Bongo Indicator For ThinkOrSwim

I was able to Re-Create the BONGO indicator, using Wilders RSI. Even though, Wilders RSI isn't available via TOS, I was able to use that same data and code to re-create the indicator. Also re-created the BONGO Weekly, it plots the weekly even on lower time frames. Comes in handy..
Screenshot 2025-09-30 093925.png
 
Here is the code for the Bongo Indicator.

The Bongo Indicator is a trend-following momentum indicator that uses a stacked configuration of three Wilder's RSI periods (8, 14, 19) combined with a 9-period Simple Moving Average to identify sustained directional moves suitable for day trading.

The Bongo Indicator excels at keeping day traders on the right side of momentum.
Its "sticky" nature (holding signal until opposite condition) reduces noise and premature exits.

Best results come from using it as a directional filter while entering on pullbacks with proper risk management.

Always combine with higher timeframe analysis and review overall market conditions.
Ruby:
def RSI8 = RSI(length = 8);
def RSI14 = RSI(length = 14);
def RSI19 = RSI(length = 19);
def MA9 = SimpleMovingAvg(close, 9);

def Up = if (RSI8 > RSI14 and RSI14 > RSI19 and close > MA9) then 1 else 0;
def Dn = if (RSI8 < RSI14 and RSI14 < RSI19 and close < MA9) then 1 else 0;

# Extended Signals (hold signal until opposite condition)
def BongoUp = if Up then 1 else
              if Dn then 0 else BongoUp[1];

def BongoDn = if Dn then 1 else
              if Up then 0 else BongoDn[1];


declare lower;
plot UpZone = if BongoUp then 1 else 0;
plot DnZone = if BongoDn then 1 else 0;


UpZone.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
UpZone.SetDefaultColor(Color.dark_GREEN);
UpZone.SetLineWeight(5);
UpZone.HideTitle();
UpZone.HideBubble();

DnZone.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
DnZone.SetDefaultColor(Color.dark_RED);
DnZone.SetLineWeight(5);
DnZone.HideTitle();
DnZone.HideBubble();


plot ZeroLine = 0;
ZeroLine.SetDefaultColor(Color.GRAY);
ZeroLine.SetStyle(Curve.SHORT_DASH);
ZeroLine.HideTitle();
ZeroLine.HideBubble();

# Add background cloud effect (optional - can be disabled)
AddCloud(UpZone, 0, Color.DARK_GREEN, Color.CURRENT);
AddCloud(DnZone, 0, Color.DARK_RED, Color.CURRENT);

@MIc5th Good news. Yes, the ToS RSI() uses a default Wilders Average
 
Last edited:
Bongo_MOD Structure

Added User‑controlled:

  • Average type
  • Length
  • Three RSI speeds
  • Global colors
  • Added Price % of MA to trend count label
"Method to the Madness": For reference I will be using this for an upcoming project... "Stay Tuned".
(Default to my preferred 8 SMA using original RSI lengths)

Bongo_MOD

Ruby:
# bongo_stacked_rsis

#--------------------
#https://usethinkscript.com/threads/bongo-indicator-for-thinkorswim.14473/#post-124524
#Bongo Indicator For ThinkOrSwim
#Bongo designed by a group of traders at an HGSI seminar.
#Mod: atcsam - User contol & price % from MA
def na = double.nan;
def bn = barnumber();

input averagetype = AverageType.SIMPLE;
input length = 8;

input RSI_1 = 8;
input RSI_2 = 14;
input RSI_3 = 19;

Input ShowLabel = Yes;

DefineGlobalColor("BongoUP",Color.Green);
DefineGlobalColor("BongoDn",Color.RED);


def r1 = RSI(length = RSI_1);
def r2 = RSI(length = RSI_2);
def r3 = RSI(length = RSI_3);

plot MA1 = MovingAverage(averagetype, close, length);

# calc % chg
def machg = ma1 - ma1[1];
def machgper = 100*machg/ma1[1];

def Up = If((r1 > r2) and (r2 > r3) and (close > MA1), 1, 0);
def Dn = If((r1 < r2) and (r2 < r3) and (close < MA1), 1, 0);

# use same var at end.  then no white sections.  cont color
def BongoUp2 = if Up then 1 else if Dn then 0 else BongoUp2[1];
def BongoDn2 = if Dn then 1 else if Up then 0 else BongoDn2[1];

MA1.AssignValueColor(if BongoUp2 then GlobalColor("BongoUp") else if BongoDn2 then GlobalColor("BongoDn") else Color.WHITE);
MA1.SetLineWeight(1);

def per = Round( 100* (Close-ma1)/ma1,1);

#--------------------------------------
# cnt bars since rev

def cnt = if bn == 1 then 0
else if BongoUp2 and BongoDn2[1] then 1
else if Bongodn2 and Bongoup2[1] then -1
else if cnt[1] > 0 then cnt[1] + 1
else if cnt[1] < 0 then cnt[1] - 1
else cnt[1];

AddLabel(
    ShowLabel,
    cnt,
    if BongoUp2 then Color.GREEN
    else if BongoDn2 then Color.RED
    else Color.WHITE
);

addlabel(yes, per +" %", (if per >0 then color.Light_green else if per < 0 then color.light_red else color.light_gray));
 
Last edited by a moderator:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
1032 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