Stochastic MA Strategy

Strategies are published here.

Moderator: admin

Re: Stochastic MA Strategy

Postby Apprentice » Sun Dec 18, 2016 7:37 am

Strategy was revised and updated.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Stochastic MA Strategy

Postby 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.
AndyMac
 
Posts: 2
Joined: Thu Jan 19, 2017 12:07 am

Re: Stochastic MA Strategy

Postby Apprentice » Sun Jan 07, 2018 9:00 am

The strategy was revised and updated.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Previous

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 10 guests