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.
// ====================================================================
Script protegido
Este script se publica como código cerrado. Sin embargo, puede utilizarlo libremente y sin limitaciones: obtenga más información aquí.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script protegido
Este script se publica como código cerrado. Sin embargo, puede utilizarlo libremente y sin limitaciones: obtenga más información aquí.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.