//+------------------------------------------------------------------+ //| RZI:).mq4 | //| Copyright © 1895, Prosto_Daun. | //| http://www.p_sec.eu | //+------------------------------------------------------------------+ #property copyright "Vasya_Daun © Corp" #property link "http://www.p_sec.eu" //---- indicator settings #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Black //---- buffers double ExtMapBuffer1[]; //---- int ExtCountedBars=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE,0,1,Black); SetIndexBuffer(0,ExtMapBuffer1); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- TODO: add your code here //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { if(Bars<=10) return(0); ExtCountedBars=IndicatorCounted(); //---- check for barsible errors if (ExtCountedBars<0) return(-1); //---- last counted bar will be recounted if (ExtCountedBars>0) ExtCountedBars--; int bar=Bars-ExtCountedBars-1; while(bar>=0) { if (High [bar] > High [bar+1] && Low [bar]> Low [bar+1])// 1 { ExtMapBuffer1[bar]=1+ExtMapBuffer1[bar+1]; } else { if (High[bar]<High[bar+1] && Low[bar]< Low[bar+1])// -1 { ExtMapBuffer1[bar]=ExtMapBuffer1[bar+1]-1; } else { ExtMapBuffer1[bar]=ExtMapBuffer1[bar+1]; } } bar--; } return(0); }
Sample
Analysis
Market Information Used:
Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Indicator Curves created:
Implements a curve of type DRAW_LINE
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Other Features: