# StochFull + Bollinger Bands

#### dali

##### New member
Is there StochFull + Bollinger Bands indicator ? Thanks

Thanks for reply @MerryDay .. yeah, not exactly what I had in mind. I was thinking to have Bollinger Bands overlay with StochFull indicator

Thanks for reply @MerryDay .. yeah, not exactly what I had in mind. I was thinking to have Bollinger Bands overlay with StochFull indicator
Dali, did you try to add the StochasticFull study to upper chart? once you add it to lower, just drag it to upper area to overlay on the BB and see if it satisfies your need.

Hi @Sree, nah that did not work :/... I have this indicator on Tradingview, so I was thinking there has to be something on TOS too.

Hi @Sree, nah that did not work :/... I have this indicator on Tradingview, so I was thinking there has to be something on TOS too.
I believe there's an rsi with Bollinger bands. I'll see if I can cook it up.

@Sree .. Thank you so much !!!!

@Sree .. Thank you so much !!!!
try this out, the bands are set to threee standard devitions that seemed to work better, its plotting the bollinger bands from the average of the two stochastic lines i believe, let me know what you think.

Code:
``````declare lower;

input over_bought = 80;
input over_sold = 20;
input KPeriod = 10;
input DPeriod = 10;
input priceH = high;
input priceL = low;
input priceC = close;
input slowing_period = 3;
input stoch_Price_Line = 2;
input Volatility_Band = 10;
input STDEV_Multiplier = 3;
input averageType = AverageType.SIMPLE;
input showBreakoutSignals = {default "No", "On FullK", "On FullD", "On FullK & FullD"};

def lowest_k = Lowest(priceL, KPeriod);
def c1 = priceC - lowest_k;
def c2 = Highest(priceH, KPeriod) - lowest_k;
def FastK = if c2 != 0 then c1 / c2 * 100 else 0;

plot FullK = MovingAverage(averageType, FastK, slowing_period);
plot FullD = MovingAverage(averageType, FullK, DPeriod);

plot OverBought = over_bought;
plot OverSold = over_sold;

def upK = FullK crosses above OverSold;
def upD = FullD crosses above OverSold;
def downK = FullK crosses below OverBought;
def downD = FullD crosses below OverBought;

def DYNRSI = (fullD+fullk)/2;
def Price1 = if averageType == AverageType.SIMPLE then Average(DYNRSI, stoch_Price_Line) else ExpAverage(DYNRSI, stoch_Price_Line);
def SDBB = StDev(DYNRSI, Volatility_Band);

plot UpSignal;
plot DownSignal;
switch (showBreakoutSignals) {
case "No":
UpSignal = Double.NaN;
DownSignal = Double.NaN;
case "On FullK":
UpSignal = if upK then OverSold else Double.NaN;
DownSignal = if downK then OverBought else Double.NaN;
case "On FullD":
UpSignal = if upD then OverSold else Double.NaN;
DownSignal = if downD then OverBought else Double.NaN;
case "On FullK & FullD":
UpSignal = if upK or upD then OverSold else Double.NaN;
DownSignal = if downK or downD then OverBought else Double.NaN;
}

UpSignal.setHiding(showBreakoutSignals == showBreakoutSignals."No");

def DYNAverage = Average(DYNRSI, Volatility_Band);

plot UpperBollinger = DYNAverage + STDEV_Multiplier * SDBB;
UpperBollinger.SetDefaultColor(Color.RED);
plot LowerBollinger = DYNAverage - STDEV_Multiplier * SDBB;
LowerBollinger.SetDefaultColor(Color.GREEN);``````

@germanburrito you are GINIUS !!!!!! WOW .. Thank you so much !!!!!! Much Love <3

@germanburrito you are GINIUS !!!!!! WOW .. Thank you so much !!!!!! Much Love <3
no problem, im glad you like it, how do you trade with it?

@germanburrito, I love trading with standard deviations. I am looking for a squeeze in bands, in uptrends I am taking trades when bands are lower and vice versa. Thank you again for putting this together!!!
If you have RSI with Bands can you please share that as well when you get a chance.

@dali

Code:
``````#Mobius

declare lower;
input length = 14;
input over_Bought = 70;
input over_Sold = 30;
input price = close;
input averageType = AverageType.WILDERS;
input showBreakoutSignals = no;
input Volatility_Band = 14; #20-40
input STDEV_Multiplier = 2;
input RSI_Period = 14; #8-25
input RSI_Price = 0; #0-6
input RSI_Price_Line = 2;

### Keith RSI, BB, DYN ###
def NetChgAvg = MovingAverage(averageType, price - price[1], length);
def TotChgAvg = MovingAverage(averageType, AbsValue(price - price[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

def DYNRSI = reference RSI(RSI_Period);
def Price1 = if averageType == AverageType.SIMPLE then Average(DYNRSI, RSI_Price_Line) else ExpAverage(DYNRSI, RSI_Price_Line);
def SDBB = StDev(DYNRSI, Volatility_Band);

plot RSI = 50 * (ChgRatio + 1);
plot MiddleLine = 50;
plot MiddleLine1 = 70;
plot MiddleLine2 = 30;

plot DYNAverage = Average(DYNRSI, Volatility_Band);
DYNAverage.SetDefaultColor(Color.YELLOW);
DYNAverage.SetLineWeight(2);

plot UpperBollinger = DYNAverage + STDEV_Multiplier * SDBB;
UpperBollinger.SetDefaultColor(Color.RED);
plot LowerBollinger = DYNAverage - STDEV_Multiplier * SDBB;
LowerBollinger.SetDefaultColor(Color.GREEN);

plot OverSold = over_Sold;
plot OverBought = over_Bought;
plot UpSignal = if RSI crosses above OverSold then OverSold else Double.NaN;
plot DownSignal = if RSI crosses below OverBought then OverBought else Double.NaN;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);

RSI.DefineColor("OverBought", GetColor(5));
RSI.DefineColor("Normal", GetColor(9));
RSI.DefineColor("OverSold", GetColor(6));
RSI.AssignValueColor(if RSI > over_Bought then RSI.Color("OverBought") else if RSI < over_Sold then RSI.Color("OverSold") else RSI.Color("Normal"));
MiddleLine.SetDefaultColor(GetColor(4));
MiddleLine1.SetDefaultColor(GetColor(5));
MiddleLine2.SetDefaultColor(GetColor(6));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);

87k+ Posts
408 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?