Open Long order at (HullMovingAverage(Main chart,HullMovingAvrPrd2, PRICE_OPEN)[HullMovingAverageShf] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Open Long order at (DEMA(Main chart,DEMAPeriod,DEMAAppliedPrice) [DEMAShift] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Subject changed from [B135] Different results between SQX <-> MT5 with tick data if using HMA for pending order prices to [B135] Different results between SQX <-> MT5 with tick data if using HMA or DEMA for pending order prices
Description changed:
Open Long order at (HullMovingAverage(Main chart,HullMovingAvrPrd2, PRICE_OPEN)[HullMovingAverageShf] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Open Long order at (DEMA(Main chart,DEMAPeriod,DEMAAppliedPrice) [DEMAShift] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Description changed:
Open Long order at (HullMovingAverage(Main chart,HullMovingAvrPrd2, PRICE_OPEN)[HullMovingAverageShf] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Open Long order at (DEMA(Main chart,DEMAPeriod,DEMAAppliedPrice) [DEMAShift] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Description changed:
Open Long order at (HullMovingAverage(Main chart,HullMovingAvrPrd2, PRICE_OPEN)[HullMovingAverageShf] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Open Long order at (DEMA(Main chart,DEMAPeriod,DEMAAppliedPrice) [DEMAShift] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Description changed:
Open Long order at (HullMovingAverage(Main chart,HullMovingAvrPrd2, PRICE_OPEN)[HullMovingAverageShf] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Open Long order at (DEMA(Main chart,DEMAPeriod,DEMAAppliedPrice) [DEMAShift] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Description changed:
Open Long order at (HullMovingAverage(Main chart,HullMovingAvrPrd2, PRICE_OPEN)[HullMovingAverageShf] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Open Long order at (DEMA(Main chart,DEMAPeriod,DEMAAppliedPrice) [DEMAShift] - (PriceEntryMult * ATR(Main chart,ATRPeriod)[ATRShift])) Limit;
Attachment SqHullMovingAverage.mq5 added
Just a little update, using DEMA the problem persists, it´s calculated slightly differently in SQX and MT5. If using it as a profit target (TP), it´s easiest to see that DEMA is always off by about 0.3 to 1 pip between SQX and MT5.
The HMA I´ve fixed in MT5 (see attachment above), is all good now, everything matches.
indicatorHandles[DEMA_1] = iCustom(NULL,0, "SqDEMA", DEMAPeriod, 2);
I´ve tried replacing it with "iDEMA(NULL, 0, DEMAPeriod, 2, PRICE_HIGH)" in the MQL5 code, to assign the correct PRICE enumeration like the SQX strategy that I use uses it (HIGH), but even then the backtests don´t match while they do if using other MA indicators in SQX. There must be more issues between how this is implemented between SQX and MT5, but I am giving up for now and hope this get´s addressed by your coders. Thanks a lot.
P.S.: Additionally, here is one more bug: if 2 DEMA´s are used in one strategy in SQX, the variable DEMAAppliedPrice is always the same for all DEMA´s, it´s not being enumerated like the DEMAPeriod (e.g. DEMAPeriod2), etc.
Attachment SqHullMovingAverage.mq5 added
Here is a fixed version of indicator SqHullMovingAverage.mq5