Help mql4

 
Hello, recently I started studying MQL4 me. with a small generator I created a simple expert advisor but I can not set the take profit and stoploss could you help me thank you.
Files:
 

Attention! No help is offered here if you use code generators because they produce very BAD code.

Help is only offered for code written by a "real human" and not by a "machine".

 
  • We hate EA builder
  • You couldn't be bothered to learn mql4, therefor there is no common language for us to communicate.
  • There are only two choices: learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem, but we are not going to debug your hundreds lines of code.
  • EA builder makes bad code counting up while closing multiple orders.
  • EA builder makes bad code Bars is unreliable (max bars on chart) volume is unreliable (miss ticks) Always use time
  • EA builder makes bad code Not adjusting for 4/5 digit brokers
  • EA builder makes bad code not adjusting for ECN brokers.
  • EA builder makes bad code not checking return codes.
  • EATree uses objects on chart to save values - not persistent storage (files or GV+Flush.) No recovery (crash/reboot.)
Reason: