Repaints B4 Balanced BB Breakout For ThinkOrSwim

Repaints
Status
Not open for further replies.

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

MACD_BB is the lines with dots and bollinger band. So, I think we are saying the same thing. There can be an option with entries and exit arrows are selectable, just like we have it for PnL calculation.

In the long run, I think we need to combine all options into a cohesive selections. This includes the scanner additions as well. I'll try to organize and present.
 
MACD_BB is the lines with dots and bollinger band. So, I think we are saying the same thing. There can be an option with entries and exit arrows are selectable, just like we have it for PnL calculation.

In the long run, I think we need to combine all options into a cohesive selections. This includes the scanner additions as well. I'll try to organize and present.
You and I are on the exact same page!!!
 
MACD_BB is the lines with dots and bollinger band. So, I think we are saying the same thing. There can be an option with entries and exit arrows are selectable, just like we have it for PnL calculation.

In the long run, I think we need to combine all options into a cohesive selections. This includes the scanner additions as well. I'll try to organize and present.
@AspaTrader let me know when you finalize the scanner code so we can integrate all together and possibly not have multiple versions posted around. Unexperienced trades reading the history may get confused. :) Trying to help everyone.
 
@AspaTrader let me know when you finalize the scanner code so we can integrate all together and possibly not have multiple versions posted around. Unexperienced trades reading the history may get confused. :) Trying to help everyone.
I agree totally and perhaps once we get some of this worked out I’ll go back and make a master page and try to delete some of these entries to cut down on any confusion
 
@Chuck I have been experimenting with https://usethinkscript.com/threads/insync-index-indicator-for-thinkorswim.5992/ to see if can complement or it is repetitive. So far, there is an interesting relation to the trend. Let me know what you think about including this to the mix with BOP and RSI_IFT.

Here is ES, and experimental integration of the indicator with InSync.

TX7LyIF.png
 
Well, further improvement with InSync. Check it out from today. Look at the vertical buy and sell levels. It is missing a long signal, I'll get that sorted out soon.

zDxeFaE.png
 
@Chuck I have been experimenting with c/ to see if can complement or it is repetitive. So far, there is an interesting relation to the trend. Let me know what you think about including this to the mix with BOP and RSI_IFT.

Here is ES, and experimental integration of the indicator with InSync.

TX7LyIF.png
Hey, That’s awesome, I personally like slim ribbons as well. The more withought bogging down the performance the more flexible it is.
v2.3 is inbound. I'm reviewing the changes.
Insync is one of my newest favorites. I tested it a few weeks back and loved it. Have so many indicators that I lost it. I have been looking for it for a week. I just realized what it was. I was looking off my phone and did not notice. This is going to be AWS in of you included that. Man you are awesome!!!!!!
 
Last edited:
Thank you very much. Looks like a great one I ever seen!

I have so many questions please if you have time:
Green dots mean long and red short?
Works on mobile?
Which version is the updated one? Can you guys update the first post?
 
I created a scan for it , See if this helps, this is only for bullish.

Ruby:
# Balanced BB Breakout Indicator
# Free for use. Header credits must be included when any form of the code included in this package is used.
# User assumes all risk. Author not responsible for errors or use of tool.
# v1.2 - Assembled by Chuck Edwards
# v2.0 - Barbaros - cleanup
# v2.1 - Barbaros - added RSI IFT, NumberOfShares, BB crossing options
# v2.2 - Barbaros - fixed PnL issues and removed intraDay filter
#v2.3 - AspaTrader - added Scan code for bullish

# Market Forecast
def pIntermediate = MarketForecast().Intermediate;

def signal_Forecasat = if (pIntermediate > pIntermediate[1] or pIntermediate >= 80) then 1 else 0;

# MACD_BB
input BBlength = 15;
input BBNum_Dev = 1.0;
input MACDfastLength = 12;
input MACDslowLength = 26;
input fastLengthMACD = 12;
input slowLengthMACD = 26;
input MACDLength = 25;
input averageTypeMACD = AverageType.WEIGHTED;
input showBreakoutSignals = no;

def MACD_Data = MACD(fastLength = MACDfastLength, slowLength = MACDslowLength, MACDLength = MACDLength);


def BB_Upper = reference BollingerBands(price = MACD_Data, length = BBlength, Num_Dev_Dn = -BBNum_Dev, Num_Dev_Up = BBNum_Dev).UpperBand;
def BB_Lower = reference BollingerBands(price = MACD_Data, length = BBlength, Num_Dev_Dn = -BBNum_Dev, Num_Dev_Up = BBNum_Dev).Lowerband;
def BB_Midline = reference BollingerBands(price = MACD_Data, length = BBlength, Num_Dev_Dn = -BBNum_Dev, Num_Dev_Up = BBNum_Dev).MidLine;

def signal_MACD = if MACD_Data > MACD_Data[1] and MACD_Data >= BB_Upper or  MACD_Data < MACD_Data[1] and MACD_Data >= BB_Upper then 1 else 0;

# Keltner Channels
input factor = 1.5;
input length = 20;
input averageType = AverageType.EXPONENTIAL;
input trueRangeAverageType = AverageType.EXPONENTIAL;

def shift = factor * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length);
def average = MovingAverage(averageType, close, length);
def Upper_Band = average + shift;
def Lower_Band = average - shift;

# Bollinger Bands

input BBLength2 = 20;
input Num_Dev_Dn = -2.0;
input Num_Dev_up = 2.0;
input bb_averageType = AverageType.SIMPLE;

def sDev = StDev(data = close, length = BBLength2);
def MidLine = MovingAverage(bb_averageType, data = close, length = BBLength2);
def LowerBand = MidLine + Num_Dev_Dn * sDev;
def UpperBand = MidLine + Num_Dev_up * sDev;


# BB Alert

input BBCrossFromAboveAlert = {default "Zero", "Lower", "Middle", "Upper"};
input BBCrossFromBelowAlert = {default "Zero", "Lower", "Middle", "Upper"};

def BBCrossFromAboveVal = if BBCrossFromAboveAlert == BBCrossFromAboveAlert.Lower then BB_Lower
                          else if BBCrossFromAboveAlert == BBCrossFromAboveAlert.Upper then BB_Upper
                          else 0;
def BBCrossFromBelowVal = if BBCrossFromBelowAlert == BBCrossFromBelowAlert.Lower then BB_Lower
                          else if BBCrossFromBelowAlert == BBCrossFromBelowAlert.Upper then BB_Upper
                          else 0;

def signal_BB = if MACD_Data crosses above BBCrossFromBelowVal then 1 else 0;

# RSI/STOCASTIC/MACD CONFLUENCE COMBO

def Value = MovingAverage(averageTypeMACD, close, fastLengthMACD) - MovingAverage(averageTypeMACD, close, slowLengthMACD);
def Avg = MovingAverage(averageTypeMACD, Value, MACDLength);

def Diff = Value - Avg;

def signal_RSI = if Diff >= 0 and Diff > Diff[1] then 1 else 0;

def ZeroLine = 0;

def UpSignalMACD = if Diff crosses above ZeroLine then ZeroLine else Double.NaN;

input lengthRSI = 7;
input averageTypeRSI = AverageType.EXPONENTIAL;

def NetChgAvg = MovingAverage(averageTypeRSI, close - close[1], lengthRSI);
def TotChgAvg = MovingAverage(averageTypeRSI, AbsValue(close - close[1]), lengthRSI);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
def RSI = 50 * (ChgRatio + 1);

input KPeriod = 5;
input DPeriod = 3;
input averageTypeStoch = AverageType.WILDERS;

def SlowK = reference StochasticFull(80, 20, KPeriod, DPeriod, high, low, close, 3, averageTypeStoch).FullK;
def SlowD = reference StochasticFull(80, 20, KPeriod, DPeriod, high, low, close, 3, averageTypeStoch).FullD;

def rsiGreen = if RSI >= 50 then 1 else Double.NaN;
def rsiRed = if RSI < 50 then 1 else Double.NaN;
def stochGreen = if SlowK >= 50 then 1 else Double.NaN;
def stochRed = if SlowK < 50 then 1 else Double.NaN;
def macdGreen = if Value > Avg then 1 else Double.NaN;
def macdRed = if Value < Avg then 1 else Double.NaN;

def signal_Stoch = if RSI >= 50 and SlowK >= 50 and Value > Avg then 1 else if RSI < 50 and SlowK < 50 and Value < Avg then 0 else 0;


# Balance of Power

input EMA = 20;
input TEMA = 20;

def THL = If(high != low, high - low, 0.01);
def BullOpen = (high - open) / THL;
def BearOpen = (open - low) / THL;
def BullClose = (close - low) / THL;
def BearClose = (high - close) / THL;
def BullOC = If(close > open, (close - open) / THL, 0);
def BearOC = If(open > close, (open - close) / THL, 0);
def BullReward = (BullOpen + BullClose + BullOC) / 1;
def BearReward = (BearOpen + BearClose + BearOC) / 1;

def BOP = BullReward - BearReward;
def SmoothBOP = ExpAverage(BOP, EMA);
def xPrice = SmoothBOP;
def xEMA1 = ExpAverage(SmoothBOP, TEMA);
def xEMA2 = ExpAverage(xEMA1, TEMA);
def xEMA3 = ExpAverage(xEMA2, TEMA);
def nRes = 3 * xEMA1 - 3 * xEMA2 + xEMA3;

def SmootherBOP = nRes;
def s1 = SmoothBOP;
def s2 = SmootherBOP;
def s3 = SmootherBOP[2];

def BOPshort = s2 < s3 and s2[1] > s3[1];
def BOPlong = s2 > s3 and s2[1] < s3[1];

# RSI IFT

def over_Bought = .5;
def over_Sold = -.5;

def R = reference RSI(5, close) - 50;
def AvgRSI = MovingAverage(AverageType.Exponential,R,9);
def inverseRSI = (Power(Double.E, 2 * AvgRSI) - 1) / (Power(Double.E, 2 * AvgRSI) + 1);
def RSI_IFT_Buy =  (inverseRSI > 0) and (inverseRSI[1] < 0);
def RSI_IFT_Sell = (inverseRSI[1] > 0) and (inverseRSI < 0);


plot signal = if signal_Forecasat and signal_BB and signal_MACD and signal_RSI and signal_Stoch then 1 else 0;





Good job sir! Can you give more explaining for which plot we scan for? Signal?
 
Thank you very much. Looks like a great one I ever seen!

I have so many questions please if you have time:
Green dots mean long and red short?
Works on mobile?
Which version is the updated one? Can you guys update the first post?
Green dots are Bullish trend, Red dots are Bearish trend. It works on mobile with limitations......the alerts, dots, P/L and candle color do not work on mobile. The latest update is “......v2.2 on post #70”....(edited) Barbaros is working on the latest improvements and will be posting soon. We are also working on some examples to show how we live to trade this indicator. I will try and update that next week as well as cleaning up this post a bit to have the latest version available on the first page. We are still making improvements to this. It is a work in progress. If while monitoring it you notice any improvements or notice any way to execute better trades using this indicator, please don't hesitate to let us know.
 
Last edited:
Green dots are Bullish trend, Red dots are Bearish trend. It works on mobile with limitations......the alerts, dots, P/L and candle color do not work on mobile. The latest update is v2.3 on post #114. Barbaros is working on the latest improvements and will be posting soon. We are also working on some examples to show how we live to trade this indicator. I will try and update that next week as well as cleaning up this post a bit to have the latest version available on the first page. We are still making improvements to this. It is a work in progress. If while monitoring it you notice any improvements or notice any way to execute better trades using this indicator, please don't hesitate to let us know.
Guys, latest indicator is v2.2 and it is on post #70. I'll be releasing v2.3 to make it continue from the latest release.

v2.3 on post #114 is scanner only. It is barebones to make scanner work quickly.

@AspaTrader do you mind editing your post and change "v2.3" to "scanner"? I'm currently thinking that we'll have 2 scripts. One for scanner and another for the indicator. I can maintain the indicator and may be you can maintain the scanner. Then, @Chuck can update the original post to include latest version of both scripts.
 
Guys, latest indicator is v2.2 and it is on post #70. I'll be releasing v2.3 to make it continue from the latest release.

v2.3 on post #114 is scanner only. It is barebones to make scanner work quickly.

@AspaTrader do you mind editing your post and change "v2.3" to "scanner"? I'm currently thinking that we'll have 2 scripts. One for scanner and another for the indicator. I can maintain the indicator and may be you can maintain the scanner. Then, @Chuck can update the original post to include latest version of both scripts.
Sure ... I will work on it...
 
Sorry about that Barbaros, My bad. You are correct that is just the scan. I only glanced at it....Forgot about it only being the bare bones. Thanks for the correction. I will also go back and edit that post for clarity. I’m kind of new to all his forum stuff lol.
 
Last edited:
Status
Not open for further replies.

Volatility Trading Range

VTR is a momentum indicator that shows if a stock is overbought or oversold based on its Weekly and Monthly average volatility trading range.

Download the indicator

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
385 Online
Create Post

Similar threads

Similar threads

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