BuyAtClose with wrong position size
Author: newengwong
Creation Date: 7/6/2008 8:25 AM
profile picture

newengwong

#1
The problem is as follow:

Position amount = 1,000
Stock Open Price = 10
Stock Close Price =20

When I use buyatclose, it indicates buying the stock at 20(which is right), but it buys 1000 shares(it uses the open price to calculate the position size), therefore given the wrong position size.

Any reason?

thx
profile picture

Cone

#2
I don't follow your logic given the quantities you provided (maybe you meant that the Position was 100 shares), but the basis price for AtOpen and AtClose orders is the previous day's closing price (not the open). This is discussed in the "100% of Equity Sizing" topic in the User Guide, and, there are programming solutions for controlling the basis price using an AtLimit order. Similar logic (albeit more complicated) could be used for AtClose orders too, if required.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).