TF 5 min on CFD DAX mini, only little backtest to validate the robusteness of the strategy
//-------------------------------------------------------------------------
// Codice principale : RSI14 _DAX 5min buono ... da ottimaizzare STOP e TARGET P
//-------------------------------------------------------------------------
////////////////rsi14 DAX 5 min /////////////////////////////////
//// short backtest ///
// ......
DEFPARAM CumulateOrders=false
DEFPARAM FLATBefore = 083000
DEFPARAM FLATAfter = 170000
REINV = 0// "0" REinvestment
//levier = 1.5
// SOLITAMENTE 2 contratti per questioni di margine solo 1
levier = 2
IF REINV = 0 THEN
n = levier // pas de réinvestissement
ENDIF
IF REINV = 1 THEN // réinvestissement
capital = 200 + strategyprofit
n = (capital / 200) *levier
ENDIF
//n1 = n+2
//if n > 200 then
//n = 100
//endif
// Indicator
Short = RSI[14](close) crosses under 25
Long = RSI[14](close) crosses over 75
MM200 = Average[200](Close)
// SET UP MASTER TREND
Long1 = DCLose(1) > MM200 and Close > DClose(1)
Short1 = DClose(1) < MM200 and Close < DCLose(1)
//
// SET UP LONG
//if Currentdayofweek <> 5 then
IF not onmarket and long and Long1 then
BUY n SHARES AT market
endif
////// SET UP SHORT ////////////
//if Currentdayofweek <> 5 then
IF short and short1 then
//IF cs1 and r1 and r3 then
//IF cs1 and r1 and r3 then
SELLSHORT n SHARES at market
endif
SET target pprofit 20
SET STOP pLOSS 30
Hello ,
there is something to help me and to check the robustness of this strategy ? Backtest with 200k bar or other check ?
Thanks
REgards
Here are the results of this trading system over 200.000 bars. Not too bad, I used 2 points spread.
Hi Nicolas ,
thanks an advance for your check
Any suggestion from the Community to optimize the equity line and to reduce the Drawdown ?
Regards .
The risk/reward ratio is 0.66, due to stoploss superior to takeprofit value. You should try to investigate first on this purpose to reduce the effect that multiple losses in the same row can have on the overall result. This is what happened during year 2015 in backtest.
HI Nicolas ,
I tried to insert a little check with current day of week , less trade but the equity line is optimize
Follow the code , what do you think ?
//-------------------------------------------------------------------------
// Codice principale : RSI14 _DAX 5min buono ... da ottimaizzare STOP e TARGET P
//-------------------------------------------------------------------------
////////////////rsi14 DAX 5 min /////////////////////////////////
//// Guadango costante
// ......
DEFPARAM CumulateOrders=false
DEFPARAM FLATBefore = 083000
DEFPARAM FLATAfter = 180000
REINV = 0// "0" REinvestment
//levier = 1.5
// SOLITAMENTE 2 contratti per questioni di margine solo 1
levier = 1
IF REINV = 0 THEN
n = levier // pas de réinvestissement
ENDIF
IF REINV = 1 THEN // réinvestissement
capital = 200 + strategyprofit
n = (capital / 200) *levier
ENDIF
//n1 = n+2
//if n > 200 then
//n = 100
//endif
x1 = n+1
// Indicator
//Short = RSI[14](close) crosses under 25
Short = RSI[14](close) crosses under 25
Long = RSI[14](close) crosses over 75
MM200 = Average[200](Close)
// SET UP MASTER TREND
Long1 = DCLose(1) > MM200 and Close > DClose(1)
Short1 = DClose(1) < MM200 and Close < DCLose(1)
//
// SET UP LONG
if Currentdayofweek < 3 then
IF not onmarket and long and Long1 then
BUY x1 SHARES AT market
endif
endif
if Currentdayofweek > 3 then
IF not onmarket and long and Long1 then
BUY n SHARES AT market
endif
endif
////// SET UP SHORT ////////////
if Currentdayofweek <3 then
IF short and short1 then
//IF cs1 and r1 and r3 then
//IF cs1 and r1 and r3 then
SELLSHORT x1 SHARES at market
endif
endif
if Currentdayofweek > 3 then
IF short and short1 then
//IF cs1 and r1 and r3 then
//IF cs1 and r1 and r3 then
SELLSHORT n SHARES at market
endif
endif
//if longonmarket then
//sell n shares at low -2 stop
//endif
SET target pprofit 20
SET STOP pLOSS 30
Please, once again, use the <> button to insert code into your post, thanks in advance 😉
So depending of the day of the week, you are modulating your exposure?
I only check in the code > if current day of week is less than 3 , buy 2 contract , else buy only 1 contract …
But the result of the equity seems better than the previous code …. Backtest only for 100k bar , I don t Know before …
Regards
Good thing about the pattern you spot for the strategy, but the RR is still inferior to 1, it doesn’t sounds good 😐
Suggest me your calculation formula of the RR ?
Thanks
The risk reward ratio is calculated mathematically by dividing the amount of profit the trader expects to have made when the position is closed (the reward) to the amount the trader stands to lose if the price moves in the unexpected direction (the risk).
So basically, in your case, divide the takeprofit by your stoploss: 20/30 = 0.66