Ergodic_TVI
Download scriptUnderstanding the Ergodic Ticks Volume Indicator
The Ergodic Ticks Volume Indicator is a sophisticated analytical tool designed to help traders visualize and interpret market activity by focusing on the frequency of price movements rather than just the price changes themselves.
How it Works: The Core Logic
Instead of looking at how much a price moved (like a standard candle's body), this indicator tracks "Ticks"—which are the individual transactions or updates occurring in the market. By analyzing these ticks, the tool provides a clearer picture of the underlying momentum and "heartbeat" of the financial instrument.
The Data Processing Journey
The logic follows a multi-step refinement process to transform raw, volatile market data into smooth, readable trends:
- Raw Tick Volume Analysis: The indicator first pulls data from a base "Ticks Volume Indicator." This identifies the raw intensity of trading activity over specific periods.
- First Smoothing Layer (EMA): To remove "noise" (the jagged, erratic jumps common in high-frequency trading), the script applies an Exponential Moving Average (EMA). This helps highlight the general direction of the volume flow while keeping the data responsive to recent changes.
- The Ergodic Transformation: The logic then performs a secondary smoothing process on that initial average. This creates the primary "Ergodic TVI" line, which represents the stabilized trend of market activity.
- The Signal Component: Finally, the script calculates a third layer of smoothing to create a "Signal" line.
How to Interpret the Results
By providing these multiple layers of data, the indicator allows you to see the relationship between the main volume trend and its moving signal:
- Trend Identification: The primary lines help you see if trading intensity is increasing or decreasing over time.
- Signal Crossings: By comparing the "Ergodic TVI" line against the "Signal" line, traders can look for shifts in momentum. When these two lines interact or diverge, it often suggests a change in the market's behavior—such as a transition from high-activity accumulation to a cooling-off period, or vice versa.
In short, this tool filters out the chaos of individual trades to reveal the broader "flow" of the market, making it easier to identify where significant trading pressure is building.
//+------------------------------------------------------------------+
//| Ergodic Ticks Volume Indicator |
//| Copyright © William Blau |
//| Coded/Verified by Profitrader |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Profitrader."
#property link "profitrader@inbox.ru"
//----
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Yellow
#property indicator_color2 Red
//---- input parameters
extern int TVI_r=12;
extern int TVI_s=12;
extern int Ergodic_r=5;
//---- buffers
double Ergodic_TVI[];
double Ergodic_Signal[];
double TVI[];
double TVI_EMA[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorShortName("Ergodic TVI("+TVI_r+","+TVI_s+","+Ergodic_r+")");
IndicatorBuffers(4);
SetIndexBuffer(0,Ergodic_TVI);
SetIndexBuffer(1,Ergodic_Signal);
SetIndexBuffer(2,TVI);
SetIndexBuffer(3,TVI_EMA);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
SetIndexLabel(0,"Erg-TVI");
SetIndexLabel(1,"Signal");
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
int limit=Bars-counted_bars;
for(i=0; i<limit; i++)
TVI[i]=iCustom(NULL,0,"Ticks Volume Indicator",TVI_r,TVI_s,1,0,i);
for(i=limit-1; i>=0; i--)
TVI_EMA[i]=iMAOnArray(TVI,0,Ergodic_r,0,MODE_EMA,i);
for(i=limit-1; i>=0; i--)
Ergodic_TVI[i]=iMAOnArray(TVI_EMA,0,5,0,MODE_EMA,i);
for(i=limit-1; i>=0; i--)
Ergodic_Signal[i]=iMAOnArray(Ergodic_TVI,0,5,0,MODE_EMA,i);
//----
return(0);
}
//+------------------------------------------------------------------+
Comments