StockSharp.Strategies.0075_OBV_Divergence.py
5.0.1
Prefix Reserved
dotnet add package StockSharp.Strategies.0075_OBV_Divergence.py --version 5.0.1
NuGet\Install-Package StockSharp.Strategies.0075_OBV_Divergence.py -Version 5.0.1
<PackageReference Include="StockSharp.Strategies.0075_OBV_Divergence.py" Version="5.0.1" />
<PackageVersion Include="StockSharp.Strategies.0075_OBV_Divergence.py" Version="5.0.1" />
<PackageReference Include="StockSharp.Strategies.0075_OBV_Divergence.py" />
paket add StockSharp.Strategies.0075_OBV_Divergence.py --version 5.0.1
#r "nuget: StockSharp.Strategies.0075_OBV_Divergence.py, 5.0.1"
#:package StockSharp.Strategies.0075_OBV_Divergence.py@5.0.1
#addin nuget:?package=StockSharp.Strategies.0075_OBV_Divergence.py&version=5.0.1
#tool nuget:?package=StockSharp.Strategies.0075_OBV_Divergence.py&version=5.0.1
OBV Divergence Strategy (Python Version)
On-Balance Volume tracks cumulative trading volume with the idea that volume precedes price. When price forms a new high but OBV fails to confirm—or vice versa—a reversal may be brewing. This strategy uses that divergence to fade unsustainable moves.
Testing indicates an average annual return of about 112%. It performs best in the forex market.
For each candle OBV is updated and compared with the prior reading. A bullish signal emerges if price makes a lower low while OBV prints a higher low. A bearish signal occurs when price rallies to a higher high but OBV lags. A moving average provides an exit point, while a percentage stop keeps losses controlled.
The approach attempts to capture mean reversion following volume exhaustion and often holds trades only until price crosses back over the average line.
Details
- Entry Criteria: Price/OBV divergence.
- Long/Short: Both.
- Exit Criteria: Price crossing moving average or stop-loss.
- Stops: Yes, percentage based.
- Default Values:
DivergencePeriod
= 5MAPeriod
= 20CandleType
= 5 minuteStopLossPercent
= 2
- Filters:
- Category: Divergence
- Direction: Both
- Indicators: OBV, MA
- Stops: Yes
- Complexity: Intermediate
- Timeframe: Intraday
- Seasonality: No
- Neural networks: No
- Divergence: Yes
- Risk level: Medium
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Move state reset to OnReseted for strategies 71-80