PROTECTED SOURCE SCRIPT
[DEM] Moving Average Signal (With Backtesting)

[DEM] Moving Average Signal (With Backtesting) is designed to generate buy and sell signals using a highly configurable moving average system with over 20 different moving average types (including EMA, SMA, HMA, ALMA, McGinley, TRAMA, and others) combined with dynamic upper and lower bands based on standard deviation or ATR multipliers. It also includes a comprehensive backtesting framework to evaluate the historical performance of these signals. The indicator overlays directly on the price chart, plotting the moving average with upper and lower bands while coloring bars green when price is above the upper band, red when below the lower band, and purple when between the bands. The strategy generates buy signals when price crosses above the upper band after being below it for one bar but above it for the previous three bars (indicating a breakout after brief consolidation), and sell signals under opposite conditions with the lower band, creating a momentum-based system that filters for sustained moves beyond the moving average envelope while offering extensive customization options and integrated backtesting metrics.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.