Entries using daily bars

Forums ProRealTime English forum ProOrder support Entries using daily bars

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

    Hi All,

    I have written a strategy using daily bars to fix the entry price. I don’t think my code is working correctly can someone explain why my code took a trade at midnight when the previous day’s low had not been exceeded. Is it because at midnight it still considers Friday as the previous day? As an example trading GBPUSD on the 10 minute timetrame it took a trade at midnight(29-30th Aug)  at a price of 13104.6 but Monday low was 13059.8 whilst Friday low was 13122.0 on IG?

     

    #12449

    You should use GRAPH to see what happen. Firstly to correctly identify the Day(s)OfWeek with their good number. You could also GRAPH your BuyPrice and SellPrice variables to see if the calculation is made correctly the way you want it to.

    #12460

    Thanks for your response Nicolas, I know the “buy” and “sell” prices work correctly so it must be that at midnight Monday into Tuesday considers Friday as the previous day . This is useful information going forward as it means “Midnight is considered part of the day that is ending”. I’ve just changed the code to Flatbefore 001000 and tested the strategy and it didn’t place a trade (aithough the trade was , thankfully,profitable). I’m not yet familiar with GRAPH will read up sometime.

    Regards

    John

    #12463

    You’ll find how to use it in the documentation:

    http://www.prorealcode.com/documentation/graph/

    I also wrote a blog article: http://www.prorealcode.com/blog/debugging-probuilder-graph-instruction/

    GRAPH instruction is the only one that can be used for debugging purpose. If something is not functioning in your code, GRAPH will save you a lot of time to understand what is doing wrong.

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