Login Page - Create Account

Support Board


Date/Time: Sat, 27 Apr 2024 05:15:19 +0000



[Programming Help] - Help with Referencing A Range of Data

View Count: 522

[2020-01-21 03:13:10]
sourdubber - Posts: 52
I have a question about "Referencing A Range of Data"

Study/Chart Alerts And Scanning: Referencing A Range of Data

In the spreadsheet, I created a custom formula using a moving average crossover and placed it in Column P3. Whenever there is a MA crossover WITHIN THE LAST 3 days and the close is below the open, I want to BUY. Here is the formula I wrote for this, to be placed in K3:

=AND(SUM(P[3:5]>0,E3<B3)

But I get a Syntax error. What am I doing wrong? Thanks in advance.
[2020-01-21 03:41:09]
sourdubber - Posts: 52
Please disregard. Found the fix.

=AND(SUM(P3:P5)>0,E3<B3)

In the document the examples was given in this format, which was a bit confusing:
AVERAGE(ID0.SG1[0:-10])
=AVERAGE(O[0:-10]) > 100
[2020-01-21 14:33:39]
Sawtooth - Posts: 3976
Spreadsheet syntax is different than Simple Alert syntax.

(However, the Spreadsheet Formula study uses Simple Alert syntax.)
[2020-01-21 23:37:25]
sourdubber - Posts: 52
(However, the Spreadsheet Formula study uses Simple Alert syntax.)

Not sure I follow but if what you wrote is true, shouldn't =AND(SUM(P[3:5])>0,E3<B3) be accepted?
[2020-01-22 01:03:41]
Sawtooth - Posts: 3976
shouldn't =AND(SUM(P[3:5])>0,E3<B3) be accepted?

No. This is a combination of the two syntaxes.

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

Login

Login Page - Create Account