Three Line Break Indicator

Forums ProRealTime English forum ProOrder support Three Line Break Indicator

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

    Hi,

    I am trying to code up a trading strategy based on the Three Line Break price style on the chart but am getting stuck at the first hurdle. When using assisted creation I click on the chart to add a condition and it comes up with the following error “The price style you have selected is not available for this code, please choose a different price style”.

    I assume this means I have manually create the style within the code in Probacktest when I am coding up the strategy itself and then refer to this in the rest of the code ? If so, can someone point me in the right direction as to how to code up the Three Line Break pricestyle ? I’ll try and learn how to do the rest of the coding myself from reading the manuals and the forums but just need help on this to get started.

    Many thanks

    #6604

    Hello manel,

    It is possible actually to code automated strategy with this price representation with the assisted creation tool.

    However, it is possible to include the code of this representation directly into your code, but it means that you’ll have to deal with programming and not the assisted creation tool.

    Someone post this code into another thread about the three line break:

    If you tell me what is all about your strategy, maybe I could help you more 🙂

     

    #6611

    Thanks very much for the code Nicolas. I am going to test this code out further and see if it resembles the actual chart itself, at the moment I’m getting errors so am obviously doing something wrong but I will keep at it.

    So like I thought, I’d have to include this chart type directly into the code. What I am looking to do initially is to code up the following  :

    • Create the (a) line break chart – variable (a) is the number of lines to draw (in the default case on prt charts it’s 3 but can be anything depending on timeframes of the chart.)
    • Look for eg. 2/3/4/5 etc (b) consecutive up (green) or down (red) bars to fully form – variable (b) is number of bars to form and observe before trading
    • Then at the open of the next bar go long or short in the direction of that trend with an attached x take profit (preferably trailing) and x stop loss. A total stop loss also needs to be applied when 2/3/4/5 bars (variable (c)) in the opposite direction have formed ie an established reversal of the current trend.

    Am not sure what the results  will be so this is just an initial idea and the code will need to be tweaked in order to accommodate different markets. But once I get a simple working version I can refine it more.

    Also, I would like to create a simple screener that I can apply to equities, indices etc which tells me in real time when my target 3/4/5 bullish/bearish (a) line break bars have formed in any particular market. Not sure if this is also possible separately.

    Many thanks for your help, it is much appreciated.

     

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