Woodies Pivots For ThinkOrSwim

anton

New member
Hi.
There are 3 pivot indicators. If you select a month or a year in the indicator, then the lines will be min on the 1 day chart. But they are not shown on intraday charts. Can I add them somehow?

 
Solution
Here is my modified version of the TOS "WoodiesPivots" study.

My version replaces the "showOnlyToday" yes/no option with a "showOnly" drop-down for multiple options.

The drop-down gives you 3 options:
"All" - Draws pivots on every day of the chart (but not the expansion area).
"Today" - Draws pivots on today's bars only (but not the expansion area).
"Expansion Only" - Draws pivots only on the expansion area, freeing up your chart.


Link to shared indicator


I hope you find this useful.
Steve


Code:
#==# SD_WoodiesPivots_Expansion
#//# modified from the TDA built-in study by Steve Day, [2023/03/08]
#--#
#//# Description:
#..# Though WoodiesPivots is very useful, I was annoyed by the clutter it added to my charts.
#..# I didn't...
@anton If you use a 90day 5minute chart and zoom out and it will display the pivots on your chart
Screenshot (86).png


On the 2minute chart, it gets a bit ugly because 2minute charts can only be extended out to 30days:
Screenshot (85).png
 
Here is my modified version of the TOS "WoodiesPivots" study.

My version replaces the "showOnlyToday" yes/no option with a "showOnly" drop-down for multiple options.

The drop-down gives you 3 options:
"All" - Draws pivots on every day of the chart (but not the expansion area).
"Today" - Draws pivots on today's bars only (but not the expansion area).
"Expansion Only" - Draws pivots only on the expansion area, freeing up your chart.


Link to shared indicator


I hope you find this useful.
Steve


Code:
#==# SD_WoodiesPivots_Expansion
#//# modified from the TDA built-in study by Steve Day, [2023/03/08]
#--#
#//# Description:
#..# Though WoodiesPivots is very useful, I was annoyed by the clutter it added to my charts.
#..# I didn't need anything other than today's pivots, and only wanted those on the expansion area.
#..# My modification of the TD-Ameritrade study replaces the "showOnlyToday" (yes/no) with -
#..# - a "showOnly" drop-down, where you can choose from 3 drawing styles:
#..#     "All" - Draws pivots on every day of the chart (but not the expansion area).
#..#     "Today" - Draws pivots on today's bars only (but not the expansion area).
#..#     "Expansion Only" - Draws pivots only on the expansion area, freeing up your chart.
#..#
#..# I hope this makes your charts easier to read as it has mine. :)



input timeFrame = {default DAY, "2 DAYS", "3 DAYS", "4 DAYS", WEEK, MONTH, "OPT EXP", QUARTER, YEAR};
#input showOnlyToday = no;
input showOnly = { default "All", "Today", "Expansion Only" };

def highByPeriod = high(period = timeFrame)[1];
def lowByPeriod = low(period = timeFrame)[1];
def openByPeriod = open(period = timeFrame);
def closeByPeriod = close(period = timeFrame)[-1];

plot R3;
plot R2;
plot R1;
plot PP;
plot S1;
plot S2;
plot S3;

## Old..
#if showOnlyToday and !IsNaN(closeByPeriod)

## New..
if      (showOnly == showOnly."Expansion Only" and !IsNaN(close))
    or  (showOnly == showOnly."Today" and (!IsNaN(closeByPeriod) or IsNaN(close)))
    or  (showOnly== showOnly."All" and IsNaN(close))
then {
    R1 = Double.NaN;
    R2 = Double.NaN;
    R3 = Double.NaN;
    PP = Double.NaN;
    S1 = Double.NaN;
    S2 = Double.NaN;
    S3 = Double.NaN;
} else {
    PP = (highByPeriod + lowByPeriod + 2 * openByPeriod) / 4;
    R1 = 2 * PP - lowByPeriod;
    S1 = 2 * PP - highByPeriod;
    R2 = PP + R1 - S1;
    S2 = PP + S1 - R1;
    R3 = R2 + R1 - PP;
    S3 = S2 + S1 - PP;
}

PP.SetDefaultColor(GetColor(0));
R1.SetDefaultColor(GetColor(5));
R2.SetDefaultColor(GetColor(5));
R3.SetDefaultColor(GetColor(5));
S1.SetDefaultColor(GetColor(6));
S2.SetDefaultColor(GetColor(6));
S3.SetDefaultColor(GetColor(6));

PP.SetStyle(Curve.SHORT_DASH);
R1.SetStyle(Curve.SHORT_DASH);
R2.SetStyle(Curve.SHORT_DASH);
R3.SetStyle(Curve.SHORT_DASH);
S1.SetStyle(Curve.SHORT_DASH);
S2.SetStyle(Curve.SHORT_DASH);
S3.SetStyle(Curve.SHORT_DASH);

def paintingStrategy = if timeframe == timeframe.WEEK then PaintingStrategy.LINE_VS_TRIANGLES else if timeFrame == timeFrame.MONTH or timeFrame == timeFrame."OPT EXP" or timeFrame == timeFrame.QUARTER or timeFrame == timeFrame.YEAR then PaintingStrategy.LINE_VS_SQUARES else PaintingStrategy.LINE_VS_POINTS;

PP.SetPaintingStrategy(paintingStrategy);
R1.SetPaintingStrategy(paintingStrategy);
R2.SetPaintingStrategy(paintingStrategy);
R3.SetPaintingStrategy(paintingStrategy);
S1.SetPaintingStrategy(paintingStrategy);
S2.SetPaintingStrategy(paintingStrategy);
S3.SetPaintingStrategy(paintingStrategy);
 
Solution

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Thread starter Similar threads Forum Replies Date
A AMM w/Trend Pivots Questions 2
Bingy Episodic Pivots Questions 0
R ATR Pivots Questions 0
Ringandpinion Mobius Trend Pivots cloud length Questions 4
Z 2nd & 3rd Order pivots Questions 2

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
238 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top