How to Toggle Indicators On and Off

 

HI

I would like to be able to toggle some/all of the indicators on and off when viewing the chart, is this possible ?

Thanks

N

 

you can choose not to show on a specific TF



or you can use a script to remove it ChartIndicatorDelete

 
Anamorphic:

HI

I would like to be able to toggle some/all of the indicators on and off when viewing the chart, is this possible ?

Thanks

N


Use (Terminal) Global Variables in each indicator that you desire to toggle on and off

The toggles can be set via scripts of buttons etc

//Toggle Script
int     value;
string  ToggleScript = "ToggleScript"; 

int OnStart()
{ 
   if(MathRound(GlobalVariableGet(ToggleScript))==0) value=1;
   else value=0;
   GlobalVariableSet(ToggleScript,value);
   Print("Toggle is  ",value);   
}
 
Anamorphic:

HI

I would like to be able to toggle some/all of the indicators on and off when viewing the chart, is this possible ?

Thanks

N

Simply said it's not possible. Best thing to do is to use templates.
 
angevoyageur:
Simply said it's not possible. Best thing to do is to use templates.

It is possible to toggle on and off Custom indicators

 
rod178:

It is possible to toggle on and off Custom indicators

Modifying the code of each indicators is not a solution in my opinion. And what can be the advantage to use a GlobalVariable compared to templates ?

Keep it simple.

 
angevoyageur:

Modifying the code of each indicators is not a solution in my opinion. And what can be the advantage to use a GlobalVariable compared to templates ?

Keep it simple.



I use Templates for such requirements, although sometimes I merely desire to remove one custom indicator from a chart.

I such cases I use a hotkey to toggle a script that sets a variable to 0 or 1

simple matter to place

if(toggle==0) // then "find and delete indicator objects and return(0)"

so the script still runs, although is is interrupted.

Reason is that in some cases multiple templates can be difficult to manage/maintain.

 

That's a shame, I thought i could do it with templates but if i have specific analysis elements for example; lines or arrows etc.. they would need to be created in each chart exactly so, too time consuming to be of use.

The way I would hope it could work is in layers so that I can turn on an off the elements that I need.

 
Have a button and then assigned it so that once click will hide the indi and click again will show the indi. I do it and works pretty well.
 
Anamorphic:

That's a shame, I thought i could do it with templates but if i have specific analysis elements for example; lines or arrows etc.. they would need to be created in each chart exactly so, too time consuming to be of use.

The way I would hope it could work is in layers so that I can turn on an off the elements that I need.

Ctrl+I then Delete the unneeded indicator(s). Place your usual indicator(s) in Favorites, then simply drag it to a chart when needed.
 
Why don't they create toggle show/hide eyes like investing.com and tradingview?
Reason: