Hello, I have a Visual JForex strategy that modifies the SL of the positions that are open when the hour changes to 21h GMT using last daily high or low as the new SL. This strategy uses a global variable: UniqueComment to identify the positions that has to manage.
When using a single instance of the strategy everything runs fine. But when I have two instances running locally, strategy instance1 for EURUSD and strategy instance2 for GBPUSD with different UniqueComment values then the SL modifications are mixed up:
Yesterday I had open two short postions:
Position 143782485 (GBPUSD) SL=1.33072
Position 143784641 (EURUSD) SL=1.18379
If working correctly position 143782485 (GBPUSD) that had previously SL = 1.33072 should be changed to the high of yesterday candle 1.32869 and Position 143784641 (EURUSD) that had previously SL = 1.18379 should be changed to the high of yesterday candle 1.18
But what happened was that the GBPUSD position was not modified and the EURUSD position was modified twice:
First the EURUSD position SL was changed to the GBPUSD High of yesterday candle (1.32869) and then it was changed again to the EURUSD high of yesterday candle (1.18).
21:00:00 Position 143784641 STOP LOSS #549013943 price changed from 1.18379 to 1.32869
21:00:00 Position 143784641 STOP LOSS #549013943 price changed from 1.32869 to 1.18
Please can you help me?