un exemple avec un cross de MA
le signal vous donne 1 pour long et -1 pour short
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
long=0 short=0 if average[20] crosses over average[50] then long=1 endif if average[20] crosses under average[50] then short=1 endif signal=0 if long=1 then signal=1 endif if short=1 then signal=-1 endif SCREENER[long or short ](signal as "SIGNAL") |