Onetrade per day (help)

Viewing 3 posts - 1 through 3 (of 3 total)
  • #232505

    Dear all,

    I tried to setup a one trade per day strategy on a 5 minute chart but it does not work.

    I followed some tutorials from this tutorial and uses the oneTrade variable to keep track of trading history.

    if I remove the IF statement at line 84, pro-backtest will have several trades on a certain day.

    However, no trades are made if the condition at line 84 is kept there.

    Any ideas?

    #232507
    Wim

    Try dropping the part (minute=15….) for starters. You have already forced the timeframe to M15, no need to check whether minute=n*15. And moreover, all calculations are made for the values at the end of a candle, and the end of the 10:15 candle is 10:30 etc.

    #232509

    Please post the code, not a screenshot of it, so that it can be used. Thanks 🙂

    I suggest that you add this line (as line 77 or 82):

    then replace the condition OneTrade = 0 by OTD (or OTD = 1) in line 84.

     

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

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