mt5重新启动后指标会自动退出,不知道为什么? 新评论 Dongbo Bai 2018.11.02 16:21 哪位大神看看,指标加载没问题,只要mt5 重新启动等价格波动时候就自动退出,只能重新加载,不敢重启 #property version "1.000"#property description "Fractals at prices Close"#property indicator_chart_window//指标应用在主窗口#property indicator_buffers 1//指标需要缓冲区数量#property indicator_plots 1//指标需要画几条线#property indicator_label1 "up"#property indicator_type1 DRAW_ARROW#property indicator_color1 DarkBlue#property indicator_style1 STYLE_SOLID#property indicator_width1 1double up[];int f1=18,count=18;//+------------------------------------------------------------------+int OnInit() { SetIndexBuffer(0,up,INDICATOR_DATA); PlotIndexSetInteger(0,PLOT_ARROW,119); PlotIndexSetInteger(0,PLOT_ARROW_SHIFT,-10); PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,EMPTY_VALUE); return(INIT_SUCCEEDED); }//+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { int i,limit; if(rates_total<8) return(0);//图表数据小于8退出 if(prev_calculated==0) limit=100; else limit=prev_calculated; for(i=limit;i<rates_total && !IsStopped();i++) { setfg(i); up[f1]=high[f1]; } return(rates_total); }void setfg( const int i){ if (i>100) { f1 = i; } } 初学者的问题 MQL5 MT5 MetaTrader 5 帮助升级到MetaTrader 5而没有损失 MQL5的股权振荡器意味着 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
哪位大神看看,指标加载没问题,只要mt5 重新启动等价格波动时候就自动退出,只能重新加载,不敢重启
#property version "1.000"