Login Page - Create Account

Support Board


Date/Time: Thu, 13 Feb 2025 17:04:29 +0000



Post From: Display integer value in one of the subgraphs

[2020-12-12 08:58:42]
User92573 - Posts: 544
Dear Support/Forum

I'm simply counting Bars e.g. 1 to n and storing the integer value in a (PersistentInt) which then sets the value in Subgraph_count[sc.Index]. As this is a float array I receive conversion integer to float warnings as expected.

The value displayed in the chart at Subgraph_count[sc.Index] using DRAWSTYLE_VALUE_ON_HIGH or DRAWSTYLE_VALUE_ON_LOW again as expected is formatted as per the sc.ValueFormat for the study and not as an integer which I require.

I cannot set sc.ValueFormat = 0; as this impacts the whole study and the other subgraphs require float values.

I've searched the help files and forum but cannot find a solution. Please can you help with this or direct me to a similar example study that solves a similar issue.

Many thanks

PS including sc.ValueFormat = 0; in the (sc.SetDefaults) does not seem to set that value when the study is loaded. Instead it defaults to VALUEFORMAT_INHERITED?