Two of my strategies are constantly being stopped and I have a hard time finding out why. I never encountered this problem before and the only two differences from other strategies, are that I normally use 5 minutes charts and above and in these two cases I use 1 minute charts. The other difference is that I have set the “DEFPARAM CumulateOrders” to true, which I normally not use.
It toggles between two error messages, apparently randomly.
The first error message relates to the preloadbars setting:
This trading system was stopped because the historical data loaded was insufficient to calculate at least one indicator during the evaluation of the last candlestick. Please increase the number of preloaded bars with the instruction DEFPARAM in the code of your strategy (ex: DEFPARAM Preloadbars = 2000). For additional assistance, please refer to the help text of the DEFPARAM function in the trading systems programming manual.
The maximum period used in the strategy for calculations is 51 and no matter if I set it for 100, 200 or the default value 2000, it still doesn’t work. I can even delete the parameter without any change.
The second error message relates to order rejection:
One of the orders of this trading system was rejected. Due to the type of rejection, the trading system had to be stopped. To see the reason the order was rejected, open the order list, go to the”Canceled/Rejected” tab and place your mouse over the warning icon in the “Status” column.
This is incorrect, since it never comes to a point where it actually tries to open a trade and the order list is always empty.
For the Nikkei index I use DEFPARAM FLATBEFORE = 010000 and DEFPARAM FLATAFTER = 073000, but I can start the strategy at e.g. 9.30 and it is stopped a few minutes later.
I can read in another (very emotional) thread, that this kind of error is believed to reside on IG side, but how can that be the case if the strategy is stopped even before it tries to open a trade? Most likely my lack of knowledge on the interface between IG and PRT, but could someone shed light on this?
Is there a solution to this problem?