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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.