Hi!
Sometimes I get different results when I backtest a strategy on the PRT connected to my demo account and the PRT connected to my real account. I’m using the same spread, tick by tick and strategy file. I have attached a screenshot of the different results and to strategy file so you can try for yourself and see if you get the same result. In this case it’s only half the amount of trades taken on the live compared to demo. Do anyone know what could cause the difference?
// BUND - IG MARKETS
// TIME FRAME 2H
// SPREAD 0.5 PIPS
DEFPARAM CumulateOrders = False
DEFPARAM PreloadBars = 200
DEFPARAM Flatafter = 200000
once optimization = 1
once mgmt = 1
// -- Optimizations selection
if optimization = 1 then
artperiod = 6
wintarget = 60
sl = 30
stopandtargetMode = 2 // 1 = fixed stop and target 2 = dynamic stop and target
slATRmultiple = 1
winATRmultiple = 4
Starttime = 080000
EndTime = 200000
atrmultiplelong = 1
atrmultipleshort = 1
//mashortperiod = 2
//malongperiod = 220
//adxlevel = 30
//adxperiod = 22
elsif optimization = 2 then
artperiod = 6
wintarget = 60
sl = 30
stopandtargetMode = 2 // 1 = fixed stop and target 2 = dynamic stop and target
slATRmultiple = 1
winATRmultiple = 3
Starttime = 080000
EndTime = 200000
atrmultiplelong = 1
atrmultipleshort = 1
//mashortperiod = 2
//malongperiod = 220
endif
if mgmt = 1 then
PositionSize = 1
elsif mgmt = 2 then
REM Money Management
Capital = 4000
Risk = 0.01
StopLoss = sl // Could be our variable X
REM Calculate contracts
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)
endif
// -- Indicaors
atr = AverageTrueRange[artperiod]
//malong = average[malongperiod]
//mashort = average[mashortperiod]
//adxfilter = adx[adxperiod]
// ENTRY CONDITION LONG
b1 = (abs(open-close) > (atr*atrmultiplelong))
b2 = (close > open)
b3 = currenttime > StartTime and currenttime < EndTime
//b4 = (mashort > malong)
//b5 = (adxlevel > adxfilter)
cb = b1 and b2 and b3 //and b5 // and b4
IF cb THEN
BUY PositionSize CONTRACTS AT MARKET
ENDIF
// ENTRY CONDITION SHORT
s1 = (abs(open-close) > (atr*atrmultipleshort))
s2 = (close < open)
s3 = currenttime > StartTime and currenttime < EndTime
//s4 = (mashort < malong)
cs = s1 and s2 and s3 //and b5 //and s4
IF cs THEN
SELLSHORT PositionSize CONTRACTS AT MARKET
ENDIF
// STOP AND TARGET
IF stopandtargetMode = 1 THEN
SET STOP pLOSS sl
SET TARGET pPROFIT wintarget
ENDIF
IF stopandtargetMode = 2 THEN
SET STOP pLOSS (atr * slATRmultiple)/pointsize
SET TARGET pPROFIT (atr * winATRmultiple)/pointsize
ENDIF
Bonjour
Il y a parfois même des différences ( sur la même stratégie à la virgule près)
voir sur le graphique ci dessous sur la grande bougie rouge 12 bougies avant la fin du graphe
la flèche rouge n’est pas au même niveau de prix sur les deux graphes.
Pourquoi???
@Madrosat, merci d’écrire en Anglais dans le forum Anglais (please speak English in English forums).
Do the 2 platforms share the same PRT version? No different custom time scheduled between them?
I should have known after making this misstake a million times… I had the trading hours set differently on the live platform. The result from the demo account is indeed valid.
Thanks for the help 🙂
I finally managed to send the fil
Nicolas : yes it is the same prt version .I think it is a question of speed say me?
@Madrosat, Pictures are too small 🙂
Excuse me Nicolas I have some probleme to send pictures
is it better??
Yes, this one is much bigger, thank you. I only see 2 charts with the same trades entries (exact same price for the 4 orders).
Morning Nicolas
Sorry
No it is not the same price for one order look at this.
Why??
I have probleme to send screen capture of orders
sorry
You mean : 1.29147 and 1.29184? Do the candlestick shares the same OHLC between the 2 accounts? Did you use the same spread for the 2 backtests? You should GRAPH the variables that trigger your entries and exit to see if their calculations are the same ..
Yes it is the same spread , I tried to Graph
Have a good day
Madrosat