I have a very noob question that should be easy to resolve. I have added all of the variables used in the plot() function just to give you more context, my question pertains to the plot() function. I want to create an alertcondition() so that whenever this plot() is executed I can set an alert for it, but i dont know how to do it.
n2 = input(12, Average Length
)
ci = (ap - esa) / (0.015 * d)
tci = ema(ci, n2)
wt1 = tci
wt2 = sma(wt1,3)
f_top_fractal(_src)=>_src[4] < _src[2] and _src[3] < _src[2] and _src[2] > _src[1] and _src[2] > _src[0]
f_bot_fractal(_src)=>_src[4] > _src[2] and _src[3] > _src[2] and _src[2] < _src[1] and _src[2] < _src[0]
f_fractalize(_src)=>f_top_fractal(_src) ? 1 : f_bot_fractal(_src) ? -1 : 0
WTFractal_topa = f_fractalize(wt2) > 0 and wt2[2] ? wt2[2] : na
plot(series = WTFractal_topa ? wt2[2] : na, title='Bearish Divergence', color=WTCol2a, linewidth=5, transp=60)
The plot basically creates a divergence on the wave (a short linear segment) when the conditions are met. This code is from the MC Bee
Indicator if you want to see it fully. I dont know how to create the alertcondition() for this can someone please help me!