# VPOC problem !!!

Questions about MultiCharts and user contributed studies.
aczk
Posts: 67
Joined: 08 Feb 2012
Has thanked: 8 times
Been thanked: 1 time

### VPOC problem !!!

Hi
I found two VPOC indicators, but they don't plot the same. Can someone help to determine which one is correct or whether they are just have different parameters??? Below the two codes and a picture attached.

thx & appreciate any help on this!

Here to first...

Code: Select all

`Input:   Style(3), POClineColor(white),   ColorPOC(yellow), ATRlength(10),   ShowPOCs(True),    MPDate(currentdate);Var:TodaysPOCTL(0),back(0),InputStyle(0),UpperLimit(300),PtrOffset(0),PricePlot(0),HighestToday(0),Flag(0),Ptr(0),POC(0),POCptr(0),POCValue(0),   Adjust(0);   If Style>0 and Style<1 then InputStyle=Style else InputStyle=3;Array:   MP[301](0);If date<>date[1] then begin   If TodaysPOCTL<>0 then value8=TL_delete(TodaysPOCTL);   TodaysPOCTL=0;   For value1 = 0 to UpperLimit-1 begin      MP[value1]=0;      End;   value4=open;   If value4*2<>intportion(value4*2) then value4=value4+.25;   PtrOffset=value4-(UpperLimit/4);   HighestToday=0;end;Value3=low;If value3*2<>intportion(value3*2) then value3=value3+.25;While value3>=low and value3<=high begin   Value2=intportion((Value3-PtrOffset)*2);      If value2>0 and value2<UpperLimit then begin      MP[Value2]=MP[Value2]+1;      {Show MP if required}      If MPDate=date or MPDate=0 then begin            end;      If MP[Value2]>HighestToday then BEgin         HighestToday=MP[Value2];         POCValue=value3;       end;   end;      value3=value3+0.5;end; If time=sess1EndTime and date<> currentdate  then begin      If ( date=JulianToDate(DateToJulian(currentdate)-1)) or ((dayofweek(currentdate)=Monday and date=JulianToDate(DateToJulian(currentdate)-3)) )       then TL_SetStyle(value8, 1) else value7=TL_SetStyle(value8, InputStyle);plot12(pocvalue);end;`

...and second one ...

Code: Select all

`[LegacyColorValue = true];   Input:   WeeklyPOC_on (true),ExtraPlot (true);   vars:      PriceDiff(0),      StartPrice(0),      PVPPrice(0),      PVPVolume(0),      V2VolLevel(0),      Class("PVP"),      InfoMap(MapSN.New);   Array:      PVPVolArray[3000] (0);         if date > date[1] then begin      StartPrice = AvgPrice;      For Value1 = 0 to 3000 Begin         PVPVolArray[Value1] = 0;      End;      PVPVolArray[1500] = Volume;      PVPPrice = AvgPrice;      PVPVolume = Volume;   end;   If date = date[1] And StartPrice > 0 Then Begin      Value2 = AvgPrice - StartPrice;      V2VolLevel = 1500+(Value2*(1/(minmove/pricescale)));      PVPVolArray[V2VolLevel] = PVPVolArray[V2VolLevel] + Volume;      {PVPVolume = 0;      PVPPrice = 0;      For Value1 = 0 to 3000 Begin         If PVPVolArray[Value1] > PVPVolume Then Begin            PVPVolume = PVPVolArray[Value1];            PriceDiff = 1500-Value1;            PVPPrice = StartPrice - (PriceDiff*(minmove/pricescale));         End         Else Begin            PVPVolume = PVPVolume;            PVPPrice = PVPPrice;         End;      End;}      If PVPVolArray[V2VolLevel] > PVPVolume Then Begin         PVPVolume = PVPVolArray[V2VolLevel];         PriceDiff = 1500-V2VolLevel;         PVPPrice = StartPrice - (PriceDiff*(minmove/pricescale));      End;   End;   Value1 = MapSN.Put(InfoMap, "PVP", PVPPrice);   Value1 = ADE.PutBarInfo(Class, GetSymbolName, ADE.TypeZeroInterval(11,1), ADE.BarID, InfoMap);   Plot1(PVPPrice, "PVP");   {Plot2(PVPVolume, "PVPVolume");}      if ExtraPlot = true then begin   Plot3(PVPPrice, "PVP");      end;      `
Attachments
VPOC difference.jpg (213.04 KiB) Viewed 246 times

TJ
Posts: 6873
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 984 times
Been thanked: 1976 times

### Re: VPOC problem !!!

aczk wrote:Hi
I found two VPOC indicators, but they don't plot the same. Can someone help to determine which one is correct or whether they are just have different parameters??? Below the two codes and a picture attached.

thx & appreciate any help on this!

Here to first...
...

Do you have a definition of VPOC that you believe is the correct formula?
We can then check it against the code you have posted above.

ABC
Posts: 563
Joined: 16 Dec 2006
Has thanked: 116 times
Been thanked: 316 times
Contact:

### Re: VPOC problem !!!

aczk,

as TJ has mentioned, you need to define what you are looking for.
From the code it appears to me that neither of those indicators is calculating the VPOC (like I would define it!) correctly on intraday charts.

Regards,

ABC
These users thanked the author ABC for the post:
TJ