# kindly help in improving the AFL

#### sherbaaz

##### Banned
Hi all,

Below is the formula for volume along with standard deviations. The problem I am facing is that the volume bars height gets compressed due to std dev cloud.

Is it possible to have the normal height of volume bars along with the clouds. If any other improvement can be done kindly help.

regds,

_SECTION_BEGIN("rest");
GraphXSpace = Param("Xspace", 10, 2, 20, 1);
// vol with std
LBP = Param("Look Back", 30, 0, 150,1 );
Mean = MA(ln(V),LBP);
StD = StDev(ln(V),LBP);

xp3 = exp(mean + 3*std); //3 band
xp2 = exp(mean + 2*std); //2 nd band
xp1 = exp(mean + 1*std); // 1st band
xm = exp(mean); // avg
xn1 = exp(mean - 1*std); // -1 band
xn2 = exp(mean - -2*std); //-2 band

Clr = IIf(V>Ref(V,-1),29,32);
Plot(V,"vol",Clr,2+4);
PcntInc = NumToStr((V-xm)/xm*100,2);

bxptop = xp3;
bxpbot = xp2;
PlotOHLC( bxptop, bxptop, bxpbot, bxpbot, "", colorCustom12,styleCloud );

bxptop1 = xp2;
bxpbot1 = xp1;
PlotOHLC( bxptop1, bxptop1, bxpbot1, bxpbot1, "", colorSeaGreen,styleCloud );

bxptop2 = xp1;
bxpbot2 = xm;
PlotOHLC( bxptop2, bxptop2, bxpbot2, bxpbot2, "", colorPink,styleCloud );

bxptop3 = xm;
bxpbot3 = xn1;
PlotOHLC( bxptop3, bxptop3, bxpbot3, bxpbot3, "", colorYellow,styleCloud );

bxptop4 = xn2;
bxpbot4 = xn1;
PlotOHLC( bxptop4, bxptop4, bxpbot4, bxpbot4, "", colorBrightGreen,styleCloud );

_SECTION_END();

PS: I also want to have cloud above the top most cloud of different color is it possible ? Any other improvement kindly help.

#### KelvinHand

##### Well-Known Member
Hi all,

Below is the formula for volume along with standard deviations. The problem I am facing is that the volume bars height gets compressed due to std dev cloud.

Is it possible to have the normal height of volume bars along with the clouds. If any other improvement can be done kindly help.

regds,

_SECTION_BEGIN("rest");
GraphXSpace = Param("Xspace", 10, 2, 20, 1);
// vol with std
LBP = Param("Look Back", 30, 0, 150,1 );
Mean = MA(ln(V),LBP);
StD = StDev(ln(V),LBP);

xp3 = exp(mean + 3*std); //3 band
xp2 = exp(mean + 2*std); //2 nd band
xp1 = exp(mean + 1*std); // 1st band
xm = exp(mean); // avg
xn1 = exp(mean - 1*std); // -1 band
xn2 = exp(mean - -2*std); //-2 band

Clr = IIf(V>Ref(V,-1),29,32);
Plot(V,"vol",Clr,2+4);
PcntInc = NumToStr((V-xm)/xm*100,2);

bxptop = xp3;
bxpbot = xp2;
PlotOHLC( bxptop, bxptop, bxpbot, bxpbot, "", colorCustom12,styleCloud );

bxptop1 = xp2;
bxpbot1 = xp1;
PlotOHLC( bxptop1, bxptop1, bxpbot1, bxpbot1, "", colorSeaGreen,styleCloud );

bxptop2 = xp1;
bxpbot2 = xm;
PlotOHLC( bxptop2, bxptop2, bxpbot2, bxpbot2, "", colorPink,styleCloud );

bxptop3 = xm;
bxpbot3 = xn1;
PlotOHLC( bxptop3, bxptop3, bxpbot3, bxpbot3, "", colorYellow,styleCloud );

bxptop4 = xn2;
bxpbot4 = xn1;
PlotOHLC( bxptop4, bxptop4, bxpbot4, bxpbot4, "", colorBrightGreen,styleCloud );

_SECTION_END();

PS: I also want to have cloud above the top most cloud of different color is it possible ? Any other improvement kindly help.
Try add styleOwnScale to plot volume

#### sherbaaz

##### Banned
Try add styleOwnScale to plot volume
thanks for the suggestion it worked well. Any way to create cloud above 3std dev on top ?

thanks