Extreme weekend gaps

Forums ProRealTime English forum ProOrder support Extreme weekend gaps

Viewing 7 posts - 1 through 7 (of 7 total)
  • #163433

    Hi Nicolas,

    Trying to see if I can figure out what happens on weekend gaps? Battling to define the Friday close and Monday open. Want to use it in a hourly timeframe as a filter to either trade the Monday or not depending on the gap…

     

    #163435

    Strategy code is run at the close of a candle so with UPDATEONCLOSE your strategy cannot know until the close of a daily candle what the open value was for that candle – so you will need to use a faster time frame or DEFAULT if you want to catch the Monday opening price and place orders based on it at the market open.

    #163439

    Thanks Vonasi,

    I tried the following on the hourly tf…but it does not register the Friday close and Monday open correctly any suggestions?

     

    #163443

    Not to worry figured it out should be 20000…

    #163448

    A candle can be identified by two reference times.

    TIME = the closing time of the candle (which is also the same as the opening time of the following candle).

    OPENTIME = the opening time of the candle (which is also the same as the closing time of the previous candle).

    So the hourly candle that opens at 010000 will close at 020000 and can be referenced as either OPENTIME = 010000 or TIME = 020000

     

    It is similar with OPENDAYOFWEEK and DAYOFWEEK.

    1 user thanked author for this post.
    #163571

    Hi Vonasi, thought I had did but I just don’t seem to get it right for the code to take the close on a Friday at 230000 and compare it to the open on the Monday at 10000. Any suggestions either as a indicator or strategy on a hourly timeframe?

    #163632

    If you add this indicator to your chart it can help to clarify things:

     

    It would appear that the candle that closes at 010000 is classified as opening at 000000 on Sunday. So you should be looking for dayofweek = 0 and time = 10000.

    1 user thanked author for this post.
Viewing 7 posts - 1 through 7 (of 7 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login