Chapter 3 — Rules & Parameters Mapping

TH

บทนี้ไม่ได้มีหน้าที่อธิบายโค้ดในเชิงเทคนิค หากมีหน้าที่อธิบายว่าโค้ดแต่ละส่วน “เกิดมาเพื่ออะไร” และถูกออกแบบมาเพื่อป้องกันความล้มเหลวแบบใดของมนุษย์ การทำความเข้าใจในระดับนี้มีความสำคัญ เพราะ RAIDER ไม่ได้ถูกสร้างขึ้นเพื่อหยุดอยู่ที่เวอร์ชันปัจจุบัน แต่ถูกออกแบบให้สามารถวิวัฒนาการต่อไปสู่สถาปัตยกรรมแบบ Agentic AI ได้โดยไม่หลุดออกจากปรัชญาตั้งต้น

โครงสร้างของกฎและพารามิเตอร์ทั้งหมดใน RAIDER จึงไม่ใช่ผลรวมของเทคนิค แต่เป็นผลลัพธ์ของการพยายามแปลงข้อจำกัดของมนุษย์ให้กลายเป็นกติกาที่ระบบสามารถบังคับใช้ได้อย่างสม่ำเสมอ

Signal & Entry Discipline

RAIDER ใช้ ZigZag สองชุดที่มีความเร็วต่างกัน เพื่อแยกโครงสร้างของตลาดออกเป็นสองระดับ ได้แก่ โครงสร้างหลักที่เคลื่อนไหวช้า และการกลับตัวระยะสั้นที่เกิดขึ้นภายในโครงสร้างนั้น การแยกชั้นเช่นนี้ไม่ได้มีไว้เพื่อเพิ่มความแม่นยำของสัญญาณ แต่เพื่อหลีกเลี่ยงการตอบสนองต่อ noise และการเข้าเทรดแบบสุ่ม

สัญญาณจะเกิดขึ้นเฉพาะเมื่อ ZigZag ทั้งสองชุดแสดงทิศทางสวนกัน ซึ่งโดยนัยคือช่วงเวลาที่ตลาดอยู่ในภาวะลังเล ไม่ใช่ช่วงที่แนวโน้มชัดเจน RAIDER เลือกที่จะไม่ไล่ตามแนวโน้มที่เห็นชัดอยู่แล้ว แต่รอจังหวะที่โครงสร้างเปิดโอกาสให้การเข้า เทรดมีเหตุผลเชิงระบบ การกระทำจึงต้องมีเงื่อนไข ไม่ใช่เกิดจากแรงกระตุ้น ณ ขณะนั้น

เพื่อแยก “การเห็นสัญญาณ” ออกจาก “การลงมือกระทำ” RAIDER ใช้แนวคิดของ pending signal โดยเจตนา ระบบจะรับรู้ว่าสัญญาณเกิดขึ้นแล้ว แต่ยังไม่อนุญาตให้เข้าเทรดทันที จนกว่าตลาดจะแสดงการยืนยันผ่านแท่งเทียนสองแท่งในทิศทางเดียวกัน กลไกนี้ไม่ได้ถูกออกแบบมาเพื่อจับจังหวะที่เร็วที่สุด แต่เพื่อบังคับให้ตลาดต้องยืนยันตัวเองก่อน วินัยจึงถูกยกระดับให้สำคัญกว่าความเร็ว

Risk Definition Before Entry

ใน RAIDER ความเสี่ยงไม่ได้ถูกกำหนดภายหลังการเข้าเทรด แต่ถูกนิยามไว้ล่วงหน้าก่อนการกระทำใด ๆ จะเกิดขึ้น ระยะโครงสร้างเริ่มต้นถูกคำนวณจากจุด ZigZag ระยะสั้น พร้อม offset ที่กำหนดไว้ล่วงหน้า เพื่อให้ตลาดเป็นผู้กำหนดกรอบการเคลื่อนไหวเริ่มต้นของระบบ ไม่ใช่มนุษย์ การออกแบบในลักษณะนี้ทำให้ความเสี่ยงไม่เกิดจากอารมณ์ ความลังเล หรือความกลัวในช่วงเวลานั้น

Distance A ซึ่งเป็นระยะห่างระหว่างราคาเข้าและ Hedge ครั้งแรก จะต้องผ่านการตรวจสอบทั้งค่าต่ำสุดและค่าสูงสุด ระบบจะไม่ยอมรับโครงสร้างที่แคบเกินไปจนเปราะบาง หรือกว้างเกินไปจนไม่สมเหตุสมผล การปฏิเสธการเทรดตั้งแต่ต้นจึงถือเป็นกลไกการอยู่รอดของระบบ ไม่ใช่การพลาดโอกาส

นอกจากนี้ RAIDER ยังตรวจสอบข้อจำกัดเชิงโครงสร้างของสภาพแวดล้อม เช่น stop level ของโบรกเกอร์ เพื่อหลีกเลี่ยงการส่งคำสั่งที่ระบบภายนอกไม่สามารถรองรับได้ ระบบถูกออกแบบให้ไม่ฝืนบริบท เพราะการฝืนข้อจำกัดเชิงโครงสร้างคือจุดเริ่มต้นของความล้มเหลวที่ไม่จำเป็น

ผลลัพธ์ปลายทางถูกกำหนดจากสัดส่วน Risk–Reward ที่ผูกกับโครงสร้างของ Distance และลำดับการจัดการสถานะ เพื่อให้ผลลัพธ์ไม่ได้ถูกตั้งขึ้นจากความเชื่อหรือความหวัง แต่เกิดจากขอบเขตของความเสี่ยงที่ระบบยอมรับไว้แล้วตั้งแต่ต้น

Money Management and Initial Exposure

การบริหารเงินของ RAIDER เริ่มต้นจากหลัก Fixed Fractional Risk โดยคำนวณจาก Equity จริง ไม่ใช่ Balance เชิงบัญชี เป้าหมายไม่ใช่การเพิ่มผลตอบแทนสูงสุด แต่คือการควบคุมการสูญเสียในระดับที่ระบบยังคงอยู่ได้

การคำนวณขนาด lot ถูกผูกกับ tick size และ tick value ของสัญญาโดยตรง เพื่อให้ “ความเสี่ยง” เป็นตัวเงินจริง ไม่ใช่ตัวเลขที่หลอกตา ระบบจงใจจำกัดขนาด lot ด้วยค่าขั้นต่ำ ขั้นสูง และ MaxLotSize เพื่อป้องกันพฤติกรรมสุดโต่ง การพังยากถูกให้ความสำคัญมากกว่าการชนะเร็ว

ทุกขั้นตอนของการคำนวณถูกบันทึกผ่าน detailed logging เพื่อให้ระบบสามารถอธิบายตัวเองย้อนหลังได้โดยไม่ต้องพึ่งความทรงจำหรือการตีความของมนุษย์ ระบบที่ไม่สามารถอธิบายพฤติกรรมของตนเองได้ คือระบบที่ไม่สามารถเรียนรู้หรือพัฒนาได้ในระยะยาว

Hedging as a Structural Response

หัวใจของ RAIDER อยู่ที่การยอมรับว่าราคาอาจเคลื่อนไหวสวนทางได้เสมอ เมื่อ initial position ถูกเปิด ระบบจะเข้าสู่โหมด hedging โดยทันที ไม่ใช่เพื่อแก้ปัญหาเฉพาะหน้า แต่เพื่อแปลงความเสี่ยงให้กลายเป็นโครงสร้าง

Buy Line และ Sell Line ถูกสร้างขึ้นจาก Distance A เพื่อทำหน้าที่เป็นจุดอ้างอิงเชิงโครงสร้างของระบบ สูตรการคำนวณ hedge lot ควบคุม net exposure ตามกรอบที่ออกแบบไว้ และตัดพฤติกรรมการขยายความเสี่ยงแบบ Martingale ออกโดยสิ้นเชิง การเพิ่มความเสี่ยงทุกครั้งจึงเป็นผลของโครงสร้าง ไม่ใช่การตอบสนองต่อความผันผวนเฉพาะหน้า

Order Sequence ถูกใช้เพื่อให้ระบบ “รู้ตัว” ว่ากำลังทำอะไรอยู่ในลำดับใด State awareness นี้ช่วยป้องกันตรรกะซ้อนทับ และลดโอกาสเกิดพฤติกรรมที่ไม่ตั้งใจ

Exit, Survival, and Reset

RAIDER ไม่ปล่อยให้การตัดสินใจจบอยู่ในพื้นที่สีเทา เมื่อ Take Profit ใดถูกแตะ ระบบจะปิดทุก position เพื่อรับกำไรอย่างเป็นระบบ โดยไม่ขยายความโลภ ในทำนองเดียวกัน เมื่อ Stop Loss ใดถูกแตะ ระบบจะปิดทุก position เพื่อยอมรับความผิดพลาดและป้องกันการเข้าสู่ death spiral

หลังจากการปิดทั้งหมด ระบบจะ reset state โดยสมบูรณ์ ทุก cycle ต้องจบอย่างชัดเจน เพื่อไม่ให้มีอารมณ์ค้างหรือแรงแค้นตกค้าง การเริ่มต้นใหม่จึงเกิดขึ้นจากศูนย์เชิงโครงสร้าง ไม่ใช่จากความพยายามแก้ตัว

Suppressing Human Intervention

RAIDER ถูกออกแบบให้ลดบทบาทของมนุษย์ในช่วงที่อารมณ์ทำงาน ระบบไม่รองรับ manual intervention และทำงานบนจังหวะ new-bar เท่านั้น เพื่อลด noise และการตอบสนองเกินเหตุ Visual lines ถูกแสดงไว้เพื่อให้มนุษย์ “ดู” ไม่ใช่ “แทรก” บทบาทของมนุษย์คือผู้สังเกต ไม่ใช่ผู้ควบคุม

Legacy Notes Toward Agentic Architecture

RAIDER รุ่นแรกยังไม่ใช่ระบบ Agentic AI อย่างสมบูรณ์ State management ยังเป็น implicit ยังไม่มีการรับรู้ regime ไม่มี self-monitoring และไม่มี memory อย่างไรก็ตาม โครงสร้างพื้นฐานเหล่านี้ถูกออกแบบมาเพื่อให้สามารถพัฒนาไปต่อได้โดยไม่ต้องรื้อปรัชญาเดิม

RAIDER ไม่ได้ถูกออกแบบมาให้ฉลาด แต่ถูกออกแบบมาให้ไม่หลุดวินัย สัญญาณเข้าไม่ได้มีไว้เพื่อความแม่นยำ แต่เพื่อหลีกเลี่ยงการเข้าแบบสุ่ม ความเสี่ยงไม่ได้ถูกกำหนดเพื่อเพิ่มผลตอบแทน แต่เพื่อป้องกันการพังทลาย Hedging ไม่ใช่การแก้ปัญหาเฉพาะหน้า แต่คือการยอมรับความไม่แน่นอนอย่างมีโครงสร้าง

ทุกพารามิเตอร์ใน RAIDER มีหน้าที่จำกัดพฤติกรรม ไม่ใช่เปิดอิสระ ทุกการตรวจสอบมีไว้เพื่อปฏิเสธการเทรดที่ “ไม่สวย” ตั้งแต่ต้น และในหลายกรณี การไม่ทำอะไรเลย คือการตัดสินใจที่ถูกต้องที่สุด


EN

Reverse-Engineered from RAIDER

This chapter is not an explanation of syntax. It is an explanation of intent. Every rule inside RAIDER exists because a specific form of instability had to be removed. Every parameter is a constraint disguised as a variable. The system was not assembled to increase sophistication, but to eliminate behavioral variance at the point where humans are least consistent.

RAIDER begins its structural logic at the signal layer, yet even here the objective is not predictive superiority. Two ZigZag layers operating at different structural speeds are used not to forecast direction, but to filter structural noise. The slower layer defines the broader directional contour, while the faster layer identifies shorter-term reversals. Action is not permitted when both layers align; alignment often represents continuation momentum, which encourages emotional participation. Instead, RAIDER evaluates opportunity when structural disagreement appears. This disagreement does not guarantee reversal. It establishes structural ambiguity—an environment where disciplined entry can be justified without chasing expansion.

Even then, observation does not automatically convert into execution. A Pending Signal state separates detection from exposure. Two consecutive confirmation candles are required before entry is authorized. This delay is deliberate. It sacrifices immediacy to enforce validation. Speed is not treated as advantage; premature exposure is treated as structural risk.

Risk is defined before any position exists. The system calculates its initial structural territory from short-term reversal references, ensuring that geometry originates from price structure rather than discretion. Distance A is derived and then validated against predefined thresholds. If too narrow, the structure becomes fragile and prone to excessive hedge frequency. If too wide, the exposure violates survivability limits. Rejection at this stage is not caution—it is structural enforcement. A trade that does not fit the geometry is not adjusted; it is denied.

External constraints are validated before execution. Broker stop levels, minimum lot sizes, and infrastructural limitations are checked to prevent structural assumptions from colliding with execution reality. A strategy that ignores infrastructure introduces risk unrelated to market logic. RAIDER prohibits such mismatches.

Once structural viability is confirmed, the initial lot size is calculated using a Fixed Fractional model referenced to actual equity rather than balance. This ensures exposure reflects real capital condition rather than accounting illusion. Tick Size and Tick Value are incorporated so that risk is measured in currency impact rather than abstract price points. Lot caps prevent disproportionate sizing even if structural ratios mathematically permit larger exposure. Profit acceleration is not prioritized. Survivability is.

Hedging is not introduced as a defensive improvisation. It is embedded from inception. When the initial position is opened, the architecture already anticipates adverse movement. Distance A defines the first structural boundary of tolerance. Distance B defines the proportional recovery objective and final territory of the cycle. These distances do not predict movement; they define permissible response.

When price crosses a structural boundary, hedge sizing is recalculated from aggregate exposure rather than order count. The system evaluates net exposure of Buy and Sell positions and adjusts proportionally within predefined geometry. This eliminates exponential escalation characteristic of Martingale systems. Exposure progression is governed by spatial ratio, not by emotional urgency.

Closure conditions are explicit. When Take Profit is reached, all positions close without incremental discretion. When the final structural risk boundary is breached, all positions close without hesitation. No extension of territory is permitted mid-cycle. A cycle must end definitively. After closure, internal state resets completely before any new initiation is possible. No residual exposure logic carries forward.

Manual intervention is structurally discouraged. Execution operates on a New-Bar basis to reduce reaction to intrabar noise. Visual lines exist for transparency, not for discretionary modification. The human defines parameters prior to activation. During execution, the human is removed from the decision loop.

In its legacy form, RAIDER is fully deterministic. It does not evaluate macro regime shifts or contextual volatility patterns. That limitation is intentional. Deterministic discipline must be absolute before contextual perception can be layered above it. The architecture shown in this chapter demonstrates that every parameter inside RAIDER serves a single function: to convert human behavioral weakness into enforceable structural restriction. The system does not attempt to increase opportunity. It reduces instability.