RSI14 & DAX 5 minutes trading system
Forums › ProRealTime English forum › ProOrder support › RSI14 & DAX 5 minutes trading system
- This topic has 10 replies, 2 voices, and was last updated 7 years ago by
Nicolas.
-
-
09/12/2017 at 1:46 PM #45862
TF 5 min on CFD DAX mini, only little backtest to validate the robusteness of the strategy
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859//-------------------------------------------------------------------------// Codice principale : RSI14 _DAX 5min buono ... da ottimaizzare STOP e TARGET P//-------------------------------------------------------------------------////////////////rsi14 DAX 5 min ///////////////////////////////////// short backtest ///// ......DEFPARAM CumulateOrders=falseDEFPARAM FLATBefore = 083000DEFPARAM FLATAfter = 170000REINV = 0// "0" REinvestment//levier = 1.5// SOLITAMENTE 2 contratti per questioni di margine solo 1levier = 2IF REINV = 0 THENn = levier // pas de réinvestissementENDIFIF REINV = 1 THEN // réinvestissementcapital = 200 + strategyprofitn = (capital / 200) *levierENDIF//n1 = n+2//if n > 200 then//n = 100//endif// IndicatorShort = RSI[14](close) crosses under 25Long = RSI[14](close) crosses over 75MM200 = Average[200](Close)// SET UP MASTER TRENDLong1 = DCLose(1) > MM200 and Close > DClose(1)Short1 = DClose(1) < MM200 and Close < DCLose(1)//// SET UP LONG//if Currentdayofweek <> 5 thenIF not onmarket and long and Long1 thenBUY n SHARES AT marketendif////// SET UP SHORT //////////////if Currentdayofweek <> 5 thenIF short and short1 then//IF cs1 and r1 and r3 then//IF cs1 and r1 and r3 thenSELLSHORT n SHARES at marketendifSET target pprofit 20SET STOP pLOSS 3009/13/2017 at 12:34 PM #4612409/18/2017 at 9:55 AM #4646509/18/2017 at 10:42 AM #4647209/18/2017 at 12:39 PM #46495The 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.
1 user thanked author for this post.
09/20/2017 at 5:51 PM #46727HI 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 ?
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283//-------------------------------------------------------------------------// Codice principale : RSI14 _DAX 5min buono ... da ottimaizzare STOP e TARGET P//-------------------------------------------------------------------------////////////////rsi14 DAX 5 min ///////////////////////////////////// Guadango costante// ......DEFPARAM CumulateOrders=falseDEFPARAM FLATBefore = 083000DEFPARAM FLATAfter = 180000REINV = 0// "0" REinvestment//levier = 1.5// SOLITAMENTE 2 contratti per questioni di margine solo 1levier = 1IF REINV = 0 THENn = levier // pas de réinvestissementENDIFIF REINV = 1 THEN // réinvestissementcapital = 200 + strategyprofitn = (capital / 200) *levierENDIF//n1 = n+2//if n > 200 then//n = 100//endifx1 = n+1// Indicator//Short = RSI[14](close) crosses under 25Short = RSI[14](close) crosses under 25Long = RSI[14](close) crosses over 75MM200 = Average[200](Close)// SET UP MASTER TRENDLong1 = DCLose(1) > MM200 and Close > DClose(1)Short1 = DClose(1) < MM200 and Close < DCLose(1)//// SET UP LONGif Currentdayofweek < 3 thenIF not onmarket and long and Long1 thenBUY x1 SHARES AT marketendifendifif Currentdayofweek > 3 thenIF not onmarket and long and Long1 thenBUY n SHARES AT marketendifendif////// SET UP SHORT ////////////if Currentdayofweek <3 thenIF short and short1 then//IF cs1 and r1 and r3 then//IF cs1 and r1 and r3 thenSELLSHORT x1 SHARES at marketendifendifif Currentdayofweek > 3 thenIF short and short1 then//IF cs1 and r1 and r3 then//IF cs1 and r1 and r3 thenSELLSHORT n SHARES at marketendifendif//if longonmarket then//sell n shares at low -2 stop//endifSET target pprofit 20SET STOP pLOSS 3009/21/2017 at 7:21 AM #4675109/21/2017 at 8:42 AM #46765I 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
09/21/2017 at 10:57 AM #4677709/22/2017 at 12:58 PM #4692409/25/2017 at 10:00 AM #47199The 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 -
AuthorPosts