Eur/usd 4 hours good backtest alone i cannot import it.
Forums › ProRealTime English forum › ProOrder support › 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
dearno.
Viewing 1 post (of 1 total)
-
-
01/21/2020 at 2:38 PM #117254
Eur/usd 4 hours good backtest alone i cannot import it. Could someone help me?
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108DEFPARAM CumulateOrders = FalseDEFPARAM PRELOADBARS = 10000daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0Horaire = time >= 000000 and time <= 200000CloturePartielle = 1PositionsizeA = 1PositionsizeV = 1IF CloturePartielle THENPositionsizeA = 4PositionsizeV = 3ENDIFMM = Average[63,3](totalprice)Newhighest=0FOR a = 0 TO 1 DOIF DHigh(a)>Newhighest or Newhighest=0 THENNewhighest = DHigh(a)ENDIFNEXTNewlowest=0FOR b = 0 TO 1 DOIF DLow(b)<Newlowest or Newlowest=0 THENNewlowest = DLow(b)ENDIFNEXTMilieu = (Newhighest+Newlowest)/2Surachat = 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 EntriesIF Horaire AND CA AND not daysForbiddenEntry AND NOT SHORTONMARKET THENBUY PositionsizeA CONTRACTS AT MARKETENDIFIF CloturePartielle THENIF LONGONMARKET THENSELL 1 CONTRACTS AT TRADEPRICE + 63*pointsize LIMITENDIFIF LONGONMARKET THENSELL 1 CONTRACTS AT TRADEPRICE + 27*pointsize LIMITENDIFIF LONGONMARKET THENSELL 1 CONTRACTS AT TRADEPRICE + 24*pointsize LIMITENDIFENDIF// Short EntriesIF Horaire AND CV AND not daysForbiddenEntry AND NOT LONGONMARKET THENSELLSHORT PositionsizeV CONTRACTS AT MARKETENDIFIF CloturePartielle THENIF SHORTONMARKET THENEXITSHORT 1 CONTRACTS AT TRADEPRICE - 22*pointsize LIMITENDIFIF SHORTONMARKET THENEXITSHORT 1 CONTRACTS AT TRADEPRICE - 70*pointsize LIMITENDIFENDIF//MFE//trailing stoptrailingstop = 21//resetting variables when no trades are on marketif not onmarket thenMAXPRICE = 0MINPRICE = closepriceexit = 0endif//case SHORT orderif shortonmarket thenMINPRICE = MIN(MINPRICE,close) //saving the MFE of the current tradeif tradeprice(1)-MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop thenpriceexit = MINPRICE+trailingstop*pointsize //set the exit price at the MFE + trailing stop price levelendifendif//case LONG orderif longonmarket thenMAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current tradeif MAXPRICE-tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop thenpriceexit = MAXPRICE-trailingstop*pointsize //set the exit price at the MFE - trailing stop price levelendifendif//exit on trailing stop price levelsif onmarket and priceexit>0 thenEXITSHORT AT priceexit STOPSELL AT priceexit STOPendif//SET TARGET pPROFIT 46SET STOP pLOSS 150 -
AuthorPosts
Viewing 1 post (of 1 total)
Find exclusive trading pro-tools on 
Similar topics: