Specification
Hello, I need an indicator and a scanner based on this indicator.
The indicator would draw trend lines like in the screenshot (something similar to ZigZag). The change in the direction of the trend drawing occurs when the next candle breaks, depending on the current direction, high or low of the previous candle or the rise of an inside bar, outside bar. ( image.png)
-When the next candle has a higher high and a higher low than the previous candle, the trend is drawn upwards
-When the next candle has a lower high and a lower low than the previous candle, the trend is drawn downwards
-In case of Inside bar, there is a change in the direction of the drawn trend
-In the case of the outside bar, the indicator should check whether the current candle first broke the high or low of the previous bar and draw a trend depending on it
Attached I am sending a version of the indicator on mt4 (unfortunately I do not have the source code).
Scanner is supposed to search for 1 setup and send a notification.
Setup - Action knocks out the previous bottom/peak, 3 consolidation trends are formed, where the 3rd trend knocks out a correction ( 1 consolidation trend). A notification is created when the last candle in the 3 trend is broken out. ( setup. jpg)
Action- ( green line on screen)
previous bottom - 1 dołek
1 consolidation trend- red arrow
2nd- yellow...
3rd- blue...
break of 3rd consolidation trend - purple line