Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

IncOBVOnArray - MetaTrader 5 Library | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

IncOBVOnArray - library for MetaTrader 5

COBVOnArray class is used to calculate OBV (on balance volume) on the indicator buffer.

This initialize() method with optional parameters is called the OnInit() function:

This solve() function calls the OnCalculate() method with the following parameters:

Additional methods:

The Test_OBVOnArray.mq5 file is an indicator of how to use the COBVOnArray class. The IncOBVOnArray file must be located in the MQL5\Include\IncOnArray directory of the terminal data folder (the IncOnArray folder must be created).

The On Balance Volume technical indicator (OBV) is a momentum technical indicator that links volume to price changes. The indicator proposed by Joseph Granville is very simple. If the closing price of the current bar is higher than the closing price of the previous bar, the volume of the current bar is added to the previous OBV. If the closing price of the current bar is lower than the closing price of the previous bar, the volume of the closing price of the current bar lower than the closing price of the previous bar is subtracted from the previous OBV.

IncOBVOnArray - library for MetaTrader 5


Attachment download

📎 incobvonarray.mqh (4.26 KB)

📎 test_obvonarray.mq5 (2.54 KB)

Source: MQL5 #672

Verification code Refresh