Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 23:16:57 +0000



[Programming Help] - ACSIL - Open/Fill price for an order

View Count: 603

[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

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account