• Get $40 off VIP by signing up for a free account! Sign Up

Ophir Gottlieb CMLviz Bullish Indicator for ThinkorSwim


Active member
2019 Donor
This is the bullish momentum indicator from CMLviz (Capital Market Laboratories) posted by Ophir Gottlieb.

It identifies
  • downtrended stocks climbing above their 200sma (a critical juncture used by algos)
  • is above short ma to confirm momentum
  • but not overbought as determined with RSI

Here's the code for ThinkorSwim, you can use this as a scanner as well on the Daily chart.

# CML Buy the Dip Indicator rev 1 by theelderwand in uTS 8-7-19
def EMA10 = MovAvgExponential(CLOSE, 10, 0, no);
def SMA200 = SimpleMovingAvg(CLOSE, 200, 0, no);
def RSI20 = RSI(20, 70, 30, CLOSE, AverageType.WILDERS, no);
def RSI14 = RSI(14, 70, 30, CLOSE, AverageType.WILDERS, no);
plot Data = (CLOSE crosses above SMA200) and (CLOSE > EMA10) and RSI20 < 70 and RSI14< 70;

Shared Scan Link: http://tos.mx/!bIJtEPZe Click here for --> Easiest way to load shared links

Note: This is NOT the same as the premium Buy the Dip indicator posted here.
Last edited by a moderator:

BenTen's Watchlist + Setup + Trade Recaps

Get access to Ben's watchlist, swing trading strategy, ThinkorSwim setup, and trade examples.

Learn more

stock price closes up thru the 200 ema within 5 bars , stock price is above 10 ema and rsi 20 period is below 70
@theelderwand I'm curious, and I haven't read the manual. Why use close crosses above SMA200 vs ">" SMA200? Thanks!

It works quite well. I get good signals. Thanks, @theelderwand ! (y)(y) On a Daily timeframe, look at trying a 65 Day EMA vs 200 day EMA. It's just a hunch... let us know

The thing to watch for IMO is price action. Obviously, to me, if I get a signal in downtrend, I would tend to ignore it.
@markos I think the idea is to catch the stock crossing over rather than a steady state, I use Wealth Lab for backtesting and it seems to back test there pretty well as well. Thanks for the tip on the revision note. Added it now.
@Shinthus what seems to be the issue ?
Got this to work finally. I think it was my TOS having issues. Looks nice. Does anybody have any alternative settings they use for this?

IDK. I'm looking at Daily TF on many stocks and ETFs and I'm getting nearly 50% signals on candles that immediately drop significantly 1 day afterward. Even with the adjusted 65 EMA.
Examine what this is actually doing. A close cross above 200 SMA gives no hint of what the next candle may do. Hence your problem with a next candle drop. The better solution is just the cross of the 200 SMA with the 10 EMA At least you have the average of those number of days weighted in your favor. I understand it may be an attempt to enter earlier than a MA cross but also presents the problem of a close cross of the 200 and a failure of the 10 EMA to ever cross. This is complicating a simple cross.
Last edited:

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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