VPA plotting required from rightside

Hellow Members,

I nned a help from you. The following AFL code draws Volume bars from leftside. I want the code to modified to draw from rightside.

Can you anybody seniors help me. Thanks in advance

_SECTION_BEGIN("A00_ATEST1");
/*
	Author: Anderson Wilson 
		based on PriceVolDistribution demo written by Tomasz Janeczko
		
Volume-by-Price is an indicator that shows the amount of volume for a particular
price range,
The Volume-by-Price bars are horizontal and shown on the left side of the chart
to correspond 
with these price ranges. Bar colors indicate bear/bull volume

Use F12 and SHIFT+F12 to define range
*/
SetChartOptions(0,chartShowArrows|chartShowDates);

bi = BarIndex();
fvb = BeginValue(bi);
lvb = EndValue(bi);
if( fvb == 0 && lvb == LastValue(bi) ) {
	fvb = FirstVisibleValue( bi );
	lvb = LastVisibleValue( bi );
}
fvb = Max( 0, fvb );
lvb = Max( 0, lvb );

bins = Param("Bins", 100, 3, 100, 1);  // no of line of volume bars
pRecHeight = Param("Rectangle Height", 0.90, 0.10, 1, 0.05);

BullBearZone = (High - Low) / 3;
bullbar = C > (High - BullBearZone);
bearbar = C < (Low + BullBearZone);

mx = PriceVolDistribution( H, L, V, bins, True, fvb, lvb );
mx1 = PriceVolDistribution( H, L, IIf( bullbar, V, 0 ), bins, True, fvb, lvb );
mx2 = PriceVolDistribution( H, L, IIf( bearbar, V, 0 ), bins, True, fvb, lvb );

bins = MxGetSize( mx, 0 );
bins1 = MxGetSize( mx1, 0 );
bins2 = MxGetSize( mx2, 0 );

GfxSetOverlayMode( 1 );
GfxSetCoordsMode( 1 );

if( bins > 1 && bins == bins1 && bins == bins2 ) {

	MaxVolume = mx[ 0 ][ 1 ];

	// find max volume
	for( i = 1; i < bins; i++ )
	{
		if( mx[ i ][ 1 ] > MaxVolume )
			MaxVolume = mx[ i ][ 1 ];
	}
	
	// rectangle height
	RecHeight = (mx[ 1 ][ 0 ] - mx[ 0 ][ 0 ]) / 2 * pRecHeight;
	
	for( i = 0; i < bins; i++ )
	{
		price = mx1[ i ][ 0 ]; // price level
		
		absVolume = mx1[ i ][ 1 ];
		VolAcum = absVolume;
		relvolume = absVolume / MaxVolume;
		relbar = relvolume * (lvb-fvb+1);
		
		// upper left corner of the rectangle.	
		x1 = fvb;
		y1 = price + RecHeight;
		// lower right corner of the rectangle.	
		x2 = fvb + relbar;
		y2 = price - RecHeight; 

		GfxFillSolidRect( x1, y1, x2, y2, colorGreen );
		
		absVolume = mx2[ i ][ 1 ];
		VolAcum += absVolume;
		relvolume = absVolume / MaxVolume;
		relbar2 = relvolume * (lvb-fvb+1);

		x1 = x2;
		x2 = x1 + relbar2;
		GfxFillSolidRect( x1, y1, x2, y2, colorPink );

		absVolume = mx[ i ][ 1 ]; 
		relvolume = (absVolume - VolAcum) / MaxVolume;
		relbar3 = relvolume * (lvb-fvb+1);

		x1 = x2;
		x2 = x1 + relbar3;
		GfxFillSolidRect( x1, y1, x2, y2, colorLightBlue );
	}
}
Plot( C, "Price", colorDefault, styleCandle );
_SECTION_END();

First of all please do not create duplicate threads and posts. Especially latter one (multiply same posts) is considered spamming. You have created same post in this thread already.

As for right hand sided... if you look at that code there are variables fvb and lvb for first and last bar of visible area. If you look further then you will see that fvb is used in x variables (x1 and x2) being used in plot functions. So they refer to x-position of x/y coordinates.
Also you can see that x2 adds variable to plot endpoint.

Now... what to do to plot to from right to left?
Well, simply change fvb (left side) to lvb (right side) in x variables and instead of addition use subtraction in the other x variables.

_SECTION_BEGIN("A00_ATEST1");
/*
	Author: Anderson Wilson 
		based on PriceVolDistribution demo written by Tomasz Janeczko
		
Volume-by-Price is an indicator that shows the amount of volume for a particular
price range,
The Volume-by-Price bars are horizontal and shown on the left side of the chart
to correspond 
with these price ranges. Bar colors indicate bear/bull volume

Use F12 and SHIFT+F12 to define range

small modification to plot right hand sided by fxshrat
https://forum.amibroker.com/t/vpa-plotting-required-from-rightside/13064/2
*/
SetChartOptions(0,chartShowArrows|chartShowDates);

bi = BarIndex();
fvb = BeginValue(bi);
lvb = EndValue(bi);
if( fvb == 0 && lvb == LastValue(bi) ) {
	fvb = FirstVisibleValue( bi );
	lvb = LastVisibleValue( bi );
}
fvb = Max( 0, fvb );
lvb = Max( 0, lvb );

bins = Param("Bins", 100, 3, 100, 1);  // no of line of volume bars
pRecHeight = Param("Rectangle Height", 0.90, 0.10, 1, 0.05);

BullBearZone = (High - Low) / 3;
bullbar = C > (High - BullBearZone);
bearbar = C < (Low + BullBearZone);

mx = PriceVolDistribution( H, L, V, bins, True, fvb, lvb );
mx1 = PriceVolDistribution( H, L, IIf( bullbar, V, 0 ), bins, True, fvb, lvb );
mx2 = PriceVolDistribution( H, L, IIf( bearbar, V, 0 ), bins, True, fvb, lvb );

bins = MxGetSize( mx, 0 );
bins1 = MxGetSize( mx1, 0 );
bins2 = MxGetSize( mx2, 0 );

GfxSetOverlayMode( 1 );
GfxSetCoordsMode( 1 );

if( bins > 1 && bins == bins1 && bins == bins2 ) {

	MaxVolume = mx[ 0 ][ 1 ];

	// find max volume
	for( i = 1; i < bins; i++ )
	{
		if( mx[ i ][ 1 ] > MaxVolume )
			MaxVolume = mx[ i ][ 1 ];
	}
	
	// rectangle height
	RecHeight = (mx[ 1 ][ 0 ] - mx[ 0 ][ 0 ]) / 2 * pRecHeight;
	
	for( i = 0; i < bins; i++ )
	{
		price = mx1[ i ][ 0 ]; // price level
		
		absVolume = mx1[ i ][ 1 ];
		VolAcum = absVolume;
		relvolume = absVolume / MaxVolume;
		relbar = relvolume * (lvb-fvb+1);
		
		// upper left corner of the rectangle.	
		x1 = lvb-relbar;
		y1 = price + RecHeight;
		// lower right corner of the rectangle.	
		x2 = lvb;
		y2 = price - RecHeight; 

		GfxFillSolidRect( x1, y1, x2, y2, colorGreen );
		
		absVolume = mx2[ i ][ 1 ];
		VolAcum += absVolume;
		relvolume = absVolume / MaxVolume;
		relbar2 = relvolume * (lvb-fvb+1);

		x2 = x1;
		x1 = x2 - relbar2;
		GfxFillSolidRect( x1, y1, x2, y2, colorPink );

		absVolume = mx[ i ][ 1 ]; 
		relvolume = (absVolume - VolAcum) / MaxVolume;
		relbar3 = relvolume * (lvb-fvb+1);

		x2 = x1;
		x1 = x2 - relbar3;
		GfxFillSolidRect( x1, y1, x2, y2, colorLightBlue );
	}
}
Plot( C, "Price", colorDefault, styleCandle );
_SECTION_END();

2

8 Likes

Hi fx, how would you plot a VP for every swing of a zig zag? :crossed_fingers:

I tried, but ended up in Useless Loop.

You get start point of zigzag (peak/through) and endpoint of zigzag (through/peak) and iterate through zigzag directions.

1

3 Likes

Sorry for duplicate posting,happened accidentally. And many thanks for the new code.I use ichimoku for trading analysis, in which min 27 bars are left blank at rightside of the chart. This is required to plot lead kumo. Please see the attached nifty chart with PlotVAPOverlay along with settings vapstyle = 3.

I want to have similar kind of chart with new code. I have put new code, it is drawing VAP from the lastcandle/bar, not from extreme right side. Please see the attached chart newcode

I want to draw VAP from extreme rightside of the chart as standard PlotVAPOverlay functionality.

Can you please do needful.

Nifty
new%20code

In such case you would have to change to pixel/price mode of GfxSetCoordsmode. And adding some percent width setting. (As aside have changed finding max. volume using loopless code).

_SECTION_BEGIN("A00_ATEST1");
/*
	Author: Anderson Wilson 
		based on PriceVolDistribution demo written by Tomasz Janeczko
		
Volume-by-Price is an indicator that shows the amount of volume for a particular
price range,
The Volume-by-Price bars are horizontal and shown on the left side of the chart
to correspond 
with these price ranges. Bar colors indicate bear/bull volume

Use F12 and SHIFT+F12 to define range

Modifications to plot right hand sided and with percent width 
And loopless finding of max. volume
by @fxshrat
https://forum.amibroker.com/t/vpa-plotting-required-from-rightside/13064/6
*/
SetChartOptions(0,chartShowArrows|chartShowDates);

GfxSetOverlayMode( 1 );

bi = BarIndex();
fvb = BeginValue(bi);
lvb = slvb = EndValue(bi);
is_not_range = fvb == 0 AND lvb == LastValue(bi);

if( is_not_range ) {
	fvb = FirstVisibleValue( bi );
	lvb = LastVisibleValue( bi );
	slvb = Status( "pxchartwidth" )+5;//Status( "lastvisiblebar" );//
	GfxSetCoordsMode( 2 );//GfxSetCoordsMode( 1 );
} else if( fvb > 0 AND lvb == LastValue(bi)) {
	lvb = LastVisibleValue( bi );
	slvb = lvb;
	GfxSetCoordsMode( 1 );
} else
	GfxSetCoordsMode( 1 );
	
fvb = Max( 0, fvb );
lvb = Max( 0, lvb );

bins = Param("Bins", 100, 3, 100, 1);  // no of line of volume bars
pRecHeight = Param("Rectangle Height", 0.90, 0.10, 1, 0.05);
pcnt_with = Param("Percent width", 20, 1, 100, 1) / 100; 

BullBearZone = (High - Low) / 3;
bullbar = C > (High - BullBearZone);
bearbar = C < (Low + BullBearZone);

mx = PriceVolDistribution( H, L, V, bins, True, fvb, lvb );
mx1 = PriceVolDistribution( H, L, IIf( bullbar, V, 0 ), bins, True, fvb, lvb );
mx2 = PriceVolDistribution( H, L, IIf( bearbar, V, 0 ), bins, True, fvb, lvb );

bins = MxGetSize( mx, 0 );
bins1 = MxGetSize( mx1, 0 );
bins2 = MxGetSize( mx2, 0 );

if( bins > 1 && bins == bins1 && bins == bins2 ) {

	// find max volume
	mat_sort = MxSortRows(mx, False, 1);				
	MaxVolume = mat_sort[0][1];		
	
	// rectangle height
	RecHeight = (mx[ 1 ][ 0 ] - mx[ 0 ][ 0 ]) / 2 * pRecHeight;
	
	for( i = 0; i < bins; i++ )
	{
		price = mx1[ i ][ 0 ]; // price level
		
		absVolume = mx1[ i ][ 1 ];
		VolAcum = absVolume;
		relvolume = absVolume / MaxVolume;
		//
		if ( is_not_range )
			relbar = relvolume * slvb * pcnt_with;
		else
			relbar = relvolume * (lvb-fvb+1);
		//
		// upper left corner of the rectangle.	
		x1 = slvb-relbar;
		y1 = price + RecHeight;
		// lower right corner of the rectangle.	
		x2 = slvb;
		y2 = price - RecHeight; 

		GfxFillSolidRect( x1, y1, x2, y2, colorGreen );
		
		absVolume = mx2[ i ][ 1 ];
		VolAcum += absVolume;
		relvolume = absVolume / MaxVolume;
		//
		if ( is_not_range )
			relbar2 = relvolume * slvb * pcnt_with;
		else
			relbar2 = relvolume * (lvb-fvb+1);
		//
		x2 = x1;
		x1 = x2 - relbar2;
		GfxFillSolidRect( x1, y1, x2, y2, colorPink );

		absVolume = mx[ i ][ 1 ]; 
		relvolume = (absVolume - VolAcum) / MaxVolume;
		if ( is_not_range )
			relbar3 = relvolume * slvb * pcnt_with;
		else
			relbar3 = relvolume * (lvb-fvb+1);
		//
		x2 = x1;
		x1 = x2 - relbar3;
		GfxFillSolidRect( x1, y1, x2, y2, colorLightBlue );
	}
}
Plot( C, "Price", colorDefault, styleCandle );
_SECTION_END();

1

4 Likes

Fxshrat,
Appreciate your help. You done it great.
I am trying to apply this to ichimoku charts, Many a times,
The leadkumo shade & VAP shade are overlapping eachother. In this scenarios, we can not see volume bars clearly. I am trying to fit it properly. Please see attached example for canbk.

Is it possible to move VAP profile to the extreme right as shown in the nifty chart ( Here I have attached amibroker standard VAP)
so that the space which I get may help in reducing the overlapping.

canbk
Nifty

Wishing you nice weekend.

Last version from me.
Forum is not supposed to be full-blown coding service.
It is expected that forum users should do some own thinking in addition.

As for getting to far right you should simply change from pxchartwidth to pxwidth of Status function.
In addition I've changed to GfxSetZOrder from GfxSetOverlayMode for more flexibility on z-ordering.

_SECTION_BEGIN("A00_ATEST1");
/*
	Author: Anderson Wilson 
		based on PriceVolDistribution demo written by Tomasz Janeczko
		
Volume-by-Price is an indicator that shows the amount of volume for a particular
price range,
The Volume-by-Price bars are horizontal and shown on the left side of the chart
to correspond 
with these price ranges. Bar colors indicate bear/bull volume

Use F12 and SHIFT+F12 to define range

Modifications to 
- plot right hand sided and with percent width 
- loopless finding of max. volume
- Change to GfxSetZOrder
by @fxshrat
https://forum.amibroker.com/t/vpa-plotting-required-from-rightside/13064/8
*/
SetChartOptions(0,chartShowArrows|chartShowDates);

bins = Param("Bins", 100, 3, 100, 1);  // no of line of volume bars
pRecHeight = Param("Rectangle Height", 0.90, 0.10, 1, 0.05);
pcnt_with = Param("Percent width", 20, 1, 100, 1) / 100; 
z_order = Param("Z-order", -1, -5, 5, 1 );

//GfxSetOverlayMode( 1 );
GfxSetZOrder(z_order);

bi = BarIndex();
fvb = BeginValue(bi);
lvb = slvb = EndValue(bi);
is_not_range = fvb == 0 AND lvb == LastValue(bi);

if( is_not_range ) {
	fvb = FirstVisibleValue( bi );
	lvb = LastVisibleValue( bi );
	slvb = Status( "pxwidth" );//Status( "pxchartwidth" )+5;//Status( "lastvisiblebar" );//
	GfxSetCoordsMode( 2 );//GfxSetCoordsMode( 1 );
} else if( fvb > 0 AND lvb == LastValue(bi)) {
	lvb = LastVisibleValue( bi );
	slvb = lvb;
	GfxSetCoordsMode( 1 );
} else
	GfxSetCoordsMode( 1 );
	
fvb = Max( 0, fvb );
lvb = Max( 0, lvb );

BullBearZone = (High - Low) / 3;
bullbar = C > (High - BullBearZone);
bearbar = C < (Low + BullBearZone);

mx = PriceVolDistribution( H, L, V, bins, True, fvb, lvb );
mx1 = PriceVolDistribution( H, L, IIf( bullbar, V, 0 ), bins, True, fvb, lvb );
mx2 = PriceVolDistribution( H, L, IIf( bearbar, V, 0 ), bins, True, fvb, lvb );

bins = MxGetSize( mx, 0 );
bins1 = MxGetSize( mx1, 0 );
bins2 = MxGetSize( mx2, 0 );


if( bins > 1 && bins == bins1 && bins == bins2 ) {

	// find max volume
	mat_sort = MxSortRows(mx, False, 1);				
	MaxVolume = mat_sort[0][1];		
	
	// rectangle height
	RecHeight = (mx[ 1 ][ 0 ] - mx[ 0 ][ 0 ]) / 2 * pRecHeight;
	
	for( i = 0; i < bins; i++ )
	{
		price = mx1[ i ][ 0 ]; // price level
		
		absVolume = mx1[ i ][ 1 ];
		VolAcum = absVolume;
		relvolume = absVolume / MaxVolume;
		//
		if ( is_not_range )
			relbar = relvolume * slvb * pcnt_with;
		else
			relbar = relvolume * (lvb-fvb+1);
		//
		// upper left corner of the rectangle.	
		x1 = slvb-relbar;
		y1 = price + RecHeight;
		// lower right corner of the rectangle.	
		x2 = slvb;
		y2 = price - RecHeight; 

		GfxFillSolidRect( x1, y1, x2, y2, colorGreen );
		
		absVolume = mx2[ i ][ 1 ];
		VolAcum += absVolume;
		relvolume = absVolume / MaxVolume;
		//
		if ( is_not_range )
			relbar2 = relvolume * slvb * pcnt_with;
		else
			relbar2 = relvolume * (lvb-fvb+1);
		//
		x2 = x1;
		x1 = x2 - relbar2;
		GfxFillSolidRect( x1, y1, x2, y2, colorPink );

		absVolume = mx[ i ][ 1 ]; 
		relvolume = (absVolume - VolAcum) / MaxVolume;
		if ( is_not_range )
			relbar3 = relvolume * slvb * pcnt_with;
		else
			relbar3 = relvolume * (lvb-fvb+1);
		//
		x2 = x1;
		x1 = x2 - relbar3;
		GfxFillSolidRect( x1, y1, x2, y2, colorLightBlue );
	}
}
Plot( C, "Price", colorDefault, styleCandle );
_SECTION_END();

1

5 Likes

Dear Fxshrat,
This code works fine
This part of coding is complex for me. I treid, but invain.
Many thanks for helping & giving valuable time.
Good weekend

All codes in this thread work. They just plot differently.

Learning is not just for school, but for life also. It (-> learning) is a process that never ends.


That being said and since I said "last version" in previous post here is very last version (and since I did not like previous quick code). Now it is cleaned up and better readable and using VarSet/Varget for repetitive tasks.

And I added left and right plotting feature within single AFL.

1

_SECTION_BEGIN("VAP (left/right)");
/*
	Authors: Anderson Wilson, Tomasz Janeczko, fxshrat 
		based on PriceVolDistribution demo written by Tomasz Janeczko
		
Volume-by-Price is an indicator that shows the amount of volume for a particular
price range,
The Volume-by-Price bars are horizontal and shown on the left side of the chart
to correspond 
with these price ranges. Bar colors indicate bear/bull volume

Use F12 and SHIFT+F12 to define range

Modifications: 
- plotting right AND left hand sided with percent width 
- loopless finding of max. volume
- Change from GfxSetOverlayMode to GfxSetZOrder
- Change to dynamic variables in loop for cleaner & better readable code  
- Added measure taking care of cases of H == L 
by fxshrat@gmail.com
https://forum.amibroker.com/t/vpa-plotting-required-from-rightside/13064/10
*/
bins = Param("Bins", 100, 3, 100, 1);  // no of line of volume bars
pRecHeight = Param("Rectangle Height", 0.90, 0.10, 1, 0.05);
pcnt_width = Param("Percent Width", 20, 1, 100, 1) / 100; 
z_order = Param("Z-order", -1, -5, 5, 1 );
left_sided = ParamToggle( "Side", "Right|Left", 1);
color1 = ParamColor( "Bull color", colorGreen);
color2 = ParamColor( "Bear color", colorPink);
color3 = ParamColor( "Total Vol. color", colorLightBlue);

bi = BarIndex();
fvb = BeginValue(bi);
lvb = EndValue(bi);
is_lastbi = lvb == LastValue(bi);
is_not_range = fvb == 0 AND is_lastbi;

SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Price", colorDefault, styleCandle );
GfxSetZOrder(z_order);

if ( left_sided ) { // if left sided
	if ( is_not_range ) {
		fvb = FirstVisibleValue( bi );
		lvb = LastVisibleValue( bi );
		x1_0 = Status("pxwidth");
		bar_range = x1_0;
		GfxSetCoordsMode( 2 );	
	} else {
		if ( fvb > 0 AND is_lastbi) 
			lvb = LastVisibleValue( bi );						
		x1_0 = lvb;
		bar_range = lvb-fvb;			
		GfxSetCoordsMode( 1 );		
	}	
} else { // if right sided
	if ( is_not_range ) {
		fvb = FirstVisibleValue( bi );
		lvb = LastVisibleValue( bi );					
	} 	
	x1_0 = fvb;	
	bar_range = lvb-fvb;
	GfxSetCoordsMode( 1 );
}
bar_range *= pcnt_width;
	
fvb = Max(0, fvb);
lvb = Max(0, lvb);

BullBearZone = (High - Low) / 3;
bullbar = C > (High - BullBearZone);
bearbar = C < (Low + BullBearZone);

priceH = IIf(H==L, H+1e-5, H);
mx0 = PriceVolDistribution(priceH, L, V, bins, absolute = True, fvb, lvb);
mx1 = PriceVolDistribution(priceH, L, IIf(bullbar, V, 0), bins, absolute, fvb, lvb);
mx2 = PriceVolDistribution(priceH, L, IIf(bearbar, V, 0), bins, absolute, fvb, lvb);

for ( n = 0; n <= 2; n++ ) {
	mx = VarGet("mx"+n);
	if ( typeof( mx ) == "matrix" )
		VarSet("bins"+n, MxGetSize(mx, 0));
	else
		VarSet("bins"+n, 1);
}

if( bins0 > 1 && bins0 == bins1 && bins0 == bins2 ) {

	// find max volume
	mat_sort = MxSortRows(mx0, False, 1);				
	MaxVolume = mat_sort[0][1];		
	
	// rectangle height
	RecHeight = (mx0[ 1 ][ 0 ] - mx0[ 0 ][ 0 ]) / 2 * pRecHeight;
	
	x2_0 = x1_0;	
	for ( i = 0; i < bins0; i++ ) {
		price = mx0[ i ][ 0 ]; // price level		
		// volumes
		absVolume1 = mx1[ i ][ 1 ];
		absVolume2 = mx2[ i ][ 1 ];
		absVolume3 = mx0[ i ][ 1 ];	
		//
		VolAcum = 0;
		for ( n = 1; n <= 2; n++ )	{
			absVolume = VarGet("absVolume"+n);
			VolAcum += absVolume;
			VarSet("relvolume"+n, absVolume / MaxVolume);						
		}
		relvolume3 = (absVolume3 - VolAcum) / MaxVolume;
		//
		for ( n = 1; n <= 3; n++ )	{
			relvolume = VarGet("relvolume"+n);
			VarSet("relbar" + n, relvolume * bar_range);
		}			
		//
		y1 = price + RecHeight;
		y2 = price - RecHeight; 
		//		
		if ( left_sided ) { // if left sided
			for ( n = 1; n <= 3; n++ ) {
				VarSet( "x2_"+n, VarGet("x1_"+(n-1)));		
				VarSet( "x1_"+n, VarGet("x2_"+n) - VarGet("relbar"+n));
			}
		} else { // if right sided
			for ( n = 1; n <= 3; n++ ) {
				VarSet( "x1_"+n, VarGet("x2_"+(n-1)));		
				VarSet( "x2_"+n, VarGet("x1_"+n) + VarGet("relbar"+n));
			}
		}
		for ( n = 1; n <= 3; n++ )
			GfxFillSolidRect(VarGet("x1_"+n), y1, VarGet("x2_"+n), y2, VarGet("color"+n));
	}
}
_SECTION_END();


16 Likes

i'm not a big user of VAP but the functionality and flexibility of code is certainly impressive :laughing:

1 Like

Hi fxshrat,

I was trying to make the VP for intraday. I was actually trying to break the data per day and I tried using a loop but failed. Below is the code:

NewDay = Day() != Ref(Day(), -1);
bi = BarIndex();

for(start = FirstVisibleValue( bi); start <= LastVisibleValue ( bi); start++)
{

fvb = LastValue(ValueWhen(NewDay, bi, 1));
lvb = LastVisibleValue( bi );

fvb = Max( 0, fvb );
lvb = Max( 0, lvb );
.
.
.

Rest of the code is same but it's not working. I'm just getting the current day VP not for each day. Can you kindly help me out?

Many Thanks.

Hello Members,

Any help on the above question will be very much appreciated. I actually want to create multi-color VP for each day. Many thanks in advance!

Thank you so much, this is Great code