diff --git a/OrdersEA_Smart_Grid.mq5 b/OrdersEA_Smart_Grid.mq5 index 7611c25..b220a4c 100644 --- a/OrdersEA_Smart_Grid.mq5 +++ b/OrdersEA_Smart_Grid.mq5 @@ -119,8 +119,7 @@ bool S1HitToday = false; //+------------------------------------------------------------------+ void CalculatePivotPoints() { - MqlRates rates[]; - ArraySetAsSeries(rates, true); + MqlRates rates[1]; int copied = CopyRates(_Symbol, PERIOD_D1, 1, 1, rates); if(copied < 1) @@ -144,8 +143,7 @@ void CalculatePivotPoints() double atr = 0; if(ATRHandle != INVALID_HANDLE) { - double atrBuf[]; - ArraySetAsSeries(atrBuf, true); + double atrBuf[1]; if(CopyBuffer(ATRHandle, 0, 0, 1, atrBuf) > 0) atr = atrBuf[0]; } @@ -173,8 +171,7 @@ bool IsRangingMarket() if(UseRSIFilter && RSIHandle != INVALID_HANDLE) { - double rsiBuf[]; - ArraySetAsSeries(rsiBuf, true); + double rsiBuf[1]; if(CopyBuffer(RSIHandle, 0, 0, 1, rsiBuf) > 0) { double rsi = rsiBuf[0]; @@ -188,8 +185,7 @@ bool IsRangingMarket() if(UseADXFilter && ADXHandle != INVALID_HANDLE && isRanging) { - double adxBuf[]; - ArraySetAsSeries(adxBuf, true); + double adxBuf[1]; if(CopyBuffer(ADXHandle, 0, 0, 1, adxBuf) > 0) { double adx = adxBuf[0];