@Steve
I am noticing a slight bug with regard to max positions and position direction. This happens when the EA is dropped fresh on a chart with already open trades in the terminal. It also happens when the EA is recompiled and/or reloaded from adjusting a setting.
I see when Awesome Original is iterating through the pairs looking for signals I notice that there is a line of code that comes after that builds a composite picture of our baskets that comes after our signals.
Code: Select all
//Build a picture of the trade position.
CountOpenTrades(symbol, MagicNumbers[tfIndex], tfIndex);
Is it possible to also perform this check prior to looking for positions without taking a performance hit?
Here is my proposed change which adds the function at the top of the for loop
Code: Select all
//Iterate through the time frames chosen by the user.
for (int tfIndex = 0; tfIndex < ArraySize(TimeFrames); tfIndex++)
{
//We need to know positions before and after trade signals - DXH
//Build a picture of the trade position.
CountOpenTrades(symbol, MagicNumbers[tfIndex], tfIndex);
BuySignal = false;
SellSignal = false;
If my thinking is correct, this would solve the greater than max signals to follow problem where the EA will load more trades per pair than we want to allow. It will also correct the pair's trade direction and not counter trade against already opened positions.
You thoughts?
EDIT: If the change is valid would also be a good time to patch the BE and JS?
- David