PROTECTED SOURCE SCRIPT
MNQ 4H Swing

// ====================================================================
// Strategy: MNQ 4H Swing — Independent Trades + Alerts + Trade Lines
// ====================================================================
// 1. Designed for MNQ futures on a strict 4-hour timeframe.
// 2. Timeframe guard ensures the code only runs on 4H charts.
// 3. User can configure risk per trade in USD and contract size limits.
// 4. Position size is calculated dynamically from entry–stop distance.
// 5. Stop-loss can be set by bar high/low or ATR multiplier.
// 6. Take-profit can be defined in points or as a risk multiple (R).
// 7. Multiple layered entries are supported, hedging is disabled.
// 8. SMA(9) acts as the main trend filter for signals.
// 9. Long entry = price above SMA + breakout after bearish bar.
// 10. Short entry = price below SMA + breakdown after bullish bar.
// 11. Candle size filters control validity of entry signals.
// 12. Trailing stop (Chandelier ATR) is available per trade layer.
// 13. Optionally move stop to breakeven at +1R profit.
// 14. Cooldown prevents immediate re-entry after flat conditions.
// 15. Alerts: both alertcondition() and alert() are included.
// 16. Alerts show entry, stop, TP, quantity, and timeframe details.
// 17. Each trade is tracked in arrays for multi-layer management.
// 18. Fixed horizontal lines (Entry/SL/TP) are drawn for 3 bars.
// 19. Debug markers visualize core long/short signals and bad bars.
// 20. Provides structured risk management, automation, and visuals.
// ====================================================================
// Strategy: MNQ 4H Swing — Independent Trades + Alerts + Trade Lines
// ====================================================================
// 1. Designed for MNQ futures on a strict 4-hour timeframe.
// 2. Timeframe guard ensures the code only runs on 4H charts.
// 3. User can configure risk per trade in USD and contract size limits.
// 4. Position size is calculated dynamically from entry–stop distance.
// 5. Stop-loss can be set by bar high/low or ATR multiplier.
// 6. Take-profit can be defined in points or as a risk multiple (R).
// 7. Multiple layered entries are supported, hedging is disabled.
// 8. SMA(9) acts as the main trend filter for signals.
// 9. Long entry = price above SMA + breakout after bearish bar.
// 10. Short entry = price below SMA + breakdown after bullish bar.
// 11. Candle size filters control validity of entry signals.
// 12. Trailing stop (Chandelier ATR) is available per trade layer.
// 13. Optionally move stop to breakeven at +1R profit.
// 14. Cooldown prevents immediate re-entry after flat conditions.
// 15. Alerts: both alertcondition() and alert() are included.
// 16. Alerts show entry, stop, TP, quantity, and timeframe details.
// 17. Each trade is tracked in arrays for multi-layer management.
// 18. Fixed horizontal lines (Entry/SL/TP) are drawn for 3 bars.
// 19. Debug markers visualize core long/short signals and bad bars.
// 20. Provides structured risk management, automation, and visuals.
// ====================================================================
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.