1. GetTradeHistory is only one way. You can call GetTradeHistory for last day only
2. GetPrices used for request execution mode only. For instant executuion use current bid or ask
2. GetPrices used for request execution mode only. For instant executuion use current bid or ask
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
1. Closing orders. I have 2 sockets in my application, one in pumping mode and the other I open and close as needed. When I close an order on the second socket, I get an UPDATE_TRADES message on the pumping socket. When I call GetTradeRecords(), it returns an array of open trades. By comparing this array to the array I have of open trades, I can infer which trade was closed. My problem is, how do I determine what price and time this trade was closed at? If I am closing the order myself, I know what price I wanted to close the order at, but what about slippage? Also, if the order is closed from the MQ Client, I get the same notification, but have no idea what price the order was closed at.
I know I can call GetTradeHistory(), but that seems expensive.
2. When I try to close an order programatically, I do something like this:
The CloseOrder call always returns an error of 2 (RET_ERROR).
I have tried inserting a ::Sleep( 5000 ) between the GetPrices call and the CloseOrder call, but I get the same result.
If I set the close price manually, without calling GetPrices, the CloseOrder call works fine. Any suggestions?
Thanks,
Steve