MQL4 Reference
Technical indicators
iCustom
| double iCustom( |
string symbol, int timeframe, string name, ..., int mode, int shift) |
Calculates the specified custom indicator and returns its value. The custom indicator must be compiled (*.EX4 file)
and be in the terminal_directory\experts\indicators directory.
Parameters:
| symbol |
- |
Symbol the data of which should be used to calculate indicator. NULL means current symbol. |
| timeframe |
- |
Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe. |
| name |
- |
Custom indicator compiled program name. |
| ... |
- |
Parameters set (if necessary). The passed parameters and their order must correspond with the desclaration order and the type of extern variables of the custom indicator. |
| mode |
- |
Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions. |
| shift |
- |
Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago). |
Sample:
double val=iCustom(NULL, 0, "SampleInd",13,1,0);
|
|
|