Moving Average Strength Index for ThinkorSwim


Staff member
I want to request a new indicator. It should be histogram, if all conditions meet it should be green and if any one condition does not meet it turns red. You can name indicator as Bingo. Two Requirements:

(1) close > 9 period SMA of the close.
(2) 8 period RSI is more than 14 period RSI and 14 period RSI is more than 19 period RSI.

It should calculate on daily and weekly time frames. Should work on at least stocks, but good to have it work on futures, indices, forex etc. stocks are must requirement. Ideally I want to see when daily turns green from red while weekly is still green in one subgraph if possible..

From what I'm seeing, this indicator (dubbed Bingo by the requester) is similar to the Market Mover Indicator where it utilizes a moving average along with the RSI (Relative Strength Index) to identify a trend.


thinkScript Code


declare lower;

input length1 = 8;

input price = close;
input averageType = AverageType.WILDERS;

def NetChgAvg1 = MovingAverage(averageType, price - price[1], length1);
def TotChgAvg1 = MovingAverage(averageType, AbsValue(price - price[1]), length1);
def ChgRatio1 = if TotChgAvg1 != 0 then NetChgAvg1 / TotChgAvg1 else 0;

def RSI1 = 50 * (ChgRatio1 + 1);

input length2 = 14;

def NetChgAvg2 = MovingAverage(averageType, price - price[1], length2);
def TotChgAvg2 = MovingAverage(averageType, AbsValue(price - price[1]), length2);
def ChgRatio2 = if TotChgAvg2 != 0 then NetChgAvg2 / TotChgAvg2 else 0;

def RSI2 = 50 * (ChgRatio2 + 1);
input length3 = 19;

def NetChgAvg3 = MovingAverage(averageType, price - price[1], length3);
def TotChgAvg3 = MovingAverage(averageType, AbsValue(price - price[1]), length3);
def ChgRatio3 = if TotChgAvg3 != 0 then NetChgAvg3 / TotChgAvg3 else 0;

def RSI3 = 50 * (ChgRatio3 + 1);

input lengthsma = 9;
input displacesma = 0;

def sma = Average(price[-displacesma], lengthsma);

Plot Bingo = RSI1 + SMA/2;
bingo.AssignValueColor(if close > sma && RSI1 > RSI2 && RSI2 > RSI3 then else;
bingo.AssignValueColor(if close > sma && RSI1 > RSI2 && RSI2 > RSI3 then else;
Bingo.SetPaintingStrategy(PaintingStrategy.HISTOGRAM) ;


Shareable Link


  • TrSDFYn.png
    100.4 KB · Views: 129

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
288 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.