After backtesting, I want to print out the result, especially the performance data and trades data. But now I found the result can only be printed as PDF or to printers. Is there a way to print/copy them to Excel? thanks..
Size:
Color:
Right click, copy to clipboard, then paste to Excel.
Size:
Color:
Hi Eugene, whats the best way to write trades to a file during an optimisation?
That is, for each parameter combination I would like to output all the trades, is that achievable?
Thank you
Size:
Color:
Hi David,
You could try to call
SaveTrades (part of Community Components) from your strategy, for example. Make sure to have included the current strategy parameter values in the file name to make it unique.
Size:
Color:
Ok thanks, will check it out
Size:
Color:
Hi Eugene, is there any way to also write each trade's P&L to a file?
Thanks for your help
David
Size:
Color:
Hi David,
Yes, as the Wiki suggests
It's possible to introduce custom output formats by modifying the method body and re-compiling the assembly on your own. Or you could lose the Tag property and assign it the closed Position's NetProfitPercent property
after the trading loop:
CODE:
Please log in to see this code.
Size:
Color:
Great stuff - thanks
Size:
Color:
Hi -
I would like to output the bar-by-bar PL rather than the final trades once closed out (and preferably inclusive of commissions). Where the sum of this bar-by-bar PL column would just equal the net PL for the time period
I've tried with the following code inside the bar loop, however this doesn't equal the PL,
Anything I'm missing here? I also note that 'NetProfitAsOfBar will always be based on 1 share while the Strategy is executing' so presumably I need to multiply by position size?
Any suggestions appreciated
Thanks
David
CODE:
Please log in to see this code.
Size:
Color:
David, the thing is that unless it's Raw Profit mode you cannot know the position size during the Strategy execution phase. The position sizing is an overlay (that is beyond your script's control) that kicks in after the Strategy has first executed all theoretical trades in Raw Profit mode with 1 share.
As this discussion has deviated from original poster's question noticeably and repeatedly, kindly consider asking any followup questions you may have in a new thread(s).
Size:
Color: