How to add the profit in the take profit line and the loss in the stop loss line of an open trade.

 

Hello everyone!

                    I am making a panel of buttons to open operations, so far I have no problem; My need for help is that I would like each order that I open to add the loss value for the Stop loss line and the same in the take profit, this next to its operation number, see drawing, the value is made in power point.

Example:

 
Manuel De Los Heros Soler:

Hello everyone!

                    I am making a panel of buttons to open operations, so far I have no problem; My need for help is that I would like each order that I open to add the loss value for the Stop loss line and the same in the take profit, this next to its operation number, see drawing, the value is made in power point.


https://docs.mql4.com/trading/ordermodify

OrderModify - Trade Functions - MQL4 Reference
OrderModify - Trade Functions - MQL4 Reference
  • docs.mql4.com
OrderModify - Trade Functions - MQL4 Reference
 
Manuel De Los Heros Soler:

Hello everyone!

                    I am making a panel of buttons to open operations, so far I have no problem; My need for help is that I would like each order that I open to add the loss value for the Stop loss line and the same in the take profit, this next to its operation number, see drawing, the value is made in power point.


Hola 

You will need to add a custom label unfortunately . MT4 is not equipped to display that .

Then if you add a custom label you will need to update it as new bars are coming in so that its visible .

And you'll also need to calculate the $ values 

 
Lorentzos Roussos #:


Then if you add a custom label you will need to update it as new bars are coming in so that its visible .

And you'll also need to calculate the $ values 

Hi! And if you move the TP line ?! How would that label position will be updated ?! 
 
Lorentzos Roussos #:

Hola 

You will need to add a custom label unfortunately . MT4 is not equipped to display that .

Then if you add a custom label you will need to update it as new bars are coming in so that its visible .

And you'll also need to calculate the $ values 

OKAY! Thank you so much.
I'm going to try it.

 
Daniel Cioca #:
Hi! And if you move the TP line ?! How would that label position will be updated ?! 

You will anticipate that 😊

Reason: