New free code from MQL5: indicators, EAs, and scripts for traders.

On Balance Volume indicator
Calculation:
Unique stair-step trend trading with the Stairsteps Expert Advisor. Innovative approach for consistent results. Learn more.
If the current close price is higher than the previous one, then:
OBV (i) = OBV (i - 1) + VOLUME (i)
If the current close price is lower than the previous one, then:
OBV (i) = OBV (i - 1) - VOLUME (i)
If the current close price is equal to the previous one, then:
OBV (i) = OBV (i - 1)
where:
- OBV (i) - value of the On Balance Volume indicator of the current period;
- OBV (i - 1) - value of the On Balance Volume indicator of the previous period;
- VOLUME (i) - volume of the current bar.
Thanks for reading. Discover premium MetaTrader solutions at RobotFX.
41