CML Buy the Dip Indicator

T

theelderwand

New member
VIP
# CML Buy the Dip Indicator rev 1 by theelderwand in uTS 8-7-19

This is the CML Buy The Dip indicator posted by Ophir. The description can be found here,


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


Code:
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;

Data.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Data.SetDefaultColor(Color.LIME);
 
Last edited:
markos

markos

Well-known member
VIP
@theelderwand I'm curious, and I haven't read the manual. Why use close crosses above SMA200 vs ">" SMA200? Thanks!
 
Shinthus

Shinthus

Member
VIP
Can't get this to work. There is a problem with "data" in the last line.
 
markos

markos

Well-known member
VIP
Please add this to the top of your script so it can be tracked by rev. Thanks.
# CML Buy the Dip Indicator rev 1 by theelderwand in uTS 8-7-19
 
T

theelderwand

New member
VIP
@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 ?
 
Shinthus

Shinthus

Member
VIP
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?
 
markos

markos

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

Shinthus

Member
VIP
It works quite well. I get good signals. Thanks, @theelderwand ! (y)(y)
@Shinthus On a Daily timeframe, look at trying a 65 Day EMA vs 200 day EMA. It's just a hunch... let us know
just clarifying - you mean 65 EMA vs 200 SMA? or 200 EMA. the default settings are 10EMA and 200SMA, I believe.
 
markos

markos

Well-known member
VIP
just clarifying - you mean 65 EMA vs 200 SMA? or 200 EMA. the default settings are 10EMA and 200SMA, I believe.
My mistake, it's the 65 EMA vs the 200 SMA. It might be too fast, try it & see.
 
Shinthus

Shinthus

Member
VIP
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.
 
Last edited:
H

horserider

Active 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:
markos

markos

Well-known member
VIP
After living with this for awhile, i like the signals. 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.
 

Top