From d945d63e4bdcf6e6ebcbf147e168576e43743dd4 Mon Sep 17 00:00:00 2001 From: Bell Date: Tue, 12 May 2026 21:50:05 +0700 Subject: [PATCH] =?UTF-8?q?Update=20indicator:=20T=C3=ADnh=20EMA200=20n?= =?UTF-8?q?=E1=BB=99i=20b=E1=BB=99=20thay=20v=C3=AC=20add=20l=C3=AAn=20cha?= =?UTF-8?q?rt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Indicators/RsiMomentumIndicator/Lib/Handles.mqh | 7 ++----- Indicators/RsiMomentumIndicator/RsiMomentumIndicator.mq5 | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Indicators/RsiMomentumIndicator/Lib/Handles.mqh b/Indicators/RsiMomentumIndicator/Lib/Handles.mqh index a2d1ef2..0c12583 100644 --- a/Indicators/RsiMomentumIndicator/Lib/Handles.mqh +++ b/Indicators/RsiMomentumIndicator/Lib/Handles.mqh @@ -1,7 +1,8 @@ //+------------------------------------------------------------------+ //| Handles.mqh | //| Tạo / giải phóng indicator handles (RSI, EMA9/RSI, WMA45/RSI, | -//| EMA200) và attach EMA200 lên main chart window. | +//| EMA200). EMA200 chỉ dùng qua CopyBuffer — không ChartIndicatorAdd | +//| (tránh ERR_CHART_INDICATOR_CANNOT_ADD trong Tester / iCustom). | //+------------------------------------------------------------------+ #ifndef RSIMOM_HANDLES_MQH #define RSIMOM_HANDLES_MQH @@ -29,10 +30,6 @@ bool Handles_CreateAll() if (h_EMA200 == INVALID_HANDLE) { Print("[RsiMom] Không tạo được handle EMA200"); return false; } - // Gắn EMA200 lên cửa sổ chính (window 0) của chart hiện tại - if (!ChartIndicatorAdd(ChartID(), 0, h_EMA200)) - PrintFormat("[RsiMom] Không thể gắn EMA200 lên chart (err=%d)", GetLastError()); - return true; } diff --git a/Indicators/RsiMomentumIndicator/RsiMomentumIndicator.mq5 b/Indicators/RsiMomentumIndicator/RsiMomentumIndicator.mq5 index f37dfa8..8c5b31a 100644 --- a/Indicators/RsiMomentumIndicator/RsiMomentumIndicator.mq5 +++ b/Indicators/RsiMomentumIndicator/RsiMomentumIndicator.mq5 @@ -1,7 +1,7 @@ //+------------------------------------------------------------------+ //| RsiMomentumIndicator.mq5 | //| Hiển thị trong cửa sổ phụ: RSI14, EMA9(RSI), WMA45(RSI) | -//| Hiển thị trên chart chính: EMA200 + mũi tên đánh dấu giao cắt | +//| Trên chart chính: mũi tên giao cắt (EMA200 chỉ tính nội bộ). | //| Panel góc trên-phải: trend, giá trị RSI / EMA9 / WMA45 | //| | //| Source code được tách thành các module trong thư mục Lib/: |