Download MetaTrader 5

Need help with code

To add comments, please log in or register
Raphael Schwietering
1431
Raphael Schwietering  

Hi,


can someone help me out.


Input

I have an ea with 2 strategies. Now i want that i can enable/disable the strategy in the ea. How can i solve this. as you can see in the picture above i have add an input bool Str 2 = true;

How can i hide the inputs for the strategy when it is false? And when i switch on true than the input parameter will be shown?


How did i have to code it in the picture above? i tried an if statement but have my problems! Can anyone help me out ?

whroeder1
17824
whroeder1  
Raphael Schwietering: How can i hide the inputs for the strategy when it is false? And when i switch on true than the input parameter will be shown?

You can't.

Raphael Schwietering
1431
Raphael Schwietering  
and how did i have to do the if statement?? if ( Str1 == true)  ???????
Anthony Garot
571
Anthony Garot  
Raphael Schwietering:
and how did i have to do the if statement?? if ( Str1 == true)  ???????

As previously stated, you can not use an input variable to hide variables.

See if this meets your needs.

https://www.mql5.com/en/docs/basis/preprosessor/conditional_compilation

aslkdjf
38
aslkdjf  
You can make your own pop-up UI to suit your requirements. 
To add comments, please log in or register