Tarea técnica
I want you to create an indicator that will be giving me notification anytime price of the current candle is about to touch or actually touch the upper band, middle band, lower band, the upper or lower trendline, or touches the 200 EMA, closes above or below it,
Conditions for giving notifications
code a simple indicator from the Bollinger bands indicator, EMA 200, and an autotrendline indicator (I will send the source code too). I want notifications from both previous candle and the current candle (index 0). The current candle is the most important
Candle 0 (or price) should notify anytime:
(a) candle 0 is a few pips (to be defined in inputs) to reach the 200 EMA from below
(b) it is a few pips to reach the 200 EMA from above or below.
(c) anytime candle 0 actually touches the 200 EMA
(d) anytime candle 1 closes below or above the 200 EMA. Indicator should specify if it is below or above.
For the Bollinger bands, indicator should notify anytime:
(a) candle 0 (or price) is a few pips from reaching the upper band
(b)candle 0 (or price) is a few pips from reaching the lower band
(c) candle 0 (or price) is a few pips from reaching the middle band from above or below
Still on Bollinger bands, indicator should notify anytime:
(a) Candle 1 closes above the upper band
(b) candle1 high is above the upper band but it closed below the upper band
(c) candle 1 closes below the lower band
(d)candle1 low is below the lower band but it closed above the lower band.
Candle 1 closes below or above the middle band. Indicator should specify if candle1 closes below or above the middle band.
For the Autotrendline indicator, the indicator to be made should notify me anytime the Autotrendline redraw itself. This is because it automatically redraws itself anytime a new higher high or new lower low is formed. This Autotrendline has two trendlines. The upper and the lower trendline. At any point in time, each trendline will connect two or more candles highs or two lower lows in a straight line.
Conditions for notifications:
(a) Anytime the upper trendline is redrawn, immediately after candle1 closes (because of a new higher high) then the indicator should notify me.
(b) for the lower trendline, anytime it is redrawn, after candle1 closes, and because it is a new lower low, then the indicator should notify me.
(c) Also, it's possible that 3 or 4 or more candles will be touching and be closing on or above the (RISING)lower trendline. This simply means that price is on uptrend and so, as each candle1 lower wick continue to touch this lower trendline or they keep closing on the lower trendline, the indicator should keep giving me notification. Same thing for the upper trendline if candle1 highs keep touching the upper trendline or closing on the upper trendline, indicator should keep giving notification. This simply means that price is respecting the trendline and not breaking it.
(d) Now Remember, a trendline can ONLY BE REDRAWN if there's a new higher high or lower low. If not, price will continue to oscillate between the two trendlines and there will be no need for any notification.
I have uploaded the Autotrendline indicator source code along with this order & the Autotrendline indicator file. You can always get the normal Bollinger bands indicator and also plot the 200 EMA yourself. I would have added support and resistance indicator to complete it but I don't know if you will be able to combine the four together. I just wanted a single indicator from these three indicators namely the Bollinger bands indicator, Autotrendline indicator and the 200 EMA.
But remember, the most important is knowing the position of the current candle (index 0) anytime it touches any of the above. This is what I can't code myself. I've been trying my best with eabuilder but it's the current candle that I don't know how to go about it. Let me know if you can do it. Thanks