LIVE & DEMO different behavior with same strategy
Forums › ProRealTime English forum › ProOrder support › LIVE & DEMO different behavior with same strategy
- This topic has 8 replies, 4 voices, and was last updated 3 years ago by Jiankyr82.
-
-
08/06/2020 at 1:49 PM #141007
Hello,
I would need your support to understand why I am experiencing different behavior between LIVE and DEMO
- 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
- the strategy includes the instruction “DEFPARAM PRELOADBARS = 300” to ensure immediate start in LIVE
- 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
08/06/2020 at 3:05 PM #141014My 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.
08/06/2020 at 3:59 PM #14101808/06/2020 at 11:39 PM #141028Hi,
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.
08/07/2020 at 7:23 AM #141032My understanding was different
Best to ask PRT direct so we know for sure?
Email using the Form below
https://www.prorealtime.com/en/contact
08/12/2020 at 6:45 PM #141490OK I have engaged now https://www.prorealtime.com/en/contact
I will publish their reply.
BR, Gaby
1 user thanked author for this post.
08/13/2020 at 3:43 PM #141528ProRealTime 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.
09/01/2020 at 9:01 PM #14315209/01/2020 at 9:36 PM #143153The default says it is 1000 which is the default one https://www.prorealtime.com/en/pdf/probacktest.pdf
-
AuthorPosts