Login Page - Create Account

Support Board


Date/Time: Fri, 27 Dec 2024 16:10:10 +0000



Post From: *Technical Issue* sc.GetTradePosition(PositionData) NOT updating PositionQuantity

[2016-03-30 11:11:06]
User972044 - Posts: 154
Thanks for the explanation. This is much more helpful. So how would I know when the position is updated or rather when the order is actually filled? Am I supposed to check for the position quantity when checking the order status block like the following?

s_SCTradeOrder TradeOrderData;

int OrderStatusCode = TradeOrderData.OrderStatusCode;

if (OrderStatusCode == SCT_OSC_FILLED)
{
// The order has completely filled
}

What if when I am checking the order status it still hasn't shown as filled what then? I will never get the position quantity by the time when I need to get the accurate position information when I need to trade? Because I cannot keep checking it every x seconds. And this is what seems to be happening. When I need to enter a new trade in the opposite direction and when I use the PositionQuantity information, it's not updated and I was prevented from entering the trade.

Again my question: Why so slow if indeed the order fill is the problem? So do I just keep track of the trading information manually? Then if that's the case, what's the point of sc.GetTradePosition() when it's not going to be real-time?

Thanks
Date Time Of Last Edit: 2016-03-30 11:12:26