I wanted to share with everyone how I have attempted to tackle the abysmal backtesting platform in ThinkorSwim using Excel.
You will need some pre-requisites to get started
Open your backtest file from TOS
You will need some pre-requisites to get started
- Notepad++: I use this tool for removing the commas from the thousands separator in the P/L column. It is also great for handling multiple files all at once.
- Excel: I was going to do this with Google sheets but it became more of a burden and I lost interest
- File Repository: https://drive.google.com/drive/folders/18s9lZ5A7Bma_-qg5PU15-iUAlpSCKyFn?usp=sharing
Backtesting How-To
Open the Backtest DB ( here you can store the results of all your backtests it also stores the macro you will use to normalize the think or swim backtest CSV's)Exporting your Strategy Backtest
- Run a backtest
- Right-click on a signal of your backtest
- Select show report
- Click export file
- Save the file to your computer
- Rightclick on the CSV file you saved and select open with Notepad++
- Hit ctrl+F to open the find window
- Select replace
- In the find what dialog box add a comma (we want to remove all the extra commas)
- Select replace all in all open documents
- Select save
- Close notepad++
Open your backtest file from TOS
- All the data is in column A so we will use the Macro from the DB sheet to scrub
- Use ctrl+f the macro in the database excel file will expand all the relevant columns
- Now you can copy and paste the columns into the Raw data column in the template
- Copy your data in the Raw Data tab
- Paste your data in the RawSort tab
- Sort the data on the Date/Time Tab
Last edited by a moderator: