Support Board
Date/Time: Sat, 10 May 2025 11:33:49 +0000
Post From: request for a very simple ACSIL study
[2015-02-14 23:46:07] |
Kiwi - Posts: 375 |
Heres the code and a dll (just save it in your data directory then follow the "Add Custom Study using custom dll instructions" to find the function within it. You can look at the first two subgraphs Strobe and Time to help you check that its doing what you expect. Default time is 60 seconds. SCSFExport scsf_RecalcChart(SCStudyInterfaceRef sc) {
if (sc.SetDefaults) { sc.GraphName = "Recalc"; sc.StudyDescription = "Recalc Chart every x secs based on real time"; sc.Subgraph[0].Name = "Strobe"; sc.Subgraph[1].Name = "Time"; sc.Subgraph[0].DrawStyle=DRAWSTYLE_IGNORE; sc.Subgraph[1].DrawStyle=DRAWSTYLE_IGNORE; sc.Input[0].Name="Seconds between recalcs"; sc.Input[0].SetInt(60); sc.UpdateAlways=1; sc.FreeDLL = 1; return; } if (sc.CurrentSystemDateTime.GetTime() % sc.Input[0].GetInt() == 0) { if (sc.Subgraph[0][sc.ArraySize-1] < 999660) { sc.Subgraph[0][sc.ArraySize-1] = 999666; sc.Subgraph[1][sc.ArraySize-1] = sc.CurrentSystemDateTime.GetTime(); sc.FlagFullRecalculate = 1; } } else sc.Subgraph[0][sc.ArraySize-1] = 0; } DLL: * Kiwi's Stuff 2015 * (kiwi15.dll) Function: Recalc How to add a custom study: http://www.sierrachart.com/index.php?page=doc/doc_DLLUsage.html Date Time Of Last Edit: 2015-02-14 23:49:36
|
![]() ![]() |