
Contents:
Follow Along a Backtest Using Provided Chartbooks
Prepare a Chart, Create a Signal, then Run a Backtest
For additional information on Auto Trading signals CLICK HERE.
Backtesting Cheat Sheet:
- Prepare chart(s) for backtesting
- Formulas in the Buy K3/Sell M3 cells
- Disconnect data feed then run Autotrade Replay Backtest
Cheat Sheet Table For Sierra Chart Backtesting - Some Possible Combinations
| | ACSIL | Just Spreadsheet For Trading Study
| Spreadsheet Auto + Trade Management by Study | Spreadsheet + Trade Order Config | Combination of Previous Options |
| --- | --- | --- | --- | --- | --- |
| Controlled By | Compiled Study | Spreadsheet K-N cells. J22-J25 | Spreadsheet K-N cells, Trade Management by Study study | Spreadsheet K-N, Trade Config (OCO) | Spreadsheets, studies, Trade Config |
| Limitations | Requires C++/ACSIL understanding | | | | |
| Performance | Extremely Fast, Highly Reliable | High | High | High | High |
| Description | Best choice in most cases | All conditions, order quantities, and orders managed through spreadsheet | Same as prior, but uses Trade Management by Study study to move orders | Trading operations handled by spreadsheet, order management via Trade Order Config. | Combine various methods to backtest or autotrade in Sierra Chart |
Key Concepts for Spreadsheet Backtesting
-
Basics:
- Buy and Sell logic in cell K3, and N3. 1 is true 0 is false
- The latest data is row 3, and when the bar forms it is sent to the row below, along with every other loaded row of data
- Spaces don’t matter in formulas and they will not cause syntax errors
- Use the absolute least amount of Number of Rows as possible, under study settings for the spreadsheet
-
Become familiarized with key columns and cells:
- J Column relates to key spreadsheet and chart values, mixed between user defined and read-only
- All columns beyond Z be default are for studies. It is possible to modify the amount of formula columns
- There are static cells and main spreadsheet formula cells. It’s possible to use static cells in H or J column in other cells and references
-
Understand referencing of studies and rows:
- Using absolute references. In case of referencing static stationary cells (J Column) from formula cells, simply add “$” between the name and number of the cell. Example: Instead of J8 cell we use the absolute reference of $J$8.
- The first study that is added to a chart containing a spreadsheet will be the AA column. The current data is row 3, so the latest value for that study is in cell AA3. Instead of referencing to that cell as AA3, we’ll identify by study name + row, for a more fluid sheet: ID1.SG1@3.
- ID1.SG1@3 means: ID1 = study ID, SG1 is sub graph 1, @3 means row 3 (the latest data)
- Example in a formula:
=IF(ID1.SG1@3 > 1000,1,0)
# This logic returns 1 if latest value of ID1.SG1 is greater than 1000.
- To refer to previous rows (bars), and also a range:
# This logic returns true when the current and last bar study value is > 1000
=AND(ID1.SG1@3 > 1000, ID1.SG1@4 > 1000)
# For a range, can try this
=AND(MIN(ID1.SG1@3:ID1.SG1@12) > 1000)
Prepare Charts and Studies
CRITICAL:
- SC Menu: Trade > Auto Trading Enabled - Global
- Disconnect from data feed when running backtest
- Chart Settings > Trading menu > Always Simulate Bid and Ask Prices During Replay: Yes
- Click Arrow to See Example of Simulate Bid and Ask Prices