Files
mql5-skills/skills/mql5/references/docs/01-constants/0148-constants-indicatorconstants-enum-ma-method.md
T
2026-06-23 21:47:51 +08:00

30 lines
929 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Smoothing Methods
Many technical indicators are based on various methods of the price series smoothing. Some standard technical indicators require specification of the smoothing type as an input parameter. For specifying the desired type of smoothing, identifiers listed in the ENUM_MA_METHOD enumeration are used.
ENUM_MA_METHOD
| ID | Description |
| --- | --- |
| MODE_SMA | Simple averaging |
| MODE_EMA | Exponential averaging |
| MODE_SMMA | Smoothed averaging |
| MODE_LWMA | Linear-weighted averaging |
Example:
```
double ExtJaws[];
double ExtTeeth[];
double ExtLips[];
//---- handles for moving averages
int    ExtJawsHandle;
int    ExtTeethHandle;
int    ExtLipsHandle;
//--- get MA's handles
ExtJawsHandle=iMA(NULL,0,JawsPeriod,0,MODE_SMMA,PRICE_MEDIAN);
ExtTeethHandle=iMA(NULL,0,TeethPeriod,0,MODE_SMMA,PRICE_MEDIAN);
ExtLipsHandle=iMA(NULL,0,LipsPeriod,0,MODE_SMMA,PRICE_MEDIAN);
```