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.
change input value of indicator [SOLVED]
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: change input value of indicator
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.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: change input value of indicator
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.
Re: change input value of indicator
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.
Re: change input value of indicator
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.
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.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: change input value of indicator [SOLVED]
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?
Re: change input value of indicator
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.
Re: change input value of indicator
no
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?
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re: change input value of indicator
I always run MC as administrator- (it's recommended).
Right-click on the MC icon and select "Run as Administrator" to start MC.
Right-click on the MC icon and select "Run as Administrator" to start MC.
Re: change input value of indicator
Hi,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.
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