Good morning traders!
I have been successful paper trading this strategy for some time now and I can actually vouch for it, it’s been profitable for me. I found this strategy on the Trading Rush channel. He’s tested over 50 strategies on Trading View over the years and to this day, the MACD 200 EMA strategy has been #1 in terms of winning percentage. Here is the strategy he came up with:
I was able to find the strategy coded on trading view. The source code is public so I pasted it below. I was wondering if anyone can convert the code from pinescript to thinkscript so I can set alerts on thinkorswim?
Below is a picture of the strategy and links for more information:
Picture of Indicator on Trading View Today In Real Time.
Link to his video for a better understanding on the strategy.
Link to the list of strategies he’s tested 100 times.
Source code below:
I have been successful paper trading this strategy for some time now and I can actually vouch for it, it’s been profitable for me. I found this strategy on the Trading Rush channel. He’s tested over 50 strategies on Trading View over the years and to this day, the MACD 200 EMA strategy has been #1 in terms of winning percentage. Here is the strategy he came up with:
- Only long entries above the 200 EMA.
- Only short entries below the 200 EMA
- Only long entries if MACD crosses above the signal line from BENEATH the zero line.
- Only short entries if MACD crosses below the signal line from ABOVE the zero line.
I was able to find the strategy coded on trading view. The source code is public so I pasted it below. I was wondering if anyone can convert the code from pinescript to thinkscript so I can set alerts on thinkorswim?
Below is a picture of the strategy and links for more information:
Picture of Indicator on Trading View Today In Real Time.
Link to his video for a better understanding on the strategy.
Link to the list of strategies he’s tested 100 times.
Source code below:
//@version=4
study(title="Trading Rush Signals & Alerts", shorttitle="Trading RUSH", overlay = true)
trend = input(title="Display 200 EA", type=input.bool, defval=false)
trendma = ema(close, 200)
labeled = input(title="Display strategy name with signals", type=input.bool, defval=true)
indicators = input(title="Display indicators", type=input.bool, defval=false)
plot(trend ? trendma : na, title = "200 EA", color=color.black, linewidth = 3)
////////
// MACD
macdenabler = input(title="Enable MACD ?", type=input.bool, defval=true)
fast_length = 12 //input(title="Fast Length", type=input.integer, defval=12)
slow_length = 26 //input(title="Slow Length", type=input.integer, defval=26)
srcmacd = close //input(title="Source", type=input.source, defval=close)
signal_length = 9 //input(title="Signal Smoothing", type=input.integer, minval = 1, maxval = 50, defval = 9)
// Calculation
fast_ma = ema(srcmacd, fast_length)
slow_ma = ema(srcmacd, slow_length)
macd = fast_ma - slow_ma
signal = ema(macd, signal_length)
hist = macd - signal
//Strategy
buymacd = crossover (macd, signal) and low > trendma and macd[1]<0
sellmacd = crossunder (macd, signal) and high < trendma and macd [1]> 0
plotshape(labeled and macdenabler ? buymacd :na, style = shape.triangleup, size = size.small, location = location.belowbar, color = color.red, title = "MACD Buy L", text = "MACD")
plotshape(labeled and macdenabler ? sellmacd :na, style = shape.triangledown, size = size.small, location = location.abovebar, color = color.red, title = "MACD Sell L", text = "MACD")
plotshape(labeled or not macdenabler ? na : buymacd, style = shape.triangleup, size = size.small, location = location.belowbar, color = color.red, title = "MACD Buy")
plotshape(labeled or not macdenabler ? na : sellmacd, style = shape.triangledown, size = size.small, location = location.abovebar, color = color.red, title = "MACD Sell")
alertcondition(buymacd or sellmacd, title = "MACD Strategy", message = "MACD signal was generated on {{ticker}} at {{timenow}}")