this when the indicator is loaded on FESX future chart, on ES future chart work great. The code of PVP isArray bounds. Wrong index value: -100
Code: Select all
{***********************************************************************************************
Coded by dbntina/boxmeister 8/9/2007
V1.01 8/11/2007 Blowfish changes eliminate scanning array every tick for PVP Volume update
***********************************************************************************************}
[LegacyColorValue = 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");}