MA crossover with Arrow

 
Hi Everyone, I'm trying to make arrow show on ma crossover but its not working please help me out. Thanks. //+------------------------------------------------------------------+ //| jhgjkhg.mq4 | //| David | //| davidon2005@yahoo.com | //+------------------------------------------------------------------+ #property copyright "David" #property link "davidon2005@yahoo.com" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Yellow #property indicator_color2 Red extern int Fast_MA=20; extern int Slow_MA=50; //---- buffers double UpBuffer[]; double DnBuffer[]; double Short_Buffer[]; double Long_Buffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int crossed(double MA1, double MA2) { static int prev_dir = 0; static int current_dir = 0; if(MA1>MA2)current_dir = 1; if(MA1 0) counted_bars--; limit=Bars-counted_bars; //---- main loop for(int i=0; i
Reason: