(or do as you please after reading this)
N.b.: This problem is handed to PRT support accompanied by a link to this topic. It is related to the Live environment (for Demo see more below).
The original exhibit of something being wrong is written here. But this appears only an exhibit while the real problem must be elsewhere. This is my conclusion after a full day of testing, yesterday.
The problem
Since the June 22 2022 version (or later with invisible updates), Systems perfectly working before, now fail somewhere;
Systems which ran for months (over 800 full trades) don’t behave as should any more, once they are restarted today.
In my case it exhibits as Stop and Limit orders not coming through any more (see link above). But after close observation it appears way more complex;
This small outlay below is totally irrelevant to the issue, and only explains how difficult it will be to troubleshoot and how anything can go wrong now in anyone’s System. So please don’t ask questions about this little text below, as it is unrelated to whatever the issue is.
The relevant code performs a transition from Trailing Stop to normal pending exit code (Stop and Limit). To perform this transition, (obviously) all kind of If’s and settings etc. are performed. For example, the Gain has to be sufficiently high and you can imagine all sorts of code to determine that. Of course there is much much more like being OnMarket in the first place, whether this stage of pending stops already has entered or not and well … anything.
So in latter “anything” something does not work any more.
What has been the most decent way to check whether it is indeed changed behaviour at the PRT side of things ?
Easy : Stop the Autotrading System, and restart it. It worked for many weeks, and now it fails.
Additional checks : With everything I do I have backtest (debug-) data and graphs, and that data and graphing still shows all as it should be. This immediately imposes the problem for real, because where graphs tell that this transition takes place, in reality
a. the still running old systems behave exactly like that;
b. the newly started same systems don’t enter that transition and thus don’t change state of the exit system (the backtest does and will exit when appropriate).
#a above implies that I can run the old and new same systems alongside, which is so indeed. On one side this makes the issue even more clear but on the other it vaguens the happening(s), like arrows and crosses all over the place, not really being sure which is which (bug #xxx (didn’t look it up) causing that the labels of the systems are hidden because of a wrong Z-order). For this reason I now set up such a System in Demo, not even knowing yet whether the issue exhibits there. If it does not, PRT could use that data for comparison; if it does, I can use it to very easily and clearly show the difference (which currently, in Live, is hard).
Testing is tedious because 1. a trade must happen, 2. it must sufficiently go in the direction of winning (which is not always so 😉 ) and it could take hours before it (may) lose and has to wait for the next trade, re-iterating to 1.
After I can clearly show what happens (I assume I will succeed in that), I am clueless on how to attack this problem. This time I would be prepared to share my code with PRT engineers (via the Help system), but I see no way how they will be able to trace what goes wrong where. So PRT, please, consider a rollback of whatever you did with the June 22 version, OR carefully go through your changelog and see what possibly can cause this. It won’t be about the ordering system (the original topic – see link in the beginning of this post – suggested that) so it even could be an If statement not working out. It could be as bad as suddenly respecting parentheses properly where I forgot a pair all together.
PS: of course I should add my ever so (not so) funny bug number : #398.