Login Page - Create Account

Support Board


Date/Time: Wed, 15 May 2024 00:30:55 +0000



Post From: Enable/Disable Auto Trade using ATR

[2016-09-04 14:53:42]
Sawtooth - Posts: 3996
To correct the syntax errors:
-Remove all of the []

-remove the () if each of the conditions between commas should disable autotrading:
ID10.SG1@4>1.2,ID10.SG1@3<1.2,ID10.SG1@5<1.4,ID10.SG1@4>1.4

-pair up the () with AND if combinations of conditions should disable autotrading:
AND(ID10.SG1@4>1.2,ID10.SG1@3<1.2),AND(ID10.SG1@5<1.4,ID10.SG1@4>1.4)
Each of these AND statements are parts of the beginning OR statement.

-The OR at the very beginning needs its own closing parenthesis at the very end.

Your CROSSFROMBELOW formula should look like this:
=AND(CROSSFROMBELOW(AA3:AA5,AC3:AC5),ID10.SG1@4>1.2,ID10.SG1@3<1.2)

Sierra Chart spreadsheets follow most Excel syntax rules. You can Google it, but you'll get more than a quick answer:
https://support.office.com/en-us/article/Overview-of-formulas-in-Excel-ecfdc708-9162-49e8-b993-c311f47ca173?ui=en-US&rs=en-US&ad=US

Basic syntax rules:
-A formula begins with a single =
-Each function opens and closes with a paired ()
-Each nested function opens and closes with its own paired ()
-When doing math, observe calculation order. This may require the use of ()
-Avoid extraneous characters.