Page 1 of 1

Global Variable as an input to an indicator

Posted: Jan 15 2019
by PD Quig
Quick question to see if it's possible to have an indicator that is already running take a global variable as an input and then recalculate all bars? For example: feed Exponential Moving Average indicator different Length parameters via global variable and have the EMA replot using the new length.

Right now it takes from 7-10 mouse clicks/key strokes to change an indicator's input value and then restart it so it re-plots across all bars. If this can be done I'll build a simple code that presents the input values as on-screen text objects that can be clicked to change the global variable which will, in turn, feed to the indicator.

Thoughts? Answers?

Re: Global Variable as an input to an indicator  [SOLVED]

Posted: Jan 15 2019
by Anna MultiCharts
Hello, PD Quig!

Unfortunately it’s impossible to change inputs dynamically neither from a PowerLanguage code, nor via any other means.

Re: Global Variable as an input to an indicator

Posted: Jan 15 2019
by PD Quig
Not what I wanted to hear, but thanks so much for the rapid reply, Anna.