As requested by @andyj on the M-Oscillator page (https://www.prorealcode.com/prorealtime-indicators/m-oscillator/), I coded this crossover screener:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Period = 14 //Number of Periods ct = close //Today's close S = 0 FOR i = 1 TO Period cp = close[i] r = (ct - cp) > 0 //R = Today's CLOSE - Previous Day's CLOSE, 1 = today > yesterday IF r = 0 THEN r = ((ct - cp) < 0) * -1 //R = Today's CLOSE - Previous Day's CLOSE, -1 = today < yesterday ENDIF s = s + r //Sum up all r's NEXT Ema5 = ExponentialAverage[5](s) //Histogram Ema3 = ExponentialAverage[3](Ema5)//M-Oscillator //Ema3b = ExponentialAverage[3](Ema3)//Signal Line Result = Ema3 CROSSES OVER 0 SCREENER[Result](close AS "Price") |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials