Trade FOREX with FXCM

  • Award-Winning Platform
  • 24/7 Customer Support
  • Trade Directly on Charts
  • Free $50K Practice Account
Register


Results 1 to 15 of 18
Page 1 of 2 1 2 LastLast

Thread: Opening Hours after the Weekend

  1. #1
    fishstick is offline Member
    Join Date
    Oct 2011
    Posts
    54

    Opening Hours after the Weekend

    I've been running an automatic strategy that continues over the weekend. However, yesterday evening (Sunday) I had a trade try to close a position at 2100 GMT. It failed, with the error message saying:

    "Market is closed. Any trading functionality is not available"

    Can I just clarify the hours of trading so I can add to the code to not operate during the closed times?

    Also, is there any difference between these hours and when strategies are able to run? If so, what are the times a strategy can run?

    Thanks,

    FishStick

  2. #2
    Ekaterina is offline Member
    Join Date
    Nov 2011
    Posts
    364
    Hi fishstick!

    FXCM offers forex trading from Sunday, starting at 5:15PM EST, until Friday at 4:55PM EST. Which means that any trading functionality is not available from Friday 4:55PM EST till Sunday 5:15PM EST. During this period your strategy is not able to open and close orders. For more information, please read this thread.

    Note: this trading period applies only to currency instruments. If your strategy is based on some CFDs, please read CFDs Product Guide.

    Best regards
    Ekaterina

  3. #3
    fishstick is offline Member
    Join Date
    Oct 2011
    Posts
    54
    Ekaterina,

    Thanks for that. That link helped with eventually finding the Weekend Trading Execution FAQ. I can code my strategy so it doesn't change or put on new orders before 1715. Is that the best way to handle keeping trades open over the weekend?

  4. #4
    Ekaterina is offline Member
    Join Date
    Nov 2011
    Posts
    364
    The startegy itself doesn't stop working during the weekends, but it can't place orders because of the lack of liquidity.
    The time you've indicated (21.00 GMT Sunday) is close to the trading opening. Which means that TS can recieve some prices but trading functionality still doesn't work. That's why you recieved the error message. In this case (to avoid confusions) it's better to code your strategy, so it stops working during the period from Friday 4:55PM EST to Sunday 5:15PM EST.

  5. #5
    fishstick is offline Member
    Join Date
    Oct 2011
    Posts
    54
    Yeah, that's the functionality I have seen with the strategy, and it actually starts itself back up on Saturday, but didn't try and do anything until 2100 on Sunday. Is there an explanation for it trying to trade at 2100? I also have another strategy trading the H4 which tried to update an order at 2000 on Sunday, which is the wrong time for H4?

    If I make use of the core.isnontrading(), will this be sufficient to trade outside of the closed times?

    Thanks,

    FishStick

  6. #6
    Ekaterina is offline Member
    Join Date
    Nov 2011
    Posts
    364
    Hi fishstick!

    Is there an explanation for it trying to trade at 2100?
    As we discucced before there is the non-tarding period from Friday 4:55 PM (EST) to Sunday 5:15 PM (EST). During this period the trading is forbidden (not available) according to the low liquidity. Inside this period there is a weekly system maintenance period, when you can't even loging into TS. This period is aproximetly from Friday 5:00 PM (EST) to Saturday 4:00 AM (EST). Please see the table here. (Weekend Trading Execution FAQ)
    As you see there is a gap existing from aproximetly Saturday 4:00 AM (EST) to Sunday 5:15 PM (EST) when the maintenance of TS is finished, but trading functionality is still not available.
    What does it mean! During this period you may be able to login into TS and TS can recieve prices from some opened banks around the world.
    As for your startegy trying to trade at the time 21.00 GMT (= 16.00 EST), I suppose that strategy recieved some price that satisfied it's order creation parametres.

    I also have another strategy trading the H4 which tried to update an order at 2000 on Sunday, which is the wrong time for H4?
    8 PM is divisable by 4 and it's an approptiate time for the H4 period.


    If I make use of the core.isnontrading(), will this be sufficient to trade outside of the closed times?
    The better solution will be to check Offers table for the AskTradable/BidTradable status. If the status is T, it means that "The Bid price is available for trading." For all possible statuses please, read SDK User Guide.

    Best regards
    Ekaterina

  7. #7
    fishstick is offline Member
    Join Date
    Oct 2011
    Posts
    54
    Ekaterina,

    I think I get it now! The AskTradable/BidTradable explanation in the SDK User Guide suggests that after the maintenance period is finished but before 1715 EST, there is a "read only" price available to the strategy? And if other banks are moving there money around the strategies parameters can be met.

    However, still with the H4, it trades at 0200, 0600, 1000, 1400, 1800, 2200. So not at 2000. So it doesn't make sense?

    Thanks for your help,

    FishStick

  8. #8
    Ekaterina is offline Member
    Join Date
    Nov 2011
    Posts
    364
    However, still with the H4, it trades at 0200, 0600, 1000, 1400, 1800, 2200. So not at 2000. So it doesn't make sense?
    I have to suggestions for this situation.

    1) According to the hours you have written, your server time should be UTC-03:00. Please, check it at the bottom of the TS main window. If it's not so, the time of the strategy performance can be different. You can easily see it on the chart, by checking the time of the each 4H bar beginning.

    2) If your server time is UTC-03:00, it supposed to be some mistake in your strategy code.

  9. #9
    fishstick is offline Member
    Join Date
    Oct 2011
    Posts
    54
    Ekaterina,

    My server time is UTC+01:00, as I am in the UK and it is BST at the moment. My strategy trades on closure of the candles, so the times I wrote before are the closures of the candles. It has never traded off those hours before during normal trading hours, I was just wondering was there an explanation for it trading at that hour. Maybe before the BidTradable becomes T, it goes back onto the EST server times?

    Thanks, you are helping a lot with my understanding of this!

    FishStick

  10. #10
    Ekaterina is offline Member
    Join Date
    Nov 2011
    Posts
    364
    I have discussed this issue with our development team, and they promted me, that about two hours before the trade opening, strategy can recieve information fromthe server about the Friday's last closed tick price. That can be the reason why your strategy tried to perform at 20.00 UTC+1 (= 15.00 EST), that is approximately 2 hours befor trading opening.

    I hope this will be helpful for you!

    Best regards
    Ekaterina
    Last edited by Ekaterina; 05-18-2012 at 04:01 AM.

  11. #11
    fishstick is offline Member
    Join Date
    Oct 2011
    Posts
    54
    That explains it then! Thanks for all your help

    FishStick

  12. #12
    blinded is offline Member
    Join Date
    May 2012
    Posts
    11

    weekend position closed inexplicably

    Fishstick I am heartened to see you trade over the weekend.

    On a demo account I had a strategy created position held over a weekend. On monday opening it got closed at a price 25 pips away from the chart displayed bid or ask price.

    Any clues? Certainly puts a damper on my long term strategy trader....

    blinded

  13. #13
    fishstick is offline Member
    Join Date
    Oct 2011
    Posts
    54
    Blinded,

    Over the weekend, prices will still move due to economic factors eg. emergency meetings about the Euro ;-) When trading opens again, the supply/demand will have changed based on that news. Most of the time, however, there isn't a big change.

    Also, for EKaterina, going back a few posts where you suggested:

    The better solution will be to check Offers table for the AskTradable/BidTradable status. If the status is T, it means that "The Bid price is available for trading."
    This, unfortunatly doesn't work, as Bid/Ask prices come in before Trading opens. It therefore tries to execute opening/closing trades when it is unable to do so. I could hardcode the times to trade in my strategy but would have to change it when the clocks change. Is it possible to get hold of the variable that is used to give the status "Trading is Open" or "Trading is Closed" at the bottom of Trading Station?

    Thanks,

    FishStick

  14. #14
    Julius at FXCM's Avatar
    Julius at FXCM is online now DailyFX Administrator
    Join Date
    Nov 2010
    Posts
    1,628
    Hello blinded, Fishstick, and thank you for your posts!


    Is it possible for prices to update over the weekend before market open and before I am able to trade again?

    The information that Fishstick has provided is absolutely correct. As you probably already know, trading is closed over the weekend because our liquidity providers are closed, and therefore during this time there isn't any way to fill your orders. Although the market is closed, prices can still continue to fluctuate and that's what can cause gaps in the market over the weekend.

    Sunday's opening prices may or may not be the same as Friday's closing prices. At times, the prices on the Sunday open are near where the prices were on the Friday close. At other times, there may be a significant difference between Friday's close and Sunday's open. The market may gap if there is a significant news announcement or an economic event changing how the market views the value of a currency. Traders holding positions or orders over the weekend should be fully comfortable with the potential of the market to gap. One of the great things about trading at FXCM is that outside of announced major holidays, the trading hours routinely close only once a week on the weekends, which corresponds with the hours of liquidity providers. In contrast, most stock exchanges close five times each week, and can gap significantly on each day's open.

    To read more about execution risks please on the link that corresponds to your account below:



    What can I do to protect my risk from trades held over the weekend?

    Traders who fear that the markets may be extremely volatile over the weekend, that gapping may occur, or that the potential for weekend risk is not appropriate for their trading style, may simply close out orders and positions ahead of the weekend.


    Where can I find more information regarding weekend execution?

    Please click here (Weekend Trading Execution FAQ) for answers to the most frequently asked questions about weekend execution. It is important for all traders to familiarize themselves with the topics covered in the Weekend Trading FAQ (Weekend Trading Execution FAQ) page.


    Thank you again for your posts blinded and Fishstick! Please feel free to post with additional questions or contact me directly at julius@fxcm.com

    Quote Originally Posted by blinded View Post
    Fishstick I am heartened to see you trade over the weekend.

    On a demo account I had a strategy created position held over a weekend. On monday opening it got closed at a price 25 pips away from the chart displayed bid or ask price.

    Any clues? Certainly puts a damper on my long term strategy trader....

    blinded
    Quote Originally Posted by fishstick View Post
    Blinded,

    Over the weekend, prices will still move due to economic factors eg. emergency meetings about the Euro ;-) When trading opens again, the supply/demand will have changed based on that news. Most of the time, however, there isn't a big change.
    Last edited by Julius at FXCM; 06-13-2012 at 08:33 PM.
    Thank you for being a part of our trading community!

    Want to discuss how our resources can help you reach your trading goals? Add your post to join the conversation or feel free to contact us directly at help@fxcm.com!

    We look forward to hearing from you!

    FXCM Online Support

  15. #15
    fishstick is offline Member
    Join Date
    Oct 2011
    Posts
    54

    Weekend Problem

    Julian, thanks for your response about the weekend trading. Maybe you can help me with this?

    Going back a few posts where EKaterina suggested:

    The better solution will be to check Offers table for the AskTradable/BidTradable status. If the status is T, it means that "The Bid price is available for trading."
    This, unfortunatly doesn't work, as Bid/Ask prices come in before Trading opens. It therefore tries to execute opening/closing trades when it is unable to do so. I could hardcode the times to trade in my strategy but would have to change it when the clocks change. Is it possible to get hold of the variable that is used to give the status "Trading is Open" or "Trading is Closed" at the bottom of Trading Station?

    Thanks,

    FishStick

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.