feat/alamo-hedge · 2026-05-13 00:03 · v3 — SS chốt 6/6 questions
Spec timeline: prototype 18:58 → Max walkthrough 21:37–22:14 →
SS reply 23:57 chốt 6/6 ambiguity. Code FBotAlamo.mqh đã unlocked.
Trang này lưu state-machine comparison + concrete example với lệnh 0.61 + 3 price scenarios +
final spec recap cho SS xác nhận lần cuối.
L1, L2, ...) là một
"mạng sống" của account — khóa drawdown ở mức an toàn để các lệnh kế tiếp
có thể trade tiếp mà không tăng DD = Second Chance.
Concrete example — Max 21:37
0.61 lot) — lệnh 0.61 là lớn nhất hiện tại, mới mở gần đây.
3 Price scenarios khi S2 Active
3 điểm khác lớn
State machines
Ctrl/Cmd + wheel zoom · drag pan · dbl-click fit
Ctrl/Cmd + wheel zoom · drag pan · dbl-click fit
Full diff table
| Aspect | CŨ (Prototype 17:00) | MỚI (Prototype 18:58) |
|---|---|---|
| State model | 3-state: STANDBY / S1 / S2 | 5-state: + S3.1 monitor + S3.2 active |
| S1 entry trigger | RANGER active OR DD ≥ 0.5×threshold |
DD ≥ 50% threshold (≡ 0.5×, cùng số) |
| S2 fire condition | Con1 (all âm) + Con2 (DD ≥ threshold) | SubCon1 (all âm) + DD ≥ threshold |
| Close logic structure | Case 1 (Ln biggest) / Case 2 (not biggest) | TH1 (no orders above/below) / TH2 (has orders) |
| Reference object for close | MG-max = lệnh lot lớn nhất Main Grid |
Lệnh X = lệnh gần Ln nhất (theo gì?) |
| 3-order gate | Không có — ALAMO luôn tự đóng | MỚI: ≥ 3 lệnh trên/dưới Ln → PosMan đóng |
| Re-fire timing | Q1 pending (a immediate vs b wait) | Resolved (b): chờ Lệnh X âm trở lại |
| Escalation L2 | DD ≥ 2×thr → fire L2 ngay (1-step) |
2-step: S3.1 monitor (DD≥2×thr−2%) → S3.2 fire (DD≥2×thr) |
| Scaling Ln | AlamoEscMultL2=2, AlamoEscMultLnPlus=3 |
L1=10% DD, L2=20%, L3=30% (clean N× rule) |
| PosMan integration | Implicit (PosMan close loop) | Addendum 1 explicit: PosMan close → ALAMO close all redundancy |
| Safety net | Bỏ LnStopLossMult + BlockExitRatio |
Cũng bỏ hết — "HEDGIN' TIL I DIE" |
| Order type re-fire | Q2 pending — em propose MARKET | Vẫn pending → câu 6 dưới |
6/6 RESOLVED — SS chốt 23:57
Max walkthrough resolve 4/6, SS reply 23:57 resolve nốt 2 còn lại + clarify 2 CLARIFIED. Tất cả ambiguity đã chốt. Em sẵn sàng code state machine 5-stage.
g_alamoTrade.Buy()
/ g_alamoTrade.Sell() với giá thị trường hiện tại (đã có pattern trong AlamoFire cũ).
✓ ALL 6 RESOLVED
6 RESOLVED
· Code FBotAlamo.mqh rewrite chuẩn bị bắt đầu. Plan dir sẽ tạo tại
plans/260513-0003-alamo-prototype-3stage-rewrite/ với phase files.