Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 21:15:00 +0000



Why would this signal still work based on passed bars?

View Count: 693

[2018-09-22 22:03:38]
GoldSquirrel - Posts: 18
I am back testing a spreadsheet study for trading strategy that combines several signals from multiple time framed charts:

SHEET 1 = 5 Minute
SHEET 2 = 30 Minute
SHEET 3 = 240 Minute

The 5 minute is the chart that is setup to take the trades. I am experiencing an anomaly that I can't explain. The signal works as it is intended. When all conditions are true across all three times, but it also works at a time I would not expect.
Here is the original code signal:

=AND(SHEET1!AE4>=SHEET1!AE5,SHEET1!AF4>=SHEET1!AF5,SHEET2!AH3<-166.60,SHEET3!AL3>SHEET3!AN3,SHEET3!AP3<=-166.0,SHEET3!AH3<=-166.0)

The only problem is, the above signal also works when the SHEET2! and SHEET3! references are 1 bar old and the SHEET1! references are true in the current bar; so for example when these conditions on true on SHEET 1:

SHEET1!AE4>=SHEET1!AE5
SHEET1!AF4>=SHEET1!AF5

The following are NOT true on SHEET 2 and SHEET 3, which would be expected to be TRUE to open an order:

SHEET2!AH3<-166.60
SHEET3!AL3>SHEET3!AN4
SHEET3!AP3<=-166.0
SHEET3!AH3<=-166.0

BUT the following are true on SHEET 2 and SHEET 3

SHEET2!AH4<-166.60
SHEET3!AL4>SHEET3!AN4
SHEET3!AP4<=-166.0
SHEET3!AH4<=-166.0

I am hoping there is something obvious here. Thank you for any help.
[2018-09-22 23:41:30]
Sawtooth - Posts: 3975
The recommended way to reference other timeframe charts is to use the Study/Price Overlay study.
It is not recommended to use cell references on other sheets because of possible loss of synchronization.
Referencing Other Charts in Spreadsheet Study Formulas: Referencing Other Charts in Spreadsheet Study Formulas
Auto Trade System Back Testing: Performing Back Testing on a Trading System That Uses Multiple Charts

Even when using the Study/Price Overlay study from other timeframes, you can occasionally have signals that either occur then disappear, or are missed then appear after. The 'Data Copy Mode' and 'Bar Time Matching Method' settings can mitigate these anomalies but there is no combination of settings that will always eliminate all of these anomalies.
[2018-09-23 00:20:49]
GoldSquirrel - Posts: 18
Thanks for the post @Tomgilb. Makes sense. I will give the overlays a go. I vaguely remember reading that calling rows/cells deep down in your spreadsheet slows down back testing considerably; when using spreadsheet systems for trading. So with the overlay-studies using a 240M on a 5M, I'm going to be 48-96 rows deep in my chart just to compare two 240 bar signals. Does that make sense? Is this going to throw off my backtesting / replay speed?
[2018-09-23 01:53:51]
Sawtooth - Posts: 3975
So with the overlay-studies using a 240M on a 5M, I'm going to be 48-96 rows deep in my chart just to compare two 240 bar signals. Does that make sense? Is this going to throw off my backtesting / replay speed?
The trade signals on the 5 min chart only occur in rows 3 or 4, so the overlaid 240 min signals will be there because 'Fill Blanks With Last Value' will be set to Yes. Rows below only affect performance if you have too many in a complex system. I've found that the default 1000 rows works well in most cases.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account