Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 10:06:29 +0000



Bar draw style variable size(=width) support

View Count: 751

[2019-08-28 10:40:24]
User353585 - Posts: 66
hello, my custom study uses Bar Bottom/Top draw style for visualizing.

I'd like it to have variable width according to the volume.

I know there are some other draw styles that I can adjust their sizes(ex:Transparent Circle Variable Size), but it's not possible with the bar draw style.

can it be supported too?
[2019-08-28 11:28:29]
Ackin - Posts: 1865
Hi,
in ACSIL?
draw style "BAR" has parameter "width". You may create function for recalculation Volume (ratio volume/coeficient) to number (then in next step width = number).

or another idea:
You can create next BAR drawstyle as next subgraph and render it transparently in the background of this, you'll see both information.
Date Time Of Last Edit: 2019-08-28 11:41:58
[2019-08-28 12:06:19]
User353585 - Posts: 66
Currently it seems like there's no direct way of controlling the widths of individual bars.
Or am I missing something?

These are related excerpt from the documentation :
"The sc.Subgraph[].DrawStyle for a study Subgraph sets the draw style for that entire Subgraph for every chart column the Subgraph is drawn in. Any changes to the Draw Style affect all chart column elements of the Subgraph when the chart is drawn. Therefore, it is not possible to use different Draw Styles for different elements of a single study Subgraph. If you want different Draw Styles, it is necessary to use separate Subgraphs for each Draw Style that you want to use."

Exceptions are some variable drawing styles you can assign individual sizes to individual elements :
"DRAWSTYLE_TRANSPARENT_CIRCLE_VARIABLE_SIZE (The sc.Subgraph[].Data[] array contains the Chart Region y- coordinate. The circle size in pixels is controlled through the sc.Subgraph[].Arrays[0][] array.)"
Date Time Of Last Edit: 2019-08-28 12:08:00
[2019-08-28 12:21:12]
Ackin - Posts: 1865
Currently it seems like there's no direct way of controlling the widths of individual bars.
Or am I missing something?

individual no...you are right....but you can have several different consecutive widths and display the one that is at the correct interval. It's a little "nasty" but you get the result you need. Then another option is to draw rectangles graphically via "tool"
[2019-08-28 12:22:16]
Ackin - Posts: 1865
and of course the best would be if a new drawstyle was made for it :)
[2019-08-28 12:28:08]
User353585 - Posts: 66
but you can have several different consecutive widths and display the one that is at the correct interval. It's a little "nasty" but you get the result you need. Then another option is to draw rectangles graphically via "tool"

yeah at first I didn't think about it. now I'm gonna try. thanks for helping.
Date Time Of Last Edit: 2019-08-28 12:28:20

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account