Login Page - Create Account

Support Board


Date/Time: Sat, 27 Apr 2024 19:20:52 +0000



Post From: Color Shading on Numbers Bars Background (and text)

[2018-03-29 21:34:46]
whats1thingnow - Posts: 407
Thanks @BenjaminR for the reminder ... I looked at the documentation again thoroughly and indeed did not see what i'm looking for

This is a description of what I hope the Background Coloring is Based on: AskVol BidVol Difference - Value Percentage

Just like https://www.sierrachart.com/index.php?page=doc/NumbersBars.php#BackgroundColoringBasedOnAskVolBidVolDifferenceActual:

The Value is: Value = Absolute Value(Ask Volume - Bid Volume)


Then, it's just like in https://www.sierrachart.com/index.php?page=doc/NumbersBars.php#CalculatedValuesBackgroundColoringLogic, we Color Background of the numbers bars Based on Value Percentage:

First, the Highest value and the Lowest value are determined for the row and an Up Range and Down Range are calculated.
- If the Highest value is positive and the Lowest value is negative, then the Up Range is defined from the Highest Value to 0 and the Down Range is defined from the Lowest value to 0 (Up Range = Highest and Down Range = Lowest).
- If both values are positive, then the Up Range is determined to be the difference between the Highest value and the Lowest value (Up Range = Highest - Lowest).
- If both values are negative, the the Lower Range is determined to be the difference between the Lowest value and the Highest value (Down Range = Lowest - Highest).

the Up Range and Down Range are then divided into four percentage groups as defined by the Percent Compare Thresholds. For example, if the Percent Compare Thresholds are set to .25, .50, and .75 then each range is divided into the following groups with each group mapping to a Color Range:
- 0.0% - 24.9% Up/Down Range 0 Color
- 25.0% - 49.9% Up/Down Range 1 Color
- 50.0% - 74.9% Up/Down Range 2 Color
- 75.0% - 100.0% Up/Down Range 3 Color

The percentage value of each value in the row is determined and the appropriate coloring selected. Positive values are assigned into the Up Range # Colors and Negative values are assigned into the Down Range # Colors.
- If the Highest value is positive and the Lowest value is negative, then a cell with a Positive value has its percent value calculated as Percentage = Cell Value / Highest Value; and a cell with a Negative value has its percent value calculated as Percentage = Cell Value / Lowest Value.
- If the Highest and Lowest values are both Positive, then each cell's percent value is calculated as Percentage = (Cell Value - Lowest Value) / (Highest Value - Lowest Value).
- If the Highest and Lowest values are both Negative, then each cell's percent value is calculated as Percentage = (Cell Value - Highest Value) / (Lowest Value - Highest Value).

Zero values are handled special, depending on the range of values in the row. If the row is all Positive values, then a 0 value is mapped into the Up Range 0 Color. If the row is all Negative values, then a 0 value is mapped into the Down Range 0 Color. If the row values span across zero (both positive and negative values) then a 0 value is mapped into the Up Range 0 Color.

If a row has all the same values (including all zero values) then the background coloring for all cells in that row uses the Up Range 0 Color.


is this what " http://www.sierrachart.com/index.php?page=doc/NumbersBars.php#AskVolBidVolDiffPercentage " was but for some reason got taken away?

thank you SC support!
Date Time Of Last Edit: 2018-03-29 21:36:45