Hello
I have a template running nicely in historical backtest but I have an issue that I don't know how to resolve when running the strategy in a live test.
I would like to run the strategy across 2-6 currency pairs concurrently for live testing. To do this currently I change the currencypair to create a new strategy, save/build and run all of the strategies, differing only by currency pair, inside Jforex.
The issue relates to the code I have around OpenPositions.PositionsAmount.
As I only want One trade open at any one time on a currently pair, not multiple longs/shorts nor longs and shorts concurrently, entry is set when OpenPositions.PositionsAmount =0
I also have OpenPositions.PositionsAmount used in my criteria to move Stop Loss to Break Even / Open price.
In a multi-strategy environment of course, only the 1st trade across all pairs running the strategy gets opened. What I would like to occur is all the valid EURUSD trades occur in parallel to the GBPUSD, AUDUSD etc so the strategies work independently.
I have tried using a Position Variable and Boolean Variable to be a check to replace OpenPositions.PositionsAmount but I'm either on the wrong track or on the right one but just plain writing it incorrectly, and I'm not knowledgeable enough in .vfs yet to know which.
Can someone have a look at the attached Template and point me in the right direction to replace the OpenPositions.PositionsAmount code so it can work in a strategy-independent way? I couldn't find any references to this particular issue in the forum.
** edit ** I'm not sure attachments are working.
Here is a link to the .vfs file on OneDrive:
https://onedrive.live.com/redir?resid=B ... file%2cvfsThanks
LD