Accumulation Distribution
AD measures the cumulative flow of money into and out of a financial instrument.
Role in the strategy
| Slot | Available | Role |
|---|---|---|
| Entry Point | No | — |
| Entry Rule | Yes | Filters entries by the AD direction. |
| Exit Point | No | — |
| Exit Rule | Yes | Triggers exits by the AD direction. |
The Accumulation Distribution produces conditions, not order prices. As an entry rule it is ANDed with the entry point and the other entry rules; as an exit rule it is ORed with the other exit rules. See Indicators for the slot semantics.
Logic rules
The AD has no level parameter; its rules use the direction of the line against the fixed 0 / 0 level pair:
| Rule | Long signal is 1 when | Short signal is 1 when |
|---|---|---|
| AD rises | AD rose on the previous bar | AD fell on the previous bar |
| AD falls | AD fell on the previous bar | AD rose on the previous bar |
| AD changes its direction upward | AD formed a valley (down then up) | AD formed a peak (up then down) |
| AD changes its direction downward | AD formed a peak (up then down) | AD formed a valley (down then up) |
Parameters
None.
Calculation
tech.AD in engine/indicator-engine/tech.ts computes the cumulative line: each bar adds or subtracts volume weighted by where the close sits inside the bar's range ((2 × Close − High − Low) / (High − Low)). The line is drawn in a separate chart pane. The indicator needs volume data.
Backtesting
- The rule is evaluated on the previous (closed) bar with the standard dead zone (
SIGMA = 0.000001). - The indicator contributes only long/short signal arrays — it never changes the entry or exit order price.
- An entry happens only when the entry point allows the direction and every entry rule passes; an exit happens when the exit point is reached and any exit rule passes.