Topic: Adding dummy variables in CreateEntrySignal and Exitsignal
Hi,
now Ea studio exports its portfolio with his kind of code
Signal CreateEntrySignal(int strategyIndex, bool canOpenLong, bool canOpenShort,
int stopLossPips, int takeProfitPips, bool isTrailingStop,
bool oppositeReverse = false)
{
Signal signal;
signal.MagicNumber = GetMagicNumber(strategyIndex);
signal.Scope = ORDER_SCOPE_ENTRY;
signal.StopLossPips = stopLossPips;
signal.TakeProfitPips = takeProfitPips;
signal.IsTrailingStop = isTrailingStop;
signal.OppositeReverse = oppositeReverse;
signal.Direction = canOpenLong && canOpenShort ? ORDER_DIRECTION_BOTH
: canOpenLong ? ORDER_DIRECTION_BUY
: canOpenShort ? ORDER_DIRECTION_SELL
: ORDER_DIRECTION_NONE;
return signal;
}
Here is the other line of strategies.
return CreateEntrySignal(0, ind0long && ind1long && ind2long, ind0short && ind1short && ind2short, 63, 175, false, true);
It would be nice that we have an option in EAs to add custom Variables into it, so its easier to modify my eas more.
Cause for now we have to change this code in every line on its own. and if you have 100 strategies portfolio its a massive time. and i think its not such much an implementation problem for @popov.
So make an option to add more variables. It can be dummy variables at first without no functionality.
So before we download the portfolio we can have the option to implement more variables. That will be looked like this.
Signal CreateEntrySignal(int strategyIndex, bool canOpenLong, bool canOpenShort,
int stopLossPips, int takeProfitPips, bool isTrailingStop,
bool oppositeReverse = false, [b]int custom[/b])
{
Signal signal;
signal.MagicNumber = GetMagicNumber(strategyIndex);
signal.Scope = ORDER_SCOPE_ENTRY;
signal.StopLossPips = stopLossPips;
signal.TakeProfitPips = takeProfitPips;
signal.IsTrailingStop = isTrailingStop;
signal.OppositeReverse = oppositeReverse;
signal.Direction = canOpenLong && canOpenShort ? ORDER_DIRECTION_BOTH
: canOpenLong ? ORDER_DIRECTION_BUY
: canOpenShort ? ORDER_DIRECTION_SELL
: ORDER_DIRECTION_NONE;
return signal;
}
and here will be automatically this.
return CreateEntrySignal(0, ind0long && ind1long && ind2long, ind0short && ind1short && ind2short, 63, 175, false, true, [b]our new custom variable[/b]);
What do you think about it. Maybe someone have better idea