mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-16 09:38:05 +00:00
doc headers
This commit is contained in:
@@ -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}");
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user