Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 05:23:50 +0000



sc.BuyEntry / sc.BuyExit linkage?

View Count: 714

[2020-09-04 22:37:32]
User99735 - Posts: 234
Hi,
Suppose I call sc.BuyEntry 5 times with qty 1 and all the orders get filled at different entry prices/times, giving five long position.
When sc.BuyExit with qty 1 is called, I think first trade is getting closed based on FIFO rules, in the Trade Activity Log.
Is it possible to exit trade which was entered second, using sc.BuyExit, instead of the first trade?

Regards

Vivek
[2020-09-06 11:11:55]
Sierra Chart Engineering - Posts: 104368
No this kind of concept does not exist at all. Order fill matching can either be done using FIFO or LIFO at the time of generating a Trades list.
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
[2020-09-06 11:22:03]
User99735 - Posts: 234
Hmm, Can this be taken as an enhancement request. Ie provide an additional field to struct s_SCNewOrder like - CloseOrderID, and close that particular trade / position created by that trade only.
[2020-09-06 11:23:44]
Sierra Chart Engineering - Posts: 104368
No absolutely not. Will never happen. Sierra Chart is not your choice if this is what you are looking for. And we are not taking feature requests now anyway.
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: 2020-09-06 11:24:09
[2020-09-22 00:23:04]
Sierra_Chart Engineering - Posts: 14076
Our answer above is from the perspective of how Sierra Chart is tracking the Trade Position Average Price. This is something that we are not going to change beyond the two different order fill matching methods we have now.

If you are looking to match order fills in your own way and then calculate your own average price separately, this is certainly possible or to do whatever you need. You have full access to the order fills to accomplish this:
Automated Trading From an Advanced Custom Study: sc.GetOrderFillEntry()
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-09-22 11:43:26]
User99735 - Posts: 234
Thanks for your response.
Just wanted to understand, how does a change in exit functionality impact the Position Average Price.
[2020-09-23 10:15:40]
Sierra Chart Engineering - Posts: 104368
We do not understand the question.
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

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

Login

Login Page - Create Account