OPEN-SOURCE SCRIPT
Cập nhật

MACD Backtesting Indicator

106
This Pine Script v5 indicator replicates TradingView's standard MACD with full backtesting capabilities. Traders can adjust all parameters (12,26,9 defaults) through inputs and see real-time performance metrics in the table. Buy/sell signals appear as labeled arrows, matching classic MACD crossover strategy while providing visual backtest results for strategy evaluation.
Phát hành các Ghi chú
EMA Implementation
EMA replaces SMA in MACD calculation using getMA() function that switches between ta.ema() and ta.sma() based on user input. Default is EMA for faster price response - standard TradingView MACD actually uses EMA internally.


Key Benefits of EMA over SMA:

Weights recent prices higher (exponential decay)

Faster trend detection and signal generation

Less lag in volatile markets

Traders select "EMA" (default) or "SMA" via dropdown. Table shows active MA type. EMA typically generates more signals due to quicker response.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.