#property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 Red #property indicator_width1 3 #property indicator_color2 DodgerBlue #property indicator_width2 3 #property indicator_color3 Tomato #property indicator_width3 3 #property indicator_color4 DodgerBlue #property indicator_width4 3 double ExtMapBuffer0[]; double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double buf0,buf1,buf2,buf3; int init() { SetIndexBuffer(0,ExtMapBuffer0); SetIndexBuffer(1,ExtMapBuffer1); SetIndexBuffer(2,ExtMapBuffer2); SetIndexBuffer(3,ExtMapBuffer3); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,3); SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,2); } return(0); int start(){ datetime TimeArray[]; int i,limit,y=0,counted_bars=IndicatorCounted(); ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),1440); limit=Bars-1; for(i=0,y=0;i<limit;i++) {while (Time[i]<TimeArray[y]) y++; buf0=iMA(Symbol(),1440,1,0,MODE_EMA,PRICE_OPEN,y); buf1=iMA(Symbol(),1440,1,0,MODE_EMA,PRICE_OPEN,y+1); buf2=iMA(Symbol(),0,2,0,MODE_SMA,PRICE_WEIGHTED,i); buf3=iMA(Symbol(),0,2,0,MODE_SMA,PRICE_WEIGHTED,i+1); ExtMapBuffer0[i]=(buf0); ExtMapBuffer1[i]=(buf0); ExtMapBuffer2[i]=(buf2); ExtMapBuffer3[i]=(buf2); if ((buf0>buf2))ExtMapBuffer3[i]=EMPTY_VALUE; if ((buf0>buf2))ExtMapBuffer1[i]=EMPTY_VALUE;} return(0); }
Sample
Analysis
Market Information Used:
Series array that contains open time of each bar
Indicator Curves created:
Implements a curve of type DRAW_LINE
Indicators Used:
Moving average indicator
Custom Indicators Used:
Order Management characteristics:
Other Features: