#property copyright "eevviill"
#property link "[email protected]"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 OrangeRed
double ExtMapBuffer1[];
double ExtMapBuffer2[];
extern int MA_fast_period = 40;
extern int MA_slow_period = 60;
int init()
{
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,SYMBOL_ARROWUP);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,SYMBOL_ARROWDOWN);
return;
}
int start()
{
int counted_bars=IndicatorCounted();
int pos = Bars-counted_bars;
double MA1 = iMA(Symbol(),0,MA_fast_period,0,MODE_LWMA,PRICE_CLOSE,1);
double MA11 = iMA(Symbol(),0,MA_fast_period,0,MODE_LWMA,PRICE_CLOSE,2);
double MA2 = iMA(Symbol(),0,MA_slow_period,0,MODE_LWMA,PRICE_CLOSE,1);
double MA22 = iMA(Symbol(),0,MA_slow_period,0,MODE_LWMA,PRICE_CLOSE,2);
if(MA11<MA22 && MA1>MA2) ExtMapBuffer1[1] = ; //up
if(MA11>MA22 && MA1<MA2) ExtMapBuffer2[1] = ; //down
return;
}