RicxParticipant
Junior
I tried to create a simple strategy with an easy target, just to get started with automated trading as I am fairly new to this type of trading.
It is a very simple strategy, which might be something to add a few tweaks to.
However I would like to minimize the number of trades ending up even, anyone got any ideas of how to accomplish that?
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Prevents the system from placing new orders on specified days of the week
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
// Conditions to enter long positions
indicator1 = RSI[2](close)
c1 = (indicator1 CROSSES OVER 8)
IF c1 AND not daysForbiddenEntry THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit long positions
indicator2 = RSI[2](close)
c2 = (indicator2 > 20)
IF c2 THEN
SELL AT MARKET
ENDIF
// Conditions to enter short positions
indicator3 = RSI[2](close)
c3 = (indicator3 CROSSES UNDER 83)
IF c3 AND not daysForbiddenEntry THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit short positions
indicator4 = RSI[2](close)
c4 = (indicator4 < 77)
IF c4 THEN
EXITSHORT AT MARKET
ENDIF
// Stops and targets
SET STOP pLOSS a
The amount of even trades youre getting is definitly a red flag.. another thing is most people who runs a similiar 10/2 rsi or in ur case 20/2 rsi, they pretty much always seem to add the “close > 200MA” rule. or something similar to define uptrend vs downtrending market.
What is your stop loss? It seems way way way too tight
RicxParticipant
Junior
You’re right, something seems odd. Though I cannot really seem to figure out what..?
What does 10/2 and 20/2 means when it comes to RSI?
Oh, I must have forgotten to delete the parameter for testing the best outcome from SL point of view. I used 27 as SL as it gave the best results in backtesting.