Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 05:31:45 +0000



Custom studies called too often (even when disconnected)

View Count: 126

[2024-04-16 18:51:06]
User145575 - Posts: 18
Hello,

I have a few ACSIL studies I have written. I often do a bit of chart analysis at the end of the day, but I have noticed that my studies are called every 10ms (my chart update interval) even when the market is not moving, and even when I have manually disconnected from the data feed. I first noticed because my CPU/GPU fans were running as they do while the market is moving, but while I was disconnected.
I do have my chart update interval set to 10ms, and that's what I want while I'm trading. But I'd like to be able to disconnect while keeping my charts visible, but my CPU/GPU fans not humming as if I'm trading.

My studies all have sc.AutoLoop = true (but NOT sc.UpdateAlways). I have verified that these are indeed being called every chart update interval by attaching my debugger, setting a breakpoint at the top of my function, and changing the chart update interval, and seeing my breakpoint get hit exactly that often. All while disconnected from the data feed, meaning that none of the usual "When the Study Function is Called" things are happening. So.... why is my study function repeatedly called when it shouldn't?

I've created a smaller chartbook for testing this issue, one with only one chart window, so there is no chance of circular references etc. It still happens in that test chartbook.

Perhaps the workaround for now is to set my update interval to something like 10000000 when I disconnect. But still, this seems like a bug to me, or I have something wrong. Can you advise me on this please?
Thank you!
[2024-04-17 01:50:24]
Sierra_Chart Engineering - Posts: 14173
If one of the studies on the chart has sc.UpdateAlways set to nonzero, all of the studies will be calculated. We are updating the documentation now regarding that. Check if this is the case.

Refer to:
Working with ACSIL Arrays and Understanding Looping: Update Study Function Calls

Working with ACSIL Arrays and Understanding Looping: When the Study Function is Called
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-04-17 03:01:24]
User145575 - Posts: 18
Ah, interesting. Do you know if "Cumulative Delta Bars - Volume" is set to always update? In my testing I pared everything down to just one of my studies that depends on that built-in study. So only the two studies were there, and it was still constantly updating.
[2024-04-17 03:56:34]
Sierra_Chart Engineering - Posts: 14173
Definitely that study does not use UpdateAlways.

Do you still notice continuous updating of the chart when removing all studies from the chart? Although not sure how you would be able to tell that. Check the Window >> Message Log for full recalculations of the chart.
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
Date Time Of Last Edit: 2024-04-17 03:57:02
[2024-04-17 07:58:58]
User145575 - Posts: 18
Actually, yes, judging by my CPU (just looking in Windows Task Manager) it does seem that SC is using relatively high CPU even if I remove all studies from my chartbook, and disconnect from data feed. Now, "relatively high" in this case with no studies is only 2%, but if I start a brand new chartbook with no studies, and disconnect, the CPU shows 0.0 or 0.1%. Could my chartbook be corrupted somehow, even after I delete all studies from it?
If I remove all studies from my cht except one of my own ACSILs, and all chart windows but the one, connect to data feed and then disconnect, and set a breakpoint, it is definitely updating constantly (whether or not I add the Cumulative Delta Bars dependency). However if I start a new chartbook and just add my study, it does not do that. Very weird! I think I need to try rebuilding my whole chartbook from scratch (not looking forward to that), and seeing if this still happens.

To summarize again:
if I start a new cht and add my study, CPU is "at rest" while data feed disconnected, and my breakpoints aren't hit.
if I remove all studies from my old cht, then re-add my study, CPU is higher even with data disconnected, and my breakpoints are constantly hit.
[2024-04-17 13:35:25]
Sierra_Chart Engineering - Posts: 14173
No:
Could my chartbook be corrupted somehow, even after I delete all studies from it?

There is some reason for the recalculation occurring. See if there is any indication of why in the Window >> Message Log.

If you provide us the Chartbook we can look at the reason. Instructions to attach:
https://www.sierrachart.com/index.php?page=PostingInformation.php#AttachFile
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-04-18 21:34:14]
User145575 - Posts: 18
Sure thing, thanks. Here is the empty chartbook that, when open and disconnected from data, still seems to be using CPU/GPU relative to the length of the update interval. If I close this cht and go to File->New Intraday Chart, cpu/gpu remains very low with that chart.
The Message Log doesn't have any smoking guns that I can see.
Private File
[2024-04-19 14:31:20]
Sierra_Chart Engineering - Posts: 14173
This chart is not calculating or drawing at all when disconnected from the data feed.
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

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

Login

Login Page - Create Account