//+------------------------------------------------------------------+ //| SiDuS_Base.mq4 | //| Maximus_genuine | //| gladmxm@bigmir.net | //+------------------------------------------------------------------+ #property copyright "Maximus_genuine" #property link "gladmxm@bigmir.net" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 DarkGreen #property indicator_color2 Maroon //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; int x=1; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { if(Digits == 5) x=10; //---- indicators SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,159); SetIndexBuffer(0,ExtMapBuffer1); SetIndexEmptyValue(0,0.0); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159); SetIndexBuffer(1,ExtMapBuffer2); SetIndexEmptyValue(1,0.0); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| 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<limit; i++) { double w5= iMA(NULL,0,5,0,MODE_LWMA,PRICE_TYPICAL,i+1); double w8= iMA(NULL,0,8,0,MODE_LWMA,PRICE_TYPICAL,i+1); double e18=iMA(NULL,0,18,0,MODE_EMA,PRICE_TYPICAL,i+1); double e28=iMA(NULL,0,28,0,MODE_EMA,PRICE_TYPICAL,i+1); if( w5>e18 && w5>e28 && w8>e18 && w8>e28 ) ExtMapBuffer1[i]=Low[i]-x*20*Point; //-------------------------------------------- if( w5<e18 && w5<e28 && w8<e18 && w8<e28 ) ExtMapBuffer2[i]=High[i]+x*20*Point; } return(0); } //+---------------------------end_film---------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains the lowest prices of each bar
Series array that contains the highest prices of each bar
Indicator Curves created:
Implements a curve of type DRAW_ARROW
Indicators Used:
Moving average indicator
Custom Indicators Used:
Order Management characteristics:
Other Features: