Range Breakout 5min

Forums ProRealTime English forum ProOrder support Range Breakout 5min

Viewing 6 posts - 1 through 6 (of 6 total)
  • #24219

    Hello All,
    I am new here and that is my first post. I am going through a lot of blogs and strategies for the last week and I am very impressed by the effort you guys put in this platform. I see you are are very dedicated to find profitable strategies, effective indicators, screeners etc. and help one another.
    Quickly to myself. I have a demo account at IG and do some manual and automatic trading there. I want to test one of my strategies with backtest but due to my limited coding abilities, I stuck at several points. I hope some of you guys can help me.

    Now to a part of my little strategy:
    I want to trade the breakout of a range (usually on a 5min chart).
    Rangetime: 7am-8am UK time (I have already problems to set the range constant, used a method by nicolas but unforunately works only as an indicator)
    Breakout: at toplevel +10% of Range or lowlevel – 10% of range
    Stoploss: Range/2
    Take profit: Range

    The first advice I need is to set the Range constant in the period 7am to 8am without having to call my own little created indicator.
    Second advice I need is, instead of taking profit, do a trailing stop. In case we are Long, set stop on previous low. In case we are short, set stop on previous high.

    Thank you in advance

    Oliver

    Sorry for my code, I dont know why the syntax colors are not shown.
    Just for your information: here the indicator code I used to set the range top and bottom level.

     

     

     

    #24231

    What is the code of mine you tried to find the highest/lowest values of the range?

    Did you try to GRAPH your variables to see how they were calculated and to find if they are correct?

    There are a lot of nested conditions, I think it could be reduce to less lines, there may be some conditions not correctly tested somewhere.

    #24242

    Hi Nicolas,
    Yes I want to find the highest/lowest in the range.
    I think I managed what I planned to do. But I had to use the function highest high and lowest low for the last 12 bars in a 5min chart.
    I think there is a smarter idea with intradaybarindex, where you can test the strategy throughout all timeframes without changing the code. That is why I tried to use your code unfortunately without success.

    I mangaged to reduce the code as well a bit.

    Here my new code.

     

    #24252

    I modify the code with my own breakout box code, seems to work correctly I think. Please review it.

     

    #77478

    Hello guys,
    I picked up my old topic as I had some time.
    For the range breakout before the official trading hours I used now a trailing stop approach which got posted once by Nicolas.
    Furthermore I skipped the hours around lunch and included a ADX indicator.

    It looks not as bad as I expected actually.

    If you have time, let me know what you are thinking and whether you have some ideas of improvement.

    Kind regards

    #77703

    Thanks a lot for feedback on your strategy. I made my own test and result is attached. Maybe it would benefit from the trailing stop calculated and triggered on a lowest timeframe with the new MTF capabilities.

Viewing 6 posts - 1 through 6 (of 6 total)

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