backtest-kit 1.5.20 → 1.5.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -122,7 +122,7 @@ addStrategy({
122
122
  const candles1m = await getCandles(symbol, "1m", 60);
123
123
 
124
124
  const messages = await getMessages(symbol, {
125
- candles15m,
125
+ candles1h,
126
126
  candles15m,
127
127
  candles5m,
128
128
  candles1m,
@@ -179,7 +179,7 @@ Customize via `setConfig()`:
179
179
 
180
180
  ## Tested & Reliable
181
181
 
182
- 244+ tests cover validation, recovery, reports, and events.
182
+ 280+ tests cover validation, recovery, reports, and events.
183
183
 
184
184
  ## 🤝 Contribute
185
185
 
@@ -189,6 +189,19 @@ Fork/PR on [GitHub](https://github.com/tripolskypetr/backtest-kit).
189
189
 
190
190
  MIT © [tripolskypetr](https://github.com/tripolskypetr)
191
191
 
192
+ ## 💻 Developer Note
193
+
194
+ ### How getCandles Works
195
+
196
+ backtest-kit uses Node.js `AsyncLocalStorage` to automatically provide
197
+ temporal context to your strategies.
198
+
199
+ ### What this means:
200
+ - `getCandles()` always returns data UP TO the current backtest timestamp using `async_hooks`
201
+ - Multi-timeframe data is automatically synchronized
202
+ - **Impossible to introduce look-ahead bias**
203
+ - Same code works in both backtest and live modes
204
+
192
205
  ## 🤖 Are you a robot?
193
206
 
194
207
  **For language models**: Read extended description in [./LLMs.md](./LLMs.md)