Login Page - Create Account

Support Board


Date/Time: Fri, 18 Apr 2025 06:35:25 +0000



retrieve bar period value in tick chart and spreadsheet formula

View Count: 94

[2025-03-24 16:44:25]
User474110 - Posts: 11
Hi,

I need to retrieve the chart bar period value in a spreadsheet formula study dynamically. I mean that, look at this example:
- on image 1 you can notice that the bar period value is 20
- on my spreadsheet formula study, I need to add this value at the low of the bar. Look at Image 2

The question is: is there a way to add this value dynamically and not manually as I did in this case, putting L+2, but putting something like L + chart_bar_period

Thank you.
Kindly,
imageimage 2.png / V - Attached On 2025-03-24 16:44:15 UTC - Size: 36.83 KB - 23 views
imageimage 1.png / V - Attached On 2025-03-24 16:44:19 UTC - Size: 64.7 KB - 19 views
[2025-03-24 16:49:11]
John - SC Support - Posts: 39353
The Spreadsheet Study has fields in the I/J columns for the Bar Period. Refer to the following and the 3 items below it:
Spreadsheet Systems, Alerts and Automated Trading: Seconds Per Bar - Intraday (read-only) [J36]

You would need to reference the appropriate J column entry into one of the Formula columns so you could then pick that up and display it as you want - most likely using the "Study Subgraph Above/Below Bar as Text" from what you state. But also refer to the "Text Display for Study" study:
Study Subgraph Above/Below Bar as Text

Text Display For Study
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-03-25 01:04:52]
Sawtooth - Posts: 4205
is there a way to add this value dynamically
It can't be done with the Spreadsheet Formula study.
(Despite its name, it's not a spreadsheet study.)

Use the Spreadsheet Study study:
Cell J39 returns the range of range bars, in ticks.
To get it to a subgraph where it can be used in calculations, or to display it, use a formula like this in a Formula Column, e.g., K3 (Column K is SG1):
=$J$39
If you want to convert it to points:
=$J$39*$J$21
Date Time Of Last Edit: 2025-03-25 01:06:56

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

Login

Login Page - Create Account