Same Chart/Strategy, Two Signals: Accessing inputs?  [SOLVED]

Questions about MultiCharts and user contributed studies.
Sebastian Vermont
Posts: 36
Joined: 06 Jan 2016
Has thanked: 6 times
Been thanked: 5 times

Same Chart/Strategy, Two Signals: Accessing inputs?

Postby Sebastian Vermont » 03 Mar 2016

Hello,

I'm trying to figure out a way to access the inputs on one particular signal from another signal when they are applied to the same chart. This would eliminate the need for multiple duplicate inputs on the 2nd signal.

I do not want to use global variables for this, as my understanding of global variables is that they can be accessed from any chart/strategy. That would create an additional set of difficulties, and increase the chances that I make a mistake somewhere.

Thanks for any help or direction that you can provide.

User avatar
TJ
Posts: 7232
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 991 times
Been thanked: 2058 times

Re: Same Chart/Strategy, Two Signals: Accessing inputs?  [SOLVED]

Postby TJ » 03 Mar 2016

Hello,

I'm trying to figure out a way to access the inputs on one particular signal from another signal when they are applied to the same chart. This would eliminate the need for multiple duplicate inputs on the 2nd signal.

I do not want to use global variables for this, as my understanding of global variables is that they can be accessed from any chart/strategy. That would create an additional set of difficulties, and increase the chances that I make a mistake somewhere.

Thanks for any help or direction that you can provide.
Look up these keywords:

i_getplotvalue
i_setplotvalue

Sebastian Vermont
Posts: 36
Joined: 06 Jan 2016
Has thanked: 6 times
Been thanked: 5 times

Re: Same Chart/Strategy, Two Signals: Accessing inputs?

Postby Sebastian Vermont » 04 Mar 2016

Thanks again TJ. I saw these keywords before, but I had assumed it was only for passing information from a signal to an indicator. I did not realize that it could pass information from a signal to a signal. This has eliminated most of the duplicity in my inputs.

The only remaining duplicity is with strings, since it looks like i_getplotvalue and i_setplotvalue will only accept numbers. This, however, is a very small limitation.


Return to “MultiCharts”