hi , attached a break out strategie on dax mini, in 1minute chart, time period which has to be watched is from 8 o clock until 9.05
on the highest value in this time there should be placed a stop buy with 1oo contracts dax mini, stopp los 23 points, profit limit 4 points.
on the lowest valute in this time there should be placed a stopp sell orders with 100 contracts dax mini, stopp los 23 points, profit limit 4 points.
now the question…i have done that in liveaccount today , and the system bought today at 8:13:09 100 minis at 12578,60 and system sold them at 9:05:14 at 12584,60, furthermore the system bought at 9:05:37 100 minis at 12580.60 and the system sold at 09:06:00
i dont understand this executions ?…..if i do the same strategy on backtest, it works like i want….backtest executed in my guess correct but different to the livetrade…
how can this happen ???
attached the code:
//————————————————————————-
defparam cumulateorders=false
defparam flatafter=173000
once achat=1
once vente=1
n=100
if time=090500 then
haut=highest[65] (high)
bas=lowest[65](low)
achat=0
vente=0
endif
IF achat = 0 THEN
buy n share at haut stop
ENDIF
IF vente = 0 then
sellshort n share at bas stop
ENDIF
If longonmarket THEN
achat = 1
ENDIF
IF shortonmarket THEN
vente = 1
ENDIF
set stop ploss 23
set target pprofit 4