Page 1 of 1

Same Chart/Strategy, Two Signals: Accessing inputs?

Posted: Mar 03 2016
by Sebastian Vermont
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.

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

Posted: Mar 03 2016
by TJ
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

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

Posted: Mar 04 2016
by Sebastian Vermont
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.