SQ creates strategies like this regularly:
//--------------------------------------------------------------------
// Pseudo Source Code of Strategy 1.1.879
//
// Generated by StrategyQuant X Build 126 for MetaTrader
// at 04/02/2020 02:30
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// Strategy Parameters
//--------------------------------------------------------------------
int MagicNumber = 11111;
int EMAPeriod = 20;
int OSMAChangesSignalPrd = 9;
int OSMAChangesFastEMA = 234;
int OSMAChangesSlowEMA = 352;
double PriceEntryMult = 2.5;
int BarsValid = 37;
int MoveSL2BE = 43;
double SL2BEAddPipsCoef = 20.4;
int ProfitTarget = 55;
int StopLoss = 25;
int TrailingStop = 64;
int TrailingActivation = 183;
int ATRPeriod = 40;
Main chart = Current Symbol / Current TF;
//--------------------------------------------------------------------
// Trading rule: Trading signals (On Bar Open)
//--------------------------------------------------------------------
LongEntrySignal = (EMA(Main chart,EMAPeriod, PRICE_CLOSE)[1] <= High(Main chart)[1]);
ShortEntrySignal = (EMA(Main chart,EMAPeriod, PRICE_CLOSE)[1] >= Low(Main chart)[1]);
LongExitSignal = (OSMA(Main chart,234, 352, OSMAChangesSignalPrd)[1] changes direction upwards);
ShortExitSignal = (OSMA(Main chart,OSMAChangesFastEMA, OSMAChangesSlowEMA, OSMAChangesSignalPrd)[1] changes direction downwards);
As can be seen, the "LongExitSignal" uses hard-coded numbers instead of the correct variables like in "ShortExitSignal". This is also the same in the MQ4 / MQ5 code, not just the pseudo-code.