ON/OFF Strategy

 

Hey, 


I have written a code with an ON/OFF buttons to turn on or Off strategies. However, I am not sure that the way I did works well for optimization with the " || ". 

Maybe I should use " && " ? 


Thnaks 

Files:
Capture.PNG  7 kb
Capture1.PNG  10 kb
 
  1. Don't post pictures of code, they are too hard to read.

    Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
              Messages Editor

  2. Only you know what your condition is. Do you really think you want all buttons on before it will trade ("&&")?
  3. Use the tester or the debugger and fix your broken code. Only after should you be optimizing.
  4. How can you optimize - there is nothing that can press your buttons?
Reason: