Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 20:26:34 +0000



[Programming Help] Simple alert formula as a line in region 2

View Count: 411

[2024-04-26 18:36:21]
User14953 - Posts: 235
Can a Simple alert formula display the value 'Dif = Max - Min', as a line in chart region 2?

=max(ID:5, ID:4, ID:14, ID:16, ID:11, ID:13)
=min(ID:5, ID:4, ID:14, ID:16, ID:11, ID:13)
[2024-04-26 20:28:22]
John - SC Support - Posts: 36238
Yes, this can be done using the "Spreadsheet Formula", which, despite its name, uses the Alert syntax.

But the formula you show is not correct for an Alert. You need to specify the ID and the Subgraph for each item (i.e. ID1.SG1). Refer to the following and the section just below it:
Study/Chart Alerts And Scanning: Referencing Study Subgraphs

If you are trying to reference the particular bar with those numbers, then refer to the following for how to do this with Alerts:
Study/Chart Alerts And Scanning: Referencing Data Other Than on the Last Bar/Column In the Chart

--

There is also the option to use the Spreadsheet Study to do this. Refer to the following:
Using the Spreadsheet Study
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-04-28 22:17:06]
User14953 - Posts: 235
What is a good link or method to plot a continuous 2000 bar line graph of ID:5.SG1 in region 2?
[2024-04-29 12:43:59]
User14953 - Posts: 235
Which sierra chart study(s) is used to plot a line histogram of id5.sg1 in region 2?
[2024-04-29 17:42:50]
John - SC Support - Posts: 36238
We are not sure what you are looking for in terms of a "continuous 2000 bar line graph" or a "line histogram".

All of the ways to display the data are in the "Draw Style" for the subgraphs. Refer to the following:
Chart Studies: Subgraphs Tab >> Draw Style
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-04-29 22:26:03]
User14953 - Posts: 235
Something like this attached image
imagehistogram.png / V - Attached On 2024-04-29 22:25:48 UTC - Size: 9.19 KB - 73 views
[2024-04-30 14:47:14]
John - SC Support - Posts: 36238
That is a "Line". Make sure that whatever study you are wanting to view in the region has the Draw Style set to to "Line". Refer to the following:
Chart Studies: Line (ACSIL: DRAWSTYLE_LINE)
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-04-30 19:25:41]
User14953 - Posts: 235
Is ACSIL or a spreadsheet itself a requirement to display in a region 2 line graph the value of ID:5.SG1?

If there are other ways to do it the preference is to find out what those are.
[2024-04-30 19:46:56]
John - SC Support - Posts: 36238
ACSIL or Spreadsheets are not required. All you need to do is set the "Region" to Region 2 and set the Draw Style for the subgraph to "Line".

Refer to the following for the Region:
Chart Studies: Settings and Inputs Tab >> Chart Region

What is the study that is defined to be ID5?
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-01 00:36:48]
User14953 - Posts: 235
ID:5.SG1 is a moving average.
[2024-05-01 14:21:02]
John - SC Support - Posts: 36238
On that Moving Average study, just set the region to be the region you want it in. By default, the study should be drawing as a line.

Note that when referencing studies for an Alert, you use the format of "IDx.SGy", so the Moving Average study would be ID5.SG1.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-01 14:49:16]
User14953 - Posts: 235
Is this* formula correctly formatted?
=max(ID5.SG1, ID4.SG1, IDx.SGy, IDx.SGy, IDx.SGy, IDx.SGy)*

Would a Moving Average study get this* to display in region 2?

If not what, what options other than ACSIL or a spreadsheet itself will display the correct formula in region 2?
[2024-05-01 15:32:11]
John - SC Support - Posts: 36238
Is this* formula correctly formatted?
=max(ID5.SG1, ID4.SG1, IDx.SGy, IDx.SGy, IDx.SGy, IDx.SGy)*

No, when we stated IDx.SGy, the x and y are referring to specific numbers. So when you have ID5.SG1, that is correct, and ID4.SG1 is correct. But you need to add other items where you have IDx.SGy. Also, you can not have an asterisk (*) at the end like you do.

We are very confused by what you are trying to accomplish. A Moving Average can be put in Region 2 directly without having to do anything special. We have noted this several times above.

Also, our first response pointed you to the "Spreadsheet Formula" study to be able to use the Alert Syntax to get something displayed.

What are you wanting to do with the MAX() function? And where are you using it?
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-02 15:17:15]
User14953 - Posts: 235
Syntax aside, which study(s) would you recommend to plot a line histogram of 'Dif' from the formula 'Dif = Max - Min' in region 2 without the use of ACSIL or a spreadsheet itself?

Syntax aside, the min and max elements will be similar to below
=max(ID5.SG1, ID6.SG1, ID7.SG1, ID8.SG1, ID9.SG1, ID10.SG1)
=min(ID5.SG1, ID6.SG1, ID7.SG1, ID8.SG1, ID9.SG1, ID10.SG1)
Date Time Of Last Edit: 2024-05-02 15:18:38
[2024-05-02 16:42:05]
John - SC Support - Posts: 36238
Spreadsheet Formula.

Refer to the following:
Spreadsheet Formula
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-02 18:21:52]
User14953 - Posts: 235
which study to plug such a formula into
[2024-05-02 20:19:55]
John - SC Support - Posts: 36238
The "Spreadsheet Formula" study. Refer to the following:
Spreadsheet Formula

We have now told you this 4 times. We do not have another way to state this. The "Spreadsheet Formula" is a study that you can enter a formula into.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-02 21:19:59]
Sawtooth - Posts: 4120
Add the Spreadsheet Formula study, set the Chart Region to 2, and put this formula in its Formula field:

=MAX(ID5.SG1, ID6.SG1, ID7.SG1, ID8.SG1, ID9.SG1, ID10.SG1) - MIN(ID5.SG1, ID6.SG1, ID7.SG1, ID8.SG1, ID9.SG1, ID10.SG1)

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

Login

Login Page - Create Account