OPEN-SOURCE SCRIPT
ที่อัปเดต: CDC BACKTEST (MACD) FIX AMOUNT $200k per trade

This strategy implements an Exponential Moving Average (EMA) Crossover System designed for backtesting and performance evaluation. EMA 12,26 (MACD)
The trading logic is based on the crossover between two EMAs — a short-term EMA (12) and a long-term EMA (26) — which serves as a momentum-based signal for trend identification.
Buy Condition:
A long (buy) position is entered when the 12-period EMA crosses above the 26-period EMA, indicating a potential upward trend or bullish momentum.
Sell Condition:
A position is closed, or a short (sell) position is opened, when the 12-period EMA crosses below the 26-period EMA, signaling a potential downward trend or bearish momentum.
Position Sizing:
Each trade with a fixed position size of 200,000 USD (default), while the starting account balance is set at 400,000 (USD).
Both the fixed trade amount and the initial balance are user-adjustable parameters, allowing flexibility for different risk preferences and portfolio sizes.
The trading logic is based on the crossover between two EMAs — a short-term EMA (12) and a long-term EMA (26) — which serves as a momentum-based signal for trend identification.
Buy Condition:
A long (buy) position is entered when the 12-period EMA crosses above the 26-period EMA, indicating a potential upward trend or bullish momentum.
Sell Condition:
A position is closed, or a short (sell) position is opened, when the 12-period EMA crosses below the 26-period EMA, signaling a potential downward trend or bearish momentum.
Position Sizing:
Each trade with a fixed position size of 200,000 USD (default), while the starting account balance is set at 400,000 (USD).
Both the fixed trade amount and the initial balance are user-adjustable parameters, allowing flexibility for different risk preferences and portfolio sizes.
เอกสารเผยแพร่
Description:This strategy implements an Exponential Moving Average (EMA) Crossover System for backtesting and performance evaluation.
The trading logic follows the crossover between a short-term EMA (12) and a long-term EMA (26), which helps identify shifts in market momentum and potential trend reversals.
Buy Condition:
A long (buy) position is opened when the 12-period EMA crosses above the 26-period EMA, signaling a potential bullish trend.
Sell Condition:
A position is closed or reversed to a short (sell) position when the 12-period EMA crosses below the 26-period EMA, indicating a potential bearish trend.
Position Sizing and Capital Management:
Each trade is executed with a fixed position size of 200,000 USD (default), while the starting account balance is set to 400,000 USD.
Both parameters are adjustable, allowing users to align the strategy with their individual risk tolerance and portfolio scale.
Backtest Period Configuration:
The strategy allows users to set a custom start date for the backtest period to focus on specific market conditions or historical intervals.
If no start date is specified, the system defaults to January 1, 1970, effectively running the test over all available data.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน