From 080e9fd62a1beb73292b48c4b9689f24c0906e7f Mon Sep 17 00:00:00 2001 From: Adrian Kierzkowski Date: Wed, 18 Sep 2024 14:44:58 +0200 Subject: [PATCH] Tiny C++ compatibility fixes. --- Indicator/IndicatorData.h | 2 +- Platform/Chart/Chart.define.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Indicator/IndicatorData.h b/Indicator/IndicatorData.h index ff184156d..9e88ffe43 100644 --- a/Indicator/IndicatorData.h +++ b/Indicator/IndicatorData.h @@ -1601,7 +1601,7 @@ class IndicatorData : public IndicatorBase { if (GetCandle() == THIS_PTR) { Alert(GetFullName(), " candle indicator must override ", __FUNCTION__, "()!"); DebugBreak(); - return -1; + return (ENUM_TIMEFRAMES)-1; } return GetCandle() PTR_DEREF GetTf(); diff --git a/Platform/Chart/Chart.define.h b/Platform/Chart/Chart.define.h index d5d772d37..74828c597 100644 --- a/Platform/Chart/Chart.define.h +++ b/Platform/Chart/Chart.define.h @@ -104,7 +104,8 @@ #define MODE_MARGINHEDGED 31 #define MODE_MARGINREQUIRED 32 #define MODE_FREEZELEVEL 33 -#else - // #ifdef __MQL4__ +#endif + +#ifndef __MQL5__ #define MODE_REAL_VOLUME 7 #endif