The talib.OBV()
function is used to calculate On Balance Volume (energy tide).
The return value of the talib.OBV()
function is a one-dimensional array.
array
talib.OBV(inReal) talib.OBV(inReal, inPriceV)
The inReal
parameter is used to specify the K-line data.
inReal
true
{@struct/Record Record} structure arrays, numeric arrays
The inPriceV
parameter is used to specify the K-line data.
inPriceV
false
{@struct/Record Record} structure array
function main() {
var records = exchange.GetRecords()
var ret = talib.OBV(records, records)
Log(ret)
}
import talib
def main():
records = exchange.GetRecords()
ret = talib.OBV(records.Close, records.Volume)
Log(ret)
void main() {
auto records = exchange.GetRecords();
auto ret = talib.OBV(records);
Log(ret);
}
The OBV()
function is described in the talib library documentation as: OBV(Records[Close],Records[Volume]) = Array(outReal)