OPEN-SOURCE SCRIPT
Volatility-Dynamic Risk Manager MNQ [HERMAN]

Title: Volatility-Dynamic Risk Manager MNQ [HERMAN]
Description:
The Volatility-Dynamic Risk Manager [HERMAN] is a dedicated risk management utility designed specifically for traders of Micro Nasdaq 100 Futures (MNQ).
Many traders struggle with position sizing because they use a fixed Stop Loss size regardless of market conditions. A 10-point stop might be safe in a slow market but easily stopped out in a high-volatility environment. This indicator solves that problem by monitoring real-time volatility (using ATR) and automatically suggesting the appropriate Stop Loss size and Position Size (Contracts) to keep your dollar risk constant.
Note: This tool is hardcoded for MNQ (Micro Nasdaq) with a tick value calculation of $2 per point.
📈 How It Works
-This script operates on a logical flow that adapts to market behavior:
-Volatility Measurement: It calculates the Average True Range (ATR) over a user-defined length (Default: 14) to gauge the current "speed" of the market.
-State Detection: Based on the current ATR, the script classifies the market into one of three states:
Low Volatility: The market is chopping or moving slowly.
Normal Volatility: Standard trading conditions.
High Volatility: The market is moving aggressively.
Dynamic Stop Loss Selection: Depending on the detected state, the script selects a pre-defined Stop Loss (in points) that you have configured for that specific environment.
Position Sizing Calculation: Finally, it calculates how many MNQ contracts you can trade so that if your Stop Loss is hit, you do not lose more than your defined "Max Risk per Trade."
🧮 Methodology & Calculations
Since this script handles risk management, transparency in calculation is vital.
Here is the exact math used:
ATR Calculation: Contracts = Max Risk / Risk Per Contract
⚙️ Settings
You can fully customize the behavior of the risk manager via the settings panel:
Risk Management
-Max Risk per Trade ($): The maximum amount of USD you are willing to lose on a single trade.
Volatility Thresholds (ATR)
-ATR Length: The lookback period for volatility calculation.
-Upper Limit for LOW Volatility: If ATR is below this number, the market is "Low Volatility."
-Lower Limit for HIGH Volatility: If ATR is above this number, the market is "High Volatility." (Anything between Low and High is considered "Normal").
Stop Loss Settings (Points)
-SL for Low/Normal/High: Define how wide your stop loss should be in points for each of the three market states.
Visual Settings
-Color Theme: Switch between Light and Dark modes.
-Panel Position: Move the dashboard to any corner or center of your chart.
-Panel Size: Adjust the scale (Tiny to Large) to fit your screen resolution.
📊 Dashboard Overview
-The on-screen panel provides a quick-glance summary for live execution:
-Market State: Color-coded status (Green = Low Vol, Orange = Normal, Red = High Vol).
-Current ATR: The live volatility reading.
-Suggested SL: The Stop Loss size you should enter in your execution platform.
-CONTRACTS: The calculated position size.
-Est. Loss: The actual dollar amount you will lose if the stop is hit (usually slightly less than your Max Risk due to rounding down).
Who is this for?
-Discretionary and systematic futures traders on MNQ (/MNQ or MES also works with small adjustments)
-Anyone who wants perfect risk consistency regardless of whether the market is asleep or exploding
-Traders who hate manual position-size calculations on every trade
No repainting
Works on any timeframe
Real-time updates on every bar
Overlay indicator (no signals, pure risk-management tool)
⚠️ Disclaimer
This tool is for informational and educational purposes only. It calculates mathematical position sizes based on user inputs. It does not execute trades, nor does it guarantee profits. Past performance (volatility) is not indicative of future results. Always manually verify your order size before executing trades on your broker platform.
Description:
The Volatility-Dynamic Risk Manager [HERMAN] is a dedicated risk management utility designed specifically for traders of Micro Nasdaq 100 Futures (MNQ).
Many traders struggle with position sizing because they use a fixed Stop Loss size regardless of market conditions. A 10-point stop might be safe in a slow market but easily stopped out in a high-volatility environment. This indicator solves that problem by monitoring real-time volatility (using ATR) and automatically suggesting the appropriate Stop Loss size and Position Size (Contracts) to keep your dollar risk constant.
Note: This tool is hardcoded for MNQ (Micro Nasdaq) with a tick value calculation of $2 per point.
📈 How It Works
-This script operates on a logical flow that adapts to market behavior:
-Volatility Measurement: It calculates the Average True Range (ATR) over a user-defined length (Default: 14) to gauge the current "speed" of the market.
-State Detection: Based on the current ATR, the script classifies the market into one of three states:
Low Volatility: The market is chopping or moving slowly.
Normal Volatility: Standard trading conditions.
High Volatility: The market is moving aggressively.
Dynamic Stop Loss Selection: Depending on the detected state, the script selects a pre-defined Stop Loss (in points) that you have configured for that specific environment.
Position Sizing Calculation: Finally, it calculates how many MNQ contracts you can trade so that if your Stop Loss is hit, you do not lose more than your defined "Max Risk per Trade."
🧮 Methodology & Calculations
Since this script handles risk management, transparency in calculation is vital.
Here is the exact math used:
ATR Calculation: Contracts = Max Risk / Risk Per Contract
⚙️ Settings
You can fully customize the behavior of the risk manager via the settings panel:
Risk Management
-Max Risk per Trade ($): The maximum amount of USD you are willing to lose on a single trade.
Volatility Thresholds (ATR)
-ATR Length: The lookback period for volatility calculation.
-Upper Limit for LOW Volatility: If ATR is below this number, the market is "Low Volatility."
-Lower Limit for HIGH Volatility: If ATR is above this number, the market is "High Volatility." (Anything between Low and High is considered "Normal").
Stop Loss Settings (Points)
-SL for Low/Normal/High: Define how wide your stop loss should be in points for each of the three market states.
Visual Settings
-Color Theme: Switch between Light and Dark modes.
-Panel Position: Move the dashboard to any corner or center of your chart.
-Panel Size: Adjust the scale (Tiny to Large) to fit your screen resolution.
📊 Dashboard Overview
-The on-screen panel provides a quick-glance summary for live execution:
-Market State: Color-coded status (Green = Low Vol, Orange = Normal, Red = High Vol).
-Current ATR: The live volatility reading.
-Suggested SL: The Stop Loss size you should enter in your execution platform.
-CONTRACTS: The calculated position size.
-Est. Loss: The actual dollar amount you will lose if the stop is hit (usually slightly less than your Max Risk due to rounding down).
Who is this for?
-Discretionary and systematic futures traders on MNQ (/MNQ or MES also works with small adjustments)
-Anyone who wants perfect risk consistency regardless of whether the market is asleep or exploding
-Traders who hate manual position-size calculations on every trade
No repainting
Works on any timeframe
Real-time updates on every bar
Overlay indicator (no signals, pure risk-management tool)
⚠️ Disclaimer
This tool is for informational and educational purposes only. It calculates mathematical position sizes based on user inputs. It does not execute trades, nor does it guarantee profits. Past performance (volatility) is not indicative of future results. Always manually verify your order size before executing trades on your broker platform.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.