a3=ExponentialAverage[8](close)
a4=ExponentialAverage[10](close)
a5=ExponentialAverage[12](close)
a6=ExponentialAverage[15](close)
a7=ExponentialAverage[30](close)
a8=ExponentialAverage[35](close)
a9=ExponentialAverage[40](close)
a10=ExponentialAverage[45](close)
a11=ExponentialAverage[50](close)
a12=ExponentialAverage[60](close)
a3 = low*1.00
a4 = high*1.00
if a2 < a1 then
if a3 < a2 then
if a4 < a3 then
if a5 < a4 then
if a6 < a5 then
if a7 < a6 then
if a8 < a7 then
if a9 < a8 then
if a10 < a9 then
if a11 < a10 then
if a12 < a11 then
DRAWTEXT("BUY", barindex, a4, SansSerif, standard,15)coloured(0,255,0)
endif
if a2 > a1 then
if a3 > a2 then
if a4 > a3 then
if a5 > a4 then
if a6 > a5 then
if a7 > a6 then
if a8 > a7 then
if a9 > a8 then
if a10 > a9 then
if a11 > a10 then
if a12 > a11 then
DRAWTEXT("SELL", barindex, a3, SansSerif, standard,15)coloured(255,0,0)
endif
Hi Nicholas, how do i end this code.? I put “return” at the end but it shows up as syntax error on the last line…
cheers
Pleidian
Anytime you use IF…. there must be a closing ENDIF.
At line 27 you only wrote ENDIF once, while you should use as many as the number of IF’s.
The same at line 42.
Then add RETURN.
cheers friends appreciate your help!