Loading…

Positive Negative Volume Index Pair

PVI and NVI both start from a base value of 100 and are pure recursions. On a bar where volume rose from the prior bar, PVI is updated by adding that bar's own percentage price change; on every other bar it stays exactly flat. NVI does the mirror image: it only updates on a bar where volume fell, and stays flat on the rest. Neither index ever reacts to a bar that fails its own volume condition - this is the actual published mechanism, not a smoothed approximation of it. Fosback's own published interpretation is included here rather than invented: NVI rising is read as accumulation happening on quiet, low volume bars - moves less likely to be driven by crowd participation, and so more likely to reflect informed positioning. PVI rising is read as the crowd following price on the busier, high volume bars. An EMA signal line is plotted against each index (Fosback's own published length was 255 bars) as the reference most of the published interpretation is built around - NVI above its own signal line is the classic Fosback bullish read. Notes and limitations - Non-repainting: both indices are pure backward recursions from bar 0, and each bar's update depends only on already-completed data. - "Volume" is tick volume (the count of price changes per bar) - forex has no exchange volume on either MetaTrader platform, and this is the standard MT4 substitute. Fosback's original research used real traded volume on equities; this is a reasonable analogue, not a literal match. - The indicator recomputes both recursions from bar 0 on every full recalculation (a fresh attach, a history extension). This is computationally cheap even on long history and avoids any drift that an incremental running value could accumulate across a partial recalc. - Equal volume between two consecutive bars leaves both indices flat for that bar, per the published definition.

Indicator · MT4 · v1.0 · Free

About Positive Negative Volume Index Pair

Positive Negative Volume Index Pair is an indicator for MetaTrader 4. It has 2 settings, such as Base value and Signal period. MQL source code included.

Files in the download: PosNegVolumeIndex.mq4, PosNegVolumeIndex.txt.

Settings

SettingDefaultWhat it does
Base value100.0Starting value for both indices, Fosback's published convention
Signal period255EMA period on each index, Fosback's own published signal length

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Volume · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria