I have been looking for the syntax to get a specific instrument's current position (number of shares) inside OnBarUpdate. I checked the account class but I cannot find the syntax for it. I expect the input of the syntax to be the Instrument and the output is the number of shares held either short or long. Is there any syntax for that inside OnBarUpdate?
Thanks.
Comment