Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 23:36:10 +0000



Reference Study Subgraph Value N bars ago

View Count: 152

[2025-02-11 11:11:15]
ticinotrader - Posts: 411
Dear Support,

I’m looking for a solution to reference a study subgraph value from a previous bar (e.g., 1 bar ago or N bars ago), similar to how many built-in studies work (like Period OHLC, TPO Value Area Lines, etc.).

I tried using the Study Subgraph Reference study, but it only allows referencing the current bar’s value, with no option for a lookback period.

My goal is to perform a simple calculation (addition) using a the current bar, but incorporating the previous bar’s subgraph value.

Is there a way to accomplish this using Sierra’s built-in studies? Due to the simple nature of the calculation, I’d prefer not to use ACSIL code/spreadsheet if possible.

Any advice would be greatly appreciated!
Thank you.
[2025-02-11 14:59:38]
binaryduke - Posts: 378
Spreadsheet Formula study:
Spreadsheet Formula

e.g. ID4.SG2[1]

Then reference the spreadsheet formula study.

Just be aware that the spreadsheet formula study runs at Low (or Very Low... can't remember) study calculation precedence:
Chart Studies: Study Calculation Precedence And Related Issues

...so you may get out of sync or delayed in what you're trying to do.

You may also have some success using the subgraph displacement of your 'source' study
Chart Studies: Subgraphs Tab >> Displacement
[2025-02-13 11:58:22]
ticinotrader - Posts: 411
@binaryduke

Thank you very much for the advice.

I especially appreciate the link to the displacement-related documentation (I simply couldn't find it myself).

Displacement seems to do exactly what I need, but I wasn’t sure whether it only affects visuals or also applies when referencing study values. Based on the documentation, it’s clear now.

Best regards,
tt

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

Login

Login Page - Create Account