Support Board
Date/Time: Fri, 27 Dec 2024 17:17:58 +0000
Post From: #SYNTAX error on Spreadsheet for trading system study
[2015-12-21 14:50:06] |
Sawtooth - Posts: 4143 |
Each spreadsheet row is a chart bar with row 3 the current bar and previous bars below. So all of the [-1]s will use @4, and the others all @3, except the [1]. Also, the OHLC are all ID0: =AND(ID3.SG12@3<=-4,ID3.SG12@4<=-4,ID3.SG12@2<=-4,ID1.SG1@3<ID0.SG4@3,ID23.SG3@3<ID0.SG4@3,ID23.SG2@3<ID0.SG4@3) The ID3.SG12[1]>=-4 is a future bar and this would be row2, except this will give an error in row 3. You can trap the error with this, forcing it to FALSE: =IF(ROW()=3,FALSE,AND(ID3.SG12@3<=-4,ID3.SG12@4<=-4,ID3.SG12@2<=-4,ID1.SG1@3<ID0.SG4@3,ID23.SG3@3<ID0.SG4@3,ID23.SG2@3<ID0.SG4@3)) |