Wiinii
Member
Previous Candle High/Low Labels & Bubbles ALL IN ONE - with custom color/transparency global options!
Hello all! I made this for myself and thought others might enjoy it as well. It includes options to turn any label or bubble on and off, and change custom colors and transparency (under Globals). Enjoy!
Hello all! I made this for myself and thought others might enjoy it as well. It includes options to turn any label or bubble on and off, and change custom colors and transparency (under Globals). Enjoy!
Code:
#Previous Candle High/Low Labels & Bubbles ALL IN ONE
#By Wiinii: https://usethinkscript.com/threads/previous-candle-high-low-labels-bubbles-for-thinkorswim.10422/
#(change color/transparency under Globals)
#Previous Candle High/Low Labels
Input ShowPreviousCandleHighLabel = yes;
Input ShowPreviousCandleLowLabel = yes;
DefineGlobalColor("PCH_Label", Color.LIGHT_GREEN);
DefineGlobalColor("PCL_Label", Color.PINK);
AddLabel(ShowPreviousCandleLowLabel, Concat ("PCL=", Round(low[1])), GlobalColor("PCL_Label"));
AddLabel(ShowPreviousCandleHighLabel, Concat ("PCH=", Round(high[1])), GlobalColor("PCH_Label"));
#Current Candle High/Low Labels
Input ShowCurrentCandleHighLabel = yes;
Input ShowCurrentCandleLowLabel = yes;
DefineGlobalColor("CCH_Label", Color.LIGHT_GREEN);
DefineGlobalColor("CCL_Label", Color.PINK);
AddLabel(ShowCurrentCandleHighLabel, Concat ("CCL=", Round(low)), GlobalColor("CCL_Label"));
AddLabel(ShowCurrentCandleLowLabel, Concat ("CCH=", Round(high)), GlobalColor("CCH_Label"));
#Previous Candle High/Low Bubbles
Input ShowPreviousCandleHighBubble = yes;
Input ShowPreviousCandleLowBubble = yes;
input bubblemoversideways = -2;
def b = bubblemoversideways;
def b1 = b + 1;
input bubblemoverupdown = 3;
DefineGlobalColor("PCH_Bubble", Color.LIGHT_GREEN);
DefineGlobalColor("PCL_Bubble", Color.PINK);
Addchartbubble(ShowPreviousCandleHighBubble and !isnan(close[b1]) and isnan(close[b]), high[b1+1], "" +round(high[b1+1]) + "", GlobalColor("PCH_Bubble"));
Addchartbubble(ShowPreviousCandleLowBubble and !isnan(close[b1]) and isnan(close[b]), low[b1+1], "" +round(low[b1+1]) + "", GlobalColor("PCL_Bubble"));
Last edited: