
Military Rule Indicator - Comprehensive Guide
🏆 Motto:
"Trade with discipline – let the Military Rule enforce your strategy!"
📌 Overview
The Military Rule indicator is a dynamic stop-loss and reversal system designed to help traders manage risk and identify potential trend reversals. It combines ATR-based volatility measurements with price action to plot trailing stops and generate entry signals.
🔧 Indicator Settings
Input Parameters:
UseATRMode (Default: true) – Switches between ATR-based or fixed-pip stop calculation.
NonATRStopPips (Default: 40) – Fixed stop distance (in pips) when ATR mode is off.
ATRPeriod (Default: 9) – Lookback period for ATR calculation.
ATRMultiplier (Default: 3.0) – Multiplier applied to ATR for stop distance.
ATRSmoothing (Default: 0) – Smoothing factor for ATR (auto-adjusted to 1 if ≤0).
ArrowDistance (Default: 0) – Vertical offset for signal arrows.
Alerts:
AlertSound – Plays sound on signals.
AlertMail – Sends email alerts.
ShowComment – Displays on-chart info.
Visual Elements:
Gold Line: Dynamic trailing stop level.
Up Arrow (Gold): Bullish reversal signal.
Down Arrow (DeepPink): Bearish reversal signal.
📊 How It Works
Core Algorithm:
Stop Calculation:
In ATR Mode: Stop distance = ATR(ATRPeriod) × ATRMultiplier.
In Manual Mode: Stop distance = NonATRStopPips in pips.
Trailing Logic:
The stop level only moves in the trend direction, locking in profits.
When price closes beyond the stop:
A reversal arrow appears (up for bullish, down for bearish).
The stop flips to the opposite side.
Signal Generation:
Buy Signal: Price closes above stop → Gold up arrow.
Sell Signal: Price closes below stop → DeepPink down arrow.
🎯 Trading Strategy Suggestions
Trend-Following Approach:
Enter long on up arrows in an uptrend (confirmed by higher highs/lows).
Enter short on down arrows in a downtrend (confirmed by lower highs/lows).
Reversal Strategy:
Use arrows as potential reversal points, especially at key S/R levels.
Best Practices:
Higher Timeframes (H4/D1) reduce false signals.
Combine with RSI/MACD for confirmation.
Adjust ATRMultiplier based on volatility (increase for choppy markets).
🔍 Additional Notes
Alerts Feature: Can notify via sound/email (great for multi-chart monitoring).
Self-Adjusting: Stops widen/narrow with market volatility in ATR mode.
Low Lag: Reacts faster than traditional moving averages.
📜 Developer & Source
Developer: R.KH 1001
Source: RoboMQL
🚀 Command your trades like a general – discipline wins the trading war! 🚀