How ProOrder treats Sunday trading data in live algos

Forums ProRealTime English forum ProOrder support How ProOrder treats Sunday trading data in live algos

Viewing 4 posts - 1 through 4 (of 4 total)
  • #111269

    I want to call yesterday’s hourly ATR for IG’s EURUSD contract during European futures opening hours. My trading platform is set to CET, Central European Time. If I do this in backtest I can use the following code snippet to store the average true range in the variable ATR:

     

    I can then call ATR during the following day.

    Backtest will treat Sunday data as Monday. However, I am uncertain how Sunday data is treated in live algos. Will the IF-clause run on DayOfWeek=1 give me Sunday data or will it give me Friday’s data?

     

    Thanks for any help answering this question.

     

     

    #111271

    Wilko – Please use the ‘Insert PRT Code’ button when posting code. I tidied up for you. 🙂

    1 user thanked author for this post.
    #111272

    Any time the code is run on a candle with a closing time of 2200 it will store the ATR based on that candle and the previous 13. If there is a Sunday 2200 candle then it will change the value. If you want to avoid those candles then just do this:

     

    #111401

    Thanks @Vonasi for you tidying of my original post and for your suggestion! That effectively eradicates this problem (which is “invisible” in backtests).

     

    /F

Viewing 4 posts - 1 through 4 (of 4 total)

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