Support Board
Date/Time: Sun, 22 Dec 2024 10:50:53 +0000
[User Discussion] - request for a very simple ACSIL study
View Count: 6130
[2015-02-13 21:26:14] |
jivetrader - Posts: 410 |
i would like a study to auto-recalculate a chart every x seconds the study would have one input: Recalc Interval if anyone could help i would be most appreciative, thanks |
[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
|
kiwi15.cpp - Attached On 2015-02-14 23:44:50 UTC - Size: 15.45 KB - 743 views kiwi15.dll - Attached On 2015-02-14 23:45:09 UTC - Size: 160.5 KB - 708 views |
[2015-02-15 10:20:31] |
ehlaban - Posts: 50 |
Nice, thanks Kiwi.
|
[2015-02-19 05:35:52] |
jivetrader - Posts: 410 |
@kiwi thanks very much for this. i plan to try it when i manage to reduce my chart loading time to something reasonable. cheers |
[2015-02-19 19:13:04] |
jivetrader - Posts: 410 |
hi Kiwi the refresh strobe is a swell idea.. does it signify anything in particular when it paints a refresh bar? most importantly, is there a way to keep the chart from auto-scrolling to the right when it refreshes? this interrupts viewing old data on the chart. thanks again. |
[2015-03-09 14:40:29] |
Sawtooth - Posts: 4141 |
@kiwi, thanks for this! It works perfectly for recalculating a spreadsheet study at regular intervals.
|
[2015-03-20 00:06:06] |
Kiwi - Posts: 375 |
Glad its useful. The command seems to have a side effect of scrolling to the last bar. I experimented to try to stop it but don't seem to be able to do it. I'll raise a support thread and ask if that can be looked at as it would be more logical not to adjust position. Or tell me what I'm doing wrong :) |
[2015-06-12 16:24:08] |
User75519 - Posts: 15 |
Thank You very much. do you by any chance have a study of divergence. thanks again
|
[2015-06-12 21:59:16] |
Kiwi - Posts: 375 |
No. I don't actually believe that it works. |
[2015-06-13 00:34:46] |
Sawtooth - Posts: 4141 |
See this thread: RSI Divergence Workaround |
[2018-02-28 11:59:01] |
samual sprat - Posts: 343 |
Hey Guy, Kiwi, Not sure if you've noticed this too but since the 64bit update which allows access to more memory, I've noticed kiwi may have a memory leak. Just thought i'd make you aware in case you're using it. Maybe you can help to fix it. See this post: Kiwi Resync Study - Memory leak? Thanks S |
[2018-03-03 11:43:56] |
samual sprat - Posts: 343 |
Guys, the fix for kiwi 15 resynce memory leak is here Kiwi Resync Study - Memory leak?
|
To post a message in this thread, you need to log in with your Sierra Chart account: