Max Drawdown

 

Hi guys,

If you can help me with this, I will be really grateful!

I need a simple code which prints on the screen as Comment() the following parameters:

TotalProfit

Max Drawdown

These 2 values should be calculated over all the history for orders with the same Magic #


I couldn't find anything similar in the CodeBase ...


Thank you guys really.