Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 10:52:14 +0000



Formula ignores 'negative' values ?

View Count: 554

[2021-06-16 11:27:18]
User238799 - Posts: 15
I am working on a function, which is making calculations based on the 'highs' and 'lows' of the cumulative delta. I have found out that it only worked correctly if the value of the cumulative delta is positive.
For testing, I have then made a function which is simply copying the cumulative high values and painting it on a single graph (in my case: ID4.SG2 ..please see the attached screenshot).
But then I have seen the follow:
- Is the cumulative delta negative, the copy function is just ignoring when the value is negative. So in my example it turns '-185' in '185', so the whole graph is inverted.

Please can someone tell me how to get a Graph which is equal to the highs on the cumulative delta? Also if the cumulative delta is positive or negative.
Thanks very much!

As attachment a screenshot of the graph and also one of the settings.
image1.PNG / V - Attached On 2021-06-16 11:24:18 UTC - Size: 17.6 KB - 178 views
image2.PNG / V - Attached On 2021-06-16 11:24:25 UTC - Size: 62.35 KB - 178 views
Attachment Deleted.
[2021-06-16 14:24:48]
John - SC Support - Posts: 31704
Are you possibly using an Unsigned Integer somewhere along the way?
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-06-16 15:49:46]
User238799 - Posts: 15
I don't think so. But honestly i am not a professional coder at all.
I just used the regular study: 'cumulative delta bars - volume'. And then, for copying the cumulative high values on the graph, I have used the Study: 'Spreadsheet Formula'. The code that i have entered at the 'Spreadsheet Formula'- Study at 'In:1' is '=ID4.SG2' refering to the cumulative delta. (please see the attached file '2.PNG')
Are there any settings (somewhere i don't know, that can cause this)?
Thanks very much!
[2021-06-16 16:12:08]
John - SC Support - Posts: 31704
These things are not matching up. The information displayed in 1.png shows that there is an ABS (Absolute Value) being taken of the data. That would explain why you are not getting the negative values.

But, the Spreadsheet Formula you show is correct and does not have an Absolute Value. Additionally, the Spreadsheet Formula has a different Short Name than what is shown in 1.png and is also set to display in Region 1, which the formula in 1.png is also not doing (it is in region 3, or possibly 2, depending on the setup).

So, there is a mismatch going on. Be sure to use that Spreadsheet Formula as you showed in the image and you should be fine.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account