Takeprofit value

 

Hi,

maybe simple question but:

i'm opennig ticket with:
ticketId = OpenTicket(symbol, isBuy, Lots, StopLossPips, TakeProfitPips);

how can I get StopLossPips, TakeProfitPips prize from running trade?

 

Is this what you want . . . ?

OrderProfit()


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

 
brugiman:
how can I get StopLossPips, TakeProfitPips prize from running trade?
what? If you don't want stops, use zero.
 

thanks Raptor,

I would say OrderTakeProfit() but you sent me right direction ;)

 
brugiman:

thanks Raptor,

I would say OrderTakeProfit() but you sent me right direction ;)

ah I see, you want the TP & SL values form the order, so you want OrderStopLoss( ) also. :-)

Reason: