Hi Team,
Please be gentle with me, Im a complete noob and I
m pretty sure my questions may be daft and basic. Anyway I`ve created a simple RSI strategy using the Simplified creation builder and applied it to the FTSE100 at 20min timeframe, on back-testing, it seems to turn a profit most of the time
However, back-testing further, there are certain dates like Feb / March 2020 where the market took a severe nose dive or October 2020 where there was a sharp upturn and I was wrong side and get stopped out. Is there a way I can prevent it from opening positions when the market is moving in one direction or another sharply?
Sorry if I sound like a complete noob.
Code looks like this, thanks in advance:
===================================================
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = RSI[17](close)
c1 = (indicator1 CROSSES OVER 29)
IF c1 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit long positions
indicator2 = RSI[17](close)
c2 = (indicator2 CROSSES OVER 70)
IF c2 THEN
SELL AT MARKET
ENDIF
// Conditions to enter short positions
indicator3 = RSI[17](close)
c3 = (indicator3 CROSSES UNDER 70)
IF c3 THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit short positions
indicator4 = RSI[17](close)
c4 = (indicator4 CROSSES UNDER 29)
IF c4 THEN
EXITSHORT AT MARKET
ENDIF