Display Profit/loss

To add comments, please log in or register
MrChuckW
406
MrChuckW  

Is there anyway to display the order profit/loss on the chart in window?

Specifically I would like to display the net profit/loss of 2 orders combined...

I am adding the OrderProfit() to get my figures from the 2 orders, and adding them together... now I need to display that number somewhere I can see it.

Any thoughts?

Joao Rosas
391
Joao Rosas  

int start()
{
   //....
   double total_profit = ....;
   Comment("    My profit is "+ total_profit+ "\n"+
           "    second line of comment that will be displayed in the upper left side of the chart");
}
MrChuckW
406
MrChuckW  
Thank you. It is working perfectly. Do you know if there is a way to make the print larger? just asking...
[Deleted]  
abstract_mind:
que usted a escrito es un archico mq4 para solo introducirlo en la carpeta indicators
greetings and thank you very much for your valuable contribution, my case is that I have no knowledge in coding, but I am very interested in enjoying this code you offered. because it made me hard to get this indicator showing gains / losses on the chart, I would be very helpful and would be eternally grateful to you if you took the time to transform this code to mq4 file in order to bring it to the folder Indicators and can be used. I try to compile it but I did not succeded for not knowing . in any case thanks for reading this petition. to help me thank you very much hope you do that-
To add comments, please log in or register