Track the deal result from ExecuteMarketOrderAsync
Created at 21 May 2014, 18:05
Track the deal result from ExecuteMarketOrderAsync
21 May 2014, 18:05
Hi:
I am thinking to use ExecuteMarketOrderAsync to place multiple orders at the same time, but also needs to monitor its executed results. Therefore I wrote something like this (but it doesnt work.) Any clue?
Order_Mark = ExecuteMarketOrderAsync(TradeType.Buy, m_symbol, m_volume); while (Order_Mark .IsExecuting ) { Print("waiting"); Thread.Sleep(1000); }
My idea is to check if the order is completed or not, but what I got is just endless "waiting", even if the order is already done (I can see that through the Journal)
Many thanks
Wjack07
Spotware
22 May 2014, 09:20
cAlgo updates API objects between invocations of user's handlers.
While your code is executing cAlgo doesn't update any API objects. In next version of cAlgo we will add RefreshData() method. RefreshData() method will allow you to refresh state of all API objects explicitly. Probably next version of cAlgo will be released in couple of weeks.
@Spotware