by mstreck » Fri Jan 17, 2014 12:57 pm
Hi,
running two instances of the same strategy on two different instruments, there is a mess-up of variables between the two instances.
The test case is that I applied the first instance of a GRAB strategy on EUR/USD. The debug message marked in red at 17:19 below is the last line of code of Prepare().
At 17:20, I started a second instance of the same strategy on USD/JPY. Although the user menu already correctly names it GRAB Strategy #2, the debug message does not align to the second instance, but to the first instance name. Afterwards,when the first instance triggered a market entry, it did it on USD/JPY, and not on EUR/USD, which means that the OfferID variable of the first instance must have been overwritten by the Prepare() routine of the second instance.
See attached screen shot.
I have used multiple instances in the past without this Problem. Please advise.
I know I can generate multiple copies with Instrument name being part of the file name as a work-around. Still, please advise on this wrong behaviour.
Thanks,
Martin
P.S. This is apparently the same issue reported earlier in the post by MooMooFX.
P.S. 2: The GRAB strategy is not the one from the site, it is a modified implementation, but still, you can test case this yourself by verifying that variables will get written over in the first instance running from the second instance once getting started up.
- Attachments
-
- BUG.zip
- (273.36 KiB) Downloaded 1128 times