Support Board
Date/Time: Tue, 26 Nov 2024 17:31:28 +0000
Post From: GDI w/2551 and study updates (manual vs auto looping implications)
[2023-11-11 01:50:13] |
User133994 - Posts: 80 |
Ok, so I'm being told this: When using GDI for drawing in Sierra Chart, if you draw on the chart within a study's function, those GDI drawings are not persistent by default. They are only present until the chart is updated again, such as with a new tick of data.
If the study function does not explicitly redraw the GDI objects on every update (which includes updates within the same bar), the drawings will disappear until the next time the study function executes and performs the drawing operation again. This is why you might see the GDI drawing disappear on a new update and reappear when the study function runs for the first event on a new bar. To maintain GDI drawings on the chart, you would typically need to ensure that the drawing code is executed on every update, not just on the first calculation of a new bar. This is often managed by checking if the chart needs redrawing and then performing the GDI drawing operations accordingly. credit: openAI Can anyone confirm this statement? That would explain the *REQUIRED* redrawing on every tick (at least if you have autoloop = 1). I did attempt to confirm this by only drawing on the first tick of each bar...and yes, the GDI drawings disappeared after the 1st tick...(of course I'm using autoloop = 1). If autoloop = 0, I'm sure the drawing wouldn't disappear, but then I have to ask, how do I get a GDI 'update' (from a study) to paint with autoloop = 0 (only 1x and persist for an entire bar's worth of tick updates)? Thanks in advance. Date Time Of Last Edit: 2023-11-11 01:51:13
|