Skip to content

Instantly share code, notes, and snippets.

@randie
randie / bta-adx.py
Last active March 26, 2021 17:49
bta-lib adx() does not work
import pandas as pd
import btalib as bta
df = pd.read_csv("data/tickers/AMD.csv", parse_dates=True, index_col='Date')
df['rsi'] = bta.rsi(df).df # works
df['adx'] = bta.adx(df).df # does not work
print(df.tail())
@randie
randie / example-generators.js
Last active July 2, 2018 02:42
simple generators example
// Demo: https://repl.it/@RandieBemis/ExampleES6Generators
// This is our generator function
// Each time it yields, it returns control to the caller of
// its iterators next() method
// A generator is a function that returns an iterator.
// An iterator is an object with a next() method.
function* g() {
yield 1;
yield 2;