I think the problem is in your CALLed indicators, since this one works (on Dax, 5 minutes):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"
1 user thanked author for this post.