Is it possible from within a strategy (or some other C# method) to output the data that gets summarized in the "By Symbol" area to a file? I know you can right click and copy/paste to excel spreadsheet, but would like to run the strategy on many symbols, and then get "By Symbol" and "Trades" data to a file for further processing. Is the data stored somewhere in an array in memory that could be accessed by the strategy code?
Size:
Color:
All Performance Visualizers, including "By Symbol" and "Trades", execute after the strategy has finished running and position sizing has been applied. So, it's not possible to access this data during strategy execution.
(Theoretically, a workaround could be to use the SystemResults/SystemPerformance objects in the same manner as "
Interacting with equity curve", but there are certain drawbacks to this approach.)
Size:
Color:
Thanks. Are the SystemResults/SystemPerformance objects documented somewhere? Or is your example the only thing to go on at the moment?
Size:
Color:
If I undestand you correct, then this gives you a hint in the right direction.
It will export the netProfit for each trade into a file:
CODE:
Please log in to see this code.
Of course, with this method you would have to do the calculations yourself in the script. But the export procedure will give you everything you need.
Size:
Color:
QUOTE:
Are the SystemResults/SystemPerformance objects documented somewhere?
In the (currently unpublished) Wealth-Lab API documentation.
QUOTE:
Or is your example the only thing to go on at the moment?
We're not recommending that example.
See the QuickRef example of
ClearPositions on how to get the Percent Winners number.
Size:
Color: