Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 09:51:07 +0000



Study Subgraphs Divide/Ratio showing -nan(in in price axis and suddenly blank.

View Count: 1527

[2018-03-01 05:19:04]
tekchan - Posts: 6
I'm attempting to use a Subgraphs Divide/Ratio study named "Contracts to Risk" that takes a horizontal line study named "Risk Value" with a constant value of say 1000 and divide it by another study named "Difference in Tick Value" with varying values on the chart ranging from 20 upwards. It was working fine just an hour ago and then all of a sudden "-nan(in" appeared in the price axis and all the values disappeared from chart. I thought it might be some sort of divide by zero happening somewhere, but the chart I'm dividing by always has a value of 20 or up so it doesn't appear to be the problem.

Please see the following link for an image of how my chart currently looks and notice the "nan(in" shown in the price access in both the "Contracts to Risk" and "Risk Value" studies. Just an hour ago the "Contracts to Risk" study looked similar to the "Difference in Tick Value" study below it.

http://www.sierrachart.com/image.php?Image=1519881178627.png
[2018-03-01 21:53:37]
Sierra Chart Engineering - Posts: 104368
Most likely this is due to a division by zero somewhere in the series of calculations.

It is necessary to go through all of the calculations and look at the studies involved in each chart column to make sure there is no division by zero. You can use the Chart Values tool for this:
Chart Drawing Tools: Chart Values/Crosshair

The thing is though, is that the Study Subgraphs Divide study will not do a division by zero. So that study itself is not going to give this particular error value.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-03-02 01:52:13]
tekchan - Posts: 6
I figured out the problem. It wasn't that it was dividing by zero as there were no zero values in the denominator. What I found was I had to change Value Format from "1" to another value say "0.00001" and then back to "1" again to get rid of the error. Then the study cleared the error and worked again.

I have no idea why this worked but it's OK now. Perhaps there is a bug somewhere in the program which might cause this? Maybe at one point by putting the format to remove all decimal places it rounded to something that appeared to be zero but the program doesn't know to recalculate to find there is no such thing happening.
[2018-03-02 03:13:43]
Sierra Chart Engineering - Posts: 104368
Could not be a bug. Fairly sure there was a division by zero somewhere.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to 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