open range strategy code – lot of success

Forums ProRealTime English forum ProOrder support open range strategy code – lot of success

This topic contains 38 replies, has 10 voices, and was last updated by avatar dillongr 7 months ago.

View all attachments
Viewing 15 posts - 1 through 15 (of 39 total)
  • #48596


    I have had a lot of success with an open range break strategy and I am trying to see if I can automate the strategy, but my limited knowledge of coding is proving to be a challenge

    I am trying to define the opening range on the 5 min, for a set period of time.  using the dax as an example:

    • open range is high and low of 5 min candles between 8am and close of the 8:55 five min candle.
    • entry is 2nd  5 min close above /below the range
    • exit is a Fibonacci expansion of, 261.8

    very simple and reliable in my intraday trading on SAF40, Dax, Dow, FTSE and US500.

    Does anyone know how you define the range?



    Hi dillongr

    try something like this for high (hh) you can also use it as an indicator by “return hh” to see that the time are in right place




    and low (ll)



    Where is your stop loss for this strategy?


    thanks Eric!

    SL is normally at the top or bottom of the range depending if you are long or short.  Price normally comes to test the 50% Fibonacci of the range before continuing on the breakout.  I also use a 15ema to confirm trend direction


    If you have a long breakout you take the bottom of the range as SL and for short the top? Sounds funny. I will program this.


    Entry condition you write the second close outside the range. Shall this two closes be consecutive?

    And tagte is the 261.8% fibs expansion. So if the range is 100 points wider you have a take profit of 261.8 points above the range top? This is far away!


    I coded this here with a profit target at the 161.8% fibo extension (that was already bad enough) and at least for the dax the result was not very promising.

    Here is the code if you want to play with it:


    1 user thanked author for this post.

    Same code as Despairs but without EMA15 and a time end for buy at 09:16, tested with 1 WF at 60% resulted in fib 1,5 on OMX 30.



    2 users thanked author for this post.

    Ooops, attached 3 times 🙂


    dont forget spread and slippage (sweden30)


    Spread was 0,9 should be ok I think, what do you mean with slippage Eric?


    Looks really good.

    Backtest with 200k .. 🙂


    about slippage on sweden30, i mean if you get a bad fill on market order or stop around the open of cash market

    but run it on demo it may not be a problem after all?





    On my computer it looks like this.?



Viewing 15 posts - 1 through 15 (of 39 total)

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