|
最近编了个自已的指标,在MetaEditor里测试很正常,但就是在MT4里却无论如何也显示不了。请各位高人看一下是什么地方出错了,谢了!!! //+------------------------------------------------------------------+ //| chen\'s avg.mq4 | //| stephen chen | //| | //+------------------------------------------------------------------+ #property copyright \"stephen chen\" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 MediumSpringGreen //---- indicator parameters所选择的均线周期为MC_Period extern int MC_Period=10; //---- buffers double MCMapBuffer1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,MCMapBuffer1); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)); IndicatorShortName(\"chen\'s avg\"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ //int deinit() //{ //---- //---- //return(0); //} //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); int k ; double quan[]; double jia_lian[]; //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars-MC_Period; //---- for(int i=0; i |
EA发布区