The Laguerre RSI technical indicator is a trend indicator based on a Laguerre filter.
The Laguerre indicator plots the weighted price trend line in a different window in the price graph window.
The Laguerre RSI indicator plots the weighted RSI indicator value filtered with a Laguerre filter. The gamma sensibility of the Laguerre filter is self adjusted with the “fractals energy” as the original author describes it.
This “energy” is the curve of yellow color, while the Laguerre RSI adjusted with this energy is the blue one.
Indicator translated from TOS code, requested on English forum.
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 49 50 51 52 53 54 |
//PRC_LaguerreRSI Fractals Energy | indicator //23.03.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //translated from original code from TOS (author:Mobius) // --- settings //nFE=13 //length for Fractal Energy calculation // --- end of settings // Calculations if barindex>nFE then o = (open + close[1]) / 2 hh = Max(high, close[1]) ll = Min(low, close[1]) c = (o + hh + ll + close) / 4 gamma = Log(Summation[nFE](Max(high, close[1]) - Min(low, close[1])) / (Highest[nFE](high) - Lowest[nFE](low)))/ Log(nFE) L0 = (1 - gamma) * c + gamma * L0[1] L1 = -gamma * L0 + L0[1] + gamma * L1[1] L2 = -gamma * L1 + L1[1] + gamma * L2[1] L3 = -gamma * L2 + L2[1] + gamma * L3[1] if L0 >= L1 then CU1 = L0 - L1 CD1 = 0 else CD1 = L1 - L0 CU1 = 0 endif if L1 >= L2 then CU2 = CU1 + L1 - L2 CD2 = CD1 else CD2 = CD1 + L2 - L1 CU2 = CU1 endif if L2 >= L3 then CU = CU2 + L2 - L3 CD = CD2 else CU = CU2 CD = CD2 + L3 - L2 endif if CU + CD <> 0 then lagRSI = CU / (CU + CD) else lagRSI=0 endif endif RETURN gamma coloured(200,200,0) as "gamma", lagRSI coloured(0,128,255) style(line,2) as "Laguerre RSI self adjusting", 0.2 style(dottedline,1) as "oversold level", 0.8 style(dottedline,1) as "overbought 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
Merci Nicolas pour cet indicateur,
Comme pour le RSI, J’aimerais pouvoir ajouter deux lignes max/min pour le gamma (basées sur l’historique des valeurs) afin de déterminer si l’on est en phase de trend exhaustion/range exhaustion. Comment faire?
Nicolas
C’est à dire ? Une détection des derniers plus haut et plus bas du gamma ? (la ligne jaune).
Si l’indicateur n’est pas normé (ou atteint rarement les limites), il faudrait deux lignes de séparation qui détermineraient, sur les n derniers mois, les 10 % des valeurs les plus élevés et plus basses afin de détecter automatiquement ensuite les configurations “le ressort va bientôt se détendre”/”le mouvement s’essouffle”. Une sorte de canal du gamma mais dont les limites horizontales dépendent de l’historique des valeurs.
Pour cela, il suffit d’intercaler ces lignes de codes à la ligne 18 (sous le calcul de gamma):
hh=highest[gammaP](gamma)*0.9
ll=lowest[gammaP](gamma)*1.1
et de remplacer la ligne 54 (RETURN) avec celle-ci :
RETURN gamma coloured(200,200,0) as \"gamma\", lagRSI coloured(0,128,255) style(line,2) as \"Laguerre RSI self adjusting\", 0.2 style(dottedline,1) as \"oversold level\", 0.8 style(dottedline,1) as \"overbought level\", hh, ll
J’ai introduit la variable “gammaP” qui permet de modifier à convenance le retour en arrière pour déterminer les résidus de la distribution du gamma entre les bornes hautes et basses de ce calcul. Il faudra donc bien entendu ajouter cette variable en externe pour la faire varier à convenance. Bon amusement 🙂
Mais j’y compte bien! Merci beaucoup Nicolas pour la solution.
Hi Nicolas, why cant the codes copy and past in to prorealttime. I want to try, but I have no time to write the updates that done by others. I think that would be positive for everyone.
Regars
Eva
Sorry I don’t understand? You can easily import any file of the library by downloading itf files and click import in prorealtime indicators list.
How can I trade with this “Yellow Energy”?
Do a Youtube search for “Revolutionary Indicators Reveal Tops & Bottoms” it explains a very similar indicator, I’m not sure if I am allowed to post videos to the forum
Hi
is there anyway to develop this for the pro scanner on daily or hourly scans. so it would create an alert just before the signals are met.
kind regards
Lee
Of course, please add a query in the proscreener forum.
C’est dommage, cette histoire d’énergie fractale bousille complètement la précision de l’indicateur original :
if barindex > 0 then
L0 = (1 – gamma) * close + gamma * L0[1]
L1 = -gamma * L0 + L0[1] + gamma * L1[1]
L2 = -gamma * L1 + L1[1] + gamma * L2[1]
L3 = -gamma * L2 + L2[1] + gamma * L3[1]
if L0 >= L1 then
CU1 = L0 – L1
CD1 = 0
else
CD1 = L1 – L0
CU1 = 0
endif
if L1 >= L2 then
CU2 = CU1 + L1 – L2
CD2 = CD1
else
CD2 = CD1 + L2 – L1
CU2 = CU1
endif
if L2 >= L3 then
CU = CU2 + L2 – L3
CD = CD2
else
CU = CU2
CD = CD2 + L3 – L2
endif
if CU + CD 0 then
lagRSI = CU / (CU + CD)
else
lagRSI = 0
endif
endif
RETURN lagRSI as “LR”