Support Board
Date/Time: Wed, 04 Mar 2026 19:52:51 +0000
Post From: Historical market depth for chart with custom bars
| [2026-01-22 17:04:33] |
| curious16 - Posts: 36 |
|
I found that it is possible to define and update subgraphs in the calling study (the study that sets sc.UsesCustomChartBarFunction = 1). This is quite convenient as we can define custom bars and calculate some analytics on these bars in the same function. What I find a bit problematic is the limited functionality to exchange data between the calling study and the custom chart bar function. As said before, we have only scalar persistent variables for this purpose. I found a partial workaround by using the two Renko price traces (SC_RENKO_OPEN, SC_RENKO_CLOSE) for sending data back from the chart bar function back to the calling study. This can be done unless the custom chart is a Renko and needs these data traces. It works but having the option to pass vectors via persistent pointers would be nicer and more flexible. Overall I am quite positive about using this custom bar mechanism. It is still early days but what I tested so far runs well. However, it appears that this part of ACSIL is less commonly used as there are only very few posts on the support board explaining how to work with custom bars. This means it takes a bit of experimentation to fully understand the method. |
