DRSI DMA Scalping Strategy No Repaint

This strategy compares the slope of a Moving Average (of your choosing) to the slope of a Momentum Indicator (of your choosing). Zero is the center line because 0 slope means sideways movement. When both lines cross your buy threshold, it buys. When both lines cross your Sell threshold, it sells. The lines may look choppy, but that is probably because it is referencing a different timeframe than what the chart is set to. I left as many settings adjustable by the user as possible so you can tune this strategy to the relative behavior of whatever you are trading.

This also includes a No Repaint function so the backtest should be as close to live trading as possible.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


alot of false signals i noticed i think it needs some confirmation indicator to make it 100 %
allenlk TradingSnip3r
@TradingSnip3r, True. I originally intended this to be a sort of sandbox to play with and see what works. It definitely has room for improvements. However, I don't think 100% accuracy is possible without knowing the future.
+1 Reply
Nice idea and implementation! Though I am still wondering why my strategy tester shows no data message so I cannot back test it... Any idea?
allenlk lcastilloe
@lcastilloe, You might have to mess with the settings to get a good profitable result on different charts. Different charts behave differently. It might be losing too much with it's default setting on the chart you're looking at. Try changing the order size to 10 and then you can play with the settings to find what works on what you're trading.
lcastilloe allenlk
@allenlk, many thnaks I can make it work now... could you please also kindly confirm how to get the two segregated alerts to perform the buy sell operations? Thanks again...
allenlk lcastilloe
@lcastilloe, There's a couple reasons this can happen.
First, if you just want to turn it off completely, set pyramiding to 0.
Second, if you still want pyramiding (I like it because if a bad trade happens it can average down or up a little bit), your moving average lengths might be too short. Remember the moving averages are looking at the candles of the alternate resolution. So if you have you chart set to 1 hour candles and the alternate resolution is 1min with the MA set to 10, there is 6 data points within that 1 hour candle. A lot can happen, it can be useful to see that high resolution if what you're trading is volatile, but if you're trading something that doesn't move very quickly it can confuse this bot (momentum will go up and down while the price didn't change enough to profit from). It's why I included the low volatility function (but the low volatility function is looking at the chart resolution).
Also do not check the box for "Recalculate after every trade" if pyramiding is active. You do need to have "Recalculate on every tick" selected to have it work on live data though.