Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 05:36:02 +0000



[User Discussion] - Obtain yesterday's value from a study

View Count: 587

[2020-07-09 19:51:47]
User790545 - Posts: 41
Hello,

This seems like it should be simple. I'm trying to get yesterday's value on study ID1 to be printed in a spreadsheet formula. What is the index syntax?

I'm trying ID1.SG1@1 but this is probably not correct.
[2020-07-10 00:59:39]
Sawtooth - Posts: 3976
The current bar is in row 3, and previous bars are in rows below.
So on a Daily chart, yesterday's value would be in row 4:
=ID1.SG1@4
[2020-07-10 02:55:25]
User790545 - Posts: 41
Thanks, Tom. I tried this but it keeps giving me a 0 value. I can put in ID1.SG1 and it provides todays value fine.

Maybe I'm approaching this the wrong way (I attached a picture), I'm looking to make the ID2 study lag the ID1 study by 1 day.
imageScreen Shot 2020-07-09 at 7.52.39 PM.png / V - Attached On 2020-07-10 02:53:24 UTC - Size: 313.33 KB - 178 views
[2020-07-10 03:04:41]
Sawtooth - Posts: 3976
You are using the Spreadsheet Formula study, which has nothing to do with spreadsheets, despite its name.
The syntax is different.

You this formula:
=ID1.SG1[-1]
[2020-07-10 03:54:57]
User790545 - Posts: 41
Thanks, that worked! Is there a reference available for what you suggested?
[2020-07-10 05:01:40]
Sawtooth - Posts: 3976
Study/Chart Alerts And Scanning: Alert Condition Formula Format

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

Login

Login Page - Create Account