Hi Steve & all,
great stuff here!
Glad to see your heads finally hitting S/R levels
Soooooo powerful indeed...
SteveHopwood wrote:
sq's indi does not appear to draw D1 s/r lines all the time, so I need to code an abort for zero value lines.
The S&R indi will only draw lines when there are any available in the past DaysBack period, which is 60 days by default.
Meaning that if PA did not get any lower (resp. higher) than current PA in the last 60 days for instance, then you won't get any "S" (resp. "R") lines.
Another thought:
sometimes there are 2 or even more D1 lines that are very close to one another.
This may make the EA trade oddly.
It would be good to display more than just 2 S and 2 R lines, perhaps increase that to be 6, to see where are the next levels;
The levels that are close enough can be seen as a "group" of S/R levels to be combined together into a single "fat" level or "S/R zone" rather than individual/unrelated levels:
S/R levels are often approached by the PA, eventually missing the previous S/R level by a few pips only, or going past that level by only a few pips, and reverse.
These are valid S/R level "re-tests", and make these areas much more powerful than untested areas for future re-tests.
The indi could actually display RECTANGLES instead of (or in addition to) FIBO objects, which would have a "Grouping Range" input that would be used to combine clusters of S/R levels into "S/R zones" rectangles.
This would leave enough space between S/R zones.
Just like NNB does it.
I will modify the S&R indicator to draw grouped S&R zones as Rectangles, and the EA can then use OBJPROP_PRICE1 and OBJPROP_PRICE2 as its high and low levels delimiters (and add buffer pips to that) instead of only OBJPROP_PRICE1 as it is the case at the moment.
Each S&R level that would not be grouped with others will still also drawn as a rectangle so that we can keep the same logic of reading the objects price1 and price2 for all drawn levels.
I'm currently debugging this change, it should be on the way soon.
Sq