Support Board
Date/Time: Fri, 31 Jan 2025 05:55:11 +0000
Post From: Automated Trading
[2019-03-06 23:50:00] |
Sawtooth - Posts: 4164 |
When referencing study outputs, you really should use this method: Working with Spreadsheets: References to Study Subgraph Columns when using the Spreadsheet Study So the formula in post #56 would look like this: P3: =IF(AND(E3>=ID2.SG2@3-2*$J$21,ID2.SG1@3<ID2.SG2@3,ID2.SG1@3>ID2.SG3@3),1,IF(AND(E3<=ID2.SG3@3+2*$J$21,ID2.SG1@3<ID2.SG2@3,ID2.SG1@3>ID2.SG3@3),0,P4)) Reasons for using this format: - You can insert/delete Formula Columns on the spreadsheet while retaining the correct references. - You can add/remove/rearrange studies in the Studies to Graph list while retaining the correct references. - You can increase/decrease the Number of Formula Columns while retaining the correct references. 1. Try this: - Don't use the P3 formula. Q3: =IF(AND(ID2.SG2@3<ID3.SG2@4,ID2.SG3@3>ID3.SG3@4),1,IF(OR(ID2.SG2@3>ID3.SG2@4,ID2.SG3@3<ID3.SG3@4),0,Q4)) R3: =AND(Q3,E3>=ID2.SG2@3-2*$J$21,ID2.SG1@3<ID2.SG2@3,ID2.SG1@3>ID2.SG3@3) S3: =IF(AND(Q3,R3),1,IF(OR(Q3=0,AND(E3<=ID2.SG3@3+2*$J$21,ID2.SG1@3<ID2.SG2@3,ID2.SG1@3>ID2.SG3@3)),0,S4)) T3: =AND(Q3,E3<=ID2.SG3@3+2*$J$21,ID2.SG1@3<ID2.SG2@3,ID2.SG1@3>ID2.SG3@3) U3: =IF(AND(Q3,T3),1,IF(OR(Q3=0,AND(E3>=ID2.SG2@3-2*$J$21,ID2.SG1@3<ID2.SG2@3,ID2.SG1@3>ID2.SG3@3)),0,U4)) K3: =AND(S3,S4=0) M3: =AND(U3,U4=0) I don't mind helping out with basic questions but the answers to your requests are becoming more complex than a forum post can accommodate. |