Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 08:41:08 +0000



Color Bar Based on Alert Condition - Assistance Please

View Count: 1079

[2023-08-25 14:56:55]
Oz - Posts: 50
Hi,
I'd like to color price bars based on the following condition.

I have set up absolute values of delta using a spreadsheet formula =ABS(AV-BV) and it plots correctly in chart region 3, this is ID2.SG1
I have set-up a multiplier for high delta which is a multiple of a MA on the ABS of delta, using the study sub-graph multiply this is ID12.SG1
The alert condition I have is:
=AND(ID2.SG1>ID12.SG1, C>O)
PS>> this is for when close is greater than open.
The Color bar Based on Alert Condition Study Subgraph Reference Value When True (in:15) is set to <Main Price Graph>?
when the appropriate bars meet the condition, this is not plotting.
What have I missed?
Thank you.
[2023-08-25 15:21:44]
John - SC Support - Posts: 36309
To start with, we are very confused as to how the condition ID2.SG1 > ID12.SG1 when you state that ID12.SG1 is a multiple of ID2.SG1?

Apart from this, what are you wanting to do in terms of coloring? Are you just wanting to color the bar when the condition is true? Or do you want to have some other kind of item drawn?

If you are just wanting to color the bar, then the Input for "Study Subgraph Reference Value when True" has no bearing and is not used.

Also, what is your Input for "Output When Condition True" set to?
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-08-25 15:59:36]
Oz - Posts: 50
Hi,
Yes I'd like to color the bar when the condition is meet.
ID2.SG1 is the absolute value of delta using =ABS(AV-BV) (spreadsheet formula study)
on this (ID2.SG1) I put a MA9
ID12.SG1 is a multiple of the moving average (2x).
So basically when close is greater then open and absolute delta is greater than 2 x the abs delta MA I'd like the bar to paint.
Hope that's a little clearer.
Thank you.
[2023-08-25 17:23:00]
John - SC Support - Posts: 36309
Your formula looks correct then, and as long as your Input for "Output When Condition is True" is set to "1.0", then it should work.

Try putting the Alert Formula into a "Spreadsheet Formula" study for the "Formula" Input. The Spreadsheet Study uses the Alert syntax, even though it is named "Spreadsheet". So just copy and paste it. This will give you an indication of the bars where the formula is True (the Spreadsheet Formula will have a value of 1 at those bars, otherwise it will be 0).

If the Spreadsheet Formula works properly then you know your formula is fine and the concept is right. Then it is just a matter of making sure the Color Bar Based on Alert Condition is setup properly.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-08-25 17:42:43]
Oz - Posts: 50
Sorry tried that again, still not coloring the bar.
PS>> Are the setting correct?
Thank you,
cheers
imageColorBarSettings2.jpg / V - Attached On 2023-08-25 17:40:31 UTC - Size: 375.26 KB - 151 views
Attachment Deleted.
[2023-08-25 17:52:48]
John - SC Support - Posts: 36309
Please get us your chart by following the instructions at the following link and we'll take a look:
Support Board Posting Information: Providing Chartbook with Only a Single Chart
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-08-28 07:24:56]
Oz - Posts: 50
Hi John,
Thank you for your reply.
While duplicating the chart to send to you the alerts worked. Seems like they needed to reload and refresh data, which makes sense.
However, I have noticed that if I add a study (like a MA) or change an item (MA) on the chart, some of the color bar based on alerts stop working. Not all just some?
I've noticed if i change time-frames from 1 to 2 minute and then come back to 1m this seems to reload the chart and fixes the issue, but ideally I don't want to keep doing this?
Is there a workaround for this?
Also order of priority when using multiple studies of color bar based on alert condition, I've read the articles on study calculations precedence and related issues but even though I've given the delta related studies priority 1-6 the volume related studies 7-11 are on top when the bars are being painted?
PS>> I have set-the order in the studies to graph settings (move up/move down) but it's not painting in that order.
What have I missed?
Many thanks.
[2023-08-28 16:31:44]
John - SC Support - Posts: 36309
We can not answer the first question - that is why we asked for the chartbook. The Color Bar Based on Alert Condition can get complicated to use if you are doing a lot with it.

With regards to the order in which the studies are "painted" it is the order in which they are listed in the Studies to Graph section of the "Studies" page. The first to draw is the highest in the list, then going down. Refer to the following:
Chart Studies: Study Display Order
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-08-28 16:41:32]
Oz - Posts: 50
Hi John,
Thank you for the reply and information link, I'll read up on the above mentioned as suggested and if I can not work it out I'll send you the chartbook as you suggested.
Cheers

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

Login

Login Page - Create Account