Confirmation Candles Indicator For ThinkorSwim

Good people...

I recently combined C3 Max Spark with Triple Exhaustion (dots)+ PLD (converted to study)(grey line)+ Horserider Volume Labels. I also changed a few "inputs" to "def" as I never messed with most of them anyway.

MZCHxL0.png


If anyone wants it,

https://tos.mx/62hTqV3
 
Good afternoon @Christopher84 - on the 1 hour TS9/1 month chart.. what leads to a buy/sell signal on the 1 hour chart? Is it closing over a certain level/moving average/something else? Looking forward to the next down arrow :)
Hi @lolreconlol,
Great question! It really depends on your strategy and time horizon. When using TS_v9, I am looking at the Confirmation Level (candle color) on the month chart and the direction and position of the averages (pointing up or down, crossed up or down). If the the candles are red and the averages are pointing downward (bearish conditions), I am looking for short positions only. If the averages cross down but the candles go green (potentially coming out of an OS zone) I will take intraday long positions). I will only hold long positions when averages are crossed upward, and the candles are green (bullish conditions). I hope this helps! Happy trading @lolreconlol!
 
HELP!

Can someone do me a solid and point me in the right direction?

s8XRfbq.png


I would like to use the following conditions to create a label for bullish or bearish bias that would remain "Bull" or "Bear" until condition two or four occurs.

1. Conditions for bearish bias at open:
  • Horserider Lower - Sell Volume is above average at open (within the first few candles of whatever timeframe chart) (the grey line is the average)
  • EMAD Lower - EMA pointing down / red
2. Bearish bias ends when:
  • Horserider Lower - First time buy volume goes above the average

3. Conditions for Bullish bias at open:
  • Horserider Lower - Sell Volume is above average at open (within the first few candles of whatever timeframe chart) (the grey line is the average)
  • EMAD Lower - EMA pointing up / green
4. Bullish bias ends when:
  • Horserider Lower - First time sell volume goes above the average

So far I have the following (the labels are at the end of the code)... just not sure how to accomplish the time portion (assuming what I have is correct)

Code:
#EMAD combined with Horserider Volume for label

#EMAD_Range Created by Christopher84 01/05/2022

declare lower;
input length8 = 10;
input length9 = 35;
input length10 = 12;
input show_ema_cloud = yes;
input price1 = close;
input coloredCandlesOn = no;
def showBreakoutSignals = no;
def displace = 0;

def AvgExp8 = ExpAverage(price1[-displace], length8);
def UPD = AvgExp8[1] < AvgExp8;
#AvgExp8.SetStyle(Curve.SHORT_DASH);
#AvgExp8.SetLineWeight(1);

def AvgExp9 = ExpAverage(price1[-displace], length9);
def UPW = AvgExp9[1] < AvgExp9;
#AvgExp9.SetStyle(Curve.SHORT_DASH);
#AvgExp9.SetLineWeight(1);

def Below = AvgExp8 < AvgExp9;
def Spark = UPD + UPW + Below;

def UPEMA = AvgExp8[1] < AvgExp8;
def DOWNEMA = AvgExp8[1] > AvgExp8;
#AvgExp8.AssignValueColor(if UPEMA then Color.LIGHT_GREEN else if DOWNEMA then Color.RED else Color.YELLOW);

def UPEMA2 = AvgExp9[1] < AvgExp9;
def DOWNEMA2 = AvgExp9[1] > AvgExp9;
#AvgExp9.AssignValueColor(if UPEMA2 then Color.LIGHT_GREEN else if DOWNEMA2 then Color.RED else Color.YELLOW);

def EMAD = (price1 - AvgExp8);
def UPEMAD = EMAD >= EMAD[1];
def DOWNEMAD = EMAD < EMAD[1];
#EMAD.AssignValueColor(if UPEMAD then Color.LIGHT_GREEN else if DOWNEMAD then Color.RED else Color.GRAY);

def EMAD2 = (price1 - AvgExp9);
def UPEMAD2 = EMAD2 >= EMAD2[1];
def DOWNEMAD2 = EMAD2 < EMAD2[1];
#EMAD2.AssignValueColor(if UPEMAD2 then Color.White else if DOWNEMAD2 then Color.BLUE else Color.GRAY);

def EMADAvg = (EMAD + EMAD2) / 2;
def UPEMADAvg = EMADAvg >= EMADAvg[1];
def DOWNEMADAvg = EMADAvg < EMADAvg[1];
#EMADAvg.AssignValueColor(if UPEMADAvg then Color.LIGHT_GREEN else if DOWNEMADAvg then Color.RED else Color.GRAY);

plot EMADSmooth = ExpAverage(EMADAvg[-displace], length10);


#########################################
input length = 14;
input averageType = AverageType.WILDERS;
def price = EMADSmooth;
#def bottom = Min(close[1], low);
input agperiod1 = AggregationPeriod.DAY;

def o = (EMADSmooth + EMADSmooth[1]) / 2;

def h = Max(EMADSmooth, EMADSmooth[1]);

def l = Min(EMADSmooth, EMADSmooth[1]);

def c = EMADSmooth;

#def open = open(period = agperiod1);
#def high = high(period = agperiod1);
#def low = low(period = agperiod1);
#def close = close(period = agperiod1);
def bottom = Min(c[1], l);
def tr = TrueRange(h, c, l);

def ptr = tr / (bottom + tr / 2);

def APTR = MovingAverage(averageType, ptr, length);
#APTR.SetDefaultColor(GetColor(8));
def UpperBand = c[1] + (APTR * o);
#UpperBand.SetDefaultColor(Color.GRAY);

def LowerBand = c[1] - (APTR * o);
#LowerBand.SetDefaultColor(Color.GRAY);

plot MidBand = (UpperBand + LowerBand) / 2;
MidBand.AssignValueColor(if (MidBand > EMADSmooth) then Color.RED else if (MidBand < EMADSmooth) then Color.GREEN else Color.GRAY);
EMADSmooth.AssignValueColor(if (MidBand > EMADSmooth) then Color.RED else if (MidBand < EMADSmooth) then Color.GREEN else Color.GRAY);


AddCloud(if show_ema_cloud and (MidBand > EMADSmooth) then MidBand else Double.NaN, EMADSmooth, Color.RED, Color.CURRENT);
AddCloud(if show_ema_cloud and (EMADSmooth >= MidBand) then EMADSmooth else Double.NaN, MidBand, Color.GREEN, Color.CURRENT);

def BulgeLength = 100;
def SqueezeLength = 100;
def BulgeLength2 = 200;
def SqueezeLength2 = 200;

plot ZeroLine = 0;
ZeroLine.AssignValueColor(if (EMADSmooth > ZeroLine) then Color.GREEN else if (EMADSmooth < ZeroLine) then Color.RED else Color.YELLOW);

def EMADSUp = EMADSmooth > ZeroLine;
def EMADSDown = EMADSmooth < ZeroLine;

#AssignPriceColor (if coloredCandlesOn and (MidBand > EMADSmooth) then Color.RED  else if coloredCandlesOn and (MidBand < EMADSmooth) then Color.GREEN else Color.GRAY);

#Vertical Line
AddVerticalLine(( GetDay() <> GetDay()[1]), "", Color.Dark_Gray, Curve.SHORT_DASH);

plot Bulge = Highest(MidBand, BulgeLength);
Bulge.SetDefaultColor(Color.WHITE);
plot Squeeze = Lowest(MidBand, SqueezeLength);
Squeeze.SetDefaultColor(Color.WHITE);


#Label
#Addlabel (yes," EMAD: ", Color.Gray);
#addLabel (yes, if EMADSmooth > ZeroLine then "  " else
#if EMADSmooth < ZeroLine then "  " else " ",
 #              if EMADSmooth > ZeroLine then Color.Green else
              # if EMADSmooth < ZeroLine then Color.Red else
              # Color.CURRENT);

# Show total volume in gray.  Buying volume in green.  Sell Volume in red.
# Volume average is gray line.
# Specified percent over average volume is cyan triangles.
# Horserider 12/30/2019 derived from some already existing studies.


#declare lower;

#Inputs

input Show30DayAvg = yes;
input ShowTodayVolume =  yes;
input ShowPercentOf30DayAvg = yes;
input UnusualVolumePercent = 200;
input Show30BarAvg = yes;
input ShowCurrentBar = yes;
input ShowPercentOf30BarAvg = yes;
input ShowSellVolumePercent = yes;

def O_HR = open;
def H_HR = high;
def C_HR = close;
def L_HR = low;
def V_HR = volume;
def buying = V_HR*(C_HR-L_HR)/(H_HR-L_HR);
def selling = V_HR*(H_HR-C_HR)/(H_HR-L_HR);

# Total Volume

# Note that Selling + Buying Volume = Volume.
plot TV = volume;

# Selling Volume

Plot SellVol = selling;
SellVol.setPaintingStrategy(PaintingStrategy.Histogram);
SellVol.SetDefaultColor(Color.Red);
SellVol.HideTitle();
SellVol.HideBubble();
SellVol.SetLineWeight(1);

TV.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
TV.SetDefaultColor(Color.GRAY);
#TV.HideTitle();
#TV.HideBubble();
TV.SetLineWeight(1);

#Volume Data

Plot BuyVol = buying;
BuyVol.setPaintingStrategy(PaintingStrategy.Histogram);
BuyVol.SetDefaultColor(Color.Green);
BuyVol.HideTitle();
BuyVol.HideBubble();
BuyVol.SetLineWeight(5);



def volLast30DayAvg = (volume(period = "DAY")[1] + volume(period = "DAY")[2] + volume(period = "DAY")[3] + volume(period = "DAY")[4] + volume(period = "DAY")[5] + volume(period = "DAY")[6] + volume(period = "DAY")[7] + volume(period = "DAY")[8] + volume(period = "DAY")[9] + volume(period = "DAY")[10] + volume(period = "DAY")[11] + volume(period = "DAY")[12] + volume(period = "DAY")[13] + volume(period = "DAY")[14] + volume(period = "DAY")[15] + volume(period = "DAY")[16] + volume(period = "DAY")[17] + volume(period = "DAY")[18] + volume(period = "DAY")[19] + volume(period = "DAY")[20] + volume(period = "DAY")[21] + volume(period = "DAY")[22] + volume(period = "DAY")[23] + volume(period = "DAY")[24] + volume(period = "DAY")[25] + volume(period = "DAY")[26] + volume(period = "DAY")[27] + volume(period = "DAY")[28] + volume(period = "DAY")[29] + volume(period = "DAY")[30]) / 30;
def today = volume(period = "DAY");
def percentOf30Day = Round((today / volLast30DayAvg) * 100, 0);
def avg30Bars = (volume[1] + volume[2] + volume[3] + volume[4] + volume[5] + volume[6] + volume[7] + volume[8] + volume[9] + volume[10] + volume[11] + volume[12] + volume[13] + volume[14] + volume[15] + volume[16] + volume[17] + volume[18] + volume[19] + volume[20] + volume[21] + volume[22] + volume[23] + volume[24] + volume[25] + volume[26] + volume[27] + volume[28] + volume[29] + volume[30]) / 30;
def curVolume = volume;
def percentOf30Bar = Round((curVolume / avg30Bars) * 100, 0);
def SellVolPercent = Round((Selling / Volume) * 100, 0);

# Labels

AddLabel(Show30DayAvg, "30 Day Avg: " + Round(volLast30DayAvg, 0), Color.LIGHT_GRAY);

AddLabel(ShowTodayVolume, "Day: " + today, (if percentOf30Day >= UnusualVolumePercent then Color.GREEN else if percentOf30Day >= 100 then Color.ORANGE else Color.LIGHT_GRAY));

AddLabel(ShowPercentOf30DayAvg, percentOf30Day + "%", (if percentOf30Day >= UnusualVolumePercent then Color.GREEN else if percentOf30Day >= 100 then Color.ORANGE else Color.WHITE) );

AddLabel(Show30BarAvg, "30 Bar Avg: " + Round(avg30Bars, 0), Color.LIGHT_GRAY);

AddLabel(ShowCurrentBar, "1 Bar: " + curVolume, (if percentOf30Bar >= UnusualVolumePercent then Color.GREEN else if PercentOf30Bar >= 100 then Color.ORANGE else Color.LIGHT_GRAY));

AddLabel(ShowPercentOf30BarAvg, PercentOf30Bar + "%", (if PercentOf30Bar >= UnusualVolumePercent then Color.GREEN else if PercentOf30Bar >= 100 then Color.ORANGE else Color.WHITE) );

AddLabel(ShowSellVolumePercent, "1 Bar Sell %: " + SellVolPercent, (if SellVolPercent > 51 then Color.RED else if SellVolPercent < 49 then Color.GREEN else Color.ORANGE));

input length_HR = 20;
plot VolAvg = Average(volume, length_HR);

VolAvg.SetDefaultColor(GetColor(7));


# hiVolume indicator
# source: http://tinboot.blogspot.com
# author: allen everhart


input type = { default SMP, EXP } ;
input length1 = 20 ;
input hotPct = 100.0 ;

def ma =
if type == type.SMP then
SimpleMovingAvg(volume, length)
else
MovAvgExponential(volume, length);

plot hv =
if 100 * ((volume / ma) - 1) >= hotPct then
ma
else
Double.NaN;

hv.SetDefaultColor( Color.CYAN);
hv.SetLineWeight(1) ;
hv.SetPaintingStrategy( PaintingStrategy.TRIANGLES);

# Bear/Bull Bias Label - Bias determined within the first 30 of market open
# bias will change or be void when sell_above_avg occurs while bias is bull
# bias will change or be void when buy_above_avg occurs while bias is bear

def Sell_Above_Avg =  sellvol > VolAvg;
def Buy_Above_Avg = buyvol > VolAvg;
def Bias_Bear = MidBand > EMADSmooth and Sell_Above_Avg;
def Bias_Bull = EMADSmooth >= MidBand and Buy_Above_Avg;

AddLabel(yes, "Bias:", Color.gray);
AddLabel(yes, if Bias_Bear then "BEAR" else
              if Bias_Bull then "BULL" else "   ",
              if Bias_Bear then Color.Red else
              if Bias_Bull then Color.Green else Color.yellow);
 
HELP!

Can someone do me a solid and point me in the right direction?

s8XRfbq.png


I would like to use the following conditions to create a label for bullish or bearish bias that would remain "Bull" or "Bear" until condition two or four occurs.

1. Conditions for bearish bias at open:
  • Horserider Lower - Sell Volume is above average at open (within the first few candles of whatever timeframe chart) (the grey line is the average)
  • EMAD Lower - EMA pointing down / red
2. Bearish bias ends when:
  • Horserider Lower - First time buy volume goes above the average

3. Conditions for Bullish bias at open:
  • Horserider Lower - Sell Volume is above average at open (within the first few candles of whatever timeframe chart) (the grey line is the average)
  • EMAD Lower - EMA pointing up / green
4. Bullish bias ends when:
  • Horserider Lower - First time sell volume goes above the average

So far I have the following (the labels are at the end of the code)... just not sure how to accomplish the time portion (assuming what I have is correct)

Code:
#EMAD combined with Horserider Volume for label

#EMAD_Range Created by Christopher84 01/05/2022

declare lower;
input length8 = 10;
input length9 = 35;
input length10 = 12;
input show_ema_cloud = yes;
input price1 = close;
input coloredCandlesOn = no;
def showBreakoutSignals = no;
def displace = 0;

def AvgExp8 = ExpAverage(price1[-displace], length8);
def UPD = AvgExp8[1] < AvgExp8;
#AvgExp8.SetStyle(Curve.SHORT_DASH);
#AvgExp8.SetLineWeight(1);

def AvgExp9 = ExpAverage(price1[-displace], length9);
def UPW = AvgExp9[1] < AvgExp9;
#AvgExp9.SetStyle(Curve.SHORT_DASH);
#AvgExp9.SetLineWeight(1);

def Below = AvgExp8 < AvgExp9;
def Spark = UPD + UPW + Below;

def UPEMA = AvgExp8[1] < AvgExp8;
def DOWNEMA = AvgExp8[1] > AvgExp8;
#AvgExp8.AssignValueColor(if UPEMA then Color.LIGHT_GREEN else if DOWNEMA then Color.RED else Color.YELLOW);

def UPEMA2 = AvgExp9[1] < AvgExp9;
def DOWNEMA2 = AvgExp9[1] > AvgExp9;
#AvgExp9.AssignValueColor(if UPEMA2 then Color.LIGHT_GREEN else if DOWNEMA2 then Color.RED else Color.YELLOW);

def EMAD = (price1 - AvgExp8);
def UPEMAD = EMAD >= EMAD[1];
def DOWNEMAD = EMAD < EMAD[1];
#EMAD.AssignValueColor(if UPEMAD then Color.LIGHT_GREEN else if DOWNEMAD then Color.RED else Color.GRAY);

def EMAD2 = (price1 - AvgExp9);
def UPEMAD2 = EMAD2 >= EMAD2[1];
def DOWNEMAD2 = EMAD2 < EMAD2[1];
#EMAD2.AssignValueColor(if UPEMAD2 then Color.White else if DOWNEMAD2 then Color.BLUE else Color.GRAY);

def EMADAvg = (EMAD + EMAD2) / 2;
def UPEMADAvg = EMADAvg >= EMADAvg[1];
def DOWNEMADAvg = EMADAvg < EMADAvg[1];
#EMADAvg.AssignValueColor(if UPEMADAvg then Color.LIGHT_GREEN else if DOWNEMADAvg then Color.RED else Color.GRAY);

plot EMADSmooth = ExpAverage(EMADAvg[-displace], length10);


#########################################
input length = 14;
input averageType = AverageType.WILDERS;
def price = EMADSmooth;
#def bottom = Min(close[1], low);
input agperiod1 = AggregationPeriod.DAY;

def o = (EMADSmooth + EMADSmooth[1]) / 2;

def h = Max(EMADSmooth, EMADSmooth[1]);

def l = Min(EMADSmooth, EMADSmooth[1]);

def c = EMADSmooth;

#def open = open(period = agperiod1);
#def high = high(period = agperiod1);
#def low = low(period = agperiod1);
#def close = close(period = agperiod1);
def bottom = Min(c[1], l);
def tr = TrueRange(h, c, l);

def ptr = tr / (bottom + tr / 2);

def APTR = MovingAverage(averageType, ptr, length);
#APTR.SetDefaultColor(GetColor(8));
def UpperBand = c[1] + (APTR * o);
#UpperBand.SetDefaultColor(Color.GRAY);

def LowerBand = c[1] - (APTR * o);
#LowerBand.SetDefaultColor(Color.GRAY);

plot MidBand = (UpperBand + LowerBand) / 2;
MidBand.AssignValueColor(if (MidBand > EMADSmooth) then Color.RED else if (MidBand < EMADSmooth) then Color.GREEN else Color.GRAY);
EMADSmooth.AssignValueColor(if (MidBand > EMADSmooth) then Color.RED else if (MidBand < EMADSmooth) then Color.GREEN else Color.GRAY);


AddCloud(if show_ema_cloud and (MidBand > EMADSmooth) then MidBand else Double.NaN, EMADSmooth, Color.RED, Color.CURRENT);
AddCloud(if show_ema_cloud and (EMADSmooth >= MidBand) then EMADSmooth else Double.NaN, MidBand, Color.GREEN, Color.CURRENT);

def BulgeLength = 100;
def SqueezeLength = 100;
def BulgeLength2 = 200;
def SqueezeLength2 = 200;

plot ZeroLine = 0;
ZeroLine.AssignValueColor(if (EMADSmooth > ZeroLine) then Color.GREEN else if (EMADSmooth < ZeroLine) then Color.RED else Color.YELLOW);

def EMADSUp = EMADSmooth > ZeroLine;
def EMADSDown = EMADSmooth < ZeroLine;

#AssignPriceColor (if coloredCandlesOn and (MidBand > EMADSmooth) then Color.RED  else if coloredCandlesOn and (MidBand < EMADSmooth) then Color.GREEN else Color.GRAY);

#Vertical Line
AddVerticalLine(( GetDay() <> GetDay()[1]), "", Color.Dark_Gray, Curve.SHORT_DASH);

plot Bulge = Highest(MidBand, BulgeLength);
Bulge.SetDefaultColor(Color.WHITE);
plot Squeeze = Lowest(MidBand, SqueezeLength);
Squeeze.SetDefaultColor(Color.WHITE);


#Label
#Addlabel (yes," EMAD: ", Color.Gray);
#addLabel (yes, if EMADSmooth > ZeroLine then "  " else
#if EMADSmooth < ZeroLine then "  " else " ",
 #              if EMADSmooth > ZeroLine then Color.Green else
              # if EMADSmooth < ZeroLine then Color.Red else
              # Color.CURRENT);

# Show total volume in gray.  Buying volume in green.  Sell Volume in red.
# Volume average is gray line.
# Specified percent over average volume is cyan triangles.
# Horserider 12/30/2019 derived from some already existing studies.


#declare lower;

#Inputs

input Show30DayAvg = yes;
input ShowTodayVolume =  yes;
input ShowPercentOf30DayAvg = yes;
input UnusualVolumePercent = 200;
input Show30BarAvg = yes;
input ShowCurrentBar = yes;
input ShowPercentOf30BarAvg = yes;
input ShowSellVolumePercent = yes;

def O_HR = open;
def H_HR = high;
def C_HR = close;
def L_HR = low;
def V_HR = volume;
def buying = V_HR*(C_HR-L_HR)/(H_HR-L_HR);
def selling = V_HR*(H_HR-C_HR)/(H_HR-L_HR);

# Total Volume

# Note that Selling + Buying Volume = Volume.
plot TV = volume;

# Selling Volume

Plot SellVol = selling;
SellVol.setPaintingStrategy(PaintingStrategy.Histogram);
SellVol.SetDefaultColor(Color.Red);
SellVol.HideTitle();
SellVol.HideBubble();
SellVol.SetLineWeight(1);

TV.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
TV.SetDefaultColor(Color.GRAY);
#TV.HideTitle();
#TV.HideBubble();
TV.SetLineWeight(1);

#Volume Data

Plot BuyVol = buying;
BuyVol.setPaintingStrategy(PaintingStrategy.Histogram);
BuyVol.SetDefaultColor(Color.Green);
BuyVol.HideTitle();
BuyVol.HideBubble();
BuyVol.SetLineWeight(5);



def volLast30DayAvg = (volume(period = "DAY")[1] + volume(period = "DAY")[2] + volume(period = "DAY")[3] + volume(period = "DAY")[4] + volume(period = "DAY")[5] + volume(period = "DAY")[6] + volume(period = "DAY")[7] + volume(period = "DAY")[8] + volume(period = "DAY")[9] + volume(period = "DAY")[10] + volume(period = "DAY")[11] + volume(period = "DAY")[12] + volume(period = "DAY")[13] + volume(period = "DAY")[14] + volume(period = "DAY")[15] + volume(period = "DAY")[16] + volume(period = "DAY")[17] + volume(period = "DAY")[18] + volume(period = "DAY")[19] + volume(period = "DAY")[20] + volume(period = "DAY")[21] + volume(period = "DAY")[22] + volume(period = "DAY")[23] + volume(period = "DAY")[24] + volume(period = "DAY")[25] + volume(period = "DAY")[26] + volume(period = "DAY")[27] + volume(period = "DAY")[28] + volume(period = "DAY")[29] + volume(period = "DAY")[30]) / 30;
def today = volume(period = "DAY");
def percentOf30Day = Round((today / volLast30DayAvg) * 100, 0);
def avg30Bars = (volume[1] + volume[2] + volume[3] + volume[4] + volume[5] + volume[6] + volume[7] + volume[8] + volume[9] + volume[10] + volume[11] + volume[12] + volume[13] + volume[14] + volume[15] + volume[16] + volume[17] + volume[18] + volume[19] + volume[20] + volume[21] + volume[22] + volume[23] + volume[24] + volume[25] + volume[26] + volume[27] + volume[28] + volume[29] + volume[30]) / 30;
def curVolume = volume;
def percentOf30Bar = Round((curVolume / avg30Bars) * 100, 0);
def SellVolPercent = Round((Selling / Volume) * 100, 0);

# Labels

AddLabel(Show30DayAvg, "30 Day Avg: " + Round(volLast30DayAvg, 0), Color.LIGHT_GRAY);

AddLabel(ShowTodayVolume, "Day: " + today, (if percentOf30Day >= UnusualVolumePercent then Color.GREEN else if percentOf30Day >= 100 then Color.ORANGE else Color.LIGHT_GRAY));

AddLabel(ShowPercentOf30DayAvg, percentOf30Day + "%", (if percentOf30Day >= UnusualVolumePercent then Color.GREEN else if percentOf30Day >= 100 then Color.ORANGE else Color.WHITE) );

AddLabel(Show30BarAvg, "30 Bar Avg: " + Round(avg30Bars, 0), Color.LIGHT_GRAY);

AddLabel(ShowCurrentBar, "1 Bar: " + curVolume, (if percentOf30Bar >= UnusualVolumePercent then Color.GREEN else if PercentOf30Bar >= 100 then Color.ORANGE else Color.LIGHT_GRAY));

AddLabel(ShowPercentOf30BarAvg, PercentOf30Bar + "%", (if PercentOf30Bar >= UnusualVolumePercent then Color.GREEN else if PercentOf30Bar >= 100 then Color.ORANGE else Color.WHITE) );

AddLabel(ShowSellVolumePercent, "1 Bar Sell %: " + SellVolPercent, (if SellVolPercent > 51 then Color.RED else if SellVolPercent < 49 then Color.GREEN else Color.ORANGE));

input length_HR = 20;
plot VolAvg = Average(volume, length_HR);

VolAvg.SetDefaultColor(GetColor(7));


# hiVolume indicator
# source: http://tinboot.blogspot.com
# author: allen everhart


input type = { default SMP, EXP } ;
input length1 = 20 ;
input hotPct = 100.0 ;

def ma =
if type == type.SMP then
SimpleMovingAvg(volume, length)
else
MovAvgExponential(volume, length);

plot hv =
if 100 * ((volume / ma) - 1) >= hotPct then
ma
else
Double.NaN;

hv.SetDefaultColor( Color.CYAN);
hv.SetLineWeight(1) ;
hv.SetPaintingStrategy( PaintingStrategy.TRIANGLES);

# Bear/Bull Bias Label - Bias determined within the first 30 of market open
# bias will change or be void when sell_above_avg occurs while bias is bull
# bias will change or be void when buy_above_avg occurs while bias is bear

def Sell_Above_Avg =  sellvol > VolAvg;
def Buy_Above_Avg = buyvol > VolAvg;
def Bias_Bear = MidBand > EMADSmooth and Sell_Above_Avg;
def Bias_Bull = EMADSmooth >= MidBand and Buy_Above_Avg;

AddLabel(yes, "Bias:", Color.gray);
AddLabel(yes, if Bias_Bear then "BEAR" else
              if Bias_Bull then "BULL" else "   ",
              if Bias_Bear then Color.Red else
              if Bias_Bull then Color.Green else Color.yellow);


Found this code for volume of the first 30 mins … how can I do something like this but use it to determine the bias in the first 30 mins?

Code:
# Volume RTH First 30 Mins

# tomsk

# 11.5.2019



declare hide_on_daily;

input startTime = 0930;

input endTime = 1000;



def Active = SecondsFromTime(startTime) >= 0 and SecondsTillTime(endTime) >= 0;

def Vol30Mins = if Active and !Active[1] then volume

else if Active then Vol30Mins[1] + volume

else Vol30Mins[1];

AddLabel(1, "Volume First 30 Mins = " + Vol30Mins, Color.YELLOW);

# End Volume RTH First 30 Mins
 
Found this code for volume of the first 30 mins … how can I do something like this but use it to determine the bias in the first 30 mins?

Code:
# Volume RTH First 30 Mins

# tomsk

# 11.5.2019



declare hide_on_daily;

input startTime = 0930;

input endTime = 1000;



def Active = SecondsFromTime(startTime) >= 0 and SecondsTillTime(endTime) >= 0;

def Vol30Mins = if Active and !Active[1] then volume

else if Active then Vol30Mins[1] + volume

else Vol30Mins[1];

AddLabel(1, "Volume First 30 Mins = " + Vol30Mins, Color.YELLOW);

# End Volume RTH First 30 Mins
Hi @HODL-Lay-HE-hoo!
I just had a spare minute to play around with this idea. Here's a sharelink https://tos.mx/t0mcb3w. This isn't a well polished code ( just a start). See what you think. Happy trading!
 
Thanks! @Christopher84 I will check it out!
Hi @HODL-Lay-HE-hoo!
Here's a share link for the Bull/Bear Label (on its own) as well as version that will paint the candles (incase you would like to see what the label would have read) https://tos.mx/xrNMbPt. If the candles are green, the label will read "Very Bullish". If candles go from green to gray or red to gray label will read either "Bullish Retracement" or "Bearish Retracement" depending on conditions. If the candles are red, the label will read "Very Bearish". Hope you find it useful! Look forward to your feedback. If everyone likes this, I will polish it up a bit and make it available on pg.1 of the thread.
oOPfzZ6.png
 
Last edited:
Hi @HODL-Lay-HE-hoo!
Here's a share link for the Bull/Bear Label (on its own) as well as version that will paint the candles (incase you would like to see what the label would have read) https://tos.mx/xrNMbPt. If the candles are green, the label will read "Very Bullish". If candles go from green to gray or red to gray label will read either "Bullish Retracement" or "Bearish Retracement" depending on conditions. If the candles are red, the label will read "Very Bearish". Hope you find it useful! Look forward to your feedback. If everyone likes this, I will polish it up a bit and make it available on pg.1 of the thread.
oOPfzZ6.png
Man thank you! I haven’t had much time to look at it as I’m out of town but it’s looking good thanks for your help. I will let you know my feedback when I get back in town.

@Christopher84 is saving peoples accounts with these indicators!
 
Hi @HODL-Lay-HE-hoo!
Here's a share link for the Bull/Bear Label (on its own) as well as version that will paint the candles (incase you would like to see what the label would have read) https://tos.mx/xrNMbPt. If the candles are green, the label will read "Very Bullish". If candles go from green to gray or red to gray label will read either "Bullish Retracement" or "Bearish Retracement" depending on conditions. If the candles are red, the label will read "Very Bearish". Hope you find it useful! Look forward to your feedback. If everyone likes this, I will polish it up a bit and make it available on pg.1 of the thread.
oOPfzZ6.png
Chris, Do you keep the timeframe and Agperiod1 on Day? or should we change to chart timeline?
 
Chris, Do you keep the timeframe and Agperiod1 on Day? or should we change to chart timeline?
Hi @METAL!
In the limited time that I have watched this indicator, I used the day setting and it looked pretty good. My thought was to utilize the higher aggregation period for the volume to identify the trend environment and use the EMAD_Range to determine appropriate entries/exits in line with the higher timeframe volume profile. It does open the possibility of repainting until the volume aggregation period closes. It will be interesting to see what holds best. I will be watching closely to see how it performs. Also, I will be looking forward to everyone’s feedback.
 
Hi @METAL!
In the limited time that I have watched this indicator, I used the day setting and it looked pretty good. My thought was to utilize the higher aggregation period for the volume to identify the trend environment and use the EMAD_Range to determine appropriate entries/exits in line with the higher timeframe volume profile. It does open the possibility of repainting until the volume aggregation period closes. It will be interesting to see what holds best. I will be watching closely to see how it performs. Also, I will be looking forward to everyone’s feedback.
Definitely use caution with this new Bull/Bear indicator. Unfortunately it appears to repaint a lot. I'm working on a few different ideas to keep it from repainting.
 
Definitely use caution with this new Bull/Bear indicator. Unfortunately it appears to repaint a lot. I'm working on a few different ideas to keep it from repainting.
Yes it does. Thank you. I tested it and it really looks promising except for how far out it repaints. I tested different timeframes and found 1hr to be pretty good for scalp attempts. Leaving Aggr period on D.
 
First off thank you @Christopher84 for working on this.

As usual I found myself thinking "What is this telling me that C3 Max Spark is not already telling me?" (which is odd considering I requested this indicator). I am not sure how the re-painting will affect my opinion as I have not had much time to watch it during market hours... that being said I added the "C3 Line Only" study and let the Bull Bear Indicator paint the candles... at which point I realized it does seem to be useful as the candles during a pullback in a bullish trend (aka retracement) are painted grey and the candles during a larger down trend (reversal) are painted red - As Chris stated previously (if I understood him correctly) it helps one to focus on the larger trend while viewing a lower timeframe.

Thanks Chris... I'll be watching. Thanks!

YUefkHF.png
 
First off thank you @Christopher84 for working on this.

As usual I found myself thinking "What is this telling me that C3 Max Spark is not already telling me?" (which is odd considering I requested this indicator). I am not sure how the re-painting will affect my opinion as I have not had much time to watch it during market hours... that being said I added the "C3 Line Only" study and let the Bull Bear Indicator paint the candles... at which point I realized it does seem to be useful as the candles during a pullback in a bullish trend (aka retracement) are painted grey and the candles during a larger down trend (reversal) are painted red - As Chris stated previously (if I understood him correctly) it helps one to focus on the larger trend while viewing a lower timeframe.

Thanks Chris... I'll be watching. Thanks!

YUefkHF.png
Hi @HODL-Lay-HE-hoo!
Here's a different combination using my MTF Moving Averages and instead of EMAD_Range. It seems to limit some of the repainting and gives a more consistent read with the volume profile. See what you think https://tos.mx/64t1Tu4. Looking forward to everyone's feedback.
DeOrSdY.png

avRx2U9.png
 

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
226 Online
Create Post

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