//+------------------------------------------------------------------+ //| Cycle Cross B1.mq4 | //| Copyright © 2010, AKA TradeForexFx | //| | //+------------------------------------------------------------------+ #property copyright "Copyright © 2010, AKA TradeForexFx" #property link "" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red #property indicator_minimum 0.0 #property indicator_maximum 100.0 //---- input parameters extern int Period_=0; extern int PeriodShift=0; extern int PrevPeriodShift=0; bool UseAlert=false; //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,233); SetIndexBuffer(0,ExtMapBuffer1); SetIndexEmptyValue(0,0.0); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,234); SetIndexBuffer(1,ExtMapBuffer2); SetIndexEmptyValue(1,0.0); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //-- Check for Start of a new Bar //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int 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--; limit=Bars-counted_bars; //---- main loop for(int i=0; i SlowPeriod_0_Previous && FastPeriod_0_Current1 < SlowPeriod_0_Previous1) ExtMapBuffer1[i] = 50.0; // ExtMapBuffer1[i] = iLow(NULL, 0, i+1); if (FastPeriod_0_Current < SlowPeriod_0_Previous &&FastPeriod_0_Current1 >SlowPeriod_0_Previous1 ) ExtMapBuffer2[i] = 50.0; // ExtMapBuffer2[i] =iHigh(NULL, 0, i+1); } return(0); } //+------------------------------------------------------------------+