Different backtest result between PRT demo and PRT live

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #34680 quote
    victormork
    Participant
    Veteran

    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
    
    Skärmavbild-2017-05-06-kl.-12.10.19.png Skärmavbild-2017-05-06-kl.-12.10.19.png Skärmavbild-2017-05-06-kl.-12.07.10.png Skärmavbild-2017-05-06-kl.-12.07.10.png Skärmavbild-2017-05-06-kl.-12.07.22.png Skärmavbild-2017-05-06-kl.-12.07.22.png
    #34704 quote
    Madrosat
    Participant
    Master

    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???

    #34705 quote
    Nicolas
    Keymaster
    Master

    @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?

    #34714 quote
    victormork
    Participant
    Veteran

    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 🙂

    #34736 quote
    Madrosat
    Participant
    Master

    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?

    graph-06-05-différence-sur-démo.jpg graph-06-05-différence-sur-démo.jpg graph-06-05-différence-sur-démo-1.jpg graph-06-05-différence-sur-démo-1.jpg
    #34743 quote
    Nicolas
    Keymaster
    Master

    @Madrosat, Pictures are too small 🙂

    #34758 quote
    Madrosat
    Participant
    Master

    Excuse me Nicolas I have some probleme to send pictures

    is it better??

    graph-06-05-différence-sur-démo.-a-PNG.png graph-06-05-différence-sur-démo.-a-PNG.png
    #34808 quote
    Nicolas
    Keymaster
    Master

    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).

    #34930 quote
    Madrosat
    Participant
    Master

    Morning Nicolas

    Sorry

    No it is not the same price for one order look at this.

    Why??

    #34971 quote
    Madrosat
    Participant
    Master
    #34974 quote
    Madrosat
    Participant
    Master

    I have probleme to send screen capture of orders

    sorry

    #35022 quote
    Nicolas
    Keymaster
    Master

    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 ..

    #35147 quote
    Madrosat
    Participant
    Master

    Yes it is the same spread , I tried  to Graph

    Have a good day

    Madrosat

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.

Different backtest result between PRT demo and PRT live


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
victormork @victormork Participant
Summary

This topic contains 12 replies,
has 3 voices, and was last updated by Madrosat
8 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/06/2017
Status: Active
Attachments: 7 files
Logo Logo
Loading...