It would be great if you could create the following additional tabs for setting up the strategy prior to beginning...
On the Settings. Create a new setting under Order handling.
Allow strategy to end in long position - check (or just assume this if the Exit on session close is left unchecked, if the Exit on session close is left unchecked, noone on earth would ever liquidate every position arbitrarily anyway, however if you want to leave this ability intact then just add the new option)
Starting Position list. Instrument, Quantity, Price, Time, Stop Limit, Sell Limit. (so these positions can be disposed of within the strategy, allow for multiple Positions per instrument of course because the strategy may allow that)
On the Display drop down add a new page
Ending Positions. (Post Run, with normal position metrics, this of course will be empty if either "Allow Strategy to end in long position" or "Exit on Session close" is checked).
On Analysis page
Add a line that shows the "Unrealized Profit/Loss" based on the ending positions. These amounts should be excluded form all of the other metrics on the Analysis since they are not completed "trades". It would also be handy to show the "Starting Unrealized Profit/Loss" at the start of the strategy based on the market price of the first tick compared with the Starting Positions. You can show an additional metric of the "Strategy Unrealized Profit/Loss" as the difference between the "Starting Unrealized Profit/Loss" and the "Unrealized Profit/Loss" which is essentially the unrealized profit/loss that was accumulated during the analysis.
On the Trades tab they won't show because they are "unrealized". They consequently should not affect any of the analysis results. ie. profit, etc. since they aren't finished yet.
The final long purchases can still show on the Executions tab.
This is actually quite easy to implement I believe having worked extensively now with the framework and the object library.
I'll be glad to do a beta test
Comment