Damiani_Volatmeter
Download scriptThe Damiani Volatmeter is a custom technical analysis indicator designed to provide traders with a visual representation of market volatility and price momentum. It works by calculating the relationship between different types of price movement—specifically comparing "raw" market variance against standardized averages.
Core Logic & Functionality
The script operates by processing two primary mathematical components:
1. Volatility Comparison (The P Line) The indicator uses the Average True Range (ATR), which measures how much a price moves on average over a specific period. It calculates two different versions of this:
- A "Fast" version based on the Viscosity setting.
- A "Slow" version based on the Sedimentation setting.
By dividing the fast volatility by the slow volatility, the script determines the current speed of price movement relative to its recent history. To make this data more responsive and less "laggy," the logic includes an optional Lag Suppressor. This feature looks at neighboring price points to smooth out sudden jumps while maintaining the core trend of the volatility shift.
2. Threshold Mapping (The M Line) The script also utilizes Standard Deviation, which measures how much prices are deviating from the mean (average) price. It calculates this across the same "Fast" and "Slow" windows mentioned above.
- It takes a user-defined Threshold (a baseline value).
- It compares the fast standard deviation to the slow standard deviation.
- The result is mapped against the threshold to create a secondary reading that helps identify if the current market "noise" is expanding or contracting relative to the baseline.
User Experience & Visuals
When you apply this script to a chart, it generates two distinct lines in a separate window:
- The P Line (Green): Represents the normalized volatility ratio. It shows you how quickly the market is moving right now compared to its historical "speed."
- The M Line (Red): Represents the deviation from the established threshold. This helps traders understand if the current price action is becoming an outlier or staying within normal bounds.
Key Parameters for Customization
- Viscosity & Sedimentation: These control the "memory" of the indicator. Lower numbers make the lines react quickly to new data; higher numbers make them smoother and slower to change.
- Threshold: This acts as your "normal" baseline. Adjusting this changes where the M line sits relative to the price action.
- Lag Suppressor: When enabled, this attempts to refine the P line by factoring in slight price differences between candles, making the indicator feel more fluid and less like it is "trailing" behind the actual market movement.
In summary, the Damiani Volatmeter helps a trader distinguish between high-intensity price spikes and sustained trends by comparing different layers of market volatility against one another.
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | D a m i a n i _ V o l a t m e t e r . m q 5 |
/ / | C o p y r i g h t 2 0 1 8 , M e t a Q u o t e s S o f t w a r e C o r p . |
/ / | h t t p s : / / m q l 5 . c o m |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
# p r o p e r t y c o p y r i g h t "