Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 02:17:13 +0000



Skip zeros with High/Low study

View Count: 782

[2021-02-17 15:38:41]
Matt NL - Posts: 91
Hi
I'm using the "High/Low for time Period - Extended" study to track alerts on a "colour candle on alert condition" study.

The problem is that when the colour candle study = false, it has a value of 0.

This 0 value is a problem for the High/Low study.

Question: Is it possible to add a new parameter to the "High/Low for time Period - Extended" study for "ignore/skip zero values"?


Thanks
Matt
[2021-02-17 17:16:33]
John - SC Support - Posts: 31159
The High/Low for Time Period - Extended study is already set to NOT display zero values. Therefore, you should not be having the problem you are stating.

The only thing we can think that might be happening is that you have not set your Input for Output When Condition True to something that is appropriate for the chart. If Output When Condition True is left at 1.0, then when your condition is True, you are seeing the display of the true value, but it is so close to 0 that it is hard to tell the difference.

Refer to the information here for that setting:
Color Bar Based on Alert Condition: Output When Condition Is True
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-02-17 19:47:02]
Matt NL - Posts: 91
Hi John
I have it set to a value from the candle.
So if PVOL(Volume) is above average, then it highlights as liquidity on the chart.
I want the high/low to track these highlighted candles, but it doesn't work well when using the "show developing high/low".
So hard to explain. I just assumed it was because of zeros (the chart is NVOL so it can be above/below zero).

See screenshot: http://www.sierrachart.com/image.php?Image=1613591136631.png

3rd pane down with the green/red NVOL candles. They're highlighted based on PVOL > above average and NVOL being either positive or negative.
It's to give an idea of bullish/bearish positioning in the market.

Then I use high/low to show when a previous position gets liquidated.
[2021-02-17 19:54:27]
John - SC Support - Posts: 31159
Attach your chartbook for us to take a look following these instructions:
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
[2021-02-17 19:56:08]
Matt NL - Posts: 91
Will do, I'll try to simplify it not to take too much of your time.
The idea is that the H/L tracks the bottom of the green candles and top of the red candles, but developing.
Appreciate it
[2021-02-17 20:09:47]
Matt NL - Posts: 91
Simple chart attached + photo with details.
attachmentjohn.Cht - Attached On 2021-02-17 20:09:09 UTC - Size: 5.96 KB - 214 views
image2021-02-17_21-01-54.png / V - Attached On 2021-02-17 20:09:13 UTC - Size: 140.57 KB - 190 views
[2021-02-17 21:24:52]
John - SC Support - Posts: 31159
The problem is that the Color Bar Based on Alert Condition is outputting a value of 0 when False. This is causing a problem for your particular setup since you are dealing with negative values. Therefore, 0 is the Highest value at those points where the data is negative.

There really is no good solution for your particular setup. You can't change the Output When False to some large negative value, as that would then cause issues for your Low values.

The only thing we can think is to shift the chart up so the values are all positive. If the actual price values are not important to what you are looking at, then this would be the best/easiest solution. Refer to the following for how to adjust your data:
Using the Basic Arithmetic Studies

Otherwise, you would have to modify the code to handle the situation you are dealing with. Refer to the following:
How to Build an Advanced Custom Study from Source Code
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-02-18 08:19:17]
Matt NL - Posts: 91
Thanks John. I'll try bumping up the numbers to non-negative.
I thought the High/Low ignored zeros though?
[2021-02-18 08:43:32]
Matt NL - Posts: 91
Hmmm can't do it with the "subgraph add" study. Then I lose the candlestick setup and it becomes really complicated.

Be nice if we could skip zeros for the high/low study.
Or output "false" when "colour candle on alert" is false instead of 0.

There's parameters for "output when true", could you also add "output when false"?

I can't find the source code for "color bar on alert". I've searched all the files included in acs source
Date Time Of Last Edit: 2021-02-18 09:43:56
[2021-02-18 15:22:54]
John - SC Support - Posts: 31159
It's all about how computers deal with the information they are given. Right now, it is being fed a zero for when the data is false. There is one other option for the output when False for the Color Bar Based on Alert Condition, but that is just a -1. That will not help.

The code for the Color Bar Based on Alert Condition is not available. But you could modify the "High/Low for Time Period - Extended" study to recognize the zero and then change it to a very negative number. You would just need to ensure that after the calculation if the result is still that very negative number that it gets remapped to a zero for the High/Low study in order to ensure that it is not drawn.

We'll see about adding additional options to the Color Bar Based on Alert Condition for false values, but it may not be something we can get to anytime soon.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-02-18 16:04:47]
Matt NL - Posts: 91
John, I did all this as a workaround for this:
Alert when crossing extension line

Is there any chance you can tell me instead how to make the extension lines usable?

This would be a much better and easier fix. So each bull/bear liquidity gets extended to end of day, and when NVOL crosses it I can get an alert/trigger
[2021-02-18 17:08:32]
John - SC Support - Posts: 31159
You cannot set an alert on an Extension Line. Those lines are handled internally and do not have a value that an alert can be used with.

If you are just wanting the level for the last alert, then you could use the Spreadsheet Study to have that level at all the bars going forward and then you would set your alert against that subgraph.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-02-18 18:37:07]
Matt NL - Posts: 91
Yea that sounds like what I need.
Never used the spreadsheet feature though. Gonna have to dig into the manual.

Thanks
Matt

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

Login

Login Page - Create Account