Auto Significant Price Levels for ThinkorSwim

@Town7425
The Magenta Dots are the 15 minute volume Point of Control (POC). You can get POC's for any time period by using the Volume Profile indicator. I use a Simplified version of the standard TD Ameritrade one without so many choices for modifications.
Here is a link
http://tos.mx/b7VL3hG

Regards,
Bob
 

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

Simplifying code to make life easier

This price level study is super useful when scalping.. but adjusting the settings is very tedious the way it is set up

Is there a way to combine the below code so that all the 'P' levels (plot start) can be adjusted together as well as the 'M' levels (midpoint)?

As it stands you have to go in and adjust each individual level, thanks for any help, cheers


Original Code

#Auto Price Levels
#@rlohmeyer shared on UseThinkscript
input gapStart = no;
input gaplevel = 00;
input PLI = 1.00;
input showMidpoints = yes;

DefineGlobalColor("PLI",color.white);
DefineGlobalColor("MP",color.light_gray);
def cl = close(period = AggregationPeriod.DAY);
def ST = Round(cl[1], 0);
def START = if gapstart == 0 then ST else if gapstart == 1 then gaplevel else Double.NaN;
def MP = PLI/2;

#Plot START
plot PLS = START;
PLS.SetDefaultColor(color.orange);
PLS.HideTitle();
PLS.SetPaintingStrategy(PaintingStrategy.horizontal);

#START Up
plot MUS = if showMidpoints then START + MP else Double.NaN;
MUS.SetDefaultColor(globalColor("MP"));
MUS.HideTitle();
MUS.SetPaintingStrategy(PaintingStrategy.dashes);
MUS.HideBubble();
plot P2 = if START > 0 then START + PLI else Double.NaN;
P2.SetDefaultColor(globalColor("PLI"));
P2.HideTitle();
P2.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M2 = if showMidpoints then P2 + MP else Double.NaN;
M2.SetDefaultColor(globalColor("MP"));
M2.HideTitle();
M2.SetPaintingStrategy(PaintingStrategy.dashes);
M2.HideBubble();
plot P3 = if START > 0 then START + (2 * PLI)else Double.NaN;
P3.SetDefaultColor(globalColor("PLI"));
P3.HideTitle();
P3.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M3 = if showMidpoints then P3 + MP else Double.NaN;
M3.SetDefaultColor(globalColor("MP"));
M3.HideTitle();
M3.SetPaintingStrategy(PaintingStrategy.dashes);
M3.HideBubble();
plot P4 = if START > 0 then START + (3 * PLI)else Double.NaN;
P4.SetDefaultColor(globalColor("PLI"));
P4.HideTitle();
P4.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M4 = if showMidpoints then P4 + MP else Double.NaN;
M4.SetDefaultColor(globalColor("MP"));
M4.HideTitle();
M4.SetPaintingStrategy(PaintingStrategy.dashes);
M4.HideBubble();
plot P5 = if START > 0 then START + (4 * PLI)else Double.NaN;
P5.SetDefaultColor(globalColor("PLI"));
P5.HideTitle();
P5.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M5 = if showMidpoints then P5 + MP else Double.NaN;
M5.SetDefaultColor(globalColor("MP"));
M5.HideTitle();
M5.SetPaintingStrategy(PaintingStrategy.dashes);
M5.HideBubble();
plot P6 = if START > 0 then START + (5 * PLI)else Double.NaN;
P6.SetDefaultColor(globalColor("PLI"));
P6.HideTitle();
P6.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M6 = if showMidpoints then P6 + MP else Double.NaN;
M6.SetDefaultColor(globalColor("MP"));
M6.HideTitle();
M6.SetPaintingStrategy(PaintingStrategy.dashes);
M6.HideBubble();
plot P7 = if START > 0 then START + (6 * PLI)else Double.NaN;
P7.SetDefaultColor(globalColor("PLI"));
P7.HideTitle();
P7.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M7 = if showMidpoints then P7 + MP else Double.NaN;
M7.SetDefaultColor(globalColor("MP"));
M7.HideTitle();
M7.SetPaintingStrategy(PaintingStrategy.dashes);
M7.HideBubble();
plot P8 = if START > 0 then START + (7 * PLI)else Double.NaN;
P8.SetDefaultColor(globalColor("PLI"));
P8.HideTitle();
P8.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M8 = if showMidpoints then P8 + MP else Double.NaN;
M8.SetDefaultColor(globalColor("MP"));
M8.HideTitle();
M8.SetPaintingStrategy(PaintingStrategy.dashes);
M8.HideBubble();
plot P9 = if START > 0 then START + (8 * PLI)else Double.NaN;
P9.SetDefaultColor(globalColor("PLI"));
P9.HideTitle();
P9.SetPaintingStrategy(PaintingStrategy.horizontal);

#STARTDown
plot MUD = if showMidpoints then START - MP else Double.NaN;
MUD.SetDefaultColor(globalColor("MP"));
MUD.HideTitle();
MUD.SetPaintingStrategy(PaintingStrategy.dashes);
MUD.HideBubble();
plot P10 = if START > 0 then START - PLI else Double.NaN;
P10.SetDefaultColor(globalColor("PLI"));
P10.HideTitle();
P10.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M10 = if showMidpoints then P10 - MP else Double.NaN;
M10.SetDefaultColor(globalColor("MP"));
M10.HideTitle();
M10.SetPaintingStrategy(PaintingStrategy.dashes);
M10.HideBubble();
plot P11 = if START > 0 then START - (2 * PLI) else Double.NaN;
P11.SetDefaultColor(globalColor("PLI"));
P11.HideTitle();
P11.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M11 = if showMidpoints then P11 - MP else Double.NaN;
M11.SetDefaultColor(globalColor("MP"));
M11.HideTitle();
M11.SetPaintingStrategy(PaintingStrategy.dashes);
M11.HideBubble();
plot P12 = if START > 0 then START - (3 * PLI)else Double.NaN;
P12.SetDefaultColor(globalColor("PLI"));
P12.HideTitle();
P12.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M12 = if showMidpoints then P12 - MP else Double.NaN;
M12.SetDefaultColor(globalColor("MP"));
M12.HideTitle();
M12.SetPaintingStrategy(PaintingStrategy.dashes);
M12.HideBubble();
plot P13 = if START > 0 then START - (4 * PLI)else Double.NaN;
P13.SetDefaultColor(globalColor("PLI"));
P13.HideTitle();
P13.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M13 = if showMidpoints then P13 - MP else Double.NaN;
M13.SetDefaultColor(globalColor("MP"));
M13.HideTitle();
M13.SetPaintingStrategy(PaintingStrategy.dashes);
M13.HideBubble();
plot P14 = if START > 0 then START - (5 * PLI)else Double.NaN;
P14.SetDefaultColor(globalColor("PLI"));
P14.HideTitle();
P14.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M14 = if showMidpoints then P14 - MP else Double.NaN;
M14.SetDefaultColor(globalColor("MP"));
M14.HideTitle();
M14.SetPaintingStrategy(PaintingStrategy.dashes);
M14.HideBubble();
plot P15 = if START > 0 then START - (6 * PLI)else Double.NaN;
P15.SetDefaultColor(globalColor("PLI"));
P15.HideTitle();
P15.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M15 = if showMidpoints then P15 - MP else Double.NaN;
M15.SetDefaultColor(globalColor("MP"));
M15.HideTitle();
M15.SetPaintingStrategy(PaintingStrategy.dashes);
M15.HideBubble();
plot P16 = if START > 0 then START - (7 * PLI)else Double.NaN;
P16.SetDefaultColor(globalColor("PLI"));
P16.HideTitle();
P16.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M16 = if showMidpoints then P16 - MP else Double.NaN;
M16.SetDefaultColor(globalColor("MP"));
M16.HideTitle();
M16.SetPaintingStrategy(PaintingStrategy.dashes);
M16.HideBubble();
plot P17 = if START > 0 then START - (8 * PLI)else Double.NaN;
P17.SetDefaultColor(globalColor("PLI"));
P17.HideTitle();
P17.SetPaintingStrategy(PaintingStrategy.horizontal);
 
Last edited by a moderator:
@profitmaya

I don't trade futures. Only spy w/ options and leveraged etf's.

Whether the bar is tick or cents or whatever, the grid is about significant price levels. Determine the correlative significant levels for the futures you are trading, generally whole numbers. With spy the correlative for /ES would be 10 for the increment and 50 for the major. That would make the midpoints 5. This is if you are trading a bar that roughly correlates to a 1 minute chart within a couple of minutes either way during the day session. The grid will not show on the overnight. Here is the latest iteration of the Auto Grid Lines I use on my 1 minute spy chart.

http://tos.mx/AfEFMFg

Screen shot below
CgbUUG8.jpg




Regards,
Bob
 
@rlohmeyer First of all just want to say thanks for the great indicator. Maybe my brain isn't fully awake yet since I haven't gotten the coffee yet, but for some reason when looking back at prior trading days with the updated code in post #1, the plot is starting at 1100 instead of plotting at 0400. Would love to be able to compare previous trading days, not sure what I'm missing. Plots well in real-time, but running into issues when trying to review. Any help would be appreciated.
 
@YoloEZ

No, your brain is not playing tricks. Because the indicator is live it determines it's "starting" price for the grid based on the open price of each bar divided by the interval you set for the "Major" levels. As such, it then plots 20 levels of "increments" AND "midpoints" of the increments both above and below that "major level", which as I said is recalculated on the open of the next bar, whether tick or time or whatever.

Thus, depending on the bar time frame you are using (or correlative tick bar, etc) the high and low for one day price action could be considerably different than a previous day and the grid "space" will be different. You may simply have to use TOS built in capacity to set a specific price level grid amount on the chart based on the "increment" you chose, and use that to compare previous days. This was built not to compare days but to trade one day based on "inherently" significant price levels.

Hope this helps,
Bob
 
@profitmaya

I don't trade futures. Only spy w/ options and leveraged etf's.

Whether the bar is tick or cents or whatever, the grid is about significant price levels. Determine the correlative significant levels for the futures you are trading, generally whole numbers. With spy the correlative for /ES would be 10 for the increment and 50 for the major. That would make the midpoints 5. This is if you are trading a bar that roughly correlates to a 1 minute chart within a couple of minutes either way during the day session. The grid will not show on the overnight. Here is the latest iteration of the Auto Grid Lines I use on my 1 minute spy chart.

http://tos.mx/AfEFMFg

Screen shot below
CgbUUG8.jpg




Regards,
Bob
@rlohmeyer may I know what are those magenta lines and how to use them?
 
@rlohmeyer may I know what are those magenta lines and how to use them?
The Magenta lines are based on your choice of what you consider to be "Major" significant price levels. For instance on the Spy I consider the "Increment" of significance to be 1$, which is how it is set. I consider the "Major" level of price significance to be 5$ and that is how these are set. They are Magenta and as price approaches these levels I look for a struggle between big money Bulls and Bears, and thus a lot of price volatility, especially around the 10$ levels. There is also a dashed magenta line at the midpoints of Major Levels.

On the sample chart I posted you can see the strong rejection of $395 and a small trend away from the price level. This happened a number of times during that trading session. And in fact the Yellow Dotted Lines at $395.14 was the open of the day. Another significant level.

Regards,
Bob
 
Last edited:
stevesawyer1338

You need to widen the prices in your price axis. Click on the price axis so that you can see a double sided arrow then move your mouse upward to widen the axis. You can also make the increments larger in the settings.

Look at the chart above in post 124. The space between the lines is larger and you only see increments from 397 to 394.5.

Bob
 
I think we are looking at two different price actions. I am looking for major top and bottom price action over a long period show the trend. This is to help show when you be ready to sell or buy. New Chart . I would love it if you could automate the chart. Thank you.
 
Last edited by a moderator:
I think we are looking at two different price actions. I am looking for major top and bottom price action over a long period show the trend. This is to help show when you be ready to sell or buy. New Chart . I would love it if you could automate the chart. Thank you.
I am sorry I do not understand your question. The chart you posted as an illustration is a 30 minute chart. The grid has to be setup based on it's usefulness relative to the time frame you are considering. For example, on daily chart for spy I would setup the Increment as 5 and the Major as 10.
On a 5 minute chart I would set it with the Increment at 1 and the Major at 5. The grid is only useful if you consider certain price levels to be INHERENTLY useful.

You can see what I am referring to in post 124 where the chart is setup with the Increment at 1 and the Major at 5 (in magenta). Those levels acted as support and resistance in real time price action.

Regards,
Bob
 
Hi Bob,

Thank you for your contribution. Very enlightening and most helpful.
I have a similar type of situation, but I would like to combine it with yours (which I can do by merging code) and I would like to add some enhancements (if possible...which I don't seem to be able to do). I wonder if you might ponder it and see if you have any suggestions as to how to achieve what I'm after.
I have included an image and a link to the indicator that I've been using for the purposes of this discussion. I did not write the indicator and I can't take any credit for it, although I have probably modified it and have #commented out my attempts to achieve the enhancements (as you'll see in the code).

Ultimately, although SPY/ES seem to have a love affair with the day's RTH open, previous day close and the half gap, I've noticed lately that it also respects things like "the open from 3 days ago" or "the daily half gap from 6 days ago"...or whenever it may be retouched for the first time.

My initial thought was to see simply if I could get yesterday's half gap to plot on today's chart, but now I'm wondering if there is a way to carry all of these previous days' opens, closes and halfgaps forward to future days?? .... or maybe just the previous 10 or 20 days worth.

Thanks for having a look. Let me know if you have any questions.

Note: on the charts and on the image, the cyan dashed line represents the daily RTH open, the yellow line represents the half gap and the gray dashed line represents the previous day's close.

ps... for those who say that you have too many lines, I have this comment: My charts contain what is included here PLUS a lot more... pivot points, volume profile, vwap, intraday-vwap and mobius supply/demand zones. Some have said to me also that there is TOO MUCH to look at and I tell them .... yes, studying it will probably make you have an epileptic fit, but if you just pay attention to the most current candle, when price comes to one of these "areas of significance" then you'll at least know that something might just happen there (like a reversal) or that you've reached a target and might consider closing your position. It all is a lot to watch to be sure (as I have the same setup on /ES, SPY and /VX) but it sure is helpful.

https://tos.mx/KEyE1v3

@rlohmeyer , @diazlaz

 
Last edited:
@RickK

Here is simple code to extend any line into the future from a specific starting date. It gives you 2 inputs for the date and the price you want to extend. Duplicate the code and rename each plotted average for the type of line you are extending. Below is an image of yesterdays Open Price on the 5 minute Spy chart extended into today and all future days until you don't need it anymore.

Code:
input BeginDate = 20230328;
input price = 397.05;
plot AVG =  if DaysFromDate(BeginDate) >= 0
   then MovingAverage(averageType.SIMPLE, price, 1)
   else double.nan;

i0ZXxGn.jpg
 
@RickK

Here is simple code to extend any line into the future from a specific starting date. It gives you 2 inputs for the date and the price you want to extend. Duplicate the code and rename each plotted average for the type of line you are extending. Below is an image of yesterdays Open Price on the 5 minute Spy chart extended into today and all future days until you don't need it anymore.

Code:
input BeginDate = 20230328;
input price = 397.05;
plot AVG =  if DaysFromDate(BeginDate) >= 0
   then MovingAverage(averageType.SIMPLE, price, 1)
   else double.nan;

i0ZXxGn.jpg

So great! Thanks Bob!... I'll give it a whirl.

@rlohmeyer
 
@RickK

Here is simple code to extend any line into the future from a specific starting date. It gives you 2 inputs for the date and the price you want to extend. Duplicate the code and rename each plotted average for the type of line you are extending. Below is an image of yesterdays Open Price on the 5 minute Spy chart extended into today and all future days until you don't need it anymore.

Code:
input BeginDate = 20230328;
input price = 397.05;
plot AVG =  if DaysFromDate(BeginDate) >= 0
   then MovingAverage(averageType.SIMPLE, price, 1)
   else double.nan;

i0ZXxGn.jpg

Hmmm... will the code above only work with the line "input price = nnn.nn;" ?
I used the following code

plot hg_plot = hg; #today's half gap
hg_plot.SetStyle(Curve.LONG_DASH);
hg_plot.SetDefaultColor(Color.yellow);
hg_plot.SetLineWeight(3);

plot hg_future = if DaysFromDate(BeginDate) >= 0
then MovingAverage(averageType.SIMPLE, hg, 1)
else double.nan;
hg_future.SetStyle(Curve.LONG_DASH);
hg_future.SetDefaultColor(Color.yellow);
hg_future.SetLineWeight(1);


and got nothing plotted into the future. Am I correct that I will need to manually enter the new price inputs daily?.... or (hopefully) is there another way?...where the code will simply pick up on the plot that was established before and then extend it off into the future?

Thanks!
@rlohmeyer
 
Hmmm... will the code above only work with the line "input price = nnn.nn;" ?
I used the following code

plot hg_plot = hg; #today's half gap
hg_plot.SetStyle(Curve.LONG_DASH);
hg_plot.SetDefaultColor(Color.yellow);
hg_plot.SetLineWeight(3);

plot hg_future = if DaysFromDate(BeginDate) >= 0
then MovingAverage(averageType.SIMPLE, hg, 1)
else double.nan;
hg_future.SetStyle(Curve.LONG_DASH);
hg_future.SetDefaultColor(Color.yellow);
hg_future.SetLineWeight(1);


and got nothing plotted into the future. Am I correct that I will need to manually enter the new price inputs daily?.... or (hopefully) is there another way?...where the code will simply pick up on the plot that was established before and then extend it off into the future?

Thanks!
@rlohmeyer

Turns out that the answer might be in the following thread solution. Thanks!

https://usethinkscript.com/threads/...-the-way-across-the-screen.14857/#post-121878
 
Turns out that the answer might be in the following thread solution. Thanks!

https://usethinkscript.com/threads/...-the-way-across-the-screen.14857/#post-121878

I added your hg code to the script I did in your link and replaced volp's reference with hg. See if this helps.

Screenshot-2023-03-30-083035.png

Code:
#name:  HalfGap_Open_PrevClose
input daysago = 1;
input marketOpenTime = 0930;
input marketCloseTime = 1559;
input period_day = AggregationPeriod.DAY;
input showtodayonly = no;
def begin = if IsNaN(close) then begin[1] else open(period = period_day);

##############
def Today = if GetDay() == GetLastDay() then 1 else 0;
def postmarketopentime  = if SecondsFromTime(marketOpenTime) >= 0 then 1 else 0;
def postmarketclosetime = if SecondsTillTime(marketCloseTime) >= 0 then 1 else 0;


############
def yesterdaysClose = close(period = "DAY")[1];
def prevdayclose = close(period = "DAY")[2];
def secondsFromOpen =  SecondsFromTime(marketOpenTime);
def secondsTillClose = SecondsTillTime(marketCloseTime);
def marketOpen = if secondsFromOpen >= 0 and secondsTillClose >= 0 then 1 else 0;

def RTH = if SecondsTillTime(marketCloseTime) > 0 and SecondsFromTime(marketOpenTime) >= 0 then 1 else 0;

rec regularHoursOpen = if (secondsFromOpen >= 0 and secondsFromOpen[1] < 0) or (GetDay() != GetDay()[1]) then open else regularHoursOpen[1];

def newDay = if GetDay() != GetDay()[1] then 1 else 0;

rec regHoursHigh = if newDay then high else if marketOpen then
if high > regHoursHigh[1] then high else regHoursHigh[1] else high;

rec regHoursLow = if newDay then low else if marketOpen then
if low < regHoursLow[1] then low else regHoursLow[1] else low;

def yc = if IsNaN(close) then yc[1] else if marketOpen then yesterdaysClose else Double.NaN;
def o  = if IsNaN(close) then o[1] else if marketOpen then regularHoursOpen else Double.NaN;
def hg = if IsNaN(close) then hg[1] else o + (yc - o) / 2;
#VPOC
#The study that zzz posted displays the last 5 VPOC and provides an excellent visual as to where an instrument trades relative to the cluster of VPOCs during the past several sessions. Franz uses this cluster of VPOCs to determine the probable direction of the market.

#If price action is trading very close to the cluster of VPOCs, this means that the market is in balance. Should the market trade above this cluster of VPOCs and continue to move higher from there, we may consider a buy at the bottom of the VAL (value area low). Conversely, if the market trades below the cluster of VPOCs, then we’ll be looking for a short entry.

#This is essentially a play on support and resistance. VPOC can be viewed as clusters of support (floor) or resistance (ceiling) zones. If one floor breaks, then it is likely going to trade to the next floor, etc.

#Franz's setup is detailed here http://tos.mx/mVEhr9# For more background information on the subject, read the CME Market Profile Handbook

input painthigh = 4;#Hint painthigh: 1=dots,2=dashes,3=squares,4=horizontal
def paintingStrategyhigh = if painthigh == 1 then PaintingStrategy.POINTS else if painthigh == 4 then PaintingStrategy.DASHES else if painthigh == 3 then PaintingStrategy.SQUARES else PaintingStrategy.HORIZONTAL;
input colorhigh = 0;#Hint colorhigh: 0=magenta,1=cyan,2=light-red,3=light_green,4=yellow,5=red,6=green,7=light_gray,8=gold,9=white


#def volp = reference VolumeProfile("time per profile" = "DAY", "on expansion" = no, "price per row height mode" = "TICKSIZE");
def volp = if isnan(hg) then volp[1] else hg;

def ymd = GetYYYYMMDD();
def capture  = !IsNaN(close) and ymd != ymd[1];
def dayCount = CompoundValue(1, if capture then dayCount[1] + 1 else dayCount[1], 0);
def thisDay  = (HighestAll(dayCount) - dayCount) ;

rec pivot0 = if IsNaN(close) then pivot0[1] else if thisDay == 0 then volp else pivot0[1];
plot pp0 = pivot0;
pp0.SetPaintingStrategy(paintingStrategyhigh);
pp0.SetDefaultColor(GetColor(colorhigh));
rec pivot1 = if IsNaN(close) then pivot1[1] else if thisDay == 1 then volp else pivot1[1];
plot pp1 = pivot1;
pp1.SetPaintingStrategy(paintingStrategyhigh);
pp1.SetDefaultColor(GetColor(colorhigh));
rec pivot2 = if thisDay == 2 then volp else pivot2[1];
plot pp2 = pivot2;
pp2.SetPaintingStrategy(paintingStrategyhigh);
pp2.SetDefaultColor(GetColor(colorhigh));
rec pivot3 = if thisDay == 3 then volp else pivot3[1];
plot pp3 = pivot3;
pp3.SetPaintingStrategy(paintingStrategyhigh);
pp3.SetDefaultColor(GetColor(colorhigh));
rec pivot4 = if thisDay == 4 then volp else pivot4[1];
plot pp4 = pivot4;
pp4.SetPaintingStrategy(paintingStrategyhigh);
pp4.SetDefaultColor(GetColor(colorhigh));
rec pivot5 = if thisDay == 5 then volp else pivot5[1];
plot pp5 = pivot5;
pp5.SetPaintingStrategy(paintingStrategyhigh);
pp5.SetDefaultColor(GetColor(colorhigh));
rec pivot6 = if thisDay == 6 then volp else pivot6[1];
plot pp6 = pivot6;
pp6.SetPaintingStrategy(paintingStrategyhigh);
pp6.SetDefaultColor(GetColor(colorhigh));
rec pivot7 = if thisDay == 7 then volp else pivot7[1];
plot pp7 = pivot7;
pp7.SetPaintingStrategy(paintingStrategyhigh);
pp7.SetDefaultColor(GetColor(colorhigh));
rec pivot8 = if thisDay == 8 then volp else pivot8[1];
plot pp8 = pivot8;
pp8.SetPaintingStrategy(paintingStrategyhigh);
pp8.SetDefaultColor(GetColor(colorhigh));
rec pivot9 = if thisDay == 9 then volp else pivot9[1];
plot pp9 = pivot9;
pp9.SetPaintingStrategy(paintingStrategyhigh);
pp9.SetDefaultColor(GetColor(colorhigh));
rec pivot10 = if thisDay == 10 then volp else pivot10[1];
plot pp10 = pivot10;
pp10.SetPaintingStrategy(paintingStrategyhigh);
pp10.SetDefaultColor(GetColor(colorhigh));

input showbubbles = yes;
input bubblemover = 2;
def b = bubblemover;
def b1 = b + 1;
def mover = showbubbles and IsNaN(close[b]) and !IsNaN(close[b1]);
AddChartBubble(mover, pivot0[b1], "P0", pp0.TakeValueColor());
AddChartBubble(mover, pivot1[b1], "P1", pp1.TakeValueColor());
AddChartBubble(mover, pivot2[b1], "P2", pp2.TakeValueColor());
AddChartBubble(mover, pivot3[b1], "P3", pp3.TakeValueColor());
AddChartBubble(mover, pivot4[b1], "P4", pp4.TakeValueColor());
AddChartBubble(mover, pivot5[b1], "P5", pp5.TakeValueColor());
AddChartBubble(mover, pivot6[b1], "P6", pp6.TakeValueColor());
AddChartBubble(mover, pivot7[b1], "P7", pp7.TakeValueColor());
AddChartBubble(mover, pivot8[b1], "P8", pp8.TakeValueColor());
AddChartBubble(mover, pivot9[b1], "P9", pp9.TakeValueColor());
AddChartBubble(mover, pivot10[b1], "P10", pp10.TakeValueColor());
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
453 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