The MA-RSI system, used by Candlestick Trader PH. You can check out his Youtube channel.
To use this script, simply copy and paste the code below in your VAI Script Editor, save it and run! Depending on how the script is written, you can run it in the charts module to display the signals on the chart or run it in the screener module, which will show all the signals for that day.
You can find more tutorials here https://www.vaianalytics.com/knowledge-base/
//MARSI system by Candlestick Trader PH
//Set variables
Set RSI9 = RSI(close,9)
Set RSI25 = RSI(close,25)
Set sma10 = SMA(close,10)
set sma20 = SMA(close,20)
//Buy if prices are above the 10 days moving average and short term RSI crosses over long term RSI
Set Buy= crossover(rsi9,rsi25) and (close > sma10)
//Sell if prices crosses below 20 day moving average or long term RSI crosses below short term RSI
Set Sell= crossover(rsi25,rsi9) or crossover(sma20,close)
// Plot the RSI, SMA and signals on the chart
plot(rsi9,line,any,RSI)
plot(rsi25,line,any,RSI)
plot(sma10,line,any,main)
plot(sma20,line,any,main)
// For this strategy, I used a different plot function for trading signals since this strategy will have multiple succeeding buy and sell signals.
//The function plotbbuysell will only open a new buy position if the previous position is already closed.
plotbuysell (buy, sell, green, red, main)
// The signal function will allow VAI to read your "buy" and "sell" conditions.
signals(buy,sell)
//end
