Auto Significant Price Levels for ThinkorSwim

rlohmeyer

Active member
Latest revision as of 4/26/23.

Here it is on a present grid setup I use for trading Spy on the 5 minute time frame, which is what I use presently. And below the image is the share link. Any questions let me know:
NT1597J.jpg


http://tos.mx/udTF9eo

Thanks to @BenTen and many other members who helped me with my coding journey to get to a chart setup I can trade with.

Regards,
Bob
 
Last edited:
A real example from this mornings trading on the usefulness of determining the significant price levels and having a grid reference. See commentary below the image. The chart is a 1 minute chart.
OyR96eh.jpg

Arrows from left to right.
Arrow 1: On upmove, price hesitates above significant price level of 47, establishes volume support above the level (magenta marker), and the continues move up.
Arrow 2: Price reaches and exceeds the next significant level, hesitates above and continues the move to Fridays high at exactly 48. (Arrow 3).
Arrow 3: price hesitates, establishing significant price action and volume levels below the 48 price level, signaling a reversal.
Arrow 4: price then moves down to the next major price level and bounces strongly. This bounce was easily anticipated.
Arrow 5: price continues it's reversal when it tests and rejects major volume area (magenta lines) to exceed 47.50 and reach the next major level at 47. Once price exceeded 47.50 to the downside, it was a no-brainer to add to a short since 47 was both a major price level but also the exact location of the VWAP (the white line) and thus a highly visible target for the big boys. Short positions exited to watch price action, with the presumption being that at least price flop around a bit, before choosing a direction. Once it became evident through price/volume action that price was more then likely NOT going to punch through the 47/VWAP level, a new long could be established at least to 47.50. (Arrow 6) where it was presumed price would again run into difficulty.
 
I am sharing another S/R Indicator I use on my charts. The indicator draws both the Daily Close and Daily Open, but also highs and lows of bars going back quite a few bars. Price auctioning is always testing certain levels on it's travels up and down on the price grid. Of these levels, previous highs and lows are most significant, and most reliable, in my estimation, as potential reversal points along with significant price levels. I have experimented over the years with many, (trading since 1987) such as pivots, fibs, ema's etc,etc,etc; but these are always the goto along with significant price levels & high volume nodes. The image below shows a perfect example where a low from 15 days previous to today (12/21/20) stopped and reversed a 250 tick ($.01/tick) advance dead on and price reversed for a 113 tick reversal. It was clearly not the only factor, since a major Price Level was right in the area, as pointed out in the above post.
The Image below shows the relationship between the specific daily bar low from 15 daily bars previous and its location on the 1 minute chart.
TzMgBV7.jpg


PS; In any of you wizard coders can simplify my coding, please feel free. I would like to be able to specifically choose how many bars back to draw high and low lines.

Code:
#RL_SRLines
input AP = aggregationPeriod.DAY;
input Previous = yes;

def open = open(period = AP);
def high = high(period = AP);
def low = low(period = AP);

plot DOp = open(period = AP);
DOp.SetDefaultColor(Color.YELLOW);
DOp.SetPaintingStrategy(PaintingStrategy.Dashes);
DOp.HideTitle();
DOp.HideBubble();

plot YCl = close(period = AP)[1];
YCl.SetPaintingStrategy(PaintingStrategy.Dashes);
YCl.SetDefaultColor(Color.DARK_ORANGE);
YCl.HideTitle();
YCl.HideBubble();

plot DHi = high(period = AP);
DHi.SetDefaultColor(Color.Green);
DHi.SetPaintingStrategy(PaintingStrategy.Dashes);
DHi.HideTitle();
DHi.HideBubble();

plot DLo = low(period = AP);
DLo.SetDefaultColor(Color.RED);
DLo.SetPaintingStrategy(PaintingStrategy.Dashes);
DLo.HideTitle();
DLo.HideBubble();


plot H1 = if Previous == 1 then (high(period = AP)[1]) else Double.NaN;
H1.SetDefaultColor(Color.GREEN);
H1.SetPaintingStrategy(PaintingStrategy.Dashes);
H1.SetLineWeight(2);
H1.HideTitle();
H1.HideBubble();

plot L1 = if Previous == 1 then (Low(period = AP)[1]) else Double.NaN;
L1.SetDefaultColor(Color.RED);
L1.SetPaintingStrategy(PaintingStrategy.Dashes);
L1.SetLineWeight(2);
L1.HideTitle();
L1.HideBubble();

plot H2 = if Previous == 1 then (high(period = AP)[2]) else Double.NaN;
H2.SetDefaultColor(Color.GREEN);
H2.SetPaintingStrategy(PaintingStrategy.DASHES);
H2.SetLineWeight(2);
H2.HideTitle();
H2.HideBubble();

plot L2 = if Previous == 1 then (low(period = AP)[2]) else Double.NaN;
L2.SetDefaultColor(Color.RED);
L2.SetPaintingStrategy(PaintingStrategy.DASHES);
L2.SetLineWeight(2);
L2.HideTitle();
L2.HideBubble();

plot H3 = if Previous == 1 then (high(period = AP)[3]) else Double.NaN;
H3.SetDefaultColor(Color.GREEN);
H3.SetPaintingStrategy(PaintingStrategy.DASHES);
H3.SetLineWeight(2);
H3.HideTitle();
H3.HideBubble();

plot L3 = if Previous == 1 then (low(period = AP)[3]) else Double.NaN;
L3.SetDefaultColor(Color.RED);
L3.SetPaintingStrategy(PaintingStrategy.DASHES);
L3.SetLineWeight(2);
L3.HideTitle();
L3.HideBubble();

plot H4 = if Previous == 1 then (high(period = AP)[4]) else Double.NaN;
H4.SetDefaultColor(Color.GREEN);
H4.SetPaintingStrategy(PaintingStrategy.DASHES);
H4.SetLineWeight(2);
H4.HideTitle();
H4.HideBubble();

plot L4 = if Previous == 1 then (low(period = AP)[4]) else Double.NaN;
L4.SetDefaultColor(Color.RED);
L4.SetPaintingStrategy(PaintingStrategy.DASHES);
L4.SetLineWeight(2);
L4.HideTitle();
L4.HideBubble();

plot H5 = if Previous == 1 then (high(period = AP)[5]) else Double.NaN;
H5.SetDefaultColor(Color.GREEN);
H5.SetPaintingStrategy(PaintingStrategy.DASHES);
H5.SetLineWeight(2);
H5.HideTitle();
H5.HideBubble();

plot L5 = if Previous == 1 then (low(period = AP)[5]) else Double.NaN;
L5.SetDefaultColor(Color.RED);
L5.SetPaintingStrategy(PaintingStrategy.DASHES);
L5.SetLineWeight(2);
L5.HideTitle();
L5.HideBubble();

plot H6 = if Previous == 1 then (high(period = AP)[6]) else Double.NaN;
H6.SetDefaultColor(Color.GREEN);
H6.SetPaintingStrategy(PaintingStrategy.DASHES);
H6.SetLineWeight(2);
H6.HideTitle();
H6.HideBubble();

plot L6 = if Previous == 1 then (low(period = AP)[6]) else Double.NaN;
L6.SetDefaultColor(Color.RED);
L6.SetPaintingStrategy(PaintingStrategy.DASHES);
L6.SetLineWeight(2);
L6.HideTitle();
L6.HideBubble();

plot H7 = if Previous == 1 then (high(period = AP)[7]) else Double.NaN;
H7.SetDefaultColor(Color.GREEN);
H7.SetPaintingStrategy(PaintingStrategy.DASHES);
H7.SetLineWeight(2);
H7.HideTitle();
H7.HideBubble();

plot L7 = if Previous == 1 then (low(period = AP)[7]) else Double.NaN;
L7.SetDefaultColor(Color.RED);
L7.SetPaintingStrategy(PaintingStrategy.DASHES);
L7.SetLineWeight(2);
L7.HideTitle();
L7.HideBubble();

plot H8 = if Previous == 1 then (high(period = AP)[8]) else Double.NaN;
H8.SetDefaultColor(Color.GREEN);
H8.SetPaintingStrategy(PaintingStrategy.DASHES);
H8.SetLineWeight(2);
H8.HideTitle();
H8.HideBubble();

plot L8 = if Previous == 1 then (low(period = AP)[8]) else Double.NaN;
L8.SetDefaultColor(Color.RED);
L8.SetPaintingStrategy(PaintingStrategy.DASHES);
L8.SetLineWeight(2);
L8.HideTitle();
L8.HideBubble();

plot H9 = if Previous == 1 then (high(period = AP)[9]) else Double.NaN;
H9.SetDefaultColor(Color.GREEN);
H9.SetPaintingStrategy(PaintingStrategy.DASHES);
H9.SetLineWeight(2);
H9.HideTitle();
H9.HideBubble();

plot L9 = if Previous == 1 then (low(period = AP)[9]) else Double.NaN;
L9.SetDefaultColor(Color.RED);
L9.SetPaintingStrategy(PaintingStrategy.DASHES);
L9.SetLineWeight(2);
L9.HideTitle();
L9.HideBubble();

plot H10 = if Previous == 1 then (high(period = AP)[10]) else Double.NaN;
H10.SetDefaultColor(Color.GREEN);
H10.SetPaintingStrategy(PaintingStrategy.DASHES);
H10.SetLineWeight(2);
H10.HideTitle();
H10.HideBubble();

plot L10 = if Previous == 1 then (low(period = AP)[10]) else Double.NaN;
L10.SetDefaultColor(Color.RED);
L10.SetPaintingStrategy(PaintingStrategy.DASHES);
H10.SetLineWeight(2);
L10.HideTitle();
L10.HideBubble();

plot H11 = if Previous == 1 then (high(period = AP)[11]) else Double.NaN;
H11.SetDefaultColor(Color.GREEN);
H11.SetPaintingStrategy(PaintingStrategy.DASHES);
H11.SetLineWeight(2);
H11.HideTitle();
H11.HideBubble();

plot L11 = if Previous == 1 then (low(period = AP)[11]) else Double.NaN;
L11.SetDefaultColor(Color.RED);
L11.SetPaintingStrategy(PaintingStrategy.DASHES);
L11.SetLineWeight(2);
L11.HideTitle();
L11.HideBubble();

plot H12 = if Previous == 1 then (high(period = AP)[12]) else Double.NaN;
H12.SetDefaultColor(Color.GREEN);
H12.SetPaintingStrategy(PaintingStrategy.DASHES);
H12.SetLineWeight(2);
H12.HideTitle();
H12.HideBubble();

plot L12 = if Previous == 1 then (low(period = AP)[12]) else Double.NaN;
L12.SetDefaultColor(Color.RED);
L12.SetPaintingStrategy(PaintingStrategy.DASHES);
L12.SetLineWeight(2);
L12.HideTitle();
L12.HideBubble();

plot H13 = if Previous == 1 then (high(period = AP)[13]) else Double.NaN;
H13.SetDefaultColor(Color.GREEN);
H13.SetPaintingStrategy(PaintingStrategy.DASHES);
H13.SetLineWeight(2);
H13.HideTitle();
H13.HideBubble();

plot L13 = if Previous == 1 then (low(period = AP)[13]) else Double.NaN;
L13.SetDefaultColor(Color.RED);
L13.SetPaintingStrategy(PaintingStrategy.DASHES);
L13.SetLineWeight(2);
L13.HideTitle();
L13.HideBubble();

plot H14 = if Previous == 1 then (high(period = AP)[14]) else Double.NaN;
H14.SetDefaultColor(Color.GREEN);
H14.SetPaintingStrategy(PaintingStrategy.DASHES);
H14.SetLineWeight(2);
H14.HideTitle();
H14.HideBubble();

plot L14 = if Previous == 1 then (low(period = AP)[14]) else Double.NaN;
L14.SetDefaultColor(Color.RED);
L14.SetPaintingStrategy(PaintingStrategy.DASHES);
L14.SetLineWeight(2);
L14.HideTitle();
L14.HideBubble();

plot H15 = if Previous == 1 then (high(period = AP)[15]) else Double.NaN;
H15.SetDefaultColor(Color.GREEN);
H15.SetPaintingStrategy(PaintingStrategy.DASHES);
H15.SetLineWeight(2);
H15.HideTitle();
H15.HideBubble();

plot L15 = if Previous == 1 then (low(period = AP)[15]) else Double.NaN;
L15.SetDefaultColor(Color.RED);
L15.SetPaintingStrategy(PaintingStrategy.DASHES);
L15.SetLineWeight(2);
L15.HideTitle();
L15.HideBubble();

plot H16 = if Previous == 1 then (high(period = AP)[16]) else Double.NaN;
H16.SetDefaultColor(Color.GREEN);
H16.SetPaintingStrategy(PaintingStrategy.DASHES);
H16.SetLineWeight(2);
H16.HideTitle();
H16.HideBubble();

plot L16 = if Previous == 1 then (low(period = AP)[16]) else Double.NaN;
L16.SetDefaultColor(Color.RED);
L16.SetPaintingStrategy(PaintingStrategy.DASHES);
L16.SetLineWeight(2);
L16.HideTitle();
L16.HideBubble();
 
Last set of indicators I use to day trade the 5min/1min by price/volume action in conjunction with Support/Resistance. Plus commentary on todays action. PS: I only trade High Volume/ High Daily Range Stocks. These stocks supply both high institutional trading interest and high daily range for large tick moves. Also, only stocks that easily allow shorting.
The additional indicators used are:
(1) 2 Volume profiles: 1 for the full days action, and the send to identify volume nodes which are the magenta lines on the chart and are crucial for telling you where the "Center of Gravity" lies in relation to present price action. These are standard with TOS though I have modified versions to get the Gray color instead of the standard blue.
(2) @korygill Last Price Tracker....essential to watch location of present price action
(3) TOS standard VWAP setup as thick dashes (white) on my chart
irXsn9C.jpg
 
Commentary on above posted chart : How to know with high probability which way the congestion area (outlined in red) will break. By the numbers on the chart using real time price/volume action and on the chart indicators. By the numbers:
1. Price action below the days VWAP.
2. Price action below yesterdays close, the Orange line of circles included in the indicator I posted S/R Lines.
3 & 4: High Volume Nodes (No: 3) ARE BELOW THE MAJOR GRID PRICE OF 48.50 (No:4) INDICATING PRICE WANTS TO MOVE LOWER, AT LEAST TO 48.
 
And here is what happened after breaking out of the consolidation area above, which I often refer to as the "building cause" area for a strong move. By the numbers:
1. Price broke down and rejected 48
2. for a retest of 48.50, at 8AM sharp broke down (Time is a factor to be watched for reversals, the half hour points especially, with price/volume action support)
3. price then easily broke through 48, consolidated below,
4. broke through 47.50, consolidated below,
5. barely hesitated at 47,
6. and got stopped by 46.50

By the numbers folks. And I am out for the day at 8:30. Short work day. I got chopped a little in the red consolidation area, but easily made it up on the rest.
voOv7k8.jpg
 
I am posting an image to show why I feel real time Price/Volume action is a successful approach to day trading using 1 minute bars, Significant Price Levels, and other S/R Levels with High Volume/High Daily Range stocks.

All the indicators have been discussed above, with code listed, except for @tomsk Swing High/Low indicator modified by @Thomas located HERE in post 88, which I now use as a way to identify potential reversal points more easily considering other factors. I will also post code below for the modification of this indicator that I use. The Image below is highly annotated so that my comments will make sense. My comments are numbered and refer to the numbers on the Image. The Significant Price Levels are annotated and PL1, PL2, etc.

iLSpHIQ.jpg


1. This a 1 minute chart: Cyan Opening Bar high could not be exceeded to reach a Significant Price Level (PL1) above at the white line, thus marking it as Swing High per modified Swing High/Low indicator AND INDICATING MORE DOWNSIDE WAS EXPECTED . Once price exceeded and then tested PL2, price was expected to reach PL3, and a short was initiated on the retest of PL2. Short was exited at PL3. Price then immediately retested PL2, a short was initiated again, and again exited at PL3. These downside moves were supported by the fact the High Volume 5 Bar Magenta POC lines were populating below the PL2.
2. Price then exceeded the PL3 to the downside and tested Thursday's close (Orange Dots), then retested PL3 several times. A short was initiated at PL3 after a few chops and was held as price easily exceeded PL4.
3. The short was exited at PL5. A short was reinitiated when it became apparent that downside price exploration was not done. Price easily moved through PL6 on high volume.
4. Exited the short on the high volume bars just PL7. This looked like stopping volume and that a reaction higher could occur corroborated by the higher volume blowout.
5. Initiated a long on the reversal bar right above PL7 for an exit at PL6.
6. Price/Volume action immediately above PL6 foretold a likely retest of the next level down. Short initiated when the @Thomas Swing High/Low Indicator Bar above PL6 was very probably not going to be exceeded by the third bar after the Cyan Swing High Bar. The short was exited at the PL7 retest. The last trade was made Long at the red arrows above PL6 where there was a very precise High Volume Node that was tested before price continued up to the VWAP and PL5. My trade day ended around 8:10 AM PST. With some loss in chop at No 2 area, ticks gained were around 135. OK for an hour and half.

One last comment. Notice the Red Arrows in the No 4 area pointing from Red and Green S/R Lines corresponding to Daily Bars 7 and 8 days previous to the present day. Institutional Traders take note of these levels to exit/enter trades as well as watching Significant Price Levels. This is also why it was not surprising to see the move down stopped in this area, at least temporarily, with several very high volume bars. That is why I use them. There are not as important, OR AS PRECISE AS SIGNIFICANT PRICE LEVELS FOR TARGETING YOUR ENTRY/EXITS, but they do add to the possibility that a level will "stop" a move.

Code for new added indicator below:
Code:
# Swing High and Swing Low
# tomsk
# 11.18.2019
# As requested by chillc15 I have modified @RobertPayne code to include SwingHigh
# points which are now plotted in CYAN with the swing high points painted in Magenta.
# So now you have both swing high and low on your charts
# +------------------------------------------------------------+
# | Example: How to extend levels to the right of the chart |
# | Robert Payne |
# | https://funwiththinkscript.com |
# +------------------------------------------------------------+
#Code modifiedTrueRange by @rlohmeyer
# SWING LOW
# define swing low points
def length = 10;
def bn = BarNumber();
def lastBar = HighestAll(if IsNaN(close) then 0 else bn);
def offset = Min(length - 1, lastBar - bn);
def swingLow = low < Lowest(low[1], length - 1) and low == GetValue(Lowest(low, length), -offset);
def swingHigh = high > Highest(high[1], length - 1) and high == GetValue(Highest(high, length), -offset);

#Identify the very last swing low point and 10 previous
def lowPointOneBarNumber = HighestAll(if swingLow then bn else 0);
def lowPointOneValue = if bn == lowPointOneBarNumber then low else lowPointOneValue[1];

def lowPointTwoBarNumber = HighestAll(if swingLow and bn < lowPointOneBarNumber then bn else 0);
def lowPointTwoValue = if bn == lowPointTwoBarNumber then low else lowPointTwoValue[1];

def lowPointThreeBarNumber = HighestAll(if swingLow and bn < lowPointTwoBarNumber then bn else 0);
def lowPointThreeValue = if bn == lowPointThreeBarNumber then low else lowPointThreeValue[1];

def lowPointFourBarNumber = HighestAll(if swingLow and bn < lowPointThreeBarNumber then bn else 0);
def lowPointFourValue = if bn == lowPointFourBarNumber then low else lowPointFourValue[1];

def lowPointFiveBarNumber = HighestAll(if swingLow and bn < lowPointFourBarNumber then bn else 0);
def lowPointFiveValue = if bn == lowPointFiveBarNumber then low else lowPointFiveValue[1];

def lowPointSixBarNumber = HighestAll(if swingLow and bn < lowPointFiveBarNumber then bn else 0);
def lowPointSixValue = if bn == lowPointSixBarNumber then low else lowPointSixValue[1];

def lowPointSevenBarNumber = HighestAll(if swingLow and bn < lowPointSixBarNumber then bn else 0);
def lowPointSevenValue = if bn == lowPointSevenBarNumber then low else lowPointSevenValue[1];

def lowPointEightBarNumber = HighestAll(if swingLow and bn < lowPointSevenBarNumber then bn else 0);
def lowPointEightValue = if bn == lowPointEightBarNumber then low else lowPointEightValue[1];

def lowPointNineBarNumber = HighestAll(if swingLow and bn < lowPointEightBarNumber then bn else 0);
def lowPointNineValue = if bn == lowPointNineBarNumber then low else lowPointNineValue[1];

def lowPointTenBarNumber = HighestAll(if swingLow and bn < lowPointNineBarNumber then bn else 0);
def lowPointTenValue = if bn == lowPointTenBarNumber then low else lowPointTenValue[1];

# Identify the very last swing high point and 10 others
def highPointOneBarNumber = HighestAll(if swingHigh then bn else 0);
def highPointOneValue = if bn == highPointOneBarNumber then high else highPointOneValue[1];

def highPointTwoBarNumber = HighestAll(if swingHigh and bn < highPointOneBarNumber then bn else 0);
def highPointTwoValue = if bn == highPointTwoBarNumber then high else highPointTwoValue[1];

def highPointThreeBarNumber = HighestAll(if swingHigh and bn < highPointTwoBarNumber then bn else 0);
def highPointThreeValue = if bn == highPointThreeBarNumber then high else highPointThreeValue[1];

def highPointFourBarNumber = HighestAll(if swingHigh and bn < highPointThreeBarNumber then bn else 0);
def highPointFourValue = if bn == highPointFourBarNumber then high else highPointFourValue[1];

def highPointFiveBarNumber = HighestAll(if swingHigh and bn < highPointFourBarNumber then bn else 0);
def highPointFiveValue = if bn == highPointFiveBarNumber then high else highPointFiveValue[1];

def highPointSixBarNumber = HighestAll(if swingHigh and bn < highPointFiveBarNumber then bn else 0);
def highPointSixValue = if bn == highPointSixBarNumber then high else highPointSixValue[1];

def highPointSevenBarNumber = HighestAll(if swingHigh and bn < highPointSixBarNumber then bn else 0);
def highPointSevenValue = if bn == highPointSevenBarNumber then high else highPointSevenValue[1];
#
def highPointEightBarNumber = HighestAll(if swingHigh and bn < highPointSevenBarNumber then bn else 0);
def highPointEightValue = if bn == highPointEightBarNumber then high else highPointEightValue[1];

def highPointNineBarNumber = HighestAll(if swingHigh and bn < highPointEightBarNumber then bn else 0);
def highPointNineValue = if bn == highPointNineBarNumber then high else highPointNineValue[1];

def highPointTenBarNumber = HighestAll(if swingHigh and bn < highPointNineBarNumber then bn else 0);
def highPointTenValue = if bn == highPointTenBarNumber then high else highPointTenValue[1];

# ADJUST CANDLE COLORS
AssignPriceColor(if swingLow then Color.cyan else if swingHigh then Color.cyan else Color.current);
 
@rlohmeyer Bob, thanks, cannot take any credit for anything. You are a big boy, but would steer ya away from anything lower than two minutes,...there is too much noise otherwise, ya miss a lot of forest through the trees. Step back....now trade well........
 
@tradeidea20 This is a nice indicator you shared. Thanks. Since I trade 1 to 2 minute candles in the AM period only, the Auto Significant Price Levels are my favorite Support/Resistance Indicator for obvious reasons. Look at the chart today from this mornings period. I have taken off the Volume Profile which I also use to day trade and left only the important price levels and other Significant S/R levels, such as the days open, yesterday close, today high and low. The Significant Price Levels are solid white lines, the midpoints are the broken gray lines. Look at the number of times price reversed at one of these levels or flirted with it before reversing, etc. Todays EXACT high was at one of these levels, as was the days EXACT low. These lines are obviously targets for institutions. You can confirm this by watching price action on a DOM and noticing how often large volume trades occur at or near these levels. The trick is to determine what these levels are for the stock you day trade. You can always start with a whole number and watch the price action around these levels.
sCI3xQm.jpg
 
@tradeidea20 I see above that you stated the lines were not showing on your chart. You have to pick a price below the stock price you are interested in. The set the increment to reach the next significant level upward. This is what I have set on the above stock, but yours will be different depending on the price range your stock is trading in. I am not enough of a coder to have the code determine the midpoint of of yesterdays bar and then auto set the lines. I am going to try and do that, as it would then be truly more automatic. If you are a decent coder, maybe you could look at it.

fXzfwdT.jpg
 
@Thomas Thanks for the nifty code from post #12 and the suggestion about 2 minute bars, which did help reduce the noise level. The above chart is showing 2 minute bars.

Since I use a 3 bar Volume POC on my trading chart, I use this as a reference point. These high volume nodes often turn out to be close to a pullback area before continuation of a move. It forms a pattern confirming continuation of a move based on actual high volume nodes. Here is an image with the magenta lines being the high volume nodes. I use these in concert with the Price Levels, as stated elsewhere.
EVH5gYn.jpg


@tradeidea20

I have improved the code for AutoPriceLevels. It now does several things automatically based on the choice of options. The improved code is below.
yLtYiEb.jpg


If you choose to set your own start level price because the stock has gapped in overnight trade, you would choose "yes" for the "gap start" option and a specific round number price level for the "gaplevel" start. The gaplevel start price will show on the chart as a solid orange line, and 8 price levels will populate BOTH ABOVE AND BELOW THAT LEVEL along with midpoints if the "show midpoints" option is "yes".

However, if you choose "no" for the "gap start" option then the code locates the previous day nearest round number close price (regular trading session) and sets that price level as the first Price Level, shown in Orange. It then does the same thing as a above, populates 8 Price Levels above and below.

I am hoping this makes this indicator easier to use. On my chart above I have reduced my background grid so that it does not show so that I can clearly see the major levels.

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:
Thanks, some nice little improvements can mean a bigger difference. Trade ON......
 
I am sharing an indicator I use every day to day trade any instrument. It auto draws significant price levels based on your determination of the price increment at which these significant price levels occur. It allows for quick identification of these levels as price nears the levels. TOS allows setting whole number increments, but as far as I can see does not allow smaller. I have included a picture showing a stock I day trade consistently and the price increments I set that occur at $.50 levels. They are marked, and as you can see they allowed for 4 day trades on this 5 minute chart when a price level provided support/resistance. This stock is trading in the 40's, but these 1$ and $.50 levels consistently turn out to be significant both as support/resistance but also as targets. You can set the beginning price level to start, the increment amount to increase from the beginning price level, and also allow for drawing midpoints. 18 levels are drawn upward from the initial beginning price level you set. So give yourself enough "space" considering the instrument you are trading for swings in either direction. The increment levels are colored white, solid and the midpoints light gray, broken. Along with whatever other indicators you use to qualify an entry, they can be very useful.

The jpg shows the levels marked by cyan arrows, and the red circles show rejection and reversal at these levels.
Notice particularly the last red circle. Price rejected a significant price level for the 3rd time, got stuck at the midpoint, broke through and hit the next significant level before it got into congestion again.

Bob

DPVuKfr.jpg


Code:
#Auto Price Levels
#original and shared code used. @rlohmeyer
input showLines = yes;
input showMidpoints = yes;
input BPL = 00.00;
input PLI = .25;

DefineGlobalColor("PLI",color.white);
DefineGlobalColor("MP",color.light_gray);
def Pa = BPL;
def Pb = BPL + PLI;
def MP = Round((Pb-Pa)/2,2);

plot P1 = if showlines then BPL else Double.NaN;
P1.SetDefaultColor(globalColor("PLI"));
P1.HideTitle();
P1.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M1 = if showMidpoints then BPL + MP else Double.NaN;
M1.SetDefaultColor(globalColor("MP"));
M1.HideTitle();
M1.SetPaintingStrategy(PaintingStrategy.dashes);
M1.HideBubble();
plot P2 = if showlines then BPL + 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 showlines then BPL + (2 * PLI)else Double.NaN;
P3.SetDefaultColor(globalColor("PLI"));
P3.HideTitle();
plot M3 = if showMidpoints then P3 +  MP else Double.NaN;
M3.SetDefaultColor(globalColor("MP"));
M3.HideTitle();
M3.SetPaintingStrategy(PaintingStrategy.dashes);
M3.HideBubble();
P3.SetPaintingStrategy(PaintingStrategy.horizontal);
plot P4 = if showlines then BPL + (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 showlines then BPL + (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 showlines then BPL + (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 showlines then BPL + (6 * PLI)else Double.NaN;
P7.SetDefaultColor(globalColor("PLI"));
P7.HideTitle();
plot M7 = if showMidpoints then P7 + MP else Double.NaN;
M7.SetDefaultColor(globalColor("MP"));
M7.HideTitle();
M7.SetPaintingStrategy(PaintingStrategy.dashes);
M7.HideBubble();
P7.SetPaintingStrategy(PaintingStrategy.horizontal);
plot P8 = if showlines then BPL + (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 showlines then BPL + (8 * PLI)else Double.NaN;
P9.SetDefaultColor(globalColor("PLI"));
P9.HideTitle();
P9.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M9 = if showMidpoints then P9 + MP else Double.NaN;
M9.SetDefaultColor(globalColor("MP"));
M9.HideTitle();
M9.SetPaintingStrategy(PaintingStrategy.dashes);
M9.HideBubble();
plot P10 = if showlines then BPL + (9 * 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 showlines then BPL + (10 * 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 showlines then BPL + (11 * PLI)else Double.NaN;
P12.SetDefaultColor(globalColor("PLI"));
P12.HideTitle();
P2.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 showlines then BPL + (12 * 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 showlines then BPL + (13 * 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 showlines then BPL + (14 * 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 showlines then BPL + (15 * 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 showlines then BPL + (16 * PLI)else Double.NaN;
P17.SetDefaultColor(globalColor("PLI"));
P17.HideTitle();
P17.SetPaintingStrategy(PaintingStrategy.horizontal);
plot M17 = if showMidpoints then P17 + MP else Double.NaN;
M17.SetDefaultColor(globalColor("MP"));
M17.HideTitle();
M17.SetPaintingStrategy(PaintingStrategy.dashes);
M17.HideBubble();
plot P18 = if showlines then BPL + (17 * PLI)else Double.NaN;
P18.SetDefaultColor(globalColor("PLI"));
P18.HideTitle();
P18.SetPaintingStrategy(PaintingStrategy.horizontal);
Hello when i put this code in i am not getting any levels. Can you please assist?
 
@Thomas Thanks for the nifty code from post #12 and the suggestion about 2 minute bars, which did help reduce the noise level. The above chart is showing 2 minute bars.

Since I use a 3 bar Volume POC on my trading chart, I use this as a reference point. These high volume nodes often turn out to be close to a pullback area before continuation of a move. It forms a pattern confirming continuation of a move based on actual high volume nodes. Here is an image with the magenta lines being the high volume nodes. I use these in concert with the Price Levels, as stated elsewhere.
EVH5gYn.jpg


@tradeidea20

I have improved the code for AutoPriceLevels. It now does several things automatically based on the choice of options. The improved code is below.
yLtYiEb.jpg


If you choose to set your own start level price because the stock has gapped in overnight trade, you would choose "yes" for the "gap start" option and a specific round number price level for the "gaplevel" start. The gaplevel start price will show on the chart as a solid orange line, and 8 price levels will populate BOTH ABOVE AND BELOW THAT LEVEL along with midpoints if the "show midpoints" option is "yes".

However, if you choose "no" for the "gap start" option then the code locates the previous day nearest round number close price (regular trading session) and sets that price level as the first Price Level, shown in Orange. It then does the same thing as a above, populates 8 Price Levels above and below.

I am hoping this makes this indicator easier to use. On my chart above I have reduced my background grid so that it does not show so that I can clearly see the major levels.

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);
@rlohmeyer so i got it running but but on 5 min or any time frame its showing very wierd result what am i doing wrong please assist?
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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