Highest price

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

    I wanna backtest a open drive failure strategy. I have managed to get the time entry condition to work but can’t seem to find a way to entry only if the opening price at 15:30 is

    the highest at 16:00 since 15:30. I also wanna know if it is possible to set my target to the opening price of the 15:30 bar.

    To clarify:

    1: Is there a code to only entry the trade if 15:30 open is still the highest point in the last half hour?

    2: Is it possible to set my target to the opening price of the 15:30 bar?

    #31695

    Hi Mikael I am not sure I understand you correctly about the opening at 15:30 but for the highest price between 15:30 and 16:00 you would need to run it on a specific timeframe- let say 15 min

    it could be something like this- I didn’t test it though

    cheers Kasper

     

    #31708

    Hello! What I mean when I said opening at 15:30 is the opening price of the 15:30 bar. I look to use this strategy at the US opening in Sweden.

    I tried  to use the code you gave me and I think your are onto something but i get an error on 1 and 3. I tried to add “then after 161500 on line 1 but still gets the error.

    I will look at it more this tonight but I appreciate you reply.

    Cheers

    #31858

    Hi, it was a syntax error. I was not near PRT but wrote it from memory.. (not selling myself very well here- I know :-))

     

    try this

     

    1 user thanked author for this post.
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