ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

MQL4 Programs

2019-09-29 15:04:22  阅读:472  来源: 互联网

标签:indicator const expert Programs attached chart advisor MQL4


MQL4 Programs
    program running
        1.script 2.Expert advisor 3. indicator
        int OnInit()  1. 2. 3    allowto use void return type
        void OnDeinit() 1.2. 3 
        void OnStart()  1       Start event handler
        int OnCalculate( const int rates_total, const int prev_calculated,const datetime   
        &time[],const double &open[],const double &Hight[],const double &Low[],const double
        &Close[],const long &tickVolume[], const long &Volume[],const in &spread[])   3 
        Calculate event handler for all prices
        void Ontick()        2                   newTick event handler
        void OnTimer()     1, 2, 3                  timer event handler
        double OnTester()     2                      tester event handler
        void OnChartEvent(const int id, const long &lparam,const double &dparam,const string
        string &sparam)  2, 3   chartEvent
       
      funtions prohibited in Indicators and Expert Advisors
      The following functions are prohibited in indicators:
      OrderSend()
      SendFtp()
      sleep()
      ExpertRemove()
      Messagebox()
      the following functions are prohibited in Expert Advisors and scripts:
      SetIndexBuffer();
      IndicatorSetDouble()
      IndicatorSetInteger()
      IndicatorSetString()
     
      the above restrictions apply to the called library.
  
   Indicators are loaded in the follwing cases:
   an indicator is attached to a chart;
   terminal start(if the indicators was attached to the chart prior  to the shutdown of the terminal);
   loading of a template(if the indicator is attached to one of the profile charts);
   change of a symbol and or timeframe of a chart ,to which the indicator is attached.
   after the sucessful recompilation of an indicator(if the inidicators was attached to a chart);
   change of input parameter of the indicator.
  
   indicators are unloaded in the following cases:
   when detaching an indictor from a chart;
   terminal shutdown (if the indicator was attached to a chart);
   loading of a template(if an indicator is attached to a chart);
   closing od a chart to which the indicator was attched.
   change of a profile(if the indicator is attached to one of chartss of the changed profile);
   change of symbol and/ ortimeframe of a chart, to which the indicator is attached;
   change of input paraneters of the indicator.
  
  
   Expert Advisors are loading in the following cases:
   when attaching an expert advior  to a chart;
   terminal start(if the expert advisor was attached to the chart prir to the shutdown of the terminal);
   loading of a template(if the expert advisor attached to the chart is specified in the  template);
   change of a profile(if the expert advisor is attached to the one of the profile charts);
   connection to an account ,even if the account number is the sanme(if the  expert advisor was attached to the chart before the authorization of the terminal on the server).
  
   expert advisors are unloaded in the following cases:
   when detaching an expert advisor fron a chart
   if a new Expert advisor ia attched to a chart,if another expert advisor has been attached already,this expert advisor is unloaded.
   terminal shutdown(if the expoert Advisor was attached to a chart);
   loading  of a template(if an expert advisor is attached to teh chart);
   close of a chart, to which the expert advisor is attached.
   change of a profile (if the expert advisor attached to one of charts of the changed profile);
   change of the account to which the terminal is cinnected(if the expert advissor was attached to the chart before the authorization of the terminal on the server)
  
   calling the expertRemove() function.
  
  
 loading an unloading of scripts
 script are loaded immediately after they are attached to a chart and unloaded immediately after they complete their operation.
 
 input parameters and source code compilation.

标签:indicator,const,expert,Programs,attached,chart,advisor,MQL4
来源: https://www.cnblogs.com/ydjmail/p/11607870.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有