Download MetaTrader 5
To add comments, please log in or register
Have you installed MetaTrader 5? Find out more about it!
Anamorphic
124
Anamorphic 2014.04.26 20:24 

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

qjol
3243
qjol 2014.04.26 23:43  

you can choose not to show on a specific TF



or you can use a script to remove it ChartIndicatorDelete

rod178
276
rod178 2014.04.27 05:05  
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);   
}
Alain Verleyen
Moderator
28536
Alain Verleyen 2014.04.27 09:32  
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.
rod178
276
rod178 2014.04.27 10:01  
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

Alain Verleyen
Moderator
28536
Alain Verleyen 2014.04.27 11:02  
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.

rod178
276
rod178 2014.04.27 13:09  
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.

Anamorphic
124
Anamorphic 2014.04.27 18:26  

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.

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.27 19:30  
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.
Alain Verleyen
Moderator
28536
Alain Verleyen 2014.04.27 20:56  
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.
/
To add comments, please log in or register