New coloring schemes in True Volume Surrogate to support Volume Spread Analysis

23 August 2020, 16:46
Stanislav Korotky
0
268

Starting from version 1.4 True Volume Surrogate indicator for MT5 provides extensive coloring schemes which can be helpful for Volume Spread Analysis.

There are 3 aspects which may determine color of a volume bar:

  • volume action, that is increased or decreased volume;
  • price action, that is increased or decreased price (on the main chart);
  • price bar strength, that is the proximity of the close price to high (in up bar) or low (in down bar) price; hence the bar can be strong or weak;

The proximity is detected if the close price is located within 1/3-d of the bar range, high-low (counting from the extremum in the bar direction).

Both volume and price actions are highlighted by colors (VolumeActionColor, PriceActionColor). Bar strength is highlighted by additional visual effect (StrengthEffect) applied to the mixed colors generated for price/volume actions.

3 main colors can be selected for bar highlighting:
  • ColorIncrease - color for increased action (volume or price);
  • ColorDecrease - color for decreased action (volume or price);
  • ColorExtra - additional color to blend with the increase/decrease colors;

If the increase/decrease colors are used for price action, then the extra color may affect volume action, and vice versa, if the increase/decrease colors are used for volume action, then the extra color may affect price action. It doesn't make sense to choose the same option for VolumeActionColor and PriceActionColor.

The extra color is used with 2 tints: the extra color "as is" (pure) and its derivative obtained by one of visual effects (moderated).

The pure tint is used for increasing values and the moderated tint is used for decreasing values. When StrengthEffect is disabled (set to None), the moderated tint is obtained by Brightness giving dimmed color. When StrengthEffect is selected as one of Saturation or Brightness, then the moderated tint is obtained by another effect. For example, if StrengthEffect is Brightness, the extra color is affected by Saturation giving more pale color.

The mix of the colors for volume and price actions is obtained by one of available blending algorithms (ColorBlendingType):

  • Additive (bitwise OR)
  • Proportional (subchannels)
  • Subtractive (bitwise XOR)

Depending from two blended colors different algorithms may produce equal of different tints.

The visual effects include:

  • Saturation - colors become more pale (somewhat similar to adding white);
  • Brightness - colors become more dark (somewhat similar to adding black);

You may find details about color models in Wikipedia.

Let us consider the settings by example.

Default color settings implies that increased volumes are highlighed with green, and decreased volumes are highlighted with red:

VolumeActionColor = Increase/Decrease
PriceActionColor = None
StrengthEffect = None
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = unimportant, since no one action uses Extra
ColorBlendingType = unimportant, since one of action colors (PriceActionColor) is None

True Volume Surrogate, MT5, Volume Spread Analysis

We can choose to highlight price action only:

VolumeActionColor = None
PriceActionColor = Increase/Decrease
StrengthEffect = None
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = unimportant, since no one action uses Extra
ColorBlendingType = unimportant, since one of action colors (VolumeActionColor) is None

True Volume Surrogate, MT5, Volume Spread Analysis

Now let us see how it will look if to mix the default volume action coloring (increased - green, decreased - red) with price action in extra color (blue).

VolumeActionColor = Increase/Decrease
PriceActionColor = Extra
StrengthEffect = None
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = Blue
ColorBlendingType = Proportional (default)

True Volume Surrogate, MT5, Volume Spread Analysis

The graph shows now 4 different colors:
  • Light blue for bars with increased volumes and increased price;
  • Sea green for bars with increased volumes and decreased price;
  • Purple for bars with decreased volumes and increased price;
  • Tomato red bars with both decreased volumes and price;

If enable strength highlight by Brightness (StrengthEffect = Brightness), we will get the graph with 8 colors, depicting all possible states of bars.

VolumeActionColor = Increase/Decrease
PriceActionColor = Extra
StrengthEffect = Brightness
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = Blue
ColorBlendingType = Proportional (default)

True Volume Surrogate, MT5, Volume Spread Analysis

The darker tints denote weak bars.

We can change blending (ColorBlendingType) to something other, say Subtractive. This will bring another picture (coloring):

VolumeActionColor = Increase/Decrease
PriceActionColor = Extra
StrengthEffect = Brightness
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = Blue
ColorBlendingType = Subtractive

True Volume Surrogate, MT5, Volume Spread Analysis

The tints are now different, but weak bars are still shown more dark.

Now let us change the effect to Saturation and see how the colors are mixing.

VolumeActionColor = Increase/Decrease
PriceActionColor = Extra
StrengthEffect = Saturation
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = Blue
ColorBlendingType = Subtractive

True Volume Surrogate, MT5, Volume Spread Analysis

This way the colors keep the same brightness, but the intensity of colors differ: on weak bars tints are less distinctive, i.e. more close to grey.

We can disable one of the actions highlighting. For example, if PriceActionColor made None, we'll get:

VolumeActionColor = Increase/Decrease
PriceActionColor = None
StrengthEffect = Saturation
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = Blue
ColorBlendingType = Subtractive

True Volume Surrogate, MT5, Volume Spread Analysis

If we change the effect to Brightness, we'll get:

VolumeActionColor = Increase/Decrease
PriceActionColor = None
StrengthEffect = Brightness
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = Blue
ColorBlendingType = Subtractive

True Volume Surrogate, MT5, Volume Spread Analysis

Compare this with the first graph (default settings).

Finally we can disable coloring of both volume and price actions, but leave strength highlighting:

VolumeActionColor = None
PriceActionColor = None
StrengthEffect = Brightness
ColorIncrease = Green
ColorDecrease = Red
ColorExtra = Blue
ColorBlendingType = Proportional

True Volume Surrogate, MT5, Volume Spread Analysis

Weak bars are dimmed.

You can play with the settings and find your optimal combination for detection of specific trading signals.

Please note, that True Volume Surrogate for MT4 does not provide these features due to limitations in MQL4 API.

Share it with friends: