Calling a function from another window/indicator

[Deleted]  

I know this can be done, because I have seen it done before but cannot find the function to do this.

How do you call a function from another indicator or somehow pass data from one indicator to another?

 

iCustom() ........

[Deleted]  

thanks, but what is the value returned from teh custom indicator? is it the return value of "start()" ?

 
clam61:
thanks, but what is the value returned from teh custom indicator? is it the return value of "start()" ?

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);

[Deleted]  

o, it gets a value from the buffers? got it.

thanks

Nicholishen:
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);