Damiani_Volt_v1

Download script
Author: Copyright � 2006,2007 Luis Guilherme Damiani
Damiani_Volt_v1

This trading indicator is designed to help traders identify high-probability market conditions by analyzing the relationship between current price volatility and historical trends. Instead of simply showing where the price is moving, it measures how "aggressive" the current price action is compared to what is considered normal for that specific asset.

Core Logic and Methodology

The script operates by comparing two distinct types of market data: Volatility (how much the price swings) and Standard Deviation (how far the price deviates from its average). It processes these two inputs to create a "signal" that tells the user whether the current market behavior is significant enough to warrant a trade.

1. Volatility Analysis (The "A" Component)

The tool looks at recent price fluctuations using an Average True Range (ATR). However, it doesn't just look at the raw number; it calculates a ratio. It compares short-term volatility against long-term volatility. This helps the script understand if the current "noise" in the market is unusually high relative to the historical norm.

2. Deviation Analysis (The "S" Component)

Simultaneously, the script monitors price stability using Standard Deviation. By comparing a fast-moving deviation calculation against a much slower one, the tool establishes a "baseline" of market behavior. It essentially calculates how much the price is currently "stretching" away from its average path.

3. The Threshold Comparison

The heart of the logic lies in the interaction between these two components:

  • The Dynamic Ceiling: The script creates a calculated threshold (a baseline level).
  • The Signal: It checks if the current Volatility Ratio (the "A" value) has climbed above this adjusted Standard Deviation threshold.

How to Interpret the Visuals

The indicator provides clear visual cues on your chart to help you make decisions:

  • Trade Opportunities: When the current volatility intensity exceeds the calculated threshold, the script identifies a specific state of market activity. This is visually represented by a shift in the line behavior (specifically, the "Lime" and "Magenta" indicators), signaling that the market is moving with enough strength to potentially be actionable.
  • No-Trade Zones: When volatility remains below the threshold, the tool signals that price movements are not significant enough relative to historical patterns. This serves as a filter to help you avoid "choppy" markets or low-momentum periods where trades are less likely to be successful.

Key Features for the User

  • Lag Suppression: The logic includes a specialized mechanism to reduce "lag." By factoring in a portion of previous price movements, the script attempts to react more quickly to real-time market shifts rather than waiting for old data to catch up.
  • Dynamic Status Updates: The tool automatically updates its short name on your chart, providing you with the exact numerical values of the Volatility and Standard Deviation components in real-time, allowing for precise monitoring of the "Trade" vs. "Do Not Trade" conditions.
Indicators Used
Indicator of the average true rangeStandard Deviation indicator
Miscellaneous
Implements a curve of type %1
10 Views
0 Downloads
0 Favorites
Damiani_Volt_v1

#property copyright "Copyright © 2006,2007 Luis Guilherme Damiani"
#property link      "http://www.damianifx.com.br"

#property indicator_separate_window
#property indicator_minimum 0.0
#property indicator_buffers 3
#property indicator_color1 Silver
#property indicator_color2 Magenta
#property indicator_color3 Lime

extern int Vis_atr = 5;
extern int Vis_std = 8;
extern int Sed_atr = 40;
extern int Sed_std = 100;
extern double Threshold_level = 1.4;
extern bool lag_supressor = TRUE;
double Buff_X = 0.5;

double BufferA[];
double BufferB[];
double BufferC[];

int init() {
   SetIndexStyle(0, DRAW_LINE);
   SetIndexBuffer(0, BufferA);
   SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 4);
   SetIndexBuffer(1, BufferB);
   SetIndexStyle(2, DRAW_LINE);
   SetIndexBuffer(2, BufferC);
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   int countedbar;
   double atr;
   double Buff_1;
   double Buff_2;
   double ATR_value;
   double std;
   double ATD_value;
   double T_Level;
   double atr_2 = 0;
   int countted = IndicatorCounted();
   if (countted < 0) return (-1);
   if (countted > 0) countted--;
   int barcount = Bars - countted;
   int atrstd = MathMax(Sed_atr, Sed_std);
   if (barcount > atrstd + 5) countedbar = barcount - atrstd;
   else countedbar = barcount;
   for (int i = countedbar; i >= 0; i--) {
      atr = iATR(NULL, 0, Vis_atr, i);
      Buff_1 = BufferC[i + 1];
      Buff_2 = BufferC[i + 3];
      ATR_value = NormalizeDouble(atr, Digits);
      if (lag_supressor) atr_2 = atr / iATR(NULL, 0, Sed_atr, i) + Buff_X * (Buff_1 - Buff_2);
      else atr_2 = atr / iATR(NULL, 0, Sed_atr, i);
      std = iStdDev(NULL, 0, Vis_std, 0, MODE_LWMA, PRICE_TYPICAL, i);
      ATD_value = NormalizeDouble(std, Digits);
      std /= iStdDev(NULL, 0, Sed_std, 0, MODE_LWMA, PRICE_TYPICAL, i);
      T_Level = Threshold_level;
      T_Level -= std;
      if (i == 0) {
         if (atr_2 > T_Level) {
            IndicatorShortName("TRADE " + " A(" + DoubleToStr(Vis_atr, 0) + "/" + DoubleToStr(Sed_atr, 0) + ")= " + DoubleToStr(atr_2, 2) + ", " + DoubleToStr(Threshold_level, 1) +
               " - S(" + DoubleToStr(Vis_std, 0) + "/" + DoubleToStr(Sed_std, 0) + ")= " + DoubleToStr(T_Level, 2) + " ");
         } else {
            IndicatorShortName("DO NOT trade " + "A(" + DoubleToStr(Vis_atr, 0) + "/" + DoubleToStr(Sed_atr, 0) + ")= " + DoubleToStr(atr_2, 2) + ", " + DoubleToStr(Threshold_level, 1) +
               " - S(" + DoubleToStr(Vis_std, 0) + "/" + DoubleToStr(Sed_std, 0) + ")= " + DoubleToStr(T_Level, 2) + " ");
         }
      }
      if (atr_2 > T_Level) {
         BufferC[i] = atr_2;
         BufferB[i] = -1;
      } else {
         BufferC[i] = atr_2;
         BufferB[i] = 0.03;
      }
      BufferA[i] = T_Level;
   }
   return (0);
}

Comments