Login Page - Create Account

Support Board


Date/Time: Thu, 20 Jun 2024 18:48:46 +0000



Post From: Average Price for Only Open Positions ?

[2022-03-11 18:20:31]
Sierra Chart Engineering - Posts: 104368
Unfortunately the flat to flat doesn't calculate correctly on my end. I bought a few contracts and sold a few until I had one remaining contract with average price of 4322.50. I bought one more contract at 4326.50 which should yield an average price for open contracts to 4324.50. It came up with 4323.30 so no good.

Your conclusion that 4323.30 is wrong is incorrect based upon the calculation method. There is a quantity weighted average price calculation based upon the quantity and price of each of the buy fills for long positions and the sell fills for short positions, that is ongoing throughout the life of the flat to flat trade.

You are just doing a simple average price calculation in your description above. That is definitely not correct.

What is wrong with the stated calculation method here?:
Trading Information Windows: Use Flat to Flat Open Position Average Price

For us to validate that there is a problem, you need to list, in an orderly line by line format, all of the fills since the beginning of the flat to flat position, their quantity and their price. And then provide an explanation of the calculation method and a reference to support that.

Using your method, let us take an example. If the entry price of the first fill is 1005 and there is a quantity of 500 and then 499 of those contracts are closed out. And then there is another entry for a single contract at a price of 1100 and then you perform a simple average price calculation without any regard to quantities, you are not going to have a true average price calculation at all. in your case, you would come up with an average price of 1,052.5. This is wrong!


There is not an issue here. If there is an issue, we would like other users as well to explain to us why. If you are looking for a true average price during a flat to flat trade, your method does not work. It would be erroneous.

Now if the calculation method, is not correct according to the documentation we can take care of that.



Rereading your first post, you are not actually looking for a flat a flat average price. You are looking for the weighted average price, of those order fills, which make up the current position. Using either FIFO or LIFO. That is supported. And there are no problems with this. So why you continue to assert there is an issue is unknown to us.

However your post #5, is essentially looking for a flat to flat average price method. What you are asking for is inconsistent between posts.

If our existing users can demonstrate a problem to us, we will look into it. But so far there is no indication of a problem.
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: 2022-03-11 18:37:13