GabyParticipant
Average
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
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.
Does the buy entry on 5th Aug @ 1am is also present in demo account? Is this entry normal?
GabyParticipant
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.
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
GabyParticipant
Average
OK I have engaged now https://www.prorealtime.com/en/contact
I will publish their reply.
BR, Gaby
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.
I have the same issue, so always we have to add DEFPARAM PRELOADBARS = 300
did this solve it?
The default says it is 1000 which is the default one https://www.prorealtime.com/en/pdf/probacktest.pdf