doc headers

This commit is contained in:
Miha Kralj
2026-02-27 07:48:12 -08:00
parent 8a1ba95173
commit 4ab3a7fb53
389 changed files with 6682 additions and 468 deletions
+17
View File
@@ -1,5 +1,22 @@
# CHANDELIER: Chandelier Exit
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | `period` (default DefaultPeriod), `multiplier` (default DefaultMultiplier) |
| **Outputs** | Single series (Chandelier) |
| **Output range** | Varies (see docs) |
| **Warmup** | `period + 1` bars |
### TL;DR
- The Chandelier Exit computes ATR-based trailing stop levels that hang from the highest high (for longs) or rise from the lowest low (for shorts) ov...
- Parameterized by `period` (default defaultperiod), `multiplier` (default defaultmultiplier).
- Output range: Varies (see docs).
- Requires `period + 1` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "The exit is more important than the entry. Everyone knows where to get in; getting out alive is the real trick."
The Chandelier Exit computes ATR-based trailing stop levels that hang from the highest high (for longs) or rise from the lowest low (for shorts) over a lookback period. It produces two overlay lines: ExitLong (trailing stop for long positions) and ExitShort (trailing stop for short positions). Developed by Charles Le Beau and popularized by Alexander Elder. Default parameters: period 22, multiplier 3.0.
+17
View File
@@ -1,5 +1,22 @@
# CKSTOP: Chande Kroll Stop
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | `atrPeriod` (default DefaultAtrPeriod), `multiplier` (default DefaultMultiplier), `stopPeriod` (default DefaultStopPeriod) |
| **Outputs** | Single series (Ckstop) |
| **Output range** | Varies (see docs) |
| **Warmup** | `atrPeriod + stopPeriod` bars |
### TL;DR
- The Chande Kroll Stop computes adaptive trailing stop levels using ATR-smoothed volatility envelopes around rolling extremes.
- Parameterized by `atrperiod` (default defaultatrperiod), `multiplier` (default defaultmultiplier), `stopperiod` (default defaultstopperiod).
- Output range: Varies (see docs).
- Requires `atrPeriod + stopPeriod` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "The best stop-loss is the one that knows where volatility ends and trend begins."
The Chande Kroll Stop computes adaptive trailing stop levels using ATR-smoothed volatility envelopes around rolling extremes. It produces two lines: StopLong (support) and StopShort (resistance). When price trades above both stops, the trend is bullish. When below both, bearish. Crossovers between the two stops signal potential reversals.
+17
View File
@@ -1,5 +1,22 @@
# FRACTALS: Williams Fractals
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | None |
| **Outputs** | Single series (FRACTALS) |
| **Output range** | Varies (see docs) |
| **Warmup** | 1 bar |
### TL;DR
- Williams Fractals detect local price extremes using a strict five-bar pattern: an Up Fractal marks a bar whose high exceeds the highs of the two ba...
- No configurable parameters; computation is stateless per bar.
- Output range: Varies (see docs).
- Requires 1 bar of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "Markets leave fingerprints at their turning points. Five bars is all it takes to read them."
Williams Fractals detect local price extremes using a strict five-bar pattern: an Up Fractal marks a bar whose high exceeds the highs of the two bars before and after it; a Down Fractal marks a bar whose low undercuts the lows of the two bars before and after it. No parameters, no smoothing, no lag compensation. The pattern either exists or it does not. Developed by Bill Williams and published in *Trading Chaos* (1995).
@@ -1,6 +1,4 @@
using OoplesFinance.StockIndicators;
using OoplesFinance.StockIndicators.Models;
// PIVOT Validation Tests - Classic Pivot Points (Floor Trader Pivots)
// Self-consistency validation across all API modes.
//
@@ -261,23 +259,4 @@ public sealed class PivotValidationTests
}
}
[Fact(Skip = "Ooples pivot indicators group by calendar day — 500×1-min bars yields ~3 daily pivots. Requires daily OHLCV input; not comparable with intraday GBM data.")]
public void Pivot_MatchesOoples_Structural()
{
var gbm = new GBM(startPrice: 100.0, mu: 0.02, sigma: 0.15, seed: 42);
var bars = gbm.Fetch(500, DateTime.UtcNow.Ticks, TimeSpan.FromMinutes(1));
var ooplesData = bars.Select(b => new TickerData
{
Date = new DateTime(b.Time, DateTimeKind.Utc),
Open = b.Open,
High = b.High,
Low = b.Low,
Close = b.Close,
Volume = b.Volume
}).ToList();
var result = new StockData(ooplesData).CalculateStandardPivotPoints();
var values = result.OutputValues.Values.First();
int finiteCount = values.Count(v => double.IsFinite(v));
Assert.True(finiteCount > 100, $"Expected >100 finite values, got {finiteCount}");
}
}
+17
View File
@@ -1,5 +1,22 @@
# PIVOT: Classic Pivot Points (Floor Trader Pivots)
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | None |
| **Outputs** | Single series (PIVOT) |
| **Output range** | Varies (see docs) |
| **Warmup** | `2` bars |
### TL;DR
- Classic Pivot Points calculate seven horizontal support and resistance levels from the previous bar's high, low, and close.
- No configurable parameters; computation is stateless per bar.
- Output range: Varies (see docs).
- Requires `2` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "The floor traders had it figured out before the quants arrived. Three numbers from yesterday's bar, seven levels for today. No optimization, no curve fitting, no excuses."
Classic Pivot Points calculate seven horizontal support and resistance levels from the previous bar's high, low, and close. The central pivot point (PP) is the arithmetic mean of HLC; three resistance levels (R1-R3) and three support levels (S1-S3) are derived from PP and the prior bar's range. The formula has been in continuous use since the 1930s among floor traders at commodity exchanges. Zero parameters, zero lag, zero ambiguity.
@@ -1,6 +1,4 @@
using OoplesFinance.StockIndicators;
using OoplesFinance.StockIndicators.Models;
// PIVOTCAM Validation Tests - Camarilla Pivot Points
// Self-consistency validation across all API modes.
//
@@ -275,23 +273,4 @@ public sealed class PivotcamValidationTests
}
}
[Fact(Skip = "Ooples pivot indicators group by calendar day — 500×1-min bars yields ~3 daily pivots. Requires daily OHLCV input; not comparable with intraday GBM data.")]
public void Pivotcam_MatchesOoples_Structural()
{
var gbm = new GBM(startPrice: 100.0, mu: 0.02, sigma: 0.15, seed: 42);
var bars = gbm.Fetch(500, DateTime.UtcNow.Ticks, TimeSpan.FromMinutes(1));
var ooplesData = bars.Select(b => new TickerData
{
Date = new DateTime(b.Time, DateTimeKind.Utc),
Open = b.Open,
High = b.High,
Low = b.Low,
Close = b.Close,
Volume = b.Volume
}).ToList();
var result = new StockData(ooplesData).CalculateCamarillaPivotPoints();
var values = result.OutputValues.Values.First();
int finiteCount = values.Count(v => double.IsFinite(v));
Assert.True(finiteCount > 100, $"Expected >100 finite values, got {finiteCount}");
}
}
+17
View File
@@ -1,5 +1,22 @@
# PIVOTCAM: Camarilla Pivot Points
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | None |
| **Outputs** | Single series (PIVOTCAM) |
| **Output range** | Varies (see docs) |
| **Warmup** | `2` bars |
### TL;DR
- Camarilla Pivot Points calculate nine horizontal support and resistance levels from the previous bar's high, low, and close.
- No configurable parameters; computation is stateless per bar.
- Output range: Varies (see docs).
- Requires `2` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "The Camarilla trader does not care where the market opens. The trader cares how far price strays from yesterday's close, and whether it returns."
Camarilla Pivot Points calculate nine horizontal support and resistance levels from the previous bar's high, low, and close. Unlike classic floor trader pivots that radiate from the PP midpoint, Camarilla levels radiate symmetrically from the previous close using fixed fractions of the prior range. The R3/S3 levels serve as the primary mean-reversion zone; breakouts beyond R4/S4 signal trend continuation. Developed by Nick Scott in 1989 using bond market data, the equation was originally distributed as a shareware Excel plugin.
@@ -1,6 +1,4 @@
using OoplesFinance.StockIndicators;
using OoplesFinance.StockIndicators.Models;
// PIVOTDEM Validation Tests - DeMark Pivot Points
// Self-consistency validation across all API modes.
//
@@ -242,23 +240,4 @@ public sealed class PivotdemValidationTests
}
}
[Fact(Skip = "Ooples pivot indicators group by calendar day — 500×1-min bars yields ~3 daily pivots. Requires daily OHLCV input; not comparable with intraday GBM data.")]
public void Pivotdem_MatchesOoples_Structural()
{
var gbm = new GBM(startPrice: 100.0, mu: 0.02, sigma: 0.15, seed: 42);
var bars = gbm.Fetch(500, DateTime.UtcNow.Ticks, TimeSpan.FromMinutes(1));
var ooplesData = bars.Select(b => new TickerData
{
Date = new DateTime(b.Time, DateTimeKind.Utc),
Open = b.Open,
High = b.High,
Low = b.Low,
Close = b.Close,
Volume = b.Volume
}).ToList();
var result = new StockData(ooplesData).CalculateDemarkPivotPoints();
var values = result.OutputValues.Values.First();
int finiteCount = values.Count(v => double.IsFinite(v));
Assert.True(finiteCount > 100, $"Expected >100 finite values, got {finiteCount}");
}
}
+17
View File
@@ -1,5 +1,22 @@
# PIVOTDEM: DeMark Pivot Points
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | None |
| **Outputs** | Single series (PIVOTDEM) |
| **Output range** | Varies (see docs) |
| **Warmup** | `2` bars |
### TL;DR
- DeMark Pivot Points calculate three horizontal support and resistance levels from the previous bar's open, high, low, and close.
- No configurable parameters; computation is stateless per bar.
- Output range: Varies (see docs).
- Requires `2` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "Most pivot formulas treat every bar the same. DeMark looked at the open-close relationship and asked: why would a bearish bar predict the same levels as a bullish one?"
DeMark Pivot Points calculate three horizontal support and resistance levels from the previous bar's open, high, low, and close. The defining characteristic is a conditional intermediate value X that changes its weighting depending on whether the prior bar closed below, above, or equal to its open. Bearish bars weight the low; bullish bars weight the high; doji bars weight the close. Three levels (PP, R1, S1) emerge from this single conditional calculation. The only pivot variant that uses the open price.
+17
View File
@@ -1,5 +1,22 @@
# PIVOTEXT: Extended Traditional Pivot Points
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | None |
| **Outputs** | Single series (PIVOTEXT) |
| **Output range** | Varies (see docs) |
| **Warmup** | `2` bars |
### TL;DR
- Extended Traditional Pivot Points calculate eleven horizontal support and resistance levels from the previous bar's high, low, and close.
- No configurable parameters; computation is stateless per bar.
- Output range: Varies (see docs).
- Requires `2` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "Classic pivots tell you where the crowd expects the market to pause. Extended pivots tell you where the crowd starts to panic."
Extended Traditional Pivot Points calculate eleven horizontal support and resistance levels from the previous bar's high, low, and close. The core levels (PP, R1-R3, S1-S3) are identical to classic floor trader pivots. The extension adds R4/R5 and S4/S5 levels that project further beyond the prior bar's range, covering extreme move scenarios such as gap opens, news-driven spikes, and trend continuation through multiple prior-range increments. The formula is pure arithmetic with zero parameters.
@@ -5,9 +5,6 @@
using System.Runtime.InteropServices;
using OoplesFinance.StockIndicators;
using OoplesFinance.StockIndicators.Models;
namespace QuanTAlib.Tests;
public sealed class PivotfibValidationTests
@@ -249,23 +246,4 @@ public sealed class PivotfibValidationTests
}
}
[Fact(Skip = "Ooples pivot indicators group by calendar day — 500×1-min bars yields ~3 daily pivots. Requires daily OHLCV input; not comparable with intraday GBM data.")]
public void Pivotfib_MatchesOoples_Structural()
{
var gbm = new GBM(startPrice: 100.0, mu: 0.02, sigma: 0.15, seed: 42);
var bars = gbm.Fetch(500, DateTime.UtcNow.Ticks, TimeSpan.FromMinutes(1));
var ooplesData = bars.Select(b => new TickerData
{
Date = new DateTime(b.Time, DateTimeKind.Utc),
Open = b.Open,
High = b.High,
Low = b.Low,
Close = b.Close,
Volume = b.Volume
}).ToList();
var result = new StockData(ooplesData).CalculateFibonacciPivotPoints();
var values = result.OutputValues.Values.First();
int finiteCount = values.Count(v => double.IsFinite(v));
Assert.True(finiteCount > 100, $"Expected >100 finite values, got {finiteCount}");
}
}
+17
View File
@@ -1,5 +1,22 @@
# PIVOTFIB: Fibonacci Pivot Points
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | None |
| **Outputs** | Single series (PIVOTFIB) |
| **Output range** | Varies (see docs) |
| **Warmup** | `2` bars |
### TL;DR
- Fibonacci Pivot Points apply Fibonacci retracement ratios (38.2%, 61.8%, 100%) to the standard pivot point formula.
- No configurable parameters; computation is stateless per bar.
- Output range: Varies (see docs).
- Requires `2` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
## Overview
Fibonacci Pivot Points apply Fibonacci retracement ratios (38.2%, 61.8%, 100%) to the standard pivot point formula. The central pivot (PP) uses the classic HLC/3 calculation, while support and resistance levels are derived by adding or subtracting Fibonacci proportions of the previous bar's trading range.
@@ -5,9 +5,6 @@
using System.Runtime.InteropServices;
using OoplesFinance.StockIndicators;
using OoplesFinance.StockIndicators.Models;
namespace QuanTAlib.Tests;
public sealed class PivotwoodValidationTests
@@ -257,23 +254,4 @@ public sealed class PivotwoodValidationTests
}
}
[Fact(Skip = "Ooples pivot indicators group by calendar day — 500×1-min bars yields ~3 daily pivots. Requires daily OHLCV input; not comparable with intraday GBM data.")]
public void Pivotwood_MatchesOoples_Structural()
{
var gbm = new GBM(startPrice: 100.0, mu: 0.02, sigma: 0.15, seed: 42);
var bars = gbm.Fetch(500, DateTime.UtcNow.Ticks, TimeSpan.FromMinutes(1));
var ooplesData = bars.Select(b => new TickerData
{
Date = new DateTime(b.Time, DateTimeKind.Utc),
Open = b.Open,
High = b.High,
Low = b.Low,
Close = b.Close,
Volume = b.Volume
}).ToList();
var result = new StockData(ooplesData).CalculateWoodiePivotPoints();
var values = result.OutputValues.Values.First();
int finiteCount = values.Count(v => double.IsFinite(v));
Assert.True(finiteCount > 100, $"Expected >100 finite values, got {finiteCount}");
}
}
+17
View File
@@ -1,5 +1,22 @@
# PIVOTWOOD: Woodie's Pivot Points
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | None |
| **Outputs** | Single series (PIVOTWOOD) |
| **Output range** | Varies (see docs) |
| **Warmup** | `2` bars |
### TL;DR
- Woodie's Pivot Points weight the closing price twice in the pivot calculation, biasing the central pivot toward where the market actually settled r...
- No configurable parameters; computation is stateless per bar.
- Output range: Varies (see docs).
- Requires `2` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
## Overview
Woodie's Pivot Points weight the closing price twice in the pivot calculation, biasing the central pivot toward where the market actually settled rather than treating high, low, and close equally. This close-weighted approach gives more emphasis to recent price action, making the pivot levels more responsive to the prior bar's close.
+17
View File
@@ -1,5 +1,22 @@
# PSAR: Parabolic Stop And Reverse
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | `afStart` (default DefaultAfStart), `afIncrement` (default DefaultAfIncrement), `afMax` (default DefaultAfMax) |
| **Outputs** | Single series (Psar) |
| **Output range** | Varies (see docs) |
| **Warmup** | `1` bars |
### TL;DR
- The Parabolic Stop And Reverse (PSAR) is a trend-following overlay indicator created by J.
- Parameterized by `afstart` (default defaultafstart), `afincrement` (default defaultafincrement), `afmax` (default defaultafmax).
- Output range: Varies (see docs).
- Requires `1` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "The trend is your friend until the end when it bends." — Ed Seykota
## Introduction
+17
View File
@@ -1,5 +1,22 @@
# SWINGS: Swing High/Low Detection
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | `lookback` (default DefaultLookback) |
| **Outputs** | Single series (Swings) |
| **Output range** | Varies (see docs) |
| **Warmup** | 1 bar |
### TL;DR
- Swing High/Low detection identifies local price extremes using a configurable lookback window.
- Parameterized by `lookback` (default defaultlookback).
- Output range: Varies (see docs).
- Requires 1 bar of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "The market tells you where it turned. You just have to listen long enough to be sure it actually meant it."
Swing High/Low detection identifies local price extremes using a configurable lookback window. A Swing High marks a bar whose high strictly exceeds the highs of all bars within the lookback window on each side. A Swing Low marks a bar whose low is strictly less than all corresponding lows. The lookback parameter controls sensitivity: larger lookback windows require more confirmation and produce fewer, more significant signals. This generalizes Williams' fixed five-bar Fractals into a flexible structural analysis tool.
+18 -1
View File
@@ -1,5 +1,22 @@
# TTM_SCALPER: TTM Scalper Alert
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Reversal |
| **Inputs** | OHLCV bar (TBar) |
| **Parameters** | `useCloses` (default false) |
| **Outputs** | Single series (TtmScalper) |
| **Output range** | Varies (see docs) |
| **Warmup** | 1 bar |
### TL;DR
- John Carter designed TTM Scalper Alert for quick identification of potential reversal points using a simple three-bar pattern recognition.
- Parameterized by `usecloses` (default false).
- Output range: Varies (see docs).
- Requires 1 bar of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> **Pending Implementation** - Placeholder for John Carter's TTM Scalper Alert indicator
## Historical Context
@@ -92,4 +109,4 @@ O(1) per bar. All state fits in two RingBuffers of size 3. Signal logic is a bra
| Signal comparison | Yes | Vector conditional-select for buy/sell |
| Output array fill | Yes | Branchless signal assignment |
Limited SIMD benefit due to 3-bar window size — setup cost exceeds savings. The comparison/signal phase is SIMD-friendly for batch output.
Limited SIMD benefit due to 3-bar window size — setup cost exceeds savings. The comparison/signal phase is SIMD-friendly for batch output.