Interrogating Positions from within the Execute routine of a .net strategy that also employs a PosSizer produces correct values for entrydates, exitdates, prices, etc. but not shares. I presume share data is missing because share data is not determined until after the Execute routine concludes and WL completes processing for a backtest. How can I obtain share values programmatically after WL processing has been completed?
Size:
Color:
If you haven't found the answer by yourself, I suggest to review the QuickRef >
Position object > and then browse for individual properties. Where applicable you will find this remark, duplicated here for your convenience:
CODE:
Please log in to see this code.
So your understanding is correct: "
share data is not determined until after the Execute routine concludes".
QUOTE:
How can I obtain share values programmatically after WL processing has been completed?
I'd say with the current design there might be no official way because it's too late: the Strategy has finished processing. But first let's find out why do you need it?
Size:
Color:
I suppose I don't really need to access share data from within the .net strategy. I can work around. I was just trying a couple backtest ideas and noticed the issue. Thanks for your confirmation.
Size:
Color:
Size:
Color: