ChrisMoody

CM_Pivot Points_M-W-D-4H-1H_Filtered

Famous Filtered Pivots Indicator -Many TimeFrames Available

CM_Pivot Points_M-W-D-4H-1H_Filtered

***Special Thanks to TheLark...AKA...The Coding Genius For Providing His Expertise...

***New Feature - Ability to turn On/Off Pivot Moving Average
***New Feature - Ability to turn On/Off Filtered Pivots (Explained Below)

Available Timeframes (Change In Inputs Tab):
1 Hour
4 Hour
Daily
Weekly
Monthly
Yearly

***All Features Available in Inputs Tab

-Ability to Plot just 1, or all Pivot Timeframes
-Defaults to Monthly Pivots
-Ability to turn On/Off Pivot Moving Average
-Ability to turn On/Off Filtered Pivots
-Ability to Plot S3 and R3 on 1 Hour and 4 Hour Pivots

***FILTERED PIVOTS!!!

-THIS IS A WAY TO FIND THE HIGHEST PROBABILITY MOVES
-IF CURRENT PIVOT IS GREATER THAN PREVIOUS PIVOT (INCLUDING MARKET THRESHOLD CALCULATION) THEN PIVOT , S1, & R2 PLOT
-IF CURRENT PIVOT IS LESS THAN PREVIOUS PIVOT (INCLUDING MARKET THRESHOLD CALCULATION) THEN PIVOT , S2, & R1 PLOT
-***THIS IS A WAY TO FILTER OUT PIVOTS AND ONLY PLOT THE LEVELS THAT ARE EXPECTED TO BE MAJOR SUPPORT AND RESISTANCE

***VIDEO COMING SOON WHERE i WILL GO OVER IN DETAIL THE THOUGHT PROCESS AND METHODOLOGY
Remove from Favorite Scripts Add to Favorite Scripts
//Created by ChrisMoody 11-23-14 with Special Thanks to TheLark...AKA...The Coding Genius
study(title="CM_Pivot Points_M-W-D_4H_1H_Filtered", shorttitle="CM_Pivots_Filtered", overlay=true)
pf = input(true,title="Show Filtered Pivots")
sa = input(true,title="Show Pivot Average")
sh = input(false, title="Show 1 Hour Pivots?")
sf = input(false, title="Show 4 Hour Pivots?")
sd = input(false, title="Show Daily Pivots?")
sw = input(false, title="Show Weekly Pivots?")
sm = input(true, title="Show Monthly Pivots?")
sy = input(false, title="Show Yearly Pivots?")
sh3 = input(false, title="Show R3 & S3 Only On 1 Hour & 4 Hour?")

// Classic Pivot
pivot = (high + low + close ) / 3.0
// Filter Cr
bull= pivot > (pivot + pivot[1]) / 2 + .0025
bear= pivot < (pivot + pivot[1]) / 2 - .0025
// Classic Pivots
r1 = pf and bear ? pivot + (pivot - low) : pf and bull ? pivot + (high - low) : pivot + (pivot - low)
s1 = pf and bull ? pivot - (high - pivot) : pf and bear ? pivot - (high - low) : pivot - (high - pivot)
r2 = pf ? na : pivot + (high - low)
s2 = pf ? na : pivot - (high - low)
r3 = sh3 and r1 + (high - low) ? r1 + (high - low) : na
s3 = sh3 and s1 - (high - low) ? s1 - (high - low) : na
//Pivot Average Calculation
smaP = sma(pivot, 3)

//1 Hour Pivots
htime_pivot = security(tickerid, '60', pivot[1])
htime_pivotAvg = security(tickerid, '60', smaP[1])
htime_R1 = security(tickerid, '60', r1[1])
htime_S1 = security(tickerid, '60', s1[1])
htime_R2 = security(tickerid, '60', r2[1])
htime_S2 = security(tickerid, '60', s2[1])
htime_R3 = security(tickerid, '60', r3[1])
htime_S3 = security(tickerid, '60', s3[1])

plot(sa and sh and htime_pivotAvg ? htime_pivotAvg : na, title="Hourly Pivot Average",style=cross, color=orange,linewidth=2)
plot(sh and htime_pivot ? htime_pivot : na, title="Hourly Pivot",style=circles, color=fuchsia,linewidth=2) 
plot(sh and htime_R1 ? htime_R1 : na, title="Hourly R1",style=circles, color=#DC143C,linewidth=2)
plot(sh and htime_S1 ? htime_S1 : na, title="Hourly S1",style=circles, color=lime,linewidth=2)
plot(sh and htime_R2 ? htime_R2 : na, title="Hourly R2",style=circles, color=maroon,linewidth=2)
plot(sh and htime_S2 ? htime_S2 : na, title="Hourly S2",style=circles, color=#228B22,linewidth=2)
plot(sh and htime_R3 ? htime_R3 : na, title="Hourly R3",style=circles, color=#FA8072,linewidth=2)
plot(sh and htime_S3 ? htime_S3 : na, title="Hourly S3",style=circles, color=#CD5C5C,linewidth=2)

//4 Hour Pivots
ftime_pivot = security(tickerid, '240', pivot[1])
ftime_pivotAvg = security(tickerid, '240', smaP[1])
ftime_R1 = security(tickerid, '240', r1[1]) 
ftime_S1 = security(tickerid, '240', s1[1])
ftime_R2 = security(tickerid, '240', r2[1]) 
ftime_S2 = security(tickerid, '240', s2[1])
ftime_R3 = security(tickerid, '240', r3[1]) 
ftime_S3 = security(tickerid, '240', s3[1])

plot(sa and sf and ftime_pivotAvg ? ftime_pivotAvg : na, title="4 Hour Pivot Average",style=cross, color=orange,linewidth=2)
plot(sf and ftime_pivot ? ftime_pivot : na, title="4 Hour Pivot",style=circles, color=fuchsia,linewidth=3) 
plot(sf and ftime_R1 ? ftime_R1 : na, title="4 Hour R1",style=circles, color=#DC143C,linewidth=3) 
plot(sf and ftime_S1 ? ftime_S1 : na, title="4 Hour S1",style=circles, color=lime,linewidth=3) 
plot(sf and ftime_R2 ? ftime_R2 : na, title="4 Hour R2",style=circles, color=maroon,linewidth=3) 
plot(sf and ftime_S2 ? ftime_S2 : na, title="4 Hour S2",style=circles, color=#228B22,linewidth=3) 
plot(sf and ftime_R3 ? ftime_R3 : na, title="4 Hour R3",style=circles, color=#FA8072,linewidth=3) 
plot(sw and ftime_S3 ? ftime_S3 : na, title="4 Hour S3",style=circles, color=#CD5C5C,linewidth=3)

//Daily Pivots 
dtime_pivot = security(tickerid, 'D', pivot[1])
dtime_pivotAvg = security(tickerid, 'D', smaP[1])
dtime_r1 = security(tickerid, 'D', r1[1]) 
dtime_s1 = security(tickerid, 'D', s1[1]) 
dtime_r2 = security(tickerid, 'D', r2[1]) 
dtime_s2 = security(tickerid, 'D', s2[1])

offs_daily = 0
plot(sa and sd and dtime_pivotAvg ? dtime_pivotAvg : na, title="Daily Pivot Average",style=cross, color=orange,linewidth=2)
plot(sd and dtime_pivot ? dtime_pivot : na, title="Daily Pivot",style=circles, color=fuchsia,linewidth=3) 
plot(sd and dtime_r1 ? dtime_r1 : na, title="Daily R1",style=circles, color=#DC143C,linewidth=3) 
plot(sd and dtime_s1 ? dtime_s1 : na, title="Daily S1",style=circles, color=lime,linewidth=3) 
plot(sd and dtime_r2 ? dtime_r2 : na, title="Daily R2",style=circles, color=maroon,linewidth=3) 
plot(sd and dtime_s2 ? dtime_s2 : na, title="Daily S2",style=circles, color=#228B22,linewidth=3) 

//Weekly Pivots 
wtime_pivot = security(tickerid, 'W', pivot[1])
wtime_pivotAvg = security(tickerid, 'W', smaP[1])
wtime_R1 = security(tickerid, 'W', r1[1]) 
wtime_S1 = security(tickerid, 'W', s1[1])
wtime_R2 = security(tickerid, 'W', r2[1]) 
wtime_S2 = security(tickerid, 'W', s2[1])

plot(sa and sw and wtime_pivotAvg ? wtime_pivotAvg : na, title="Weekly Pivot Average",style=cross, color=orange,linewidth=3)
plot(sw and wtime_pivot ? wtime_pivot : na, title="Weekly Pivot",style=circles, color=fuchsia,linewidth=4) 
plot(sw and wtime_R1 ? wtime_R1 : na, title="Weekly R1",style=circles, color=#DC143C,linewidth=4) 
plot(sw and wtime_S1 ? wtime_S1 : na, title="Weekly S1",style=circles, color=lime,linewidth=4) 
plot(sw and wtime_R2 ? wtime_R2 : na, title="Weekly R2",style=circles, color=maroon,linewidth=4) 
plot(sw and wtime_S2 ? wtime_S2 : na, title="Weekly S2",style=circles, color=#228B22,linewidth=4) 

//Monthly Pivots
mtime_pivot = security(tickerid, 'M', pivot[1])
mtime_pivotAvg = security(tickerid, 'M', smaP[1])
mtime_R1 = security(tickerid, 'M', r1[1])
mtime_S1 = security(tickerid, 'M', s1[1])
mtime_R2 = security(tickerid, 'M', r2[1])
mtime_S2 = security(tickerid, 'M', s2[1])

plot(sa and sm and mtime_pivotAvg ? mtime_pivotAvg : na, title="Monthly Pivot Average",style=cross, color=orange,linewidth=4)
plot(sm and mtime_pivot ? mtime_pivot : na, title="Monthly Pivot",style=circles, color=fuchsia,linewidth=5)
plot(sm and mtime_R1 ? mtime_R1 : na, title="Monthly R1",style=circles, color=#DC145C,linewidth=5)
plot(sm and mtime_S1 ? mtime_S1 : na, title="Monthly S1",style=circles, color=lime,linewidth=5)
plot(sm and mtime_R2 ? mtime_R2 : na, title="Monthly R2",style=circles, color=maroon,linewidth=5)
plot(sm and mtime_S2 ? mtime_S2 : na, title="Monthly S2",style=circles, color=#228B22,linewidth=5)

//Yearly Pivots
ytime_pivot = security(tickerid, '12M', pivot[1])
ytime_pivotAvg = security(tickerid, '12M', smaP[1])
ytime_R1 = security(tickerid, '12M', r1[1])
ytime_S1 = security(tickerid, '12M', s1[1])
ytime_R2 = security(tickerid, '12M', r2[1])
ytime_S2 = security(tickerid, '12M', s2[1])

//Yearly Pivots Plots
plot(sa and sy and ytime_pivotAvg ? ytime_pivotAvg : na, title="Yearly Pivot Average",style=cross, color=orange,linewidth=4)
plot(sy and ytime_pivot ? ytime_pivot : na, title="Yearly Pivot",style=cross, color=fuchsia,linewidth=6) 
plot(sy and ytime_R1 ? ytime_R1 : na, title="Yearly R1",style=cross, color=#DC143C,linewidth=6) 
plot(sy and ytime_S1 ? ytime_S1 : na, title="Yearly S1",style=cross, color=lime,linewidth=6) 
plot(sy and ytime_R2 ? ytime_R2 : na, title="Yearly R2",style=cross, color=maroon,linewidth=6) 
plot(sy and ytime_S2 ? ytime_S2 : na, title="Yearly S2",style=cross, color=#228B22,linewidth=6)
I heard a webinar that said the Camarilla pivots were used by major banks for intra-day trading. Is this one similar and/or do we have it on the community. I searched in the search box but I could not find it.
Reply
ChrisMoody PRO Alphaoptions
#1 That's not true. That was the Host of the Webinar creating value for what they were showing. Traders for Institutions use different type of Indicators for Day Trading Entries...I will be introducing those soon.

If you search for pivots and use the Standard one provided by TradingView I'm 99% sure in the inputs tab you can change to Camarilla.

I've met two traders who I know make money...and they use Camarilla as a breakout strategy. Remind me and I will show you how they use them sometime.
+1 Reply
TASAVANT Alphaoptions
Major banks are not allowed to day trade...fyi
Reply
True and Not True...

Major Banks have different "Divisions" that can Day Trade with Money the Banks don't have to keep on hand to guarantee customer accounts. So the Banks just can't discretionary Trade with money that insures customer deposits. They can and do own separate entities where they "Trade" with the Banks Profits.

While the "Term" isn't exactly correct...Most people use "Major Banks" loosely and include "Goldman Sachs" in that definition. Who of course can and does Day Trade.
+1 Reply
Thanks Chris, I use classic pivots and its just amazing so far, I am waiting to see your video tutorial on your thought process and methodology to use this tool. Thanks a lot.
Reply
Thanks Gus...I'll post the links when I'm done recording...will probably finish during Thanksgiving
Reply
Great indicator, Chris! Never knew classic pivot averages are so useful.
Reply
hey moody,how can I get this indicator,average pivot ?
Reply
ChrisMoody PRO MarketsMaker
Very Simple...Many Options. Watch second video titled Importing Custom Indicators.

http://videos.tradingview.com/
Reply
MarketsMaker ChrisMoody
ok.Thanks
Reply
Chris, thank you very much for your work! I would like to ask you if pivot works also with Heiken Ashi candlestik. Thanks
Reply
They should be accurate within about 99% if your using Weekly, Monthly...Daily would be a little less accurate...Heik candles don't show the accurate opening price.

That's why on the chart above I coded CM_Heik Candles ... The plot the same colors Heik candles would...but they use the true Open, High, Low, Close of traditional candles/bars. I highly recommend that indicator...Heikinashi candles are great...but most people don't realize that they make other indicators less accurate. Take a look at my codes for the link...or run a search in the PineScript Library.
Reply
papigna PRO ChrisMoody
Thank You Chris
Reply
No Problem
Reply
here is the link...b/c I also released a modified Heik...and that is not the one you want.

CM Heikin-Ashi Candlesticks_V1
Reply
Thanks Chris .looks amazing as usual. Is there any way to hide the long,too many pivot price markings on the top of the chart next to the CM-PIVOTS_FILTERED?
Reply
ChrisMoody PRO FrancisFrango
Not Currently...they are working on it.
Reply
Will there video of this system?
Reply
I am reading Javier H.Paz's book "The forex trading manual" which has an very profitable daily fx trading strategy based on pivots.

his pivot calculation starts from GMT0:00. at one second past that point, the pivot line for the next 24 hours can be calculated and drawn on a platform chart. The pivot calculations are in line with the floor pivot point calculation. it includes the m lines in addition to the r lines and s lines. Please advise how to adjust your pivot indicator to show this?
Reply
To adjust the indicator I would need to create a custom session. Before doing this I would need to know the precise rules of the Strategy. 99% of published Strategies work for a specific period of time...a specific type of market...etc I can test the strategy and if valid I'll be happy to make the template.

If you don't want to publish the Strategies rules here then PM me. If the Strategy is Valid I'll gladly buy the book to give the author his fair dues. But I have so many strategies that really are valid strategies I'm not going to buy a trading book and spend my time reading it when from my experience 99% aren't valid.

Your call...but thanks for publishing the comment.
+1 Reply
Hey Chris, have you made the video about this indicator yet? I was unable to find it. Thanks!!
Reply
ChrisMoody PRO moneymaking
I've recorded a couple....After initially recording the first video was way too long...People don't want to sit through a 30 minute or a hour video...So I'm recording in 10 minute segments covering a specific topic...so it will be easy for people to reference if they want to go back and re watch a specific topic. I've had so many requests for these videos I just want to record a series that I can keep posted for a long time without having to redo them.
+3 Reply
moneymaking ChrisMoody
Alright, Thank you so much!!
Reply
clubie ChrisMoody
I think you don't have to worry about the length of the video at all :). People don't mind watching it if it worth it and in this case, it definitely worth it.
Reply
goooddd Thanks
Reply
ChrisMoody PRO ersoytoptas
No problem...Thanks for the comment
+2 Reply
I really like this indicator! Been using it a lot in combination with some other stuff and it has really boosted the performance. I have been trying to modify it a little and have totally failed at getting it figured out. Instead of using the Daily Pivot that is based on NY times, is Pine Script capable of doing the calculation based on a specific hour open and close (specifically London)? I'm only interested in the daily London for my initial entry and then use various other time frames for targets and stops. I've tried a couple different things but have had no luck getting it to work on Pine Script. I run daypivot.lua on Marketscope, and thought maybe that code would give me a clue on how to do it on Pine Script but couldn't really figure out a way which allows a variable market open time. My end goal is to have the London Pivot calculated and then be able to run some alerts off that.
Reply
JRG sandpipertrader
Chris - Are the" how to use" videos up yet..I can not fide them. THX
Reply
Dear Chris! i am new in this site. i am interested in your pivot subjects .how could i use your indies for MT4 platform?
Thankyou
Reply
See answer a few comments below
Reply
Hi! Big fan of your scripts, i have learned so much about pine thanks to you :) Is there any way in this script to only draw the current session pivot?
Reply
Also, i'm struggling in finding the link to your webinairs...
Reply
Yes...Take a look at all of my Scripts. I wrote one a while back. I believe I even gave you the ability to use Daily Pivots on Intra-Day or you could chose 4 hour, 2 hour etc.

Just click on my picture and there will be a dropdown of Published Scripts...If you can't find it let me know.
Reply
hye chriss, sorry for asking very noob questions.. how can i use ur script for the moving average & heiken ashi here into my mt4 platform?.. is there anywhere in my mt4 i can paste this script to work? might someone here can highlight & show me the way.. thanks guys
Reply
Respectfully...We only support TradingView here. Hope you understand. Although the code is open sourced...so it would be a easy conversion.
Reply
JamesBrown PRO ChrisMoody
I like to use the 4 h pivots and I noticed that it will chart R 1,2, and 3, but only chart S 1 and 2. It's missing support 3 pivot. I made sure that everything is checked to be used, and it is. I just doesn't plot for some reason.
Reply
ChrisMoody PRO JamesBrown
Nice find. I'm finding two problems...The one you mentioned...and also if Filtered pivots are turned on/off it affects the value of R3 and I'm sure it would S3. I'll take a look later.
Reply
ChrisMoody PRO JamesBrown
Here is a quick Fix of your initial problem.

Go to Line 64 and where it says plot currently the first 2 letters are sw - change the sw to sf ....This will plot S3 on 4H Pivots.

***Note...on 1 hour and 4 hour if you use S3 and/or R3 Don't check Filtered Pivots. If filtered pivots is checked then R3 and S3 can be the wrong value. When I have time to take a look and fix this...I'll update the whole code.
+1 Reply
JamesBrown PRO ChrisMoody
Thanks Chris.
Reply
Hi Chris, I find this filtered pivots very useful. Thanks alot..
I was wondering if there is a way to hide/turn off historical pivots like the option in built-in pivot indicator..
+1 Reply
aries1998 swordmaker
yeah , i think too many historical pivots makes the chart a little bit hard to read.
Reply
ChrisMoody PRO swordmaker
Agree. At the time I coded this I specifically asked and the capability wasn't there. It may be now...I'll have to check.
Reply
swordmaker ChrisMoody
Great! Thanks..
Reply
Hi Chris. Could u please send me the link to the video to use this indicator. Thanks
Reply
Where do i download the indicator? Do i have to put the above code in MQL editor, i have never done any of that sort of ting!!
Reply
sawyer.lachlan justinmcnabb
Press "/" when you are at your chart. Type in "cm_pivot" and click on the first one that comes up, it will be applied to your chart. Be sure to click on the name of the indicator, not the details or settings boxes on the far right.
Reply
ChrisMoody PRO sawyer.lachlan
I'm just coming back to TradingView .... I didn't know they had implemented that feature..Very useful...thanks for the info
Reply
@ChrisMoody, Man I thought you died lol
Reply
@ChrisMoody, Also, I can't seem to get S2 and R2 to come up on the hourly. Just have 1 and 3 - missing in between. Any ideas?
Reply
This looks great, but the pivot points move when you zoom in and out. https://www.youtube.com/watch?v=J4SZGrgzDaY

Got it set up for 4H pivots as dots and daily pivots as lines, but everything is moving as zoom in and out!!
Reply
Where do I enter the above script for the pivots indicator on MT4?
Reply
hi chris, I am really glad your amazing indicator. I have a short question and I hope, you will have a time to answer it.

I use camarilla pivots and I noticed that pivots are not stay on constant value in real time market, their end points change up to current candle. How can I keep them on constant value. let me give u an example of my part of formula

s3 = WeekClose - (WeekHigh - WeekLow) * 1.1 / 4
BUY = security(tickerid, Pivots_Time_Frame, s3)
Rule = low <= BUY
plotshape(Rule, style=shape.triangleup, color=green, location=location.belowbar, text='BUY')

Best


Reply
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
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