Half a position (0.5) on DAX 10 minutes – MTF strategy
- This topic has 19 replies, 8 voices, and was last updated 4 years ago by .
Similar topics:
Forums › ProRealTime English forum › ProOrder support › Half a position (0.5) on DAX 10 minutes – MTF strategy
I’m fed up of waiting for @xrpboss to come back, so I’m putting attached on Demo Forward Test tomorrow! 🙂
There is scope for improvement if only I knew how it worked! 🙂
There are loads of trades that exit at £2 profit after having an MFE of > £100!
A Trailing Stop might improve it and catch trades with a good MFE before the > £100 profit dribbles away and turns into an exit at £2 profit.
Attached is the .itf thus far.
Please post any improvments.
I don’t know why but this code prompted me to look for a solution … look at lines 4, 15 and 23.
It seems to work..the sharpe ratio is enough you think! lol
help welcome
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
DEFPARAM CumulateOrders = False DEFPARAM PreLoadBars = 2000 DEFPARAM FLATBEFORE = 000000 divh, divb, ignored = CALL "Divergence RSI with lookback"[11, 76, 1, 1](close)//14-70/30/30 one = 1 if intradaybarindex=0 then two = 0 endif if onmarket and three<>tradeindex then two=two+1 three=tradeindex endif TIMEFRAME (default) //four = CALL "O" four = (divh < 1) //1000 //aa ici c est divb < TIMEFRAME (2 minute, updateonclose)//90 min IF Not OnMarket THEN five = 0 ELSE five = five + 1 ENDIF //six = CALL "K" six = (divb < 1)//1 //aa ici c est divh < TIMEFRAME (default) ONCE seven = 1 IF IntraDayBarIndex = 0 THEN seven = 1 ENDIF eight = five IF Not OnMarket AND eight <> eight[1] THEN seven = 1 ENDIF IF six AND seven ANd two<one and four THEN BUY 10 CONTRACT AT MARKET seven = 0 ENDIF //SET TARGET pPROFIT 400 //SET STOP pLOSS 170 nine = 300 ten = 240 IF NOT ONMARKET THEN eleven=0 ENDIF IF LONGONMARKET AND close-tradeprice(1)>=nine*pipsize THEN eleven = tradeprice(1)+ten*pipsize ENDIF IF eleven>0 THEN SELL AT eleven STOP ENDIF twelve = 2//12 fourteen = 1//2 IF NOT ONMARKET THEN fifteen=0 ENDIF IF LONGONMARKET AND close-tradeprice(1)>=twelve*pipsize THEN fifteen = tradeprice(1)+fourteen*pipsize ENDIF IF fifteen>0 THEN SELL AT fifteen STOP ENDIF //SET TARGET pPROFIT 4//2 //SET STOP pLOSS 100// 10 //https://www.prorealcode.com/topic/breakeven-with-a-technical-indicator/ // BUY //if ConditionsPurchase AND Not OnMarket then //BUY 1 lot AT market //endif // BREAKEVEN //SMA20 = Average [aa](close)//20 //once flag = (close >= SMA20) //if OnMarket AND flag =1 then //SELL 1 lot AT TRADEPRICE +1 LIMIT //endif // //// TP = HIGH BOLLINGER //BBH = BollingerUp [bb](close)//20 //C3 = (high >= BBH) // //MyConditionsCloture = C3 // //if MyConditionsCloture AND OnMarket then //SELL 1 lot AT market //endif //SET TARGET pPROFIT 6 //SET STOP pLOSS 200 //------------------------------------------------------ //trailing stop function trailingstart = 10//4//20 //trailing will start @trailinstart points profit trailingstep = 4//10//5 //trailing step to move the "stoploss" //reset the stoploss value IF NOT ONMARKET THEN newSL=0 ENDIF //manage long positions IF LONGONMARKET THEN //first move (breakeven) IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN newSL = tradeprice(1)+trailingstep*pipsize ENDIF //stop order to exit the positions IF newSL>0 THEN SELL AT newSL STOP EXITSHORT AT newSL STOP ENDIF endif |
Find exclusive trading pro-tools on