Readme and Comments

This commit is contained in:
Bell
2026-05-17 23:23:44 +07:00
parent 5c90171709
commit 7f68c86846
14 changed files with 487 additions and 47 deletions
+16 -3
View File
@@ -1,5 +1,16 @@
//+------------------------------------------------------------------+
//| Classifier.mqh — 7+ trạng thái §1.1 (bar đóng shift 1) |
//| Classifier.mqh |
//| Phân loại trạng thái HTF §1.1 (bar HTF đóng, shift 1) |
//+------------------------------------------------------------------+
//| ĐÃ GIẢI QUYẾT: |
//| • Bull Pullback: Fib OK + giá (mid body) giữa L0H0 |
//| • Bull CHoCH: body phá dưới L0 HOẶC đang update.phase CHoCH |
//| • Bull Continue: body phá trên H0 HOẶC đang update Continue |
//| • Bear: đối xứng (phá H0 / phá L0) |
//| • Neutral: không đủ 4 swing hoặc cấu trúc không HH-HL/LH-LL |
//| • Fib fail → BULL/BEAR_INCOMPLETE (sóng chưa kết thúc) |
//| ƯU TIÊN: nếu đang §1.4 update → hiển thị CHoCH/Continue trước |
//| CHƯA: phân tầng ưu tiên phức tạp khi nhiều tín hiệu cùng bar |
//+------------------------------------------------------------------+
#ifndef HYPERICT_CLASSIFIER_MQH
#define HYPERICT_CLASSIFIER_MQH
@@ -9,7 +20,6 @@
#include <HyperICT/FibValidator.mqh>
#include <HyperICT/KeyLevels.mqh>
//+------------------------------------------------------------------+
class CClassifier
{
public:
@@ -21,10 +31,11 @@ public:
if(ctx.structBias == STRUCT_NONE)
return HTF_NEUTRAL;
const int sh = 1;
const int sh = 1; // bar HTF vừa đóng
const double bodyMid = (iClose(ctx.symbol, ctx.htf, sh) +
iOpen(ctx.symbol, ctx.htf, sh)) * 0.5;
//--- Đang trong §1.4 → state CHoCH / Continue theo event
if(ctx.update.phase != UPD_PHASE_IDLE)
{
if(ctx.structBias == STRUCT_BULL)
@@ -43,6 +54,7 @@ public:
}
}
//--- § tiên quyết Fib: fail ≠ Neutral
if(!ctx.fibOk)
{
if(ctx.structBias == STRUCT_BULL)
@@ -51,6 +63,7 @@ public:
return HTF_BEAR_INCOMPLETE;
}
//--- §1.1 trạng thái khi snapshot idle (chưa hoặc đã xong update)
if(ctx.structBias == STRUCT_BULL)
{
if(CKeyLevels::BodyBreakBelow(ctx.symbol, ctx.htf, sh, ctx.keyLv1.price))