Time problem in "breakout" strategy.

Forums ProRealTime English forum ProOrder support Time problem in "breakout" strategy.

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

    Hi Traders,

    I am new to the ProReal Time software as well as coding. I am working on a basic Breakout strategy to get started. I have some problems with setting the breakout time correctly and it seems like the the “HIGH” and “LOW” are 10 minutes before my settings in the code. Example below the breakout time is set between 09:00 and 09:30 but when running the backtest it seems to take the high and low 08:50 – 09:20. Accept for that it seems to be working. there can only be 1 trade per day and the TP and SL are set value. Please comment if you see anything alse that could be improved when it comes to coding. I know this strategy doesnt deliver any great result at this point, but right now I am just interesting in learning the ProReal Time coding.

    Thanks!

     

     

    #65722

    To write code, please use the <> “insert PRT code” button to make code easier to read and understand. Thanks.

    Roberto

    #65726

    TIME refers to the Close of the candlesticks, you can use OPENTIME instead.

    For 1 trade each day, you can use the code provided in this topic: trade only once per day.

    (there are also a lot of other topics in forums about it!).

    #65729

    Maybe the LOW’s and HIGH’s before 090000 are not broken from 090000 and 093000!

    Add these two lines after line 35 to debug their values and identify what the issue might be:

     

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