// The following code is related to this timescale:10 minutes
MySMA20m = Average[20](close)
MySMA10m = Average[10](close)
c1 = (MySMA10m crosses over MySMA20m)
c2 = (MySMA10m crosses under MySMA20m)
Signalachat = c1
Signalvente = c2
If Signalachat then
PrixACHAT = Low
DRAWARROWUP(barindex,low-0)coloured(0,0,0)
Bar1 = BarIndex
endif
if Signalvente then
PrixVENTE = high
DRAWARROWDOWN(barindex,high+0) coloured(0,0,0)
Bar2 = BarIndex
endif
DRAWSEGMENT(Bar1,PrixACHAT,Bar2,PrixVENTE) coloured(0,255,0,255) STYLE(line,2)
return PrixACHAT as "Signalachat", PrixVENTE as "Signalvente"
//Hereafter is the code line to insert but How??
//DRAWSEGMENT (barindex, close, barindex[5], close[5])