Support Board
Date/Time: Fri, 24 Jan 2025 11:25:28 +0000
Post From: Study Function Programming Error Causing Freeze
[2019-01-10 06:46:54] |
User345961 - Posts: 2 |
Hi, as the title, It happens in Custom Study, Template Function, when I write a simple "cicle for" to find the first high bar, higher than actual. SCSFExport scsf_TemplateFunction(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { ...... return; } // Section 2 - Do data processing here unsigned int indexHigh; for(int i=sc.Index-1; ; i--) { if(sc.High > sc.High[sc.Index]) { indexHigh = i; break; } } Maybe it runs continuosly and could be the reason for the freeze....is there a way to insert a "delay" or "pause" in the code (like sleep function in python for example) Or is it another problem? Thank you! |