Login Page - Create Account

Support Board


Date/Time: Sun, 06 Jul 2025 14:38:11 +0000



[Programming Help] - Getting a #value! error...

View Count: 671

[2019-03-22 15:08:27]
User917679 - Posts: 76
I put this simple piece of code through my spreadsheet..:

AND(ID25.SG1@4:ID25.SG1@29>ID25.SG4@4:ID25.SG4@29,ID51.SG1@4:ID51.SG1@29>ID51.SG4@4:ID51.SG4@29,ID68.SG1@4:ID68.SG1@29>ID68.SG4@4:ID68.SG4@29)

From this alone(maybe spreadsheet settings too idk), is it possible to determine what could be the cause of a #value error here?


Edit:

I tried to make my code more efficient(as opposed to writing everything out full form), and it seems that the range function I'm using is incompatible with "AND()" ?

In this case I'm abbreviating: // Heiken-Ashi #1,#2, and #3 are to EACH show 26 red signals in a row before a sell open is issued
Date Time Of Last Edit: 2019-03-22 22:36:42
[2019-03-22 23:05:04]
Sawtooth - Posts: 4236
If the signals appear as 1 in the cells, you could use a formula like this:
=AND(SUM(OFFSET(ID25.SG1@4,0,0,26,1))=26,SUM(OFFSET(ID51.SG1@4,0,0,26,1))=26,SUM(OFFSET(ID68.SG1@4,0,0,26,1))=26)

This will be TRUE even if there are more than 26 in a row.

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

Login

Login Page - Create Account