#property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 White #property indicator_color2 SpringGreen #property indicator_color3 Red #property indicator_width1 4 #property indicator_width2 4 #property indicator_width3 4 extern int Par = 10; //cog2 extern int CountBars = 2000; //cog2 double nuet[]; double up[]; double down[]; //+------------------------------------------------------------------+ int init() { SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexBuffer(0,nuet); SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexBuffer(1,up); SetIndexStyle(2,DRAW_HISTOGRAM); SetIndexBuffer(2,down); SetIndexEmptyValue(0,0); SetIndexEmptyValue(1,0); SetIndexEmptyValue(2,0); return(0); } //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ int start() { int counted_bars; int limit; int i; double ma0; double ma1; counted_bars = IndicatorCounted(); if (counted_bars < 0) return(-1); if (counted_bars > 0) counted_bars--; limit = Bars - counted_bars; for (i = 0; i < limit; i++) { ma0 = iCustom(NULL,0,"Center of Gravity2",Par,CountBars,0,i); ma1 = iCustom(NULL,0,"Center of Gravity2",Par,CountBars,1,i); nuet[i] = 0; up[i] = ma0; down[i] = ma1; if (ma0 > ma1) down[i] = 0 && up[i] == EMPTY_VALUE && nuet[i] == EMPTY_VALUE; if (ma0 < ma1) up[i] = 0 && down[i] == EMPTY_VALUE && nuet[i] == EMPTY_VALUE; if (ma0 == ma1) nuet[i] = 0 && down[i] == EMPTY_VALUE && up[i] == EMPTY_VALUE; } return(0); }
Sample
Analysis
Market Information Used:
Indicator Curves created:
Implements a curve of type DRAW_HISTOGRAM
Indicators Used:
Custom Indicators Used:
Center of Gravity2
Order Management characteristics:
Other Features: