Trading Rush MACD 200 EMA Strategy 62% Win Rate For ThinkOrSwim

@dmaffo , you are not really looking at a script. Upper panel is price crossing above EMA, 50 or 200 whatever is set. The lower panel is a simple macd histogram with green(above 0 bars) to get the same view add ema then add macd histogram
 
Edit: My mistake, I think I see what the issue is, it's taking the signal from the first candle when I enter on the 2nd (so there's no repainting). Can the code be manipulated to show arrows on the 2nd candle open?
View attachment 989
Attached is an example of the indicator not signaling with the 50 EMA.
input fastLength = 8;
input slowLength = 17;
input macdLength = 9;
input averageType = AverageType.EXPONENTIAL;
input price = close;
input EMAperiod = 50;
Def trendma = ExpAverage(price, EMAperiod);
#trendma.SetDefaultColor(Color.Cyan);
def signal = reference MACD(fastLength, slowLength, macdLength, averageType).Avg;
def macd = reference MACD(fastLength, slowLength, macdLength, averageType).Value;
plot buymacd = macd crosses above signal within 2 bars and low > trendma and macd[1] < 0;
buymacd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buymacd.setDefaultColor(Color.Green);
#plot sellmacd = macd crosses below signal and high < trendma and macd [1] > 0;
#sellmacd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_Down);
#sellmacd.setDefaultColor(Color.Red);
 
input fastLength = 8;
input slowLength = 17;
input macdLength = 9;
input averageType = AverageType.EXPONENTIAL;
input price = close;
input EMAperiod = 50;
Def trendma = ExpAverage(price, EMAperiod);
#trendma.SetDefaultColor(Color.Cyan);
def signal = reference MACD(fastLength, slowLength, macdLength, averageType).Avg;
def macd = reference MACD(fastLength, slowLength, macdLength, averageType).Value;
plot buymacd = macd crosses above signal within 2 bars and low > trendma and macd[1] < 0;
buymacd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buymacd.setDefaultColor(Color.Green);
#plot sellmacd = macd crosses below signal and high < trendma and macd [1] > 0;
#sellmacd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_Down);
#sellmacd.setDefaultColor(Color.Red);
BBIG, KOSS for today Oct2021
 
I decided to make an account today because I was pleased viewing this thread. I use the exact strategy with ETF's and futures, but using a 50 EMA instead of 200. Has been working well for me.

I wanted to know why when I change the input from 200 EMA to 50 EMA it doesn't signal correctly. Does anyone know how to fix this?

Code:
input fastLength = 12;
input slowLength = 26;
input macdLength = 9;
input averageType = AverageType.EXPONENTIAL;
input price = close;
input EMAperiod = 50;
plot trendma = ExpAverage(price, EMAperiod);
trendma.SetDefaultColor(Color.Cyan);
def signal = reference MACD(fastLength, slowLength, macdLength, averageType).Avg;
def macd = reference MACD(fastLength, slowLength, macdLength, averageType).Value;
plot buymacd = macd crosses above signal and low > trendma and macd[1] < 0;
buymacd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buymacd.setDefaultColor(Color.Green);
plot sellmacd = macd crosses below signal and high < trendma and macd [1] > 0;
sellmacd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_Down);
sellmacd.setDefaultColor(Color.Red);

@irishgold @MerryDay
One last thought, after watching TradingRush and the backtesting, then the results, you changed the settings,..... now you will have to backtest to understand if your change returns or surpasses previous results?
 
Edit: My mistake, I think I see what the issue is, it's taking the signal from the first candle when I enter on the 2nd (so there's no repainting). Can the code be manipulated to show arrows on the 2nd candle open?
View attachment 989
Attached is an example of the indicator not signaling with the 50 EMA.
You mind sharing your chart set up? I am using MerryDay set up/watchlist with a GaussianMACD and overlaid the TradingRush signals. Then there's the watchlist with Gaussian,......not good. Example is easily visual in the watchlist, and I will see if I can substitute signal????????
HOPJQsF.png
 
You mind sharing your chart set up? I am using MerryDay set up/watchlist with a GaussianMACD and overlaid the TradingRush signals. Then there's the watchlist with Gaussian,......not good. Example is easily visual in the watchlist, and I will see if I can substitute signal????????
HOPJQsF.png
Hey Thomas,

Sorry I haven't been as active.

Absolutely I'll attached the link below.

https://tos.mx/dFG284w
 
I added volume arrows on the zero line. Not sure about the arrows. Maybe you have to many indicators on your chart.
Code:
declare lower;
input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
input HighVolume = yes;
input VolumeAveragingLength = 20;
input VolumePercentThreshold = 60;
plot Value = MovingAverage(averageType, close, fastLength) – MovingAverage(averageType, close, slowLength);
plot Avg = MovingAverage(averageType, Value, MACDLength);
plot Diff = Value – Avg;
plot ZeroLine = 0;
Value.SetDefaultColor(GetColor(1));
Avg.SetDefaultColor(GetColor(8));
Diff.SetDefaultColor(GetColor(5));
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Diff.SetLineWeight(3);
Diff.DefineColor(“Positive and Up”, Color.GREEN);
Diff.DefineColor(“Positive and Down”, Color.DARK_GREEN);
Diff.DefineColor(“Negative and Down”, Color.RED);
Diff.DefineColor(“Negative and Up”, Color.DARK_RED);
Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.Color(“Positive and Up”) else Diff.Color(“Positive and Down”) else if Diff < Diff[1] then Diff.Color(“Negative and Down”) else Diff.Color(“Negative and Up”));

##High Volume
def aVol = Average(volume, VolumeAveragingLength);
def pVol = 100 * ((volume - aVol[1]) / aVol[1]);
def pDot = pVol >= VolumePercentThreshold;
def HV= pDot and HighVolume;
plot HiVolArrow = if HV then 0 else Double.NaN;

HiVolArrow.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
HiVolArrow.SetDefaultColor(Color.WHITE);
HiVolArrow.HideTitle();
HiVolArrow.HideBubble();

ZeroLine.SetDefaultColor(GetColor(0));


# now for the signal
def ValueCrossBelowZeroline = Value[1] < Avg[1] and Value[1] < 0 and Value > Avg;
plot belowZeroCross = if ValueCrossBelowZeroline then Value else Double.NaN;
belowZeroCross.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
belowZeroCross.SetDefaultColor(Color.CYAN);
def ValueCrossAboveZeroline = Value[1] > Avg[1] and Value[1] > 0 and Value < Avg;
plot aboveZeroCross = if ValueCrossAboveZeroline then Value else Double.NaN;
aboveZeroCross.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
aboveZeroCross.SetDefaultColor(Color.MAGENTA);

#plot scan = ValueCrossBelowZeroline;
#plot scan = ValueCrossAboveZeroline;
# Alerts
Alert(aboveZeroCross, "ValueCrossAboveZeroline", Alert.BAR, Sound.Bell);
Alert(belowZeroCross, "ValueCrossBelowZeroline", Alert.BAR, Sound.Ding);
This is great! Is there one like this for trade view? With the volume arrows and alerts?
 
Code:
input fastLength = 12;
input slowLength = 26;
input macdLength = 9;
input averageType = AverageType.EXPONENTIAL;
input price = close;
input EMAperiod = 200;
plot VWAP1 = VWAP(Period = AggregationPeriod.DAY);

plot trendma = ExpAverage(price, EMAperiod);
trendma.SetDefaultColor(Color.Cyan);
def signal = reference MACD(fastLength, slowLength, macdLength, averageType).Avg;
def macd = reference MACD(fastLength, slowLength, macdLength, averageType).Value;
plot buymacd = macd crosses above signal and close > VWAP1 and macd[1] < 0;
buymacd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
buymacd.setDefaultColor(Color.Green);
plot sellmacd = macd crosses below signal and close < VWAP1 and macd [1] > 0;
sellmacd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_Down);
sellmacd.setDefaultColor(Color.Red);
Can you please share your MACD_VWAP chart! I can not make it work
Thanks
 
You would create 2 Scans using the 10 stocks as the basis, then add condition one with plot macdbuy and the second scan plot sellmacd,
once created you create alert based on scan and it can send email or SMS from TOS
hi irishgold (and everyone who can see this) - I came across this post. What is the condition I should check in TOS Stock Hacker Scan? I attached photo

Thanks
 

Attachments

  • 2024-03-20 07_37_31-Main@thinkorswim [build 1980].jpg
    2024-03-20 07_37_31-Main@thinkorswim [build 1980].jpg
    55.1 KB · Views: 133

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
446 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.
Back
Top