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
Copy file name to clipboardExpand all lines: docs/_indicators/Renko.md
+44-47Lines changed: 44 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,19 +38,6 @@ You must have at least two periods of `quotes` to cover the warmup periods; howe
38
38
39
39
**`EndType.HighLow`** - Brick change threshold measured from `High` and `Low` price
40
40
41
-
## Chaining
42
-
43
-
Results are based in `IQuote` and can be further used in any indicator.
44
-
45
-
```csharp
46
-
// example
47
-
varresults=quotes
48
-
.ToRenko(..)
49
-
.ToRsi(..);
50
-
```
51
-
52
-
This indicator must be generated from `quotes` and **cannot** be generated from results of another chain-enabled indicator or method.
53
-
54
41
## Response
55
42
56
43
```csharp
@@ -90,43 +77,23 @@ Each result record represents one Renko brick.
90
77
91
78
See [Utilities and helpers]({{site.baseurl}}/utilities#utilities-for-indicator-results) for more information.
92
79
93
-
## ATR Variant
94
-
95
-
```csharp
96
-
// C# usage syntax
97
-
IReadOnlyList<RenkoResult>results=
98
-
quotes.ToRenkoAtr(atrPeriods, endType);
99
-
```
100
-
101
-
### Parameters for ATR
102
-
103
-
**`atrPeriod`**_`int`_ - Number of lookback periods (`A`) for ATR evaluation. Must be greater than 0.
104
-
105
-
**`endType`**_`EndType`_ - See options below. Default is `EndType.Close`
106
-
107
-
#### Historical quotes requirements for ATR
108
-
109
-
You must have at least `A+100` periods of `quotes`.
110
-
111
-
`quotes` is a collection of generic `TQuote` historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See [the Guide]({{site.baseurl}}/guide/#historical-quotes) for more information.
80
+
## Chaining
112
81
113
-
## Response for ATR
82
+
Results are based in `IQuote` and can be further used in any indicator.
114
83
115
84
```csharp
116
-
IReadOnlyList<RenkoResult>
85
+
// example
86
+
varresults=quotes
87
+
.ToRenko(..)
88
+
.ToRsi(..);
117
89
```
118
90
119
-
- This method returns a time series of all available indicator values for the `quotes` provided.
120
-
- It does not return a single incremental indicator value.
121
-
122
-
## Streaming and real-time usage for ATR variant
123
-
124
-
**⚠️ Streaming not supported for ATR variant**: The `ToRenkoAtr()` method requires calculating ATR across the full dataset to determine the final brick size. Incremental streaming (StreamHub) or buffer (BufferList) implementations would require buffering all historical quotes and recalculating the entire Renko series on each new data point, which defeats the purpose of incremental processing.
125
-
126
-
**Recommendation**: Use the Series implementation (`ToRenkoAtr()`) with periodic batch recalculation. For real-time scenarios with dynamic brick sizing, consider recalculating at appropriate intervals rather than on every tick. Alternatively, use the fixed brick size variant (`ToRenko()`) which fully supports streaming and buffering (see below).
91
+
This indicator must be generated from `quotes` and **cannot** be generated from results of another chain-enabled indicator or method.
127
92
128
93
## Streaming
129
94
95
+
**Fixed brick size only** - Streaming implementations are only available for fixed brick size Renko. The [ATR variant](#atr-variant) requires full dataset processing and does not support incremental streaming.
96
+
130
97
Subscribe to a `QuoteHub` for streaming scenarios:
@@ -156,8 +121,40 @@ foreach (Quote quote in quotes) // simulating incremental data
156
121
IReadOnlyList<RenkoResult>results=buffer;
157
122
```
158
123
159
-
The buffering approach is ideal for growing datasets where quotes arrive incrementally over time.
124
+
## ATR Variant
125
+
126
+
```csharp
127
+
// C# usage syntax
128
+
IReadOnlyList<RenkoResult>results=
129
+
quotes.ToRenkoAtr(atrPeriods, endType);
130
+
```
131
+
132
+
### Parameters for ATR
133
+
134
+
**`atrPeriod`**_`int`_ - Number of lookback periods (`A`) for ATR evaluation. Must be greater than 0.
135
+
136
+
**`endType`**_`EndType`_ - See options below. Default is `EndType.Close`
137
+
138
+
#### Historical quotes requirements for ATR
139
+
140
+
You must have at least `A+100` periods of `quotes`.
141
+
142
+
`quotes` is a collection of generic `TQuote` historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See [the Guide]({{site.baseurl}}/guide/#historical-quotes) for more information.
143
+
144
+
### Response for ATR
145
+
146
+
```csharp
147
+
IReadOnlyList<RenkoResult>
148
+
```
149
+
150
+
- This method returns a time series of all available indicator values for the `quotes` provided.
151
+
- It does not return a single incremental indicator value.
152
+
- See [RenkoResult](#renkoresult) above for detailed response structure.
160
153
161
-
> 🚩**Warning**: Unlike most indicators in this library, this indicator DOES NOT return the same number of elements as there are in the historical quotes. Renko bricks are added to the results once the `brickSize` change is achieved. For example, if it takes 3 days for a $2.50 price change to occur an entry is made on the third day while the first two are skipped. If a period change occurs at multiples of `brickSize`, multiple bricks are drawn with the same `Timestamp`. See [online documentation](https://www.investopedia.com/terms/r/renkochart.asp) for more information.
162
-
>
163
154
> 👉**Repaint warning**: When using the `ToRenkoAtr()` variant, the last [Average True Range (ATR)]({{site.baseurl}}/indicators/Atr/#content) value is used to set `brickSize`. Since the ATR changes over time, historical bricks will be repainted as new periods are added or updated in `quotes`.
155
+
156
+
### Streaming limitations for ATR
157
+
158
+
**ATR variant does not support streaming**: The `ToRenkoAtr()` method requires calculating ATR across the full dataset to determine the final brick size. Incremental streaming would require buffering all historical quotes and recalculating the entire Renko series on each new data point, which defeats the purpose of incremental processing.
159
+
160
+
**Recommendation**: Use the Series implementation (`ToRenkoAtr()`) with periodic batch recalculation. For real-time scenarios, consider recalculating at appropriate intervals rather than on every tick.
Copy file name to clipboardExpand all lines: specs/001-develop-streaming-indicators/tasks.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,7 +162,7 @@ Note on former deferrals: Some indicators were previously marked as deferred due
162
162
-[x]**T052** Implement Pvo BufferList in `src/m-r/Pvo/Pvo.BufferList.cs` ✅
163
163
-[x]**T053** Implement QuotePart BufferList in `src/_common/QuotePart/QuotePart.BufferList.cs` ✅
164
164
-[x]**T054** Implement Renko BufferList in `src/m-r/Renko/Renko.BufferList.cs` ✅
165
-
-[ ]**T055** Implement RenkoAtr BufferList in `src/m-r/RenkoAtr/RenkoAtr.BufferList.cs`
165
+
-[ ]**T055**~~Implement RenkoAtr BufferList~~**NOT IMPLEMENTED** — ATR calculation requires full dataset to determine final brick size. Buffering all quotes and recalculating entire Renko series on each add would defeat the purpose of incremental processing. Series-only implementation maintained.
166
166
-[x]**T056** Implement Roc BufferList in `src/m-r/Roc/Roc.BufferList.cs` ✅
167
167
-[x]**T057** Implement RocWb BufferList in `src/m-r/RocWb/RocWb.BufferList.cs` ✅
168
168
-[x]**T058** Implement RollingPivots BufferList in `src/m-r/RollingPivots/RollingPivots.BufferList.cs` ✅
0 commit comments