Page 1 of 1

Exporting simulation graph results

Posted: Sat Nov 03, 2012 9:10 pm
by domingoa
Hi,

I need to store the simulation test results, 'the trade log.csv' shows the individual trades. In addition to this, i'd like to capture the trade graphs for each entry order listed on the .csv file.

What is the quick way to export the graphs of individual trades from the simulation run?



Regards,

Posted: Sun Nov 04, 2012 11:39 am
by Jake Carriker
The trade charts are created on the fly as you view them. At this time there is no way to export them. Your best option for now might be screen captures...

Posted: Tue Nov 06, 2012 8:15 pm
by domingoa
Hi Jake,

Thanks for your reply.

Posted: Thu Jan 31, 2013 11:23 pm
by tovetski
Hi domingoa,

I haven't gone around to doing this but you could do so using R in a "relatively" simple fashion.

When i'll get to that, I will:
- Use R and xts package
- Load Trade Log.csv in R object
- Sort by symbol
- Loop through each trade
- Load price data from TB price files if symbol is a new symbol
- Filter price data from price object using entry date/exit date range for current trade.
- Plot the time series and whatever annotations, MAs, indicators, etc... on it and save it to an image file called something like: [symbol][entry date][exit date][side].png in a folder of your choice
- go to next trade
- Enjoy the illustrations that piled up in your folder.

Another advantage of going through this trouble is that you can perform different analysis on your trade P/L, MFE, MAE, time exits, etc... This type of [P/L] vs [bars in trade] analysis can be quite instructive.

Like I said, "relatively" simple. I'll try to remember and post some samples when I get there.

Happy programming in the mean time if you beat me to it.