Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 16:48:29 +0000



[Programming Help] - Spreadsheet formula array input syntax for MAX()

View Count: 319

[2023-07-26 20:54:01]
User562383 - Posts: 10
Is there a way to input an array into a spreadsheet formula function?

For example, to calculate the highest high over the last 5 bars (I know there's a prebuilt study this is just an example) I can use MAX(ID0.SG2[0],ID0.SG2[-1],ID0.SG2[-2],ID0.SG2[-3],ID0.SG2[-4])

But can this be rewritten as an array? Eg something like MAX(ID0.SG2[0]:ID0.SG2[-5])

I know this can easily be done in a spreadsheet study with the @ syntax, I am specifically asking about the spreadsheet formula bracket[] syntax.
[2023-07-26 20:56:47]
John - SC Support - Posts: 36322
The Spreadsheet Formula does not support the Range syntax like the Spreadsheet. As you state, it would have to be done by specifying each individual item.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account