Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 07:05:40 +0000



Finding Fill Price for a manual placed trade

View Count: 733

[2017-06-29 19:19:06]
Joel Wisdo - Posts: 15
I am having a little bit of trouble finding the trade prices of 2 trades that are manually entered as limit orders. One trade will be a buy limit order and the other will be a sell limit order
The goal is - if a trade enters into a buy limit order it will calculate the difference between the entry of the buy limit order and the price of sell limit order that has yet to be filled and vice versa. If you can point me in the right direction on how to find these 2 different prices, I would be grateful and thank you for your help ahead of time. I have weeded through the documentation and I am little confused on how to use sc.GetLastPriceForTrading() and the other sc.Get.... fuctions
[2017-06-30 16:27:31]
Sierra Chart Engineering - Posts: 104368
You will need to get the orders themselves which will contain the prices, with this function:
http://www.sierrachart.com/index.php?page=doc/ACSILTrading.html#GetOrderByIndex

There is also this function but it would not be helpful if one of the orders has not yet filled:
http://www.sierrachart.com/index.php?page=doc/ACSILTrading.html#scGetTradeListEntry
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
Date Time Of Last Edit: 2017-06-30 21:22:35
[2017-06-30 17:35:52]
Joel Wisdo - Posts: 15
Thank you!
[2017-06-30 21:16:31]
Joel Wisdo - Posts: 15
To my knowledge the following code should return the price of the current trade


s_ACSTrade OrderEntry;
int Trade = sc.GetTradeListSize();

for (int i = 0; i < Trade; i++)
{
if (sc.GetTradeListEntry(i, OrderEntry))
{
CurrentPrice = OrderEntry.AverageEntryPrice;
}

}



[2017-06-30 21:17:33]
Joel Wisdo - Posts: 15
Is that correct?
[2017-06-30 21:24:16]
Sierra Chart Engineering - Posts: 104368
s_ACSTrade OrderEntry;

if (sc.GetTradeListEntry( sc.GetTradeListSize()-1, OrderEntry))
{
CurrentPrice = OrderEntry.AverageEntryPrice;
}


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
[2017-06-30 22:15:20]
Joel Wisdo - Posts: 15
Thank you!

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

Login

Login Page - Create Account