@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.
@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.
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);