Login Page - Create Account

Support Board


Date/Time: Tue, 30 Apr 2024 01:58:57 +0000



[Programming Help] - 1 tick ms

View Count: 587

[2020-02-25 17:45:24]
JYohan - Posts: 25
Hello,

For weeks I've been trying to lower the 1 tick ms calculation time of various studies, without sacrificing update interval time. It seems that once any code is entered after SetDefault causes the ms to skyrocket, especially after a few hours. I have the chart set to 1 day but will it go lower on a 1 tick chart? Other things i've tried include:

-sc.ResizeArray(0)
-sc.ClearPersistentData()
-sc.ClearBidAskVolume
-sc.UpdateAlways = 0;
-lowering time and sales max tick record
-subgraph_field[sc.Index - 50] = 0;

So far the only thing that's sort of worked is forcing the entire study to operate off an if statement, but I'm not sure how to code it to only draw after the 100th bar. Doing something like: if (sc.Index > sc.ArraySize - 50) will significantly reduce ms early in the day but after an hour or so the ms will go from 5ms to over 200ms, as the 1 day 1 tick file increases. Even if I reload the chart, the study operates off the entire file. Any help is much appreciated.
[2020-03-06 20:19:31]
JYohan - Posts: 25
The main solution I found was changing every study to manual looping, aka sc.Autoloop = 0; and using for loops for calculations. This doesn't have much of an effect on 1min or even 1second charts, but has dramatic performance effect on 1 tick charts.

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

Login

Login Page - Create Account