Support Board
Date/Time: Thu, 27 Feb 2025 09:02:52 +0000
[Programming Help] - Force recalculation of a study when user drawn drawing is moved
View Count: 652
[2021-06-28 16:23:37] |
ATricky1 - Posts: 16 |
I've been struggling to find out how to do this in ACSIL. I've trawled the documentation but can't find a solution - but maybe I've missed something. I've coded a study to start a plot based on an anchor (vertical line user drawn drawing) as a start point. The study creates the line and the plot is created from that bar onwards. However, on moving the line the plot is not re-adjusted. 1) Autoloop is set to 1 2) Chart interval update is set to 500 msecs 3) I'm running this out of market hours which I guess may affect any update? 4) sc.RecalculateChartImmediate(0) won't work - presumably because the code isn't being rerun anyway. 4) On turning Trade Simulation on or off it will update the study / plot as will adding any other study or 'Apply'. The documentation infers this anyway. If the line is moved manually then I need the study to be run - the plot re-adjusted without me having to hit any buttons or select any other options. Can the line be polled for any movement from the existing study or any other study/option? I need this outside of the symbol market hours when no ticks are coming in. Thanks. |
[2021-06-29 16:09:02] |
ATricky1 - Posts: 16 |
Bump...Could someone help with the above please? Thanks.
|
[2021-06-29 16:52:43] |
User907968 - Posts: 833 |
Using Drawing Tools From an Advanced Custom Study Can the line be polled for any movement from the existing study
Using Drawing Tools From an Advanced Custom Study: sc.GetUserDrawnChartDrawing()I need this outside of the symbol market hours when no ticks are coming in.
ACSIL Interface Members - Variables and Arrays: sc.UpdateAlways
|
[2021-06-29 21:31:04] |
ATricky1 - Posts: 16 |
sc.UpdateAlways did the trick. I'm guessing it should be use sparingly with a 500msecs or greater update to keep the CPU overhead down? Geez - will I ever get through the scale of all the documentation :) Thanks a bunch. Much appreciated. Date Time Of Last Edit: 2021-06-29 21:31:39
|
To post a message in this thread, you need to log in with your Sierra Chart account: