Support Board
Date/Time: Sun, 16 Nov 2025 11:14:44 +0000
[Programming Help] - Preventing ghost labels in the ZigZag study
View Count: 42
| [2025-11-15 16:17:48] |
| C_Money - Posts: 87 |
|
Hi all, Something I've been struggling with for a long time. I've been using the ZigZag study (and other custom variants of it from other users) and all of them have this "ghost label" issue. My custom study depends on the ZigZag labels when plotting buy/sell signals. The issue is, when the market moves strongly in one direction without a retracement, my study will plot signals where a ZZ label used to be, but is no longer. In my spreadsheet system, I can still see the values in SG2 (1, 2, 3 or 4 for HH, LL, HL, LL), even though there is no text label to accompany it. Even if I pull the SG2 array directly from the ZigZag study and not the Spreadsheet, it still has ghost labels. How can I fix this without having to use the Chart Recalculation study (it causes incredible lag, as my system is pretty complex.) The ZigZag study is in Studies7.cpp and I THINK the solution is somewhere here on line 1654. Even if I remove that if statement and keep the for loop, it doesn't clear anything. if (PriorLastZZEndpointIndex != -1)
{ // Clear from beginning of chart to end for (int ZeroIndex = 0; ZeroIndex < sc.ArraySize; ZeroIndex++) { Subgraph_TextLabels[ZeroIndex] = 0; Subgraph_ReversalPrice[ZeroIndex] = 0; Subgraph_ZigzagLength[ZeroIndex] = 0; Subgraph_ZigzagNumBars[ZeroIndex] = 0; } } Date Time Of Last Edit: 2025-11-15 16:18:58
|
| [2025-11-15 19:21:58] |
| Sierra_Chart Engineering - Posts: 21433 |
|
I can still see the values in SG2 (1, 2, 3 or 4 for HH, LL, HL, LL), even though there is no text label to accompany it. You do have to clear the value representing these labels, in the Subgraph at the chart bar index, by setting it to 0.
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account:
