Breakout and re-testing – lets build something

Forums ProRealTime English forum ProOrder support Breakout and re-testing – lets build something

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

    Hi all, in this thread i want to see if someone wants to collaborate building a certain type of system.

    Ive been playing around with a strategy, but im not sure what the best way to code it would be. I want to trade when a breakout occurs and price goes to retest the breakout level. See photo1 (sorry you need to save the photo to be able to zoom in incase you dont see/understand what ive written on the photo).

    Now lets talk about a couple of points here:

     

    1. A breakout out of a trend (a skewed line up or down) is much harder to do, obviously, because a straight line is easy to draw, just a simple highest high or lowest low or highest close or something in that nature.

    2. Period and timeframe are important. As seen in my photo some of those are 1h, some are 15m, some are 5 min. Its not always easy to spot and there is no 1 simple answer as to how many bars price will break out of, and how many bars it will take until price re-tests

    3. You will miss out on all trades where price never re-tests. Meaning you could be missing out on huge trends and swings, but i guess thats just the name of the game. Cant win em all.

     

    I made a custom version of an indicator i found on this page:

     

     

    The indicator creates a band around price on the highest high and lowest low, based on X periods, and then all of that are Y periods ago. See photo2. (in photo im using h1 = 15 and p1 = 10)

    This is just 1 way of expressing a breakout and maybe a re-test.

    Was hoping that maybe one of you might have a good idea or 2 on how to express this further/more accurate or would be interested in working on this project.

     

    Some thoughts going forward:

    Different indicator(s)

    Adding a “breakout filter” as well, combined with maybe my custom indicator here.

    How many periods?

    What timeframe(s)?

    What markets? (forex, stock indicies, stocks, metals, oil, etc.)

    multiple timeframes?

    #108600

    Hi,

    Could you pls detail what in the name of all that is good and holy does  this instruction do?

    Thanks

    #108645

    Hi,

    Could you pls detail what in the name of all that is good and holy does this instruction do?

    Thanks

    Hi!

    That is looking for the highest high of last “H1” periods, P1 periods ago..

    So lets say you want a line drawn at the highest high point of the last 20 bars. then you just write the code: hil = highest[20](high[1]) and you get a line drawn form the highest point of the last 20 candles.

    Then part 2 is the last [P1] at the end of the code which determines that i want that line drawn based on “P1” periods ago.

     

    Take a look at photo 2, the closeup of a breakout. You can clearly see that the actual “highest high” of the past 20 candles is way above the drawn line we are seeing in the photo. That is because the “highest high drawn line” you see in the photo is the highest high of the last 15 candles, 10 candles ago.

     

    In other words: We want to see the breakout to go back down to the “previous highest high” and re-test that area (Resistance now becoming support)

    #108650

    Ok, let’s try with bullish breakout.

    Test a low crosses under a previous significant highest high? with perhaps a margin error of x%?

    I might have an idea with a non-crossing template I made recently in another (french) topic: https://www.prorealcode.com/topic/codage-non-croisement-d-mm/#post-106971 : a short moving average has already crossed another slow one (could be here your highest high) and then come back to re-test it without a cross by testing the spread between them, so that you are testing an hook in the price.

     

    #108651

    Thats a good idea! Ill see if i can work on that.

    #108652

    A rough code of a rough idea: I used fractals and price retracement in % to get a breakout signal.. in fact I realize that it is adapted to a trend continuation and not really for a real breakout of a price compression zone..

     

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