MQL4 Reference
Technical indicators
iOsMA
| double iOsMA( |
string symbol, int timeframe, int fast_ema_period, int slow_ema_period, int signal_period, int applied_price, int shift) |
Calculates the Moving Average of Oscillator and returns its value. Sometimes called MACD Histogram in some systems.
Parameters:
| symbol |
- |
Symbol the data of which should be used to calculate indicator. NULL means the current symbol. |
| timeframe |
- |
Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe. |
| fast_ema_period |
- |
Number of periods for fast moving average calculation. |
| slow_ema_period |
- |
Number of periods for slow moving average calculation. |
| signal_period |
- |
Number of periods for signal moving average calculation. |
| applied_price |
- |
Applied price. It can be any of Applied price enumeration values. |
| shift |
- |
Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago). |
Sample:
if(iOsMA(NULL,0,12,26,9,PRICE_OPEN,1)>iOsMA(NULL,0,12,26,9,PRICE_OPEN,0)) return(0);
|
|
|