Get number of shares for current bar?
Author: BAJER
Creation Date: 1/5/2018 11:02 PM
profile picture

BAJER

#1
Is there a function that would get # of shares for current bar in the trading loop? Do I need to keep track of this separately? If so, any ideas on how to do this.

My goal is to make a strategy decision about how many additional shares to buy, or how many to sell based on the strategy and the current purchased share total for the bar.

Thanks,
Joel
profile picture

Eugene

#2
Joel,

There is no built-in function for the number of shares (current equity etc.) but you will find a workaround in this FAQ:

How to display portfolio equity (exposure, drawdown etc.) series and/or interact dynamically with the portfolio level equity in Strategy?