How to identify clean range to the left hand side of the chart

 


I am trying to code an expert advisor that runs on simple price action, If price breaks above the recent resistance with clean range to the left hand side, open a buy position. Could somebody help me in trying to code the bit that identifies the clean range to the left ?

 
DroidM: If price breaks above the recent resistance with clean range to the left hand side, 

Until you can state your requirements in concrete terms, it can not be coded.

  1. How do you define “recent resistant?” Your image looks like the highest close.

  2. How do you define “clean range?” Your image looks like last 4-15 bars. But If it is that range, why didn't you open on the last green bar?

Help you with what? You haven't stated a problem, you stated a vague want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
          No free help (2017)

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum (2018)

We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
          No free help (2017)

 
William Roeder #:

Until you can state your requirements in concrete terms, it can not be coded.

  1. How do you define “recent resistant?” Your image looks like the highest close.

  2. How do you define “clean range?” Your image looks like last 4-15 bars. But If it is that range, why didn't you open on the last green bar?

Help you with what? You haven't stated a problem, you stated a vague want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
          No free help (2017)

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum (2018)

We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
          No free help (2017)

Thanks for the reply, I would just like someone to guide me even if code is not provided. A bullish candle followed by a bearish candle creates resistance and once price breaks that resistance given there is clean range to the left, we execute. The range in the image is within the last 15 bars, but I would like to look through all the bars available in view on the chart

Reason: