Login Page - Create Account

Support Board


Date/Time: Tue, 21 May 2024 03:36:02 +0000



Post From: ACSIL - Open/Fill price for an order

[2020-07-15 12:46:49]
backinblack - Posts: 29
Hi,

I am trying to get the fill price for a trade using ACSIL and seeing some strange behaviour (I am sure I am committing a mistake somewhere,but cant figure out). I get into a long using BuyEntry (With an attached SL order). My study then tries to get the fill price for the order using:


s_SCTradeOrder ExistingOrder;
if (sc.GetOrderByOrderID(OriginalOrderID, ExistingOrder) == SCTRADING_ORDER_ERROR) { //Position doesnt exist
..something something...
return;
}
else {// Position exists in Market
double openingPrice = ExistingOrder.AvgFillPrice;

When I print this openingPrice, I get seemingly random numbers. eg on EURUSD, I would my order got filled around 1.09673 but I got opening price = 538667392 and 1703575552 (On another instance)

What am I doing wrong here?

Thanks