Camarilla Pivots (D,W,M) Secrets of a Pivot Boss

Primarily for equities as no provision has been made to control the timing at which the open close high low are determined, indeed, I see no straightforward mechanism to do so in Pinescript.

Development aided by: but with the entirely different calculations presented in "Secrets of a Pivot Boss" by Franklin Ochoa. And far cleaner and less-redundant code.

To trade the indicator, watch the H3,H4,H5 and L3,L4,L5 bars. There are two built-in strategies. Depending on pivot width, sell at H3 and buy at L3 with stop at H4/L4 or above. For strongly trending environments: buy at H4, cover at H5--similarly for downtrends.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Hi Ian ,thank you for developing such a good indicator,
can you please check why we do not get the current day levels?
it takes around 30 min to load them and in the first 15-20 min when the market opens, we do not have them.
Is this smth that you have limited yourself?
+5 Reply
Ian_Carsen Time_Oracle
@Time_Oracle, that may be because the data is not real time? The code is taking the value of the previous data (daily, weekly, monthly bar) so maybe the new bar has to start being formed before this works. Maybe you can improve it, see the section about "barmerge.lookahead_on" here: https://www.tradingview.com/pine-script-docs/en/v4/essential/Context_switching_the_security_function.html
Time_Oracle Ian_Carsen
@Ian_Carsen, I found a solution ,if go to daily and you click in the level,it will show as dots.not ideal but its a work around.thank you for the reply
+1 Reply
Thank you for sharing.
+3 Reply
can u please extend the time frame yearly.. it would be more helpfull
Sir can please add next day calculation on this formula
Ian, Can we set this to start calculations using pre-market data rather than just start-of-day?
Hello Ian, Thank you for this ... Can I confirm if "H1" is similar to "R1" and L1 is akin to "S1" that most other pivot point systems use ?
Thank you so much
Ian_Carsen Bleuwhale1983
@Bleuwhale1983, That is exactly correct!
Bleuwhale1983 Ian_Carsen
@Ian_Carsen, Thank you so very much for this script, and the clarification... also, I'm wondering if we can use pre-market data instead of just regular market ones?
Home Stock Screener Forex Screener Crypto Screener Economic Calendar About Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out