Skip to content

Instantly share code, notes, and snippets.

View carloswm85's full-sized avatar
🎯
Compiling...

Carlos W. Mercado carloswm85

🎯
Compiling...
View GitHub Profile
@carloswm85
carloswm85 / indexable_skip_list.dart
Created April 29, 2024 15:14 — forked from simc/indexable_skip_list.dart
Fast indexable skip list for Dart. All operations (except clear) are O(log n)
import 'dart:collection';
import 'dart:math';
class IndexableSkipList<K, V> {
static const _maxHeight = 12;
final _Node<K, V> _head = _Node(
null,
null,
List.filled(_maxHeight, null),
// Add the values you want
rsi = ta.rsi(close,14)
// Define the function
// With one call, you'll get back 9 values
fGetImported(_timeframe) =>
request.security(symbol = syminfo.tickerid, timeframe = _timeframe, expression = [open, high, low, close, rsi, open[1], high[1], low[1], close[1]], gaps = barmerge.gaps_off)
// Implement the function for different timeframes
// 3 timeframes