Price_Channel Indicator For MT5
Table Of Contents:
- Price_Channel Indicator For MT5
- 安装Price_Channel Indicator For MT5
- Price_Channel Indicator For MT5参数
- Price_Channel Indicator For MT5缓冲区
- 守则主要部分
Price_Channel Indicator For MT5的Price_Channel Indicator For MT5
安装Price_Channel Indicator For MT5
通过上面的表格下载指标后,您需要解压缩zip文件。然后,您需要将文件price_channel.mq5复制到MT5安装的文件夹MQL5Indicators中。之后,请重启MT5,然后您将能够在指标列表中看到该指标。
Price_Channel Indicator For MT5参数
Price_Channel Indicator For MT5具有要配置的1 参数。
input int InpChannelPeriod=22; // Period
Price_Channel Indicator For MT5缓冲区
Price_Channel Indicator For MT5提供3 缓冲区。
SetIndexBuffer(0,ExtHighBuffer,INDICATOR_DATA); SetIndexBuffer(1,ExtLowBuffer,INDICATOR_DATA); SetIndexBuffer(2,ExtMiddBuffer,INDICATOR_DATA);
守则主要部分
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 &TickVolume[], const long &Volume[], const int &Spread[]) { int i,limit; //--- check for rates if(rates_total lt InpChannelPeriod) return(0); //--- preliminary calculations if(prev_calculated==0) limit=InpChannelPeriod; else limit=prev_calculated-1; //--- the main loop of calculations for(i=limit;i lt rates_total && !IsStopped();i++) { ExtHighBuffer[i]=Highest(High,InpChannelPeriod,i); ExtLowBuffer[i]=Lowest(Low,InpChannelPeriod,i); ExtMiddBuffer[i]=(ExtHighBuffer[i]+ExtLowBuffer[i])/2.0;; } //--- OnCalculate done. Return new prev_calculated. return(rates_total); } //+------------------------------------------------------------------+