Login Page - Create Account

Support Board


Date/Time: Fri, 17 May 2024 20:58:42 +0000



Post From: Custom studies called too often (even when disconnected)

[2024-04-16 18:51:06]
User145575 - Posts: 19
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!