BetterVolume ChartBars part2 1.4
Download scriptThis tool is designed to analyze market activity by examining the relationship between trading volume and price movement. Instead of just looking at how much "activity" occurred, it evaluates the intensity and quality of that activity to highlight specific market conditions on your chart.
How the Logic Works
The script operates by scanning a set number of historical bars (customizable by the user) and performing three primary types of calculations for each bar:
1. Volume Intensity (Product) The tool calculates a "Volume Intensity" value by multiplying the total volume traded by the price range (the distance between the high and low of that specific bar). A high value here suggests a significant amount of capital moving over a large price distance, often indicating strong momentum.
2. Effort vs. Result (Quotient) The tool also calculates an "Efficiency" ratio by dividing the volume by the price range. This helps identify situations where a lot of trading activity resulted in very little price movement—often a sign of heavy competition or "churn."
3. Comparative Analysis (Look-Back) To provide context, the script doesn't look at bars in isolation. It examines a specific window of previous bars (the "Look-Back" period) to determine if the current bar represents a peak in intensity or efficiency compared to its recent neighbors.
Visual Indicators on the Chart
Based on these calculations, the script identifies and marks four specific market behaviors using different colors:
- High Churn: This is identified when a bar shows a significant peak in "Effort vs. Result." It highlights areas where high volume was concentrated but failed to produce an outsized price move.
- Climax High Churn: This is the most extreme signal. it appears only when a bar simultaneously hits a peak in both Volume Intensity and Efficiency. This represents a "climax" point—a moment of maximum market exhaustion or intense conflict between buyers and sellers.
- General Support/Resistance Markers: The script uses the high and low prices of these identified bars to plot markers on your chart, allowing you to see exactly where these periods of high-intensity activity occurred visually.
Summary for the User
Essentially, this script acts as a "stress test" for price action. It filters out the "noise" of standard trading and draws your attention to specific moments where market participants were fighting hardest over a price level, helping you identify zones of significant exhaustion or high-interest activity.
#property copyright ""
#property link ""
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Lime
#property indicator_color2 Lime
#property indicator_color3 Magenta
#property indicator_color4 Magenta
#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 2
#property indicator_width4 2
extern int NumberOfBars = 500;
extern string Note = "0 means Display all bars";
extern int MAPeriod = 100;
extern int LookBack = 20;
double red[],blue[],yellow[],green[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexBuffer(0,red);
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexLabel(0,"High Churn ");
SetIndexBuffer(1,blue);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexLabel(1,"");
SetIndexBuffer(2,yellow);
SetIndexStyle(2,DRAW_HISTOGRAM);
SetIndexLabel(2,"Climax High Churn ");
SetIndexBuffer(3,green);
SetIndexStyle(3,DRAW_HISTOGRAM);
SetIndexLabel(3,"");
IndicatorShortName("Better Volume On Chart 1.4" );
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
double VolLowest,Range,Value2,Value3,HiValue2,HiValue3,LoValue3,tempv2,tempv3,tempv;
int limit;
int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
if ( NumberOfBars == 0 )
NumberOfBars = Bars-counted_bars;
limit=NumberOfBars; //Bars-counted_bars;
for(int i=0; i<limit; i++)
{
red[i] = 0; blue[i] = 0; yellow[i] = 0; green[i] = 0;
Value2=0;Value3=0;HiValue2=0;HiValue3=0;LoValue3=99999999;tempv2=0;tempv3=0;tempv=0;
VolLowest = Volume[iLowest(NULL,0,MODE_VOLUME,20,i)];
if (Volume[i] == VolLowest)
{
//yellow[i] = High[i];
//green[i]=Low[i];
}
Range = (High[i]-Low[i])/Point;
Value2 = Volume[i]*Range;
if ( Range != 0 )
Value3 = Volume[i]/Range;
for ( int n=i;n<i+LookBack;n++)
{
tempv2 = Volume[n]*((High[n]-Low[n])/Point);
if ( tempv2 > HiValue2 )
HiValue2 = tempv2;
if ( Volume[n]*((High[n]-Low[n])/Point) != 0 )
{
tempv3 = Volume[n] / ((High[n]-Low[n])/Point);
if ( tempv3 > HiValue3 )
HiValue3 = tempv3;
if ( tempv3 < LoValue3 )
LoValue3 = tempv3;
}
}
if ( Value2 == HiValue2 )
{
//red[i] = High[i];
//blue[i]=Low[i];
//yellow[i]=0;
}
if ( Value3 == HiValue3 )
{
red[i] = High[i];
blue[i] =Low[i];
//yellow[i]=0;
//red[i]=0;
}
if ( Value2 == HiValue2 && Value3 == HiValue3 )
{
yellow[i] = High[i];
green[i]=Low[i];
//red[i]=0;
//green[i]=0;
//yellow[i]=0;
}
if ( Value3 == LoValue3 )
{
//white[i] = High[i];
//magenta[i]=Low[i];
//blue[i]=0;
//red[i]=0;
//green[i]=0;
//yellow[i]=0;
}
}
//----
//----
return(0);
}
//+------------------------------------------------------------------+
Comments