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

Note: This is NOT the same as the premium Buy the Dip indicator posted here.

Video Tutorial

Last edited by a moderator:

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


Well-known member
@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.


Active member
2019 Donor
@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 ?


2019 Donor
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.


Well-known member
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:
I know this thread is a year old, but if there are any updates or just a simple TOS share link, maybe I could get this thing to work? I copied and pasted both ways....with the " # CML Buy the Dip Indicator rev 1 by theelderwand in uTS 8-7-19 " on top of the script and without....neither is producing any "yellow arrows" in any time frame. What am I doing wrong???????


New member
I was able to get this to work for my daily chart but I wasn't sure about the readings actually. The few arrows that came up appeared in the dip for some, in more random locations for others.

BenTen's Watchlist + Setup + Trade Recaps

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

Learn more