Support Board
Date/Time: Fri, 07 Feb 2025 04:13:54 +0000
[Programming Help] - Spreadsheet Formula Help
View Count: 691
[2020-05-21 07:13:54] |
User486817 - Posts: 83 |
Hello, I'm new to formula creation and would like to create a formula with the following three conditions: (ID6.SG1 <=-40) AND((ID6.SG1[0] > ID6.SG1[-1]) , (ID6.SG1[-1] <= ID6.SG1[-2])) (ID17.SG8 [0] > ID17.SG8[-1]) I have input the following into the spreadsheet and no matter how i correct it, it returns a syntax error: =AND((ID6.SG1 <=-40), AND((ID6.SG1[0] > ID6.SG1[-1]) , (ID6.SG1[-1] <= ID6.SG1[-2])) , (ID17.SG8 [0] > SG8[-1])) If it is possible for someone to help, thank you so much for your kindness. best regards, Date Time Of Last Edit: 2020-05-21 07:17:33
|
[2020-05-21 11:55:24] |
Sawtooth - Posts: 4173 |
If you are using the Spreadsheet Formula study, your formula should work: =AND((ID6.SG1 <=-40), AND((ID6.SG1[0] > ID6.SG1[-1]) , (ID6.SG1[-1] <= ID6.SG1[-2])) , (ID17.SG8 [0] > ID17.SG8[-1])) If you are using a spreadsheet study, the syntax is different: =AND((ID6.SG1@3 <=-40) , AND((ID6.SG1@3 > ID6.SG1@4) , (ID6.SG1@4 <= ID6.SG1@5)) ,(ID17.SG8@3 > ID17.SG8@4)) It could be simplified: =AND(ID6.SG1@3 <=-40 , ID6.SG1@3 > ID6.SG1@4 , ID6.SG1@4 <= ID6.SG1@5 , ID17.SG8@3 > ID17.SG8@4) Working with Spreadsheets: References to Study Subgraph Columns when using the Spreadsheet Study |
[2020-05-21 12:20:16] |
User486817 - Posts: 83 |
tomgilb, everything works, your kindness is greatly appreciated. i wish you nothing but the best. kind regards, |
To post a message in this thread, you need to log in with your Sierra Chart account: