Different plot, same data

imagen

Hi, I attach the image with two volume indicators.

The one above is the standard volume that Amibroker brings to which I´ve added a Bollinguer bands.

The one below is the same as the one above but configured with this code:

_SECTION_BEGIN("Volume Bollinguer");

Periods = Param("Periods", 21, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
ColorBB = ParamColor("ColorBB", colorCycle );
StyleBB = ParamStyle("StyleBB");
Plot(Volume,"Volume",ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram  ) );
Plot( BBandTop( Volume, Periods, Width ), "BBTop" + _PARAM_VALUES(), ColorBB, StyleBB ); 

_SECTION_END();

The BBandTop of all the periods are the same in both indicators but in the upper indicator it is not well aligned, the volume doesn´t exceed the band, being the volume > BBandTop..

What´s happening?
Thanks.

Correct Code is as below

_SECTION_BEGIN("Volume Bollinguer");

Periods = Param("Periods", 21, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
ColorBB = ParamColor("ColorBB", colorCycle );
StyleBB = ParamStyle("StyleBB");
Plot(Volume,"Volume",ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleThick, maskHistogram  ) );
Plot( BBandTop( Volume, Periods, Width ), "BBTop" + _PARAM_VALUES(), ColorBB, StyleBB ); 

_SECTION_END();

Don't use styleOwnScale if you want to use the indicator as display.

Thanks, I think that the scale is the problem but OwnScale is off in both indicators.

It is not OFF in the code you originally posted. So I think that @Yogyatrader gave you the correct answer and solution.

Otherwise, please, post again the code for both plots so it will be possible to do a proper comparison and see if anyone else is able to reproduce your result.

imagen

Top indicator:

_SECTION_BEGIN("Volume");
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram  ) );
_SECTION_END();

_SECTION_BEGIN("Bollinger Bands");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorCycle );
Style = ParamStyle("Style");
Plot( BBandTop( P, Periods, Width ), "BBTop" + _PARAM_VALUES(), Color, Style ); 
Plot( BBandBot( P, Periods, Width ), "BBBot" + _PARAM_VALUES(), Color, Style ); 
_SECTION_END();

Lower indicator:

_SECTION_BEGIN("Volume Bollinguer");
//Bollinguer superior en volumen
Periods = Param("PeriodsBBtop", 21, 2, 300, 1 );
Width = Param("WidthBB", 2, 0, 10, 0.05 );
ColorBB = ParamColor("ColorBB", colorCycle );
StyleBB = ParamStyle("StyleBB");
Plot(Volume,"Volume",ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram  ) );
Plot( BBandTop( Volume, Periods, Width ), "BBTop" + _PARAM_VALUES(), ColorBB, StyleBB ); 


_SECTION_END();


The styleOwnScale isn´t selected in any of the indicators.
Thanks.

styleOwnScale

is present in these lines:

Top indicator:

Grey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram  ) );

Bottom indicator:

Plot(Volume,"Volume",ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram  ) );

Remove it from code, "reset" the existing plots (from the Paramaters dialog), set again the Bollinger values to be the same and check the result. For me using your posted code (with styleOwnScale removed) it is:

image

Thanks beppe, i understand your reply, but if you look at my two codes they both have styleOwnScale, and the graphics look different.

In neither of the two is styleOwnScale selected in the parameters, look:

imagen

I have done different tests and this happens because the first code is generated automatically when dragging indicators. This is when the problem with scaling occurs. With my second code it looks the same if you have styleOwnScaleor no styleOwnScalein the parameters (without selecting it in the window).