ON/OFF Strategy

William Roeder  
  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?