PROTECTED SOURCE SCRIPT

MNQ 4H Swing

87
// ====================================================================
// 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.
// ====================================================================

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.