How to have my EA use existing order info for new order

 

How can I grab info off an existing order and use it for a new order? for example if I have my stoploss getting close can I use code to grab existing stoploss level and have it open a sell stop order at the stoploss level?

Im super new to programing trying to learn so please be gentle! lol

thanks!