Could you tell me why nothing appears on my chart with this indicator and how to solve the problem ? Thank you very much. This is my first one.
indicator1 = CALL "Exemple ADX"[14]
c0 = indicator1 > 20
indicator2 = ExponentialAverage[200]
c1 = close > indicator2
c3 = close < indicator2
indicator3 = CALL "last heikin" [2, 5, 1](close)
c2 = close > indicator3
c4 = close < indicator3
vert = c0 AND c1 AND c2
rouge = c0 AND c3 AND c4
If vert then
backgroundcolor(0,255,0)
Endif
If rouge then
backgroundcolor(255,0,0)
Endif
Return vert coloured (0,255,0) as "long", rouge coloured (255,0,0) as "short"
I think the problem is in your CALLed indicators, since this one works (on Dax, 5 minutes):
indicator1 = adx[14]//CALL "Exemple ADX"[14]
c0 = indicator1 > 20
indicator2 = ExponentialAverage[200]
c1 = close > indicator2
c3 = close < indicator2
indicator3 = supertrend[3,10]//CALL "last heikin" [2, 5, 1](close)
c2 = close > indicator3
c4 = close < indicator3
vert = c0 AND c1 AND c2
rouge = c0 AND c3 AND c4
If vert then
backgroundcolor(0,255,0)
Endif
If rouge then
backgroundcolor(255,0,0)
Endif
Return vert coloured (0,255,0) as "long", rouge coloured (255,0,0) as "short"