Simple Coding Help - No Promise.

XRAY27

Well-Known Member
I want 3 lines marking VAH VAL and VOLPOC in the below code

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

PlotVAPOverlay( Param("Lines", 200, 1, 5000000000, 1 ), Param("Width", 10, 1, 1000000000, 1 ), ParamColor("Color", colorGold ), ParamToggle("Side", "Left|Right",1) | 2 * ParamToggle("Style", "Fill|Lines", 1) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
 
I want 3 lines marking VAH VAL and VOLPOC in the below code

Hi

For calculating the PoC and VAH/VAL we have to use similar code by Milind/Kaka/Rajendran's that is posted on your thread.

Code:
PlotVAPOverlay( Param("Lines", 200, 1, 5000000000, 1 ), Param("Width", 10, 1, 1000000000, 1 ), ParamColor("Color", colorGold ), ParamToggle("Side", "Left|Right",1) | 2 * ParamToggle("Style", "Fill|Lines", 1) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
The above code plots the volume profile for all the visible bars in a chart instead you can use the following for Daily VP on intraday charts

Code:
_SECTION_BEGIN("VAP"); 
segments = IIf( Interval() < inDaily, Day(), Month() ); 
segments = segments != Ref( segments , -1 ); 
PlotVAPOverlayA( segments , Param("Lines", 200, 100, 1000, 1 ), Param("Width", 70, 1, 100, 1 ), ParamColor("Color", colorGold ), ParamToggle("Side", "Right|Left" ) | 2 * ParamToggle("Style", "Fill|Lines", 0) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
_SECTION_END();

Thanks


Happy :)
 

XRAY27

Well-Known Member
Hi

For calculating the PoC and VAH/VAL we have to use similar code by Milind/Kaka/Rajendran's that is posted on your thread.

Code:
PlotVAPOverlay( Param("Lines", 200, 1, 5000000000, 1 ), Param("Width", 10, 1, 1000000000, 1 ), ParamColor("Color", colorGold ), ParamToggle("Side", "Left|Right",1) | 2 * ParamToggle("Style", "Fill|Lines", 1) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
The above code plots the volume profile for all the visible bars in a chart instead you can use the following for Daily VP on intraday charts

Code:
_SECTION_BEGIN("VAP"); 
segments = IIf( Interval() < inDaily, Day(), Month() ); 
segments = segments != Ref( segments , -1 ); 
PlotVAPOverlayA( segments , Param("Lines", 200, 100, 1000, 1 ), Param("Width", 70, 1, 100, 1 ), ParamColor("Color", colorGold ), ParamToggle("Side", "Right|Left" ) | 2 * ParamToggle("Style", "Fill|Lines", 0) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
_SECTION_END();

Thanks


Happy :)
This is same code as you call volume at multi in amibroker basic charts

yes afl i'm using in the thread of kaka /modified my rajendran do plot vp

Daily/weekly/monthly only problem is chart will crash in case of more days !!!

if with in the above code lines marking POC and VAH AND VAL are there (EOD) it will be of great help !!
 
Last edited:
need help seniors and experts (happy singh ji and other experts) i need buy/ sell signals when red line cross blue line on price charts
Code:
Buy  = ExRem(Buy,Sell);		Short = ExRem(Short,Cover);
Sell = ExRem(Sell,Buy);		Cover = ExRem(Cover,Short);
PlotShapes(Buy *1+Short*2,colorWhite,0,IIf(Buy,L,H),-24);
PlotShapes(Sell*4+Cover*3,colorWhite,0,IIf(Cover,L,H),-24);
Add the above code to get Buy/Short/Sell/cover Arrows plotted


Happy :)
 
Hello ji. Can any one have option greeks afl or can anyone help for this. Searched all google but dont find anything for real time greeks along with historical chart. If sirji you guys will make it it will be of great help to many to deal with options greek. Thanz in advance. Hopefully get help.
 
This is same code as you call volume at multi in amibroker basic charts

yes afl i'm using in the thread of kaka /modified my rajendran do plot vp

Daily/weekly/monthly only problem is chart will crash in case of more days !!!

if with in the above code lines marking POC and VAH AND VAL are there it will be of great help !!
For calculating PoC we need to determine the Price at which maximum Volume was traded (or max nos of TPOs are printed) and for that similar looping structure has to be used, which has limitations as you have experienced it will not be able to draw multiple Profiles on single chart. The Amibroker sample code that I have copied above will give you multiple daily profiles on single chart without crashing but value areas and PoC have to be approximated.

But think about it, doing it manually gives us an advantage of taking into consideration confluence with few other S/R levels on the charts like Swing Pivots (PL/PHs) or floor/camarilla pivots, BRNs etc, sideways PA zones, gaps etc.

The more the confluence the better will be the level / band


Happy :)
 

XRAY27

Well-Known Member
For calculating PoC we need to determine the Price at which maximum Volume was traded (or max nos of TPOs are printed) and for that similar looping structure has to be used, which has limitations as you have experienced it will not be able to draw multiple Profiles on single chart. The Amibroker sample code that I have copied above will give you multiple daily profiles on single chart without crashing but value areas and PoC have to be approximated.

But think about it, doing it manually gives us an advantage of taking into consideration confluence with few other S/R levels on the charts like Swing Pivots (PL/PHs) or floor/camarilla pivots, BRNs etc, sideways PA zones, gaps etc.

The more the confluence the better will be the level / band



Happy :)
Thanks a lot Happy Bro !!! :thumb::thumb:
 
Thanks a lot Happy Bro !!! :thumb::thumb:
Try this code with small modification on sample code adds variable for Hourly/Daily/Weekly/Monthly Profile


Code:
_SECTION_BEGIN("VAP"); 
VPTF = ParamList("VP Timeframe","Hourly|Daily|Weekly|Monthly",1);
     if (VPTF == "Monthly") segments = Month() != Ref(Month(),-1);
else if (VPTF == "Daily")   segments =  Day() !=  Ref(Day(),  -1);
else if (VPTF == "Hourly")  segments = Hour() !=  Ref(Hour(), -1);
else  segments = (DayOfWeek()== 1 AND Ref(DayOfWeek(),-1) != 1); 
PlotVAPOverlayA( segments , Param("Lines", 200, 100, 1000, 1 ), Param("Width", 70, 1, 100, 1 ), ParamColor("Color", colorGold ), ParamToggle("Side", "Right|Left" ) | 2 * ParamToggle("Style", "Fill|Lines", 0) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
_SECTION_END();
The weekly option has a small bug, will not plot VP for that week if Monday is a trading holiday, but other wise useful

Happy :)
 

Similar threads