CM_Laguerre PPO PercentileRank Mkt Tops & Bottoms

Custom Code that Finds Market Tops & Bottoms!!!

CM_Laguerre PPO PercentileRank V2 Mkt Tops & Bottoms

Original Laguerre PPO code was Created by TheLark.
Special Thanks to coondawg71 and ChartArt for Great Insights

This Is Version 2 Of This Indicator that now Finds Market Tops and Bottoms.

Coming Next…Upper Indicator Pinpointing Entries Based on Price Action!!!

See Original Post Below For Detailed Information.
CM_Laguerre PPO PercentileRank - Markets Topping

Other Indicators That Show Market Bottoms Well.

CM ATR PercentileRank - Great For Showing Market Bottoms!

Great Confirming Indicator For The Williams Vix Fix

Two Trading Systems - Based on Extreme Moves!!!

Remove from Favorite Scripts Add to Favorite Scripts
//Created by ChrisMoody on 11/03/2014...Original PPO Code Created by TheLark
//Thanks to coondawg71 and ChartArt for Great Insights
//Great for Spotting Tops & Bottoms.
study(title = "CM_Laguerre PPO PercentileRank Mkt Tops & Bottoms", shorttitle="CM_Laguerre PPO PctRank Tops-Bottoms", overlay=false, precision=1)
pctile = input(90, title="Percentile Threshold Extreme Value, Exceeding Creates Colored Histogram")
wrnpctile = input(70, title="Percentile Threshold Warning Value, Exceeding Creates Colored Histogram")
Short = input(0.4, title="PPO Setting")
Long = input(0.8, title="PPO Setting")
lkbT = input(200,title="Look Back Period For 'Tops' Percent Rank is based off of?")
lkbB = input(200,title="Look Back Period For 'Bottoms' Percent Rank is based off of?")
sl=input(true,title="Show Threshold Line?")
swl=input(true,title="Show Warning Threshold Line?")

//Laguerre PPO Code from TheLark
lag(g, p) =>
    L0 = (1 - g)*p+g*nz(L0[1])
    L1 = -g*L0+nz(L0[1])+g*nz(L1[1])
    L2 = -g*L1+nz(L1[1])+g*nz(L2[1])
    L3 = -g*L2+nz(L2[1])+g*nz(L3[1])
    f = (L0 + 2*L1 + 2*L2 + L3)/6
lmas = lag(Short, hl2)
lmal = lag(Long, hl2)

pctileB = pctile * -1
wrnpctileB = wrnpctile * -1

//PPO Plot
ppoT = (lmas-lmal)/lmal*100
ppoB = (lmal - lmas)/lmal*100
//PercentRank of PPO 
pctRankT = percentrank(ppoT, lkbT)
pctRankB = percentrank(ppoB, lkbB) * -1
//Color Definition of Columns
colT = pctRankT >= pctile ? red : pctRankT >= wrnpctile and pctRankT < pctile ? orange : gray
colB = pctRankB <= pctileB ? lime : pctRankB <= wrnpctileB and pctRankB > pctileB ? green : silver
//Plot Statements.
plot(pctRankT,title="Percentile Rank Columns", color=colT, style=columns, linewidth=2)
plot(sl and pctile ? pctile : na, title="Extreme Move Percentile Threshold Line", color=red, style=linebr, linewidth=4)
plot(swl and wrnpctile ? wrnpctile : na, title="Warning Percentile Threshold Line", color=orange, style=line, linewidth=4)

plot(pctRankB,title="Percentile Rank Columns", color=colB, style=columns, linewidth=2)
plot(sl and pctileB ? pctileB : na, title="Extreme Move Percentile Threshold Line", color=lime, style=linebr, linewidth=4)
plot(swl and wrnpctileB ? wrnpctileB : na, title="Warning Percentile Threshold Line", color=green, style=line, linewidth=4)
plot(0, title="0 Line Circles Plot", style=circles, linewidth=4, color=silver)
plot(0, title="0 Line-Line Plot", style=linebr, linewidth=4, color=gray)
Well, thank you for coding all these cool indicators in the first place. I guess I speak for everyone here when I say that you are an invaluable asset to the TradingView community.
+9 Reply
That was all you guys...Alls I did was Invert the Histogram....
+1 Reply
ChartArt ChrisMoody
And that was solely coondawg71's genius simple idea. I only tested it and shared my screenshots. Thanks for creating this new version.
+1 Reply
First to thank you!
+1 Reply
I recommend to combine this script with Chris Moody's other scripts for even greater confirmation, for example:

Williams Vix Fix
CM_Williams_Vix_Fix  Finds Market Bottoms

Parabolic SAR
CM_Parabolic SAR

Triple confirmation of a market bottom:
+1 Reply
2use ChartArt
Is there a difference between parabolic sar and updated heiken trend bars changing colors?
Both look decent, heiken seems to change a bit before...
2use IvanLabrie
If you change to heiken, GANN swings show signals at different dates, so is the trend bars getting colored. I assume ppo has a different result. i seem to note myself using bar color changing on normal bars instead
Using the heiken color bars?
2use IvanLabrie
Try it - heiken and usual bars. GANN swing signals earlier on normal bars. I understand heiken makes some indicators trigger later, but im not yet home to test SAR, and this one for the difference. Generally i recently looking out to see which one of the top/bottom calling triggers at best time and on which bar type.
My Heikin Candles used on the top chart are for that reason. My Heikin candles act 100% just like normal candles in regards to other indicators...they just color the same a s Heikin-Ashi candles would.
+1 Reply
2use ChrisMoody
Thanx for your answer. As you are here, i indeed wanted to ask you this - but thought not to disturb as i dive into a lot of indicators coded by you and want to test first, then ask questions. But, yes - the heikin color indicator - was it meant for the usual bars instead of heikin? Cause it works on both, and as much as a heikin is good for the eye, i see that some indicators trigger late with that bar selected, but i have to admit i find your heikin coloring script quite useful :)

PS - and a general thanx for all the work you're doing.
it's ONLY for regular Candles/bars etc. It won't work correctly on Heikin-Ashi bars.
+1 Reply
2use ChartArt
And special thanx for pointing out sar to me - i missed and it seems to do a good job as well!
LOVE IT !!!!
Chris, thanks for sharing, Is there anywhere I can download. I get 2 errors when try to compile.
guro guro
Ignore this Chris, you can tell I'm a newbie on here
I dont believe in indicators but this one is surely changing my perspective...... good work Sir CM..
Are you going to update the script adding entry points ?
best regards.
Can I get this Indicator on THINKORSWIM platform ?
+1 Reply
First of all thanks a lot for this indicator but I'm kind of confused on how to use it so is there a guide on how to use this some where? Also when I use this I don't get those colored columns going from top to bottom like you have in your picture above to indicate the candle is that something I can turn on if so how? Also is there a best time frame to trade with this or will anyone do? Anyways thanks in advance love your Enhanced Ichimoku Cloud also it has helped me a lot I'm still new to trading so I'm still trying to learn.
United States
United Kingdom
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out