Login Page - Create Account

Support Board


Date/Time: Wed, 23 Apr 2025 01:35:51 +0000



[Programming Help] - Demand Index study not displaying

View Count: 1000

[2021-07-05 10:12:12]
User93464 - Posts: 52
The Demand Index study has stopped working on my EURUSD 1 min chart. It displays correctly on the EURUSD 5 min chart. I also have the issue on the GBPUSD 1 min chart, but if I change the timeframe on the chart to 5 min and then change it back to 1 min timeframe, the study continues to display correctly. This fix does not seem to work on the EURUSD. I have tried upgrading the charts to the latest version, but this does not solve the issue
imageSierra Charts demand index EURUSD 2021-07-05_11-06-04.png / V - Attached On 2021-07-05 10:11:45 UTC - Size: 161.66 KB - 298 views
[2021-07-05 12:02:17]
Sierra Chart Engineering - Posts: 104368
We will look into this and determine a solution.
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
[2021-07-21 15:52:51]
User93464 - Posts: 52
Any update on a solution for this issue?
[2021-07-22 08:54:07]
Sierra Chart Engineering - Posts: 104368
We will have this resolved in the next release.
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
[2021-09-08 06:16:42]
User93464 - Posts: 52
This issue seemed to have been resolved, but as of this morning the issue has returned. Demand Index will not display on the EURUSD in the 1min timeframe, but does so in the 5 min timeframe.

GBPUSD seems unaffected by the issue

Please reply ASAP
imageSC demand index issue 2021-09-08_07-14-40.png / V - Attached On 2021-09-08 06:16:23 UTC - Size: 241.93 KB - 218 views
[2021-09-11 20:15:41]
User190501 - Posts: 98
Yes, the demand index study on my side has stopped to be displayed completely on a stock chart at all time frames. The only way to make it visible was to uncheck the evening session for a stock chart. I have tried it as well on a futures chart with evening session checked and unchecked and the demand index doesn't display at all. Kindly advise ASAP.
Date Time Of Last Edit: 2021-09-12 01:16:52
[2021-09-13 13:54:14]
Sierra_Chart Engineering - Posts: 19307
We are still reviewing this study.
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-09-15 13:55:57]
User190501 - Posts: 98
Is there any update yet?
[2021-09-28 08:01:24]
User93464 - Posts: 52
Any update on this issue?
[2021-09-28 14:12:09]
Sierra Chart Engineering - Posts: 104368
Checking on this.
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
[2021-09-29 14:37:36]
SC Support Tom - Posts: 450
I believe that I have found the error.

In the code we see the following line.


if (Array_RangeMA[0] > SmallValue && Array_HL2C[sc.Index] > SmallValue)

Later we see the following lines.


else

{

Array_BuyPower[sc.Index] = 0.0f;

Array_SellPower[sc.Index] = 0.0f;

}

Whenever H[0] and L[0] are equal, Array_RangeMA[0] = 0, thus forcing the Buy Power and Sell Power Arrays to be zero for all chart bars. It is not that the Subgraphs are not being displayed; they are. I verified this by changing the colors. It is just that their values are zero. I have recommended a fix to Sierra Chart Engineering, which they will review.
Date Time Of Last Edit: 2021-09-29 16:12:13
[2021-10-04 20:13:11]
User93464 - Posts: 52
Any news on a fix for this issue?
[2021-10-05 18:43:55]
Sierra_Chart Engineering - Posts: 19307
We have made the change. This is now released in the latest prerelease. Update instructions:
Software Download: Fast Update
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-12-06 20:27:21]
User190501 - Posts: 98
<<Issue with Demand Index Not Displaying on BTCUSD Charts>>
Hi Support Team,

I’ve noticed that the Demand Index is not being displayed on the BTCUSD charts. Upon reviewing the code, I identified a potential issue with the calculation of SmallValue. The code sets:

const float SmallValue = sc.TickSize / 4.0f;


If the TickSize is 5, then SmallValue becomes greater than 1. Since the volume and its average for this symbol are relatively low, the following section of the code causes both BuyPower and SellPower to be set to zero:

sc.MovingAverage(Array_Range, Array_RangeMA, Input_DIMovAvgType.GetMovAvgType(), Input_BSPowerLength.GetInt());
sc.MovingAverage(sc.Volume, Array_VolumeMA, Input_DIMovAvgType.GetMovAvgType(), Input_BSPowerLength.GetInt());

if (sc.Index >= 1)
{
if (Array_VolumeMA[sc.Index] > SmallValue)
{
Array_BuyPower[sc.Index] = sc.Volume[sc.Index] / Array_VolumeMA[sc.Index];
Array_SellPower[sc.Index] = sc.Volume[sc.Index] / Array_VolumeMA[sc.Index];
}
else
{
Array_BuyPower[sc.Index] = 0.0f;
Array_SellPower[sc.Index] = 0.0f;
}
}

This appears to affect instruments where SmallValue > 1 due to the TickSize and limited volume. Could you confirm if this is the expected behavior or if adjustments are needed for such scenarios?

Thank you for your assistance!
[2024-12-06 21:32:28]
John - SC Support - Posts: 39428
We do see an issue with the SmallValue and how it is used, but it is at this part of the code:
if (Divisor > SmallValue)
   Calculation1 = 1 - (Dividend / Divisor);

Since the Divisor in this case could be small, this check was causing the issue. We have changed this to be the following:
if (Divisor != 0)
    Calculation1 = 1 - (Dividend / Divisor);

This will be out in the next pre-release.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-12-19 04:52:26]
User190501 - Posts: 98
It would be valuable to add parameters to calculate the demand index using: Total Volume (as it is current case) or using the cumulative delta Volume or Tick -- i.e substitute (V/Average Volume) by (Cumulative delta Volume or tick /Average Volume) -- Thanks
[2024-12-19 06:39:45]
Sierra_Chart Engineering - Posts: 19307
At this point, modify the source code of this particular study and build your own version of it:
How to Build an Advanced Custom Study from Source Code
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-12-19 15:47:37]
User190501 - Posts: 98
Is there a function to call to provide the cumulative delta value?

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

Login

Login Page - Create Account