1833

2013.10.01 12:59

2016.11.22 07:33

• SimpleMAOnBuffer() - 将price[]数组的简单均线值填充到输出数组buffer[]；
• ExponentialMAOnBuffer() - 将price[]数组的指数均线值填充到输出数组buffer[]；
• SmoothedMAOnBuffer() - 将price[]数组的平滑均线值填充到输出数组buffer[]；
• LinearWeightedMAOnBuffer() - 将price[]数组的线性加权均线值填充到输出数组buffer[]；。

```//+------------------------------------------------------------------+
//|                                               MovingAverages.mqh |
//|                        Copyright 2009, MetaQuotes Software Corp. |
//|                                              https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "2009, MetaQuotes Software Corp."
//+------------------------------------------------------------------+
//| 简单移动平均线                                            |
//+------------------------------------------------------------------+
double SimpleMA(const int position,const int period,const double &price[])
//+------------------------------------------------------------------+
//| 指数移动平均线                                       |
//+------------------------------------------------------------------+
double ExponentialMA(const int position,const int period,const double prev_value,const double &price[])
//+------------------------------------------------------------------+
//| 平滑移动平均线                                          |
//+------------------------------------------------------------------+
double SmoothedMA(const int position,const int period,const double prev_value,const double &price[])
//+------------------------------------------------------------------+
//| 线性加权移动平均线                                   |
//+------------------------------------------------------------------+
double LinearWeightedMA(const int position,const int period,const double &price[])

//+------------------------------------------------------------------+
//| 价格数组的简单移动平均                             |
//+------------------------------------------------------------------+
int SimpleMAOnBuffer(const int rates_total,const int prev_calculated,const int begin,
//+------------------------------------------------------------------+
//| 价格数组的指数移动平均                        |
//+------------------------------------------------------------------+
int ExponentialMAOnBuffer(const int rates_total,const int prev_calculated,const int begin,
const int period,const double& price[],double& buffer[])
//+------------------------------------------------------------------+
//| 价格数组的平滑移动平均                           |
//+------------------------------------------------------------------+
int SmoothedMAOnBuffer(const int rates_total,const int prev_calculated,const int begin,
const int period,const double& price[],double& buffer[])
//+------------------------------------------------------------------+
//| 价格数组的线性加权移动平均                    |
//+------------------------------------------------------------------+
int LinearWeightedMAOnBuffer(const int rates_total,const int prev_calculated,const int begin,
const int period,const double& price[],double& buffer[])
```

ErrorDescription

WININET_TEST