This indicator code apply a Laguerre filter to the Rate Of Change of price within the last “vPeriod”.
It could be assimilated as a Relative Strength Index (RSI) oscillator because of use of price difference of the ROC formula.
Since a Laguerre filter is used to filter market noises, this oscillator better react to the price change than a typical RSI. The oscillator is made to spot the center of the price, for mean reverting purpose (trade market overbought and oversold levels) or trend change with the middle level crosses (level 50 for this technical oscillator).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
//PRC_Laguerre ROC | indicator //16.11.2016 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //converted from Metatrader4 version // --- parameters // vPeriod = 5 // gamma = 0.5 L0A = L0 L1A = L1 L2A = L2 L3A = L3 if barindex>vPeriod then rROC = (((Close - Close[vPeriod]) / Close[vPeriod]) + Pointsize) L0 = ((1 - gamma)*(rROC)) + (gamma*L0A) L1 = - gamma *L0 + L0A + gamma *L1A L2 = - gamma *L1 + L1A + gamma *L2A L3 = - gamma *L2 + L2A + gamma *L3A CU = 0 CD = 0 if (L0 >= L1) then CU = L0 - L1 else CD = L1 - L0 endif if (L1 >= L2) then CU = CU + L1 - L2 else CD = CD + L2 - L1 endif if (L2 >= L3) then CU = CU + L2 - L3 else CD = CD + L3 - L2 endif if (CU + CD <> 0) then LROC = CU / (CU + CD) endif endif RETURN LROC as "Laguerre ROC", 0 as "0 level", 0.25 as "0.25 level", 0.5 as "0.5 level", 0.75 as "0.75 level", 1 as "1 level" |
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hello Nicolas,
I would like to ask you about another indicator derivated from ROC and that I am sure you know, the Smoothed Rate of Change, developped by Fred G. Schutzman and mentioned by Alexander Elder in” Trading for a living”. I looked in different places but it seems they’re using not exactly the same formula to calculate it. I am using bellow’s one. Is it correct?
Many thankd in advance.
Carlos.
media=ExponentialAverage[13](close)
Signal=ROC[21](close)
ROCAL=signal/media*100
Return ROCAL as \"ROC Alisado\"
I don’t know really, just like you I found a lot of different formulas there and there on the internet. You can open a new request in the probuilder section of the forum and we will investigate and centralize informations there, thank you.
Thanks a lot Nicolas.
I posted it.
Carlos.
hello Nicolas
how can i get this indicator
i tried copy and paste the code but i didn’t work