查看完整版本: 求教高手,如何在新指标里引用自定义指标

eastfox008 2007-9-30 15:16

求教高手,如何在新指标里引用自定义指标

原有自定义指标I1,输出三个曲线数据D1,D2,D3
新制作了一个指标I2,想引用I1.D1的数据,怎么做呢?
先谢过各位高手。

xfxyldj 2007-9-30 20:41

回复 1楼 的帖子

用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).

英文的。将就着看吧。呵呵。

eastfox008 2007-10-1 18:27

谢谢楼上大侠!!
这么快就解决了困惑!

xfxyldj 2007-10-2 14:41

回复 3楼 的帖子

希望能帮到你。

MACD 2008-7-25 18:07

:yct63
页: [1]
查看完整版本: 求教高手,如何在新指标里引用自定义指标