REM Cet exemple calcule le MACD
MMrapide = EXPONENTIALAVERAGE[p](CLOSE)
MMlente = EXPONENTIALAVERAGE[q](CLOSE)
monMACD = MMrapide - MMlente
Ligne = EXPONENTIALAVERAGE[r](monMACD)
if monMACD[1]<0 and monMACD >= 0 Then
//crpoisement à la hausse achat
DRAWARROWUP(barindex,low) COLOURED(0,155,10)
DRAWTEXT("ACHAT", barindex, close,dialog,standard,15) COLOURED(0,155,10)
endif
if monMACD[1]>0 and monMACD <0 Then
//crpoisement à la baisse vente
DRAWARROWDOWN(barindex,low) COLOURED(155,10,0)
DRAWTEXT("VENTE", barindex, close,dialog,standard,15) COLOURED(155,10,0)
endif
RETURN monMACD - ligne AS "MACD"