Help fix my Panel + Button

 
Hello guys. Could you please help me fix my EA panel+Button? it should work next way, Show Daily, Weekly, Monthly and Total profit properly, update them on every closed trade and button should show current profit/loss and pushing it should close all trades under this pair + magic. Current version freezes my MT5 and calculations are not proper I think..
Documentation on MQL5: Position Properties / Constants, Enumerations and Structures
Documentation on MQL5: Position Properties / Constants, Enumerations and Structures
  • www.mql5.com
Execution of trade operations results in the opening of a position, changing of its volume and/or direction, or its disappearance. Trade operations...
Files: