Login Page - Create Account

Support Board


Date/Time: Tue, 21 May 2024 00:52:41 +0000



Post From: 1 tick ms

[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.