ATR-Weighted OBV EMA Crossover Strategy with Percentage Stops
Summary
This strategy builds a modified On-Balance Volume series by weighting signed volume with volume relative to ATR. It then calculates a fast and a slow exponential moving average of that series, using their crossover and crossunder as long and short signals. The strategy is configured to trade within a selectable date range and sizes positions as a percentage of equity. Its stop loss is set as a percentage of average position price, with the described default at 3%; a very distant take-profit input is calculated, but the shown exit orders use stop levels.
The script also tracks signal direction and plots the two averages and position state for visual reference. The document supplies no backtest results, and its strategy settings assume zero commission, so the code alone cannot establish real-world performance. The ATR-weighted volume formula, market-specific volume data, and execution assumptions may materially affect signals and outcomes.
Key ideas
- Long and short signals occur when the faster OBV EMA crosses the slower EMA.
- The OBV calculation weights signed volume using volume relative to ATR.
- The strategy can restrict entries to a configurable start and end date.
- A percentage stop is applied based on the average position price.
- The document reports no performance results and configures the strategy with zero commission.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.