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