Traditional Pivot Points Indicator for ThinkorSwim

Ronin13

Member
VIP
Have searched high and low but cannot find anything akin to the standard Traditional Pivot Points indicator for ToS:

Wq1EmI9.png


Anyone have any leads, please help?

Thanks!
 

Ronin13

Member
VIP
yes i have @BenTen , ToS does have it as a default indicator. however, it is very crude (see image below) , plus the source code is inaccessible. and yes, i have tried all the indicators there, other 3 are variations of the PP

LASk6Pl.png
 

BenTen

Administrative
Staff
VIP
Try the following code:

Code:
# Traditional Pivot Points
# Assembled by BenTen at UseThinkScript.com
# Based on the formula from https://www.tradingview.com/support/solutions/43000521824-pivot-points-standard/

input aggregationPeriod = AggregationPeriod.DAY;
def HIGHprev = high(period = aggregationPeriod)[1];
def LOWprev = low(period = aggregationPeriod)[1];
def CLOSEprev = close(period = aggregationPeriod)[1];

plot PP = (HIGHprev + LOWprev + CLOSEprev) / 3;
plot R1 = PP * 2 - LOWprev;
plot S1 = PP * 2 - HIGHprev;
plot R2 = PP + (HIGHprev - LOWprev);
plot S2 = PP - (HIGHprev - LOWprev);
plot R3 = PP * 2 + (HIGHprev - 2 * LOWprev);
plot S3 = PP * 2 - (2 * HIGHprev - LOWprev);

PP.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S2.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
R3.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
S3.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
 

Bugs_Munny

New member
I am looking for the standard ToS pivot points the provide, but I would like to see the actual lines labeled S1 S2 PP R1 R2 on the right along with the price. Thank you!
 

Ronin13

Member
VIP
thanks @BenTen , gave this a spin. looks good, only the open and close timeframe does not seem to gel with futures contracts O&C.

and yes - can you please advise the code needed to label the lines S3 through R3 (as suggested by @Bugs_Munny) as well as to change line appearance? (e.g. dotted lines)
 

Similar threads

Top