You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Always present, even for parameter-free indicators:
119
119
120
120
```markdown
121
-
### Historical quotes requirements
121
+
### Historical price bars requirements
122
122
123
-
You must have at least `N` periods of `quotes` to cover the warmup periods.
123
+
You must have at least `N` periods of `bars` to cover the warmup periods.
124
124
125
-
`quotes` is a collection of generic `TQuote` historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See [the Guide](/guide/getting-started#historical-quotes) for more information.
125
+
`bars` is a collection of generic `TBar` historical price bars. It should have a consistent frequency (day, hour, minute, etc). See [the Guide](/guide/getting-started#historical-bars) for more information.
126
126
```
127
127
128
128
- Express the minimum in terms of formula variables (e.g., `N`, `2×(S+P)`, `S+P+100`)
@@ -137,8 +137,8 @@ You must have at least `N` periods of `quotes` to cover the warmup periods.
137
137
IReadOnlyList<{Indicator}Result>
138
138
```
139
139
140
-
- This method returns a time series of all available indicator values for the `quotes` provided.
141
-
- It always returns the same number of elements as there are in the historical quotes.
140
+
- This method returns a time series of all available indicator values for the `bars` provided.
141
+
- It always returns the same number of elements as there are in the historical price bars.
142
142
- It does not return a single incremental indicator value.
143
143
- The first `N-1` periods will have `null` values since there's not enough data to calculate.
144
144
````
@@ -164,7 +164,7 @@ Adjust the period count and percentage to match the indicator's actual convergen
164
164
165
165
| property | type | description |
166
166
| -------- | ---- | ----------- |
167
-
|`Timestamp`| DateTime | Date from evaluated `TQuote`|
167
+
|`Timestamp`| DateTime | Date from evaluated `TBar`|
168
168
|`PropertyName`| double | What this value represents |
169
169
```
170
170
@@ -196,7 +196,7 @@ This indicator may be generated from any chain-enabled indicator or method.
196
196
197
197
```csharp
198
198
// example
199
-
varresults=quotes
199
+
varresults=bars
200
200
.Use(CandlePart.HL2)
201
201
.To{Indicator}(..);
202
202
```
@@ -205,15 +205,15 @@ Results can be further processed on `{PrimaryValue}` with additional chain-enabl
205
205
206
206
```csharp
207
207
// example
208
-
varresults=quotes
208
+
varresults=bars
209
209
.To{Indicator}(..)
210
210
.ToRsi(..);
211
211
```
212
212
````
213
213
214
214
Variations:
215
215
216
-
- When the indicator can only read from `quotes` (not chains), replace the first block with: `This indicator must be generated from \`quotes\` and **cannot** be generated from results of another chain-enabled indicator or method.`
216
+
- When the indicator can only read from `bars` (not chains), replace the first block with: `This indicator must be generated from \`bars\` and **cannot** be generated from results of another chain-enabled indicator or method.`
217
217
- When the indicator can only output to chains (not read from them), describe that instead
218
218
- When chaining outputs to a specific property, note which property is the chainable value (e.g., "Note: \`TenkanSen\` is the primary reusable value for chaining purposes.")
219
219
@@ -233,31 +233,31 @@ Use the buffer-style `List<T>` when you need incremental calculations without a
When the hub subscribes to an upstream chain-enabled hub (not a `QuoteHub`), adjust the hub variable type and creation accordingly.
260
+
When the hub subscribes to an upstream chain-enabled hub (not a `BarHub`), adjust the hub variable type and creation accordingly.
261
261
262
262
End the section with a cross-reference to the usage guides:
263
263
@@ -279,7 +279,7 @@ Use the Series (batch) implementation with periodic recalculation instead.
279
279
280
280
Standard reasons by category:
281
281
282
-
-**Dual-series indicators** (Beta, Correlation, Prs): "This indicator requires a second synchronized quote series, which cannot be expressed in the single-series streaming model."
282
+
-**Dual-series indicators** (Beta, Correlation, Prs): "This indicator requires a second synchronized bar series, which cannot be expressed in the single-series streaming model."
283
283
-**Lookahead/repaint indicators** (ZigZag): "This indicator requires lookahead to confirm reversal points; output repaints as new data arrives, making incremental results undefined."
284
284
-**Full-dataset algorithms** (StdDevChannels): "This indicator recalculates the entire dataset on each new data point, making incremental streaming impractical."
285
285
@@ -311,10 +311,10 @@ When an indicator has multiple overloads worth showing upfront (e.g., Ichimoku),
Copy file name to clipboardExpand all lines: .agents/skills/indicator-buffer/SKILL.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: indicator-buffer
3
-
description: Implement BufferList incremental indicators with efficient state management. Use for IIncrementFromChain or IIncrementFromQuote implementations. Covers interface selection, constructor patterns, and BufferListTestBase testing requirements.
3
+
description: Implement BufferList incremental indicators with efficient state management. Use for IIncrementFromChain or IIncrementFromBar implementations. Covers interface selection, constructor patterns, and BufferListTestBase testing requirements.
4
4
---
5
5
6
6
# BufferList indicator development
@@ -10,7 +10,7 @@ description: Implement BufferList incremental indicators with efficient state ma
Copy file name to clipboardExpand all lines: .agents/skills/indicator-stream/SKILL.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
name: indicator-stream
3
-
description: Implement StreamHub real-time indicators with O(1) performance. Use for ChainHub or QuoteProvider implementations. Covers provider selection, RollbackState patterns, performance anti-patterns, and comprehensive testing with StreamHubTestBase.
3
+
description: Implement StreamHub real-time indicators with O(1) performance. Use for ChainHub or BarProvider implementations. Covers provider selection, RollbackState patterns, performance anti-patterns, and comprehensive testing with StreamHubTestBase.
4
4
---
5
5
6
6
# StreamHub indicator development
@@ -10,18 +10,18 @@ description: Implement StreamHub real-time indicators with O(1) performance. Use
10
10
| Provider Base | Input | Output | Use Case |
11
11
| ------------- | ----- | ------ | -------- |
12
12
|`ChainHub<IReusable, TResult>`| Single value | IReusable | Chainable indicators |
|`BarProvider<TIn, TOut>` (self-rooted) | None | TOut | Source hubs with no upstream — bootstrap with an inert sentinel provider |
16
16
|`StreamHub<TProviderResult, TResult>`| Any hub result | Any result | Compound hubs (internal hub dependency) |
17
17
18
18
Self-rooted source hubs (those that originate a stream rather than transform another hub's output) take an inert sentinel provider so the base-class constructor has something to subscribe to; the sentinel rejects subscriptions and carries no cache.
19
19
20
20
## Aggregator / quantizer hubs
21
21
22
-
Hubs that bucket small bars (or raw ticks) into larger time periods derive from `QuoteProvider<TIn, IQuote>`. Conventions:
22
+
Hubs that bucket small bars (or raw ticks) into larger time periods derive from `BarProvider<TIn, IBar>`. Conventions:
23
23
24
-
- Constructors accept a `PeriodSize` enum **and** a custom `TimeSpan` overload; the enum overload throws for month-or-longer periods (use `TimeSpan` instead) since calendar arithmetic is not a fixed `TimeSpan`.
24
+
- Constructors accept a `BarInterval` enum **and** a custom `TimeSpan` overload; the enum overload throws for month-or-longer periods (use `TimeSpan` instead) since calendar arithmetic is not a fixed `TimeSpan`.
25
25
- Take an optional `fillGaps` flag. Default `false` (silent buckets are simply omitted from the output stream); `true` synthesizes zero-volume bars whose `Open`/`High`/`Low`/`Close` all carry forward the prior bar's close through the silent period.
26
26
- Round the input timestamp down to the current bucket on every `OnAdd`, then either update the current bar in place or emit a new bucket.
27
27
- Override `Rebuild(DateTime)` to align the requested rebuild timestamp to the bucket boundary before delegating to base — an upstream rebuild whose timestamp is mid-bucket must clear the in-cache partial bar, not duplicate it.
@@ -40,7 +40,7 @@ Use the project's performance-analysis document as the source of truth for measu
The "framework floor" is the per-tick overhead inherent to the observer pattern, cache management, and read-only collection wrappers. Simple stateless indicators routinely measure 6–11x against Series while still achieving tens of thousands of quotes per second; this is acceptable. Optimization effort should target indicator-specific algorithmic issues, not the framework floor.
43
+
The "framework floor" is the per-tick overhead inherent to the observer pattern, cache management, and read-only collection wrappers. Simple stateless indicators routinely measure 6–11x against Series while still achieving tens of thousands of bars per second; this is acceptable. Optimization effort should target indicator-specific algorithmic issues, not the framework floor.
44
44
45
45
Forbid O(n²) recalculation — rebuild entire history on each tick:
46
46
@@ -91,14 +91,14 @@ Replay up to `restoreIndex` (inclusive). The item at the rollback timestamp is r
91
91
- Inherit `StreamHubTestBase`
92
92
- Abstract method (compile error if missing): `ToStringOverride_ReturnsExpectedName()`
0 commit comments