change input value of indicator  [SOLVED]

Questions about MultiCharts and user contributed studies.
ppc
Posts: 42
Joined: 04 Nov 2014
Has thanked: 4 times

change input value of indicator

Postby ppc » 04 Apr 2018

Hi MC friends,

I apply an indicator to 20 charts. If I change the value of input of indicator (e.g. from 1 to 0 or from 0 to 1), I need to change it one by one in each chart. Is there any way to change it globally (make change once then indicators in 20 charts has same input value) so as to minimize manual input and error? Thanks.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: change input value of indicator

Postby TJ » 04 Apr 2018

Hi MC friends,

I apply an indicator to 20 charts. If I change the value of input of indicator (e.g. from 1 to 0 or from 0 to 1), I need to change it one by one in each chart. Is there any way to change it globally (make change once then indicators in 20 charts has same input value) so as to minimize manual input and error? Thanks.

If you go to the code and rename the variable, all the value will be reassigned.

eg. change the variable name from "length" to "LENGTH" will cause the value to be reassigned during compilation.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: change input value of indicator

Postby TJ » 04 Apr 2018

Hi MC friends,

I apply an indicator to 20 charts. If I change the value of input of indicator (e.g. from 1 to 0 or from 0 to 1), I need to change it one by one in each chart. Is there any way to change it globally (make change once then indicators in 20 charts has same input value) so as to minimize manual input and error? Thanks.

If you go to the code and rename the variable, the value will be reassigned.

eg. change the variable name from "length" to "LENGTH" will cause the value to be reassigned during compilation.

ppc
Posts: 42
Joined: 04 Nov 2014
Has thanked: 4 times

Re: change input value of indicator

Postby ppc » 05 Apr 2018

Hi MC friends,

I apply an indicator to 20 charts. If I change the value of input of indicator (e.g. from 1 to 0 or from 0 to 1), I need to change it one by one in each chart. Is there any way to change it globally (make change once then indicators in 20 charts has same input value) so as to minimize manual input and error? Thanks.

If you go to the code and rename the variable, the value will be reassigned.

eg. change the variable name from "length" to "LENGTH" will cause the value to be reassigned during compilation.

Thanks TJ. I also use this way but want to find another way to achieve this. Sometimes, the compiler say the indicator is running, I need to compile it several times.

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: change input value of indicator

Postby wilkinsw » 05 Apr 2018

You can create a seperate indicator ("new") that plots the inputs you want.

Then go to each indicator and specifiy their inputs as the "new" plot(s).

Now going forward you can change "new" and it will change all your indicator inputs in one shot.

Note however that since MC11 there is a bug where signals (that aren't live - live ones still work correctly) do not acknowledge the change to the input values until you turn off/on the signal.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: change input value of indicator  [SOLVED]

Postby TJ » 05 Apr 2018



If you go to the code and rename the variable, the value will be reassigned.

eg. change the variable name from "length" to "LENGTH" will cause the value to be reassigned during compilation.

Thanks TJ. I also use this way but want to find another way to achieve this. Sometimes, the compiler say the indicator is running, I need to compile it several times.

Which version of MC?

Are you running MC as administrator?

ppc
Posts: 42
Joined: 04 Nov 2014
Has thanked: 4 times

Re: change input value of indicator

Postby ppc » 07 Apr 2018

You can create a seperate indicator ("new") that plots the inputs you want.

Then go to each indicator and specifiy their inputs as the "new" plot(s).

Now going forward you can change "new" and it will change all your indicator inputs in one shot.

Note however that since MC11 there is a bug where signals (that aren't live - live ones still work correctly) do not acknowledge the change to the input values until you turn off/on the signal.

Wiklinsw,

I don't fully understand what you mean. Could you elaborate more? Thanks for note.

ppc
Posts: 42
Joined: 04 Nov 2014
Has thanked: 4 times

Re: change input value of indicator

Postby ppc » 07 Apr 2018


Thanks TJ. I also use this way but want to find another way to achieve this. Sometimes, the compiler say the indicator is running, I need to compile it several times.

Which version of MC? MC64 ver11

Are you running MC as administrator?
no

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: change input value of indicator

Postby sptrader » 07 Apr 2018

I always run MC as administrator- (it's recommended).
Right-click on the MC icon and select "Run as Administrator" to start MC.

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: change input value of indicator

Postby wilkinsw » 09 Jul 2018

You can create a seperate indicator ("new") that plots the inputs you want.

Then go to each indicator and specifiy their inputs as the "new" plot(s).

Now going forward you can change "new" and it will change all your indicator inputs in one shot.

Note however that since MC11 there is a bug where signals (that aren't live - live ones still work correctly) do not acknowledge the change to the input values until you turn off/on the signal.

Wiklinsw,

I don't fully understand what you mean. Could you elaborate more? Thanks for note.
Hi,

Look up "study on study" in the Wiki.

In your case it will be study on signal. All you need to do is create a study for each "global input" you need and then add the study to the input field for the signal.

Then when you update the study value it will now update all signals.

But beware of a slight bug in MC11+ versions whereby if you use "open next bar" in your code some live charts won't update correctly (but there is a workaround):

viewtopic.php?f=1&t=51310&p=129820#p129820


Return to “MultiCharts”