Turbo VZO Simpler Trading Indicator for ThinkorSwim

Sneaky_Swings

Member
VIP
I modified the VZO so it will show signals that are within .02 of the VZO that is used by Danielle from simpler trading. Felt like it was time to give back to the community on this one as it has done so much for me. For instructions on how to use this indicator please use Simpler's resources and explanation relating to it or refer to the other VZO indicators that are posted on this site.

Link to study: http://tos.mx/PYvpPuS

Code:
declare lower;

input length = 14;
input length2 = 20;
input showvolumelabels = yes;
def VP = ExpAverage(Sign(close - close[1]) * volume, length);
def TV = ExpAverage(volume, length2);
plot VZO = 100 * VP / TV;
def "+60" = 60;
def "+40" = 40;
def "-40" = -40;
def "-60" = -60;
plot ZeroLine = 0;

VZO.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
VZO.DefineColor("Normal", Color.YELLOW);
VZO.DefineColor("OverBought", Color.RED);
VZO.DefineColor("OverSold", Color.GREEN);
VZO.AssignValueColor(if VZO < -15 then VZO.Color("OverBought") else if VZO > 15 then VZO.Color("OverSold") else VZO.Color("Normal"));
ZeroLine.SetDefaultColor(Color.YELLOW);
ZeroLine.SetStyle(Curve.SHORT_DASH);

AddCloud("+60",   "+40",   Color.RED,   Color.CURRENT);
AddCloud("-40", "-60", Color.GREEN, Color.CURRENT);
AddCloud(15, -15, CreateColor(197 , 160, 0), Color.CURRENT);

input lengthv = 50;
def Vol = volume;
def VolAvg = Average(volume, lengthv);
AddLabel(yes and showvolumelabels, Vol, if close > close[1] then Color.CYAN else Color.RED);
AddLabel(yes and showvolumelabels, VolAvg, Color.ORANGE);

Just for fun, I added volume labels that correlate to the default volumeavg study on ToS. My labels will be Cyan for green candles and red for red candles. The value of the 50-period volume avg will be yellow. Happy Trading.
 

BenTen's Watchlist + Setup + Trade Recaps

Get access to Ben's watchlist, swing trading strategy, ThinkorSwim setup, and trade examples.

Learn more

Kirix

New member
Is there a way you can add a sound/alert option for when it exits the buy/sell zone?

edit:

I think if you add this it will produce alerts.

Code:
input AlertsOn = yes;
def condition1 = VZO crosses above "+40";
def condition2 = VZO crosses below "+40";
def condition3 = VZO crosses below "-40";
def condition4 = VZO crosses above "-40";

# Alert
Alert(alertsOn and condition1, "Enter Sell Zone", Alert.BAR, Sound.Ring);
Alert(alertsOn and condition2, "Exit Sell Zone", Alert.BAR, Sound.Bell);
Alert(alertsOn and condition3, "Enter Buy Zone", Alert.BAR, Sound.Ring);
Alert(alertsOn and condition4, "Exit Buy Zone", Alert.BAR, Sound.Bell);
 

marketview

New member
In one of the videos from Simpler trading I saw this indicator at the bottom. I am wondering how is this pattern achieved.
there is two drawing in there the top and bottom and it seems to have this smooth transition with some kind of square or something.

Do anyone know what is the method used here to achieve this?

x3ZAoWb.png
 

marketview

New member
Don't waste your time. It's merely a trend indicator that is not very useful.

@Sneaky_Swings Thanks for sharing the link.
is this about my question?
im not interested in the indicator per se just how did they get that pattern as i like that and would like to use it in my own indicator as it seems easy on eye
 

marketview

New member
@marketview the "some kind of square" something is sometimes a function of a higher aggregation study displayed on a lower aggregation chart.
Can you give me a example of some similar indicator somewhere,, im trying to see how to get that kind of painting in the lower part as i can only get is square or histogram or line etc
 

MerryDay

Well-known member
VIP
@marketview a search of these forums for 'MTF' yielded over 600 results. Every kind of example you could ever want. MTF analysis should be used with the understanding if you are posting a 20min aggregation on a 5min chart, you need to wait the 20min for the candle to close, in the meanwhile repainting could occur, resulting in inaccurate results.
 

marketview

New member
@marketview a search of these forums for 'MTF' yielded over 600 results. Every kind of example you could ever want. MTF analysis should be used with the understanding if you are posting a 20min aggregation on a 5min chart, you need to wait the 20min for the candle to close, in the meanwhile repainting could occur, resulting in inaccurate results.
Sorry i did not understand what this aggregation you where talking about and MTF. i am relatively new to doing scripting in thinkscript

I finally found how this pattern is being done ,, apparently its using the function AddCloud function that is the plotting it like the screenshot i posted . i am going to check out how to use that function
 

helloadamlee

New member
VIP
Sorry i did not understand what this aggregation you where talking about and MTF. i am relatively new to doing scripting in thinkscript

I finally found how this pattern is being done ,, apparently its using the function AddCloud function that is the plotting it like the screenshot i posted . i am going to check out how to use that function
Not sure if this is the same thing but has that style. https://tos.mx/MCtema6

Code:
#Name:             ChrisStoplight
#Programmed By:    Chris Ball (xxx) on #1/31/09
#Added Choppiness and Squeeze Indicator by [email protected] Lounge
#Added FW_Mobo_Basic
#Modified to add/change indicators
declare lower;
input showlabels = no;
input showclouds = yes;
input rsilength  = 5;
def c = close;
def h = high;
def l = low;
def o = open;

#MOMENTUM
input lengthmo = 5;
def Momentum = c - c[lengthmo];
plot mopos = if Momentum >= 0 then 3 else 2;
mopos.SetDefaultColor(Color.GREEN);
plot moneg = if Momentum < 0 then 3 else 2;
moneg.SetDefaultColor(Color.RED);
AddCloud(if showclouds then mopos else Double.NaN, if showclouds then moneg else Double.NaN, Color.GREEN);

#CCI
input lengthcci = 13;
def pricecci = c + l + h;
def linDev = LinDev(pricecci, lengthcci);
def CCI = if linDev == 0 then 0 else (pricecci - Average(pricecci, lengthcci)) / linDev / 0.015;
plot cci1 = if CCI >= 0 then 4 else 3;
cci1.SetDefaultColor(Color.GREEN);
plot cci2 = if CCI < 0 then 4 else 3;
cci2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then cci1 else Double.NaN, if showclouds then cci2 else Double.NaN, Color.GREEN);

#RSI
def rsi   = reference RSI(length = rsilength)."RSI";
plot rsi1 = if rsi >= 50 then 5 else 4;
plot rsi2 = if rsi < 50  then 5 else 4;
rsi1.SetDefaultColor(Color.GREEN);
rsi2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then rsi1 else Double.NaN, if showclouds then rsi2 else Double.NaN, color1 = Color.GREEN);

#Bollinger Bands MOBO
input lengthmobo = 10;
input Num_Dev_Dn = -0.8;
input Num_Dev_up =  0.8;

def sDev = StDev(data = c, length = lengthmobo);

def Midmobo = Average(c, length = lengthmobo);
def Lowermobo = Midmobo + Num_Dev_Dn * sDev;
def Uppermobo = Midmobo + Num_Dev_up * sDev;
def upmobo = if upmobo[1] == 0 and c >= Uppermobo then 1 else if upmobo[1] == 1 and c > Lowermobo then 1 else 0;
def upmo = if upmobo  and c > Uppermobo then 1 else 0;
def dnmo = if !upmobo and c > Lowermobo then 1 else 0;
plot mobo1 = if upmobo == 1 then 6 else 5;
mobo1.SetDefaultColor(Color.GREEN);
plot mobo2 = if upmobo == 0 then 6 else 5;
mobo2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then mobo1 else Double.NaN, if showclouds then mobo2 else Double.NaN, Color.GREEN);

#Trend
#Choppiness Indicator from Mobius @My Trade with color changes by Lar
#Set ADX & SMA to how you trade
#Indicates Trending or Chop along with current ADX level

def ADXLength     = 5; #TOS default 10
input AverageType = AverageType.HULL;
def AvgLength     = 5; #TOS default 8
def Lengthchop    = 8;
def Signal        = 3;
def Choppy        = 61.8;
def MidLine       = 50;
def Trending      = 38.2;


def ADX = Round(reference ADX(length = ADXLength), 0);
def AVG = MovingAverage(AverageType = AverageType, c, AvgLength);
def CIB = ((Log(Sum(TrueRange(h, c, l), Lengthchop) /
             (Highest(if h >= c[1] then h else
             c[1], Lengthchop) -
             Lowest( if l <= c[1] then l else c[1], Lengthchop)))
             / Log(10)) / (Log(Lengthchop) / Log(10))) * 100;
def CI  = CIB;

#Choppiness/Trend Indicator
plot chop = if CI > MidLine then 7 else 6;
chop.SetDefaultColor(Color.YELLOW);
plot trend1 = if CI < MidLine and c > AVG then 7 else 6;
trend1.SetDefaultColor(Color.GREEN);
plot trend2 = if CI < MidLine and c < AVG then 7 else 6;
trend2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then chop else Double.NaN, if showclouds then trend1 else Double.NaN, Color.YELLOW, Color.GREEN);
AddCloud(if showclouds then chop else Double.NaN, if showclouds then trend2 else Double.NaN, Color.YELLOW, Color.RED);

#Overall
plot uptrend = if mopos == 3 and cci1 == 4 and rsi1 == 5 and mobo1 == 6 then 8 else 7;
uptrend.SetDefaultColor(Color.GREEN);
plot dntrend = if moneg == 3 and cci2 == 4 and rsi2 == 5 and mobo2 == 6 then 8 else 7;
dntrend.SetDefaultColor(Color.RED);
AddCloud(uptrend, dntrend, Color.GREEN, Color.RED);


#Squeeze by Mobius @ My Trade with color mod by Lar
#Look at Cloud Color as a possible indication of direction once squeeze ends
def nK            = 1.5;
def nBB           = 2.0;
def lengthsqueeze = 20;

def BBHalfWidth = StDev(c, lengthsqueeze);
def KCHalfWidth = nK * Average(TrueRange(h,  c,  l),  lengthsqueeze);
def isSqueezed  =  nBB * BBHalfWidth / KCHalfWidth < 1;

#Squeeze for Longer Term Trend Indicator

plot BBS_Ind = if isSqueezed then 8.2 else Double.NaN;
BBS_Ind.SetDefaultColor(Color.DARK_ORANGE);
BBS_Ind.SetPaintingStrategy(PaintingStrategy.POINTS);
BBS_Ind.SetLineWeight(2);
BBS_Ind.HideBubble();

#Line Spacer
plot line9 = 9;
line9.SetDefaultColor(Color.DARK_GRAY);

AddLabel(showlabels, "MOMENTUM "  + Round(Momentum, 3), if Momentum >= 0 then Color.GREEN else Color.RED);
AddLabel(showlabels, "CCI " + Round(CCI, 0), if CCI >= 0 then Color.GREEN else Color.RED);
AddLabel(showlabels, "RSI " + Round(rsi, 0), if reference RSI(length = rsilength)."RSI" >= 50 then Color.GREEN else Color.RED);
AddLabel(showlabels, if upmobo and upmo then "Mobo Above Upper" else if !upmo and dnmo then "Mobo Below Lower" else "Mobo Inside", if upmobo == 1 then Color.GREEN else Color.RED);
AddLabel(showlabels, if CI > MidLine then "CHOP " + Round(CI, 0) else "TRENDING " + Round(CI, 0), if CI > MidLine then Color.YELLOW else Color.WHITE);
AddLabel(showlabels, "ADX " + ADX, if CI > MidLine then Color.YELLOW else Color.WHITE);
AddLabel(showlabels, if uptrend == 8 then "Trend All Up " else if dntrend == 8 then "Trend All Down " else "Trend Mixed ", if uptrend == 8 then Color.GREEN else if dntrend == 8 then Color.RED else Color.GRAY);
#Count of Periods in consecutive squeeze
#rec count = if isSqueezed then count[1] + 1 else 0;
#AddLabel(yes, if isSqueezed then Concat("Squeeze ", count) else "No Squeeze", Color.DARK_ORANGE);
 
Last edited:

trader1618

New member
VIP
Not sure if this is the same thing but has that style. https://tos.mx/MCtema6

Code:
#Name:             ChrisStoplight
#Programmed By:    Chris Ball (xxx) on #1/31/09
#Added Choppiness and Squeeze Indicator by [email protected] Lounge
#Added FW_Mobo_Basic
#Modified to add/change indicators
declare lower;
input showlabels = no;
input showclouds = yes;
input rsilength  = 5;
def c = close;
def h = high;
def l = low;
def o = open;

#MOMENTUM
input lengthmo = 5;
def Momentum = c - c[lengthmo];
plot mopos = if Momentum >= 0 then 3 else 2;
mopos.SetDefaultColor(Color.GREEN);
plot moneg = if Momentum < 0 then 3 else 2;
moneg.SetDefaultColor(Color.RED);
AddCloud(if showclouds then mopos else Double.NaN, if showclouds then moneg else Double.NaN, Color.GREEN);

#CCI
input lengthcci = 13;
def pricecci = c + l + h;
def linDev = LinDev(pricecci, lengthcci);
def CCI = if linDev == 0 then 0 else (pricecci - Average(pricecci, lengthcci)) / linDev / 0.015;
plot cci1 = if CCI >= 0 then 4 else 3;
cci1.SetDefaultColor(Color.GREEN);
plot cci2 = if CCI < 0 then 4 else 3;
cci2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then cci1 else Double.NaN, if showclouds then cci2 else Double.NaN, Color.GREEN);

#RSI
def rsi   = reference RSI(length = rsilength)."RSI";
plot rsi1 = if rsi >= 50 then 5 else 4;
plot rsi2 = if rsi < 50  then 5 else 4;
rsi1.SetDefaultColor(Color.GREEN);
rsi2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then rsi1 else Double.NaN, if showclouds then rsi2 else Double.NaN, color1 = Color.GREEN);

#Bollinger Bands MOBO
input lengthmobo = 10;
input Num_Dev_Dn = -0.8;
input Num_Dev_up =  0.8;

def sDev = StDev(data = c, length = lengthmobo);

def Midmobo = Average(c, length = lengthmobo);
def Lowermobo = Midmobo + Num_Dev_Dn * sDev;
def Uppermobo = Midmobo + Num_Dev_up * sDev;
def upmobo = if upmobo[1] == 0 and c >= Uppermobo then 1 else if upmobo[1] == 1 and c > Lowermobo then 1 else 0;
def upmo = if upmobo  and c > Uppermobo then 1 else 0;
def dnmo = if !upmobo and c > Lowermobo then 1 else 0;
plot mobo1 = if upmobo == 1 then 6 else 5;
mobo1.SetDefaultColor(Color.GREEN);
plot mobo2 = if upmobo == 0 then 6 else 5;
mobo2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then mobo1 else Double.NaN, if showclouds then mobo2 else Double.NaN, Color.GREEN);

#Trend
#Choppiness Indicator from Mobius @My Trade with color changes by Lar
#Set ADX & SMA to how you trade
#Indicates Trending or Chop along with current ADX level

def ADXLength     = 5; #TOS default 10
input AverageType = AverageType.HULL;
def AvgLength     = 5; #TOS default 8
def Lengthchop    = 8;
def Signal        = 3;
def Choppy        = 61.8;
def MidLine       = 50;
def Trending      = 38.2;


def ADX = Round(reference ADX(length = ADXLength), 0);
def AVG = MovingAverage(AverageType = AverageType, c, AvgLength);
def CIB = ((Log(Sum(TrueRange(h, c, l), Lengthchop) /
             (Highest(if h >= c[1] then h else
             c[1], Lengthchop) -
             Lowest( if l <= c[1] then l else c[1], Lengthchop)))
             / Log(10)) / (Log(Lengthchop) / Log(10))) * 100;
def CI  = CIB;

#Choppiness/Trend Indicator
plot chop = if CI > MidLine then 7 else 6;
chop.SetDefaultColor(Color.YELLOW);
plot trend1 = if CI < MidLine and c > AVG then 7 else 6;
trend1.SetDefaultColor(Color.GREEN);
plot trend2 = if CI < MidLine and c < AVG then 7 else 6;
trend2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then chop else Double.NaN, if showclouds then trend1 else Double.NaN, Color.YELLOW, Color.GREEN);
AddCloud(if showclouds then chop else Double.NaN, if showclouds then trend2 else Double.NaN, Color.YELLOW, Color.RED);

#Overall
plot uptrend = if mopos == 3 and cci1 == 4 and rsi1 == 5 and mobo1 == 6 then 8 else 7;
uptrend.SetDefaultColor(Color.GREEN);
plot dntrend = if moneg == 3 and cci2 == 4 and rsi2 == 5 and mobo2 == 6 then 8 else 7;
dntrend.SetDefaultColor(Color.RED);
AddCloud(uptrend, dntrend, Color.GREEN, Color.RED);


#Squeeze by Mobius @ My Trade with color mod by Lar
#Look at Cloud Color as a possible indication of direction once squeeze ends
def nK            = 1.5;
def nBB           = 2.0;
def lengthsqueeze = 20;

def BBHalfWidth = StDev(c, lengthsqueeze);
def KCHalfWidth = nK * Average(TrueRange(h,  c,  l),  lengthsqueeze);
def isSqueezed  =  nBB * BBHalfWidth / KCHalfWidth < 1;

#Squeeze for Longer Term Trend Indicator

plot BBS_Ind = if isSqueezed then 8.2 else Double.NaN;
BBS_Ind.SetDefaultColor(Color.DARK_ORANGE);
BBS_Ind.SetPaintingStrategy(PaintingStrategy.POINTS);
BBS_Ind.SetLineWeight(2);
BBS_Ind.HideBubble();

#Line Spacer
plot line9 = 9;
line9.SetDefaultColor(Color.DARK_GRAY);

AddLabel(showlabels, "MOMENTUM "  + Round(Momentum, 3), if Momentum >= 0 then Color.GREEN else Color.RED);
AddLabel(showlabels, "CCI " + Round(CCI, 0), if CCI >= 0 then Color.GREEN else Color.RED);
AddLabel(showlabels, "RSI " + Round(rsi, 0), if reference RSI(length = rsilength)."RSI" >= 50 then Color.GREEN else Color.RED);
AddLabel(showlabels, if upmobo and upmo then "Mobo Above Upper" else if !upmo and dnmo then "Mobo Below Lower" else "Mobo Inside", if upmobo == 1 then Color.GREEN else Color.RED);
AddLabel(showlabels, if CI > MidLine then "CHOP " + Round(CI, 0) else "TRENDING " + Round(CI, 0), if CI > MidLine then Color.YELLOW else Color.WHITE);
AddLabel(showlabels, "ADX " + ADX, if CI > MidLine then Color.YELLOW else Color.WHITE);
AddLabel(showlabels, if uptrend == 8 then "Trend All Up " else if dntrend == 8 then "Trend All Down " else "Trend Mixed ", if uptrend == 8 then Color.GREEN else if dntrend == 8 then Color.RED else Color.GRAY);
#Count of Periods in consecutive squeeze
#rec count = if isSqueezed then count[1] + 1 else 0;
#AddLabel(yes, if isSqueezed then Concat("Squeeze ", count) else "No Squeeze", Color.DARK_ORANGE);
hello adamlee,

do you have any explanation on how this works? i know this is a seperate discussion but i would like to know how to read this indicator.

Thank you in advance.
 

marketview

New member
Not sure if this is the same thing but has that style. https://tos.mx/MCtema6

Code:
#Name:             ChrisStoplight
#Programmed By:    Chris Ball (xxx) on #1/31/09
#Added Choppiness and Squeeze Indicator by [email protected] Lounge
#Added FW_Mobo_Basic
#Modified to add/change indicators
declare lower;
input showlabels = no;
input showclouds = yes;
input rsilength  = 5;
def c = close;
def h = high;
def l = low;
def o = open;

#MOMENTUM
input lengthmo = 5;
def Momentum = c - c[lengthmo];
plot mopos = if Momentum >= 0 then 3 else 2;
mopos.SetDefaultColor(Color.GREEN);
plot moneg = if Momentum < 0 then 3 else 2;
moneg.SetDefaultColor(Color.RED);
AddCloud(if showclouds then mopos else Double.NaN, if showclouds then moneg else Double.NaN, Color.GREEN);

#CCI
input lengthcci = 13;
def pricecci = c + l + h;
def linDev = LinDev(pricecci, lengthcci);
def CCI = if linDev == 0 then 0 else (pricecci - Average(pricecci, lengthcci)) / linDev / 0.015;
plot cci1 = if CCI >= 0 then 4 else 3;
cci1.SetDefaultColor(Color.GREEN);
plot cci2 = if CCI < 0 then 4 else 3;
cci2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then cci1 else Double.NaN, if showclouds then cci2 else Double.NaN, Color.GREEN);

#RSI
def rsi   = reference RSI(length = rsilength)."RSI";
plot rsi1 = if rsi >= 50 then 5 else 4;
plot rsi2 = if rsi < 50  then 5 else 4;
rsi1.SetDefaultColor(Color.GREEN);
rsi2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then rsi1 else Double.NaN, if showclouds then rsi2 else Double.NaN, color1 = Color.GREEN);

#Bollinger Bands MOBO
input lengthmobo = 10;
input Num_Dev_Dn = -0.8;
input Num_Dev_up =  0.8;

def sDev = StDev(data = c, length = lengthmobo);

def Midmobo = Average(c, length = lengthmobo);
def Lowermobo = Midmobo + Num_Dev_Dn * sDev;
def Uppermobo = Midmobo + Num_Dev_up * sDev;
def upmobo = if upmobo[1] == 0 and c >= Uppermobo then 1 else if upmobo[1] == 1 and c > Lowermobo then 1 else 0;
def upmo = if upmobo  and c > Uppermobo then 1 else 0;
def dnmo = if !upmobo and c > Lowermobo then 1 else 0;
plot mobo1 = if upmobo == 1 then 6 else 5;
mobo1.SetDefaultColor(Color.GREEN);
plot mobo2 = if upmobo == 0 then 6 else 5;
mobo2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then mobo1 else Double.NaN, if showclouds then mobo2 else Double.NaN, Color.GREEN);

#Trend
#Choppiness Indicator from Mobius @My Trade with color changes by Lar
#Set ADX & SMA to how you trade
#Indicates Trending or Chop along with current ADX level

def ADXLength     = 5; #TOS default 10
input AverageType = AverageType.HULL;
def AvgLength     = 5; #TOS default 8
def Lengthchop    = 8;
def Signal        = 3;
def Choppy        = 61.8;
def MidLine       = 50;
def Trending      = 38.2;


def ADX = Round(reference ADX(length = ADXLength), 0);
def AVG = MovingAverage(AverageType = AverageType, c, AvgLength);
def CIB = ((Log(Sum(TrueRange(h, c, l), Lengthchop) /
             (Highest(if h >= c[1] then h else
             c[1], Lengthchop) -
             Lowest( if l <= c[1] then l else c[1], Lengthchop)))
             / Log(10)) / (Log(Lengthchop) / Log(10))) * 100;
def CI  = CIB;

#Choppiness/Trend Indicator
plot chop = if CI > MidLine then 7 else 6;
chop.SetDefaultColor(Color.YELLOW);
plot trend1 = if CI < MidLine and c > AVG then 7 else 6;
trend1.SetDefaultColor(Color.GREEN);
plot trend2 = if CI < MidLine and c < AVG then 7 else 6;
trend2.SetDefaultColor(Color.RED);
AddCloud(if showclouds then chop else Double.NaN, if showclouds then trend1 else Double.NaN, Color.YELLOW, Color.GREEN);
AddCloud(if showclouds then chop else Double.NaN, if showclouds then trend2 else Double.NaN, Color.YELLOW, Color.RED);

#Overall
plot uptrend = if mopos == 3 and cci1 == 4 and rsi1 == 5 and mobo1 == 6 then 8 else 7;
uptrend.SetDefaultColor(Color.GREEN);
plot dntrend = if moneg == 3 and cci2 == 4 and rsi2 == 5 and mobo2 == 6 then 8 else 7;
dntrend.SetDefaultColor(Color.RED);
AddCloud(uptrend, dntrend, Color.GREEN, Color.RED);


#Squeeze by Mobius @ My Trade with color mod by Lar
#Look at Cloud Color as a possible indication of direction once squeeze ends
def nK            = 1.5;
def nBB           = 2.0;
def lengthsqueeze = 20;

def BBHalfWidth = StDev(c, lengthsqueeze);
def KCHalfWidth = nK * Average(TrueRange(h,  c,  l),  lengthsqueeze);
def isSqueezed  =  nBB * BBHalfWidth / KCHalfWidth < 1;

#Squeeze for Longer Term Trend Indicator

plot BBS_Ind = if isSqueezed then 8.2 else Double.NaN;
BBS_Ind.SetDefaultColor(Color.DARK_ORANGE);
BBS_Ind.SetPaintingStrategy(PaintingStrategy.POINTS);
BBS_Ind.SetLineWeight(2);
BBS_Ind.HideBubble();

#Line Spacer
plot line9 = 9;
line9.SetDefaultColor(Color.DARK_GRAY);

AddLabel(showlabels, "MOMENTUM "  + Round(Momentum, 3), if Momentum >= 0 then Color.GREEN else Color.RED);
AddLabel(showlabels, "CCI " + Round(CCI, 0), if CCI >= 0 then Color.GREEN else Color.RED);
AddLabel(showlabels, "RSI " + Round(rsi, 0), if reference RSI(length = rsilength)."RSI" >= 50 then Color.GREEN else Color.RED);
AddLabel(showlabels, if upmobo and upmo then "Mobo Above Upper" else if !upmo and dnmo then "Mobo Below Lower" else "Mobo Inside", if upmobo == 1 then Color.GREEN else Color.RED);
AddLabel(showlabels, if CI > MidLine then "CHOP " + Round(CI, 0) else "TRENDING " + Round(CI, 0), if CI > MidLine then Color.YELLOW else Color.WHITE);
AddLabel(showlabels, "ADX " + ADX, if CI > MidLine then Color.YELLOW else Color.WHITE);
AddLabel(showlabels, if uptrend == 8 then "Trend All Up " else if dntrend == 8 then "Trend All Down " else "Trend Mixed ", if uptrend == 8 then Color.GREEN else if dntrend == 8 then Color.RED else Color.GRAY);
#Count of Periods in consecutive squeeze
#rec count = if isSqueezed then count[1] + 1 else 0;
#AddLabel(yes, if isSqueezed then Concat("Squeeze ", count) else "No Squeeze", Color.DARK_ORANGE);
Thank you ,,, its not the same indicator but it has the same structure and they are using AddCloud function achieve this ,, for now i have just made them as squares instead of cloud,, but will work on make it like cloud so the progress is smooth looking
 

Billions

Active member
2019 Donor
VIP
I modified the VZO so it will show signals that are within .02 of the VZO that is used by Danielle from simpler trading. Felt like it was time to give back to the community on this one as it has done so much for me. For instructions on how to use this indicator please use Simpler's resources and explanation relating to it or refer to the other VZO indicators that are posted on this site.

Link to study: http://tos.mx/PYvpPuS

Code:
declare lower;

input length = 14;
input length2 = 20;
input showvolumelabels = yes;
def VP = ExpAverage(Sign(close - close[1]) * volume, length);
def TV = ExpAverage(volume, length2);
plot VZO = 100 * VP / TV;
def "+60" = 60;
def "+40" = 40;
def "-40" = -40;
def "-60" = -60;
plot ZeroLine = 0;

VZO.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
VZO.DefineColor("Normal", Color.YELLOW);
VZO.DefineColor("OverBought", Color.RED);
VZO.DefineColor("OverSold", Color.GREEN);
VZO.AssignValueColor(if VZO < -15 then VZO.Color("OverBought") else if VZO > 15 then VZO.Color("OverSold") else VZO.Color("Normal"));
ZeroLine.SetDefaultColor(Color.YELLOW);
ZeroLine.SetStyle(Curve.SHORT_DASH);

AddCloud("+60",   "+40",   Color.RED,   Color.CURRENT);
AddCloud("-40", "-60", Color.GREEN, Color.CURRENT);
AddCloud(15, -15, CreateColor(197 , 160, 0), Color.CURRENT);

input lengthv = 50;
def Vol = volume;
def VolAvg = Average(volume, lengthv);
AddLabel(yes and showvolumelabels, Vol, if close > close[1] then Color.CYAN else Color.RED);
AddLabel(yes and showvolumelabels, VolAvg, Color.ORANGE);

Just for fun, I added volume labels that correlate to the default volumeavg study on ToS. My labels will be Cyan for green candles and red for red candles. The value of the 50-period volume avg will be yellow. Happy Trading.
Do you adjust the input timeframe like if you use a different timeframe
 

New Indicator: Buy the Dip

Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.

Download the indicator

Similar threads

Top