It appears that the LastPosition.Size property returns the dollar value of the position on the entry date, not the Bar date (i.e. current market value of position). Is there another property that provides this? I am trying to estimate the cash that will be generated by the sale of a split position.
If none exists then I am thinking of using something like:
CODE:
Please log in to see this code.
Do you agree?
Size:
Color:
That's right: the Size property returns the dollar size of the position i.e. the shares multiplied by the entry price (or by the margin for futures). In portfolio simulation mode though, all trades are pre-executed using 1 share per Position anyway, so your strategy's results are always based on 1 share while it is executing. Consequently, the correct dollar value on a given bar is available after Strategy execution in a module like PosSizer or Performance Visualizer.
Size:
Color:
but...
you can access the actual dollar size of a position in a Strategy in Raw Profit mode or if using "WealthScript Override (SetShareSize)" in Portforlio Sim. mode.
Size:
Color: