anybody correct me please.
this is Indicator code
//+------------------------------------------------------------------+ //| Indicator.mq4 | //| GGekko | //| | //+------------------------------------------------------------------+ #property copyright "GGekko" #property link "" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Lime #property indicator_width1 1 #property indicator_width2 1 //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,117); SetIndexBuffer(0,ExtMapBuffer1); SetIndexEmptyValue(0,EMPTY_VALUE); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,218); SetIndexBuffer(1,ExtMapBuffer2); SetIndexEmptyValue(1,EMPTY_VALUE); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(int i=0; i<limit; i++) {if ( High[iHighest(NULL,0,MODE_HIGH,3,4)] > High[iHighest(NULL,0,MODE_HIGH,3,1)]) ExtMapBuffer1[i]=High[i+1]+.0003; else ExtMapBuffer1[i]=EMPTY_VALUE; } //---- done return(0); } //+------------------------------------------------------------------+
High[iHighest(NULL,0,MODE_HIGH,3,i+4)] > High[iHighest(NULL,0,MODE_HIGH,3,i+1)].
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi i am trying to write a indicator
if previous 3 bars highest should be less than to its previous 3 bars highest.
i mean if previous 1,2,3 bars highest should less than to previous 4,5,6 bars Highest.
but iam getting arrows for every bar!