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,
Exporting simulation graph results
-
- Site Admin
- Posts: 1493
- Joined: Fri Sep 12, 2003 10:32 am
- Location: Austin, Texas
-
- Senior Member
- Posts: 46
- Joined: Fri Jan 13, 2006 10:49 am
- Location: Montreal, Quebec, Canada
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.
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.