LIVE & DEMO different behavior with same strategy

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #141007 quote
    Gaby
    Participant
    Average

    Hello,

    I would need your support to understand why I am experiencing different behavior between LIVE and DEMO

    1. the strategy ALMA MACD TEMA (first file) is launched in both DEMO and LIVE accounts, starting on 17 July @ 23.00, DAX 30, Daily TF
    2. the strategy includes the instruction “DEFPARAM PRELOADBARS = 300” to ensure immediate start in LIVE
    3. the strategy includes a CALL function to retrieve the indicator PRC ALMA MACD

    Now, the issue is the following:

    – in the DEMO account, the strategy (launched on July 17th @ 23.00) is making the first trade on July 24th @ 1 am (sell entry)

    – in the LIVE account, the strategy (same starting point) is making the first trade on 5th Aug @ 1am (buy entry)

    Basically, the LIVE account got a delayed start, missing the first trade. But I was expecting the DEFRAMPARAM PRELOADBARS instruction to resolve this.

    I appreciate your support to explain why, thanks

    Gabriele Bertini

    ALMA_MACD-TEMA-1B-CF-DE2Q.itf PRC_ALMA-MACD.itf
    #141014 quote
    GraHal
    Participant
    Master

    My understanding is that  DEFPARAM PRELOADBARS = 2000 as a default (without needing any entry at all).

    You put DEFPARAM PRELOADBARS = 300 on Live (but not on Demo?) so you made Live different from Demo which would be default = 2000.

    #141018 quote
    Nicolas
    Keymaster
    Master

    Does the buy entry on  5th Aug @ 1am is also present in demo account? Is this entry normal?

    #141028 quote
    Gaby
    Participant
    Average

    Hi,

    1 – the strategy executed in DEMO and LIVE is 100% identical and both got the instruction DEFPARAM PRELOADBARS = 300

    2 – yes on Aug 5th @ 1am the LIVE strategy performed a buy entry @ 12,619.2 and the very same trade was executed in DEMO account, with a buy entry @ 12,618.7 (delta is the spread and few seconds of difference in execution).

    Could it be the Call Function the problem (being the PRELOADBARS instruction present only once in the strategy, but not being repeated in the indicator itself)?

    @ GraHal – please can you expand your comment “My understanding is that DEFPARAM PRELOADBARS = 2000 as a default (without needing any entry at all)”

    My understanding was different: without PRELOADBARS instruction, the strategy in LIVE will wait until all bars have been loaded in order to generate the stats for the indicator… therefore I coded this instruction to pre-load data and avoiding waiting time.

    #141032 quote
    GraHal
    Participant
    Master

    My understanding was different

    Best to ask PRT direct so we know for sure?

    Email using the Form below

    https://www.prorealtime.com/en/contact

    #141490 quote
    Gaby
    Participant
    Average

    OK I have engaged now https://www.prorealtime.com/en/contact

    I will publish their reply.

    BR, Gaby

    GraHal thanked this post
    #141528 quote
    Nicolas
    Keymaster
    Master

    ProRealTime will not reply to you if you are not one of their customer. Are you an IG client?

    PRELOADBARS is used to … preload history at the moment of the strategy start and not wait to wait X bars before starting to trade. It is used in order to get sufficient history preloaded in order to do calculation you need depending of your code.

    #143152 quote
    Jiankyr82
    Participant
    Junior

    I have the same issue, so always we have to add DEFPARAM PRELOADBARS = 300

    did this solve it?

    #143153 quote
    Jiankyr82
    Participant
    Junior

    The default says it is 1000 which is the default one  https://www.prorealtime.com/en/pdf/probacktest.pdf

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

LIVE & DEMO different behavior with same strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Gaby @gaby Participant
Summary

This topic contains 8 replies,
has 4 voices, and was last updated by Jiankyr82
5 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/06/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...