by AndyMac » Wed Jan 25, 2017 9:53 am
Hi,
I suspect there is a bug when using multiple strategies against different currency pairs, whereby the "Close on Opposite" can trigger the closure of a trade on a different pair.
My suggestion would be to change line 583 and 673 of the current version from this:
[codeif row.AccountID == Account and row.OfferID == Offer and row.QTXT == CustomID and (row.BS == BuySell or BuySell == nil) then
[/code]
To include an Instrument check like this:
[codeif row.AccountID == Account and row.Instrument == instance.bid:instrument() and row.OfferID == Offer and row.QTXT == CustomID and (row.BS == BuySell or BuySell == nil) then
[/code]
In my case, this was a solution for me as I'm running multiple copies of this strategy on a few currency pairs, however, this wouldn't solve the possible scenario of someone running multiple copies of this strategy on a single pair.