python
Date Open high Low close Volume
2006-10-02 75.10 75.870 74.30 74.86 25451400.0
the dataframe is in this format actually when I am pasting it it is getting pasted vertically so only one sample I wrote on own.
below is the obv theory on which code is written
If the closing price is above the prior close price then:
Current OBV = Previous OBV + Current Volume
If the closing price is below the prior close price then:
Current OBV = Previous OBV - Current Volume
If the closing prices equals the prior close price then:
Current OBV = Previous OBV (no change)
Date Open high Low close Volume
2006-10-02 75.10 75.870 74.30 74.86 25451400.0
the dataframe is in this format actually when I am pasting it it is getting pasted vertically so only one sample I wrote on own.
below is the obv theory on which code is written
If the closing price is above the prior close price then:
Current OBV = Previous OBV + Current Volume
If the closing price is below the prior close price then:
Current OBV = Previous OBV - Current Volume
If the closing prices equals the prior close price then:
Current OBV = Previous OBV (no change)