Number of decimals for Volume in custom pane
Author: kazuna
Creation Date: 8/18/2015 4:31 AM
profile picture

kazuna

#1
Suppose I draw my own volume pane like this:
CODE:
Please log in to see this code.

The volume pane is shown with decimals to ten thousandths.
How can I change the code so that I can get rid of the decimals?
profile picture

Eugene

#2
Volume is a double like any DataSeries so you can't truncate the series just for output, for example. There are 3 global preferences that affect the number of decimals one way or another:

1. Preferences > Advanced Options > Decimal Places
2. Symbol Info Manager > Decimals
3. Bars.FormatValue
profile picture

kazuna

#3
The "Advanced Options" is exactly what I wanted but it changes not only the custom volume pane but also all other panes.
That's why I wanted to control from the code to change the decimal place only on that pane.
I wished if ChartPane.Decimals did it but apparently not.
Any other option?
profile picture

Eugene

#4
QUOTE:
The "Advanced Options" is exactly what I wanted but it changes not only the custom volume pane but also all other panes.

Volume in a custom pane is nothing different as explained above so it's not going to be treated differently from other series:

QUOTE:
Volume is a double like any DataSeries so you can't truncate the series just for output, for example. There are 3 global preferences that affect the number of decimals one way or another:
profile picture

kazuna

#5
Please consider supporting custom decimal property setting for ChartPane object.
profile picture

Eugene

#6
For the VolumePane (not for a custom pane), you can use

CODE:
Please log in to see this code.
profile picture

kazuna

#7
Any technical reason for it not working to a custom pane?
profile picture

Eugene

#8
Not being the developer, I can only speculate.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).