Jamshidbek Kuchkarov / Publications
Forum
Getting Position ID of the trade
I want to get the position ID of a trade right after opening it, but it always returns 0 . Here is the code I’m using: if (trade.Sell(volume, symbol, 0 , sl, tp)) { ulong order_ticket = trade.ResultOrder(); // Trying to get the position ID ulong pos_id = HistoryDealGetInteger (order_ticket