Pivot points are probably one of the greatest leading indicator for any and all asset classes, used since the advent of the public/private markets, granted it uses previous days data, it is an awesome leading indicator that produces guide rails for future trading periods. This project was born out of the necessity to have the additional fibonacci levels and to have pivot point for the current day to appear for pre and post market hours. The latter inspiration was later added by the TV team at my request and it was greatly appreciated.
This tool can be handy in any trading process from short-long term trades or timeframes, multiple timeframe analysis, trend trades, swing trades, position trades, and momentum trades.
The tool can also be a great addition to any part of your processes especially if you are looking for instances of confluences on higher or lower timeframes.
"Pivot points are a technical indicator that is used to determine the levels at which price may face support or resistance. The Pivot Points indicator consists of a pivot point (PP) level and several support (S) and resistance (R) levels." - TV Help Center
We have found the Fibonacci levels to be more respected/self-fulfilling than other versions of the pivot point indicator. (Find example in code notes below)
Note: (If you all love the flexibility of this code then we will be happy to replicate it using the other pivot point formulas. Just drop us a private message.)
TV has a great default version of the indicator but it lacks dynamism. (The compile time is relatively similar to the default indicator also)
Some of the features that we loved from the default we have been able to carry over after many many difficult iterations:
-- Showing historical pivots (probably the most difficult feature add up until some recent pine script features additions)
-- Automatic pivot timeframe creation...meaning for appropriate pivot lines populate for daily, weekly, monthly, and yearly timeframe periods
-- Labels that do not lay on top of the lines as labels normally do
By dynamism we are referring to the following abilities/features:
-- Ability for the next day's pivot to populate before the next market open (pivots populate when the market time changes over to the next day)
-- Ability to turn on/off every support and/or resistance line...sometime you just want to see the resistance levels if it is an up kind of day
-- Ability to have the support/resistance lines to be different colors
-- Ability to change what the pivot point itself if based on
-- The additional fibonacci ratios
Default Ratios + Matching Labels:
38.2% - S1/R1
61.8% - S2/R2
100% - S3/R3
Additional (Mid) Ratios + Matching Labels:
23.6% - SA/RA
50% - SB/RB
76.4% - SC/RC
127.2% - S4/R4
141.4% - S5/R5
161.8% - S6/R6
200% - S7/R7
Code Notes and Insight:
pivot point = (high + low + close) / 3
support lines = pivot - (prevhigh - prevlow) * 0.236
resistance lines = pivot - (prevhigh - prevlow) * 0.236
The high, low and close is based on the indicator resolution which by default is set too auto due to smaller timeframes not being able to pull back enough data at time when attempting to show multiple periods of pivots.
The increased resolution is determined by the following parameters (similar to the default TV indicator):
-- for intraday resolutions up to and including 15 min, DAY (1D) is used
-- for intraday resolutions 26m, 30m, and 1H then WEEK (1W) is used
-- for 3H, 4H and daily resolutions MONTH (1M) is used
-- for weekly and monthly resolutions, 12-MONTH (12M) is used
-- Tooltips have been added on the labels as subtle references in case you forget what a specific level's formula is
-- Remember to set your changes as default in the input menu after changing the colors of lines or default populated levels
-- Number of pivots back has been limited to 20 given that indicators are only able to populate 500 lines and labels but 20 historical periods should be more than enough for sufficient use
---------
Past performance is not indicative of future performance.
Please PM us to obtain access to any of our indicators.
Please PM or comment if you run into any bugs within your use or any questions about functionality.