Exporting simulation graph results

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
domingoa
Roundtable Fellow
Roundtable Fellow
Posts: 68
Joined: Fri May 02, 2008 10:41 am

Exporting simulation graph results

Post 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,
Jake Carriker
Site Admin
Site Admin
Posts: 1493
Joined: Fri Sep 12, 2003 10:32 am
Location: Austin, Texas

Post 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...
domingoa
Roundtable Fellow
Roundtable Fellow
Posts: 68
Joined: Fri May 02, 2008 10:41 am

Post by domingoa »

Hi Jake,

Thanks for your reply.
tovetski
Senior Member
Senior Member
Posts: 46
Joined: Fri Jan 13, 2006 10:49 am
Location: Montreal, Quebec, Canada

Post 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.
Post Reply