I had a question about the attached indicator - ( see the code below) . The PVP indicator gives you the closing price for the highest / Maximum volume bar on any given day / session.
Is there a way to adjust this indicator to get the closing price for the bar that is 20 bars before / ahead of the highest / Maximum volume bar on any given day / session? Thanks for your feedback..
double MaxVolume = 0;
double MaxPrice = 0.0;
for (int x = 0; x <= Bars.BarsSinceSession; x++)
{
if (Volume[x] > MaxVolume)
{
MaxVolume = Volume[x];
MaxPrice = Close[x];
}
}
PVPLine.Set(MaxPrice);
Comment