Is it possible to reference data number as an input?

Questions about MultiCharts and user contributed studies.
tcat
Posts: 158
Joined: 02 Feb 2008
Location: Lausanne, Switzerland
Has thanked: 9 times
Been thanked: 4 times

Is it possible to reference data number as an input?

Postby tcat » 26 Jan 2011

I am working with several instruments which get different data numbers. I was wondering if it was possible to specify the data number as an input to an indicator, in order to prevent duplication of indicators.

Thierry

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Re: Is it possible to reference data number as an input?

Postby Dave Masalov » 26 Jan 2011

Dear Thierry,

Yes it is possible:

Code: Select all

input: data_num(2);
plot1(average(close, 10), of data(data_num));

tcat
Posts: 158
Joined: 02 Feb 2008
Location: Lausanne, Switzerland
Has thanked: 9 times
Been thanked: 4 times

Re: Is it possible to reference data number as an input?

Postby tcat » 26 Jan 2011

Excellent!
Thanks Dave, I tried a few things but missed that way of doing things. A real time saver!

Cheers,
Thierry

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Re: Is it possible to reference data number as an input?

Postby Dave Masalov » 26 Jan 2011

You are welcome.


Return to “MultiCharts”