Support Board
Date/Time: Mon, 25 Nov 2024 12:38:11 +0000
[Programming Help] - Chart loosing custom ASCIL colors when clicking on any study settings in Studies
View Count: 277
[2024-03-08 05:47:49] |
User366743 - Posts: 14 |
I have used in the past a study (trial ) that has the same behavior after the time trial limit expired - no colors on candles: each candle is a hollow candle. I do not have a problem with that (I did not pay for the study). However my own ASCIL study seem to have sign of this same behavior: loosing colors by simply clicking on any loaded study settings as shown in the video - very frustrating. The colors are instantly back by clicking on any settings in the chart settings or by clicking on Chart->Recalculate. As per your advise I did not include any files yet but have them handy. Please advise what I'm missing? Regards, Wally Pietruszka Date Time Of Last Edit: 2024-03-08 05:48:15
|
[2024-03-08 06:00:52] |
User366743 - Posts: 14 |
Decided to show the problem. Thanks. https://www.sierrachart.com/image.php?Image=1709877418952.png https://www.sierrachart.com/image.php?Image=1709877582941.png |
[2024-03-08 06:12:10] |
User366743 - Posts: 14 |
This strange behaviour seems to only occur with Heikin-Ashi study overlay when Display As Main Price Graph option is selected (if this is not used, the colors will not disappear but will not cover the candles completely). https://www.sierrachart.com/image.php?Image=1709878265682.png |
[2024-03-08 07:31:45] |
Sierra_Chart Engineering - Posts: 17172 |
If the color settings of a study are changing, it means the study itself is changing them. The source code of the study would have to be examined. 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 Date Time Of Last Edit: 2024-03-08 07:31:53
|
[2024-03-09 07:04:04] |
User366743 - Posts: 14 |
OK, that is not a problem. A I said this behavior does not occur if the option Display As Main Price Graph is not used. I'm not necessarily looking to build reliable system based on Haikin-Ashi overlay as the price points are averages (not real values) this then just a test/ demonstration.. and it works if settings are not clicked on.. It is just an annoyance or a bug (on my part of coding or SierraChart end). |
HA_STD.cpp - Attached On 2024-03-09 06:54:44 UTC - Size: 13.01 KB - 100 views Attachment Deleted. ES_S3.Cht - Attached On 2024-03-09 07:03:21 UTC - Size: 10.43 KB - 204 views |
[2024-03-09 10:27:48] |
User431178 - Posts: 541 |
A I said this behavior does not occur if the option Display As Main Price Graph is not used. When your study is configured to be the main price graph it is calculated before the other studies (and those other studies as based upon it). Your study calls in data from other studies, but during recalcution there is no data available from those studies (as they have not yet been calculated). In other words you have a circular dependency in your study. |
[2024-03-09 17:58:24] |
User366743 - Posts: 14 |
It is possibly true (circular dependency), however if I set a flag at the end of the ASCIL code sc.FlagFullRecalculate = 1; to run at each iteration - then the graph/study will recalculate (at each candle - this is overkill) and it will regain colors/ outputs even if it looses them, so this somewhat proves the point the the recalculation function still works. Another point is that my study not only loses colors but also outputs (signals arrows) and defaults to hollow candles that are not part of the defaults (not in graphic settings and not in ASCIL code) - and this is odd to me. Regards. Date Time Of Last Edit: 2024-03-09 17:59:16
|
[2024-03-09 18:27:23] |
User431178 - Posts: 541 |
It is possibly true (circular dependency), however if I set a flag at the end of the ASCIL code sc.FlagFullRecalculate = 1; to run at each iteration - then the graph/study will recalculate (at each candle - this is overkill) and it will regain colors/ outputs even if it looses them, so this somewhat proves the point the the recalculation function still works. Yes, this is true. - When you hit apply in the studies window, all the study arrays are cleared. - When you recalculate the chart, the study arrays are not cleared, meaning that the old data is there in the arrays when your study is calculated (this is the same reason it works during live updates - the data from the previous calculation is available). So the dependency problem still exists, but the recalculate fudges it so you get the desried output. defaults to hollow candles that are not part of the defaults (not in graphic settings and not in ASCIL code) That's not what's happening, they are being set to black fill beacuse the DataColor array is all zeros. The signal arrows that you add as chart drawings are automatically deleted when the chart is recalculated, they are then not redrawn as you don't get any signals (due to the dependency issue). FYI here is some information about the order of calculation - Chart Studies: How Calculation Order of Studies Is Determined Date Time Of Last Edit: 2024-03-09 18:27:53
|
[2024-03-09 21:13:24] |
User366743 - Posts: 14 |
OK we getting a bit closer to the source of the problem. Assumption: it seems like barely clicking on any study in the study settings even without hitting the apply button (i.e clicking the OK button only) will clear the data/ color arrays. My ASCIL study is positioned last in the order of precedence and has this: sc.CalculationPrecedence = LOW_PREC_LEVEL; (but these might not matter in the case of Display as Main Price Graph - I do not have enough experience here..) Fact: after hitting OK in the studies and "losing the data arrays information: colors/ signals" I will go to chart settings and click on any settings (without changing anything) and this will instantly reload the missing array information and bring back the colors and the signals - so the data technically is still present (just in different arrays/ space). Interesting at least to me.. I have not seen this behavior with other studies: i.e. I have similar ASCIL study coloring Renko bars without such a problem. Regards, W.P. Date Time Of Last Edit: 2024-03-09 21:26:19
|
[2024-03-09 22:04:29] |
User366743 - Posts: 14 |
There is likely something in the Heikin-Ashi study provided by SierraChart (Heikin-Ashi is provided as add-on study not a native candle type) that I do not use (or use incorrectly). If I apply to the build-in Heikin-Ashi study: Display as Main Price Graph - it seems not to suffer by my problems. (My ASCIL study is based on SierraChart provided code in Studies.cpp but it does not mean that the provided code is production ready.) Date Time Of Last Edit: 2024-03-10 00:41:27
|
[2024-03-09 22:23:47] |
User366743 - Posts: 14 |
In my limited experience the colors (or other output graphics) will not display correctly if the study in question does not calculate correctly the position value (the index value is calculated/ assigned by SierraChart). This for now is to me the actual culprit.. https://www.sierrachart.com/image.php?Image=1710031631112.png This is the image of my Haikin-Ashi overlaid over SierraChart Heikin-Ashi: it seems like the open/ close values are not the same but they should have been.. So SierraChart build-in Heikin-Ashi study calculates the candle values differently than the provided code in Studies.cpp Finally I got it to work but it is still odd. 1. I must add the build in study Heikin-Ashi (with default settings) and use DisplayAsMainPriceGraph option. 2. I followed as close the logic of the provided code as possible with my ASCIL study. Add the ASCIL study (as last one) and this time do not use DisplayAsMainPriceGraph option. 3. Hide the build-in study Heikin-Ashi. So it boils down to the fact that the ASCIL Heikin-Ashi study relies at some point on the build-in Heikin-Ashi study and that the DisplayAsMainPriceGraph should not be used by the ASCIL study. Now I can click on any study in the settings, hit apply (or not) and the graph data arrays do not loose its values. Thank you for your input. Date Time Of Last Edit: 2024-03-10 05:27:08
|
HA_STD2.cpp - Attached On 2024-03-10 02:19:03 UTC - Size: 11.03 KB - 158 views |
To post a message in this thread, you need to log in with your Sierra Chart account: