Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 00:04:26 +0000



ACSIL: sc.GetTradePositionForSymbolAndAccount function member AveragePrice not works

View Count: 1006

[2019-05-29 22:39:39]
TedMar - Posts: 189
i tryed for example of chart with study

sc.GetTradePosition and sc.GetTradePositionForSymbolAndAccount

result , Quantity works with both , but AveragePrice with sc.GetTradePosition only
[2019-05-30 04:53:36]
Sierra Chart Engineering - Posts: 104368
We will resolve this in the next version but it is not always going to be set. It will be accurate for Trade Simulation Mode but for non-simulated trading it may or may not be set.

It is only more assured to be accurate with this particular service:
Sierra Chart / Trading Technologies Futures Order Routing Service
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-05-30 06:47:37]
TedMar - Posts: 189
We will resolve this in the next version but it is not always going to be set.
but this is essential to find out AveragePrice for other symbol, or u have other idea?

by sc.GetOrderForSymbolAndAccountByIndex and sc.GetOrderByOrderID with s_SCTradeOrder is posible check Order status only.
If fact dont know how i can check for Other Symbol Order Fills with open Position status and FillAvarage.

Any Idea?

Mybe is posible to check Fill by Fill , or Last In first Out Fill matching status to find which allready filled Orders are Not calculate in Open Positions and FillAvarage?
[2019-05-30 12:24:14]
bradh - Posts: 859
int TradeOrderResult;
double OrderID1FillPrice;
s_SCTradeOrder TradeOrder1;
TradeOrderResult = sc.GetOrderByOrderID(OrderID1, TradeOrder1);
if (TradeOrder1.OrderStatusCode == SCT_OSC_FILLED)
{
OrderID1FillPrice = (double) TradeOrder1.AvgFillPrice;
}

[2019-05-30 13:32:48]
TedMar - Posts: 189
@bradh


OrderID1FillPrice = (double) TradeOrder1.AvgFillPrice;

u idea not works with Other Symbol, check my first Post
Date Time Of Last Edit: 2019-05-30 13:34:23

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

Login

Login Page - Create Account