How to calculate potential profit

 
Hi, In MT 4 when hovering on a TP line, you can see the potential profit for that trade. When the TP is actually hit, the potential profit becomes realized profit.

Now I want to calculate the total POTENTIAL profit for all open orders, including the total swap and commission and display this value on the chart.

Any suggestions how to calculate this in MQL4?

Thanks,
Mike
 
Potential profit / loss = (exit price - entry price) / TickSize * TickValue * lots
 
amrali #:
Potential profit / loss = (exit price - entry price) / TickSize * TickValue * lots
Awesome, thank you !