Eur/usd 4 hours good backtest alone i cannot import it.
- This topic has 0 replies, 1 voice, and was last updated 5 years ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
Similar topics:
Forums › ProRealTime English forum › ProOrder support › Eur/usd 4 hours good backtest alone i cannot import it.
Eur/usd 4 hours good backtest alone i cannot import it. Could someone help me?
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 |
DEFPARAM CumulateOrders = False DEFPARAM PRELOADBARS = 10000 daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0 Horaire = time >= 000000 and time <= 200000 CloturePartielle = 1 PositionsizeA = 1 PositionsizeV = 1 IF CloturePartielle THEN PositionsizeA = 4 PositionsizeV = 3 ENDIF MM = Average[63,3](totalprice) Newhighest=0 FOR a = 0 TO 1 DO IF DHigh(a)>Newhighest or Newhighest=0 THEN Newhighest = DHigh(a) ENDIF NEXT Newlowest=0 FOR b = 0 TO 1 DO IF DLow(b)<Newlowest or Newlowest=0 THEN Newlowest = DLow(b) ENDIF NEXT Milieu = (Newhighest+Newlowest)/2 Surachat = average[13,7]((Newhighest+Milieu)/2) Survente = average[13,7]((Newlowest+Milieu)/2) CA = (MM > Surachat) and (close crosses over Milieu) CV = (MM < Survente) and (close crosses under Milieu) // Long Entries IF Horaire AND CA AND not daysForbiddenEntry AND NOT SHORTONMARKET THEN BUY PositionsizeA CONTRACTS AT MARKET ENDIF IF CloturePartielle THEN IF LONGONMARKET THEN SELL 1 CONTRACTS AT TRADEPRICE + 63*pointsize LIMIT ENDIF IF LONGONMARKET THEN SELL 1 CONTRACTS AT TRADEPRICE + 27*pointsize LIMIT ENDIF IF LONGONMARKET THEN SELL 1 CONTRACTS AT TRADEPRICE + 24*pointsize LIMIT ENDIF ENDIF // Short Entries IF Horaire AND CV AND not daysForbiddenEntry AND NOT LONGONMARKET THEN SELLSHORT PositionsizeV CONTRACTS AT MARKET ENDIF IF CloturePartielle THEN IF SHORTONMARKET THEN EXITSHORT 1 CONTRACTS AT TRADEPRICE - 22*pointsize LIMIT ENDIF IF SHORTONMARKET THEN EXITSHORT 1 CONTRACTS AT TRADEPRICE - 70*pointsize LIMIT ENDIF ENDIF //MFE //trailing stop trailingstop = 21 //resetting variables when no trades are on market if not onmarket then MAXPRICE = 0 MINPRICE = close priceexit = 0 endif //case SHORT order if shortonmarket then MINPRICE = MIN(MINPRICE,close) //saving the MFE of the current trade if tradeprice(1)-MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then priceexit = MINPRICE+trailingstop*pointsize //set the exit price at the MFE + trailing stop price level endif endif //case LONG order if longonmarket then MAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current trade if MAXPRICE-tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then priceexit = MAXPRICE-trailingstop*pointsize //set the exit price at the MFE - trailing stop price level endif endif //exit on trailing stop price levels if onmarket and priceexit>0 then EXITSHORT AT priceexit STOP SELL AT priceexit STOP endif //SET TARGET pPROFIT 46 SET STOP pLOSS 150 |
Find exclusive trading pro-tools on