RSI(2) On The S&P 500 (Amibroker And Tradestation Code)
The strategy in plain English:
- The two-day RSI must be lower than 15.
- If one is true, then enter at the close.
- Exit at the close when the close is higher than yesterday’s high.
Amibroker code:
Buy=rsi(2)<15 ;
buyPrice=C;
Sell= C>Ref(H,-1) ;
sellPrice=Close ;
Tradestation code:
{
RSI(2) On The S&P 500 (Strategy 61)
The two-day RSI must be lower than 15.
If one is true, then enter at the close.
Exit at the close when the close is higher than yesterday's high.
}
Inputs:
RsiLookback(2),
RsiTreshold(15);
if RSI(Close, RsiLookback) < RsiTreshold Then
Buy this bar on close;
if Barssinceentry(0) >= 1 and Close > High[1] Then
Sell this bar on close;
Disclosure: We are not financial advisors. Please do your own due diligence and investment research or consult a financial professional. All articles are our opinions – they are not suggestions to buy or sell any securities.
