fmt := import("fmt")
exch := import("exchange")
t := import("times")
bbands := import("indicator/bbands")

load := func() {
    start := t.date(2017, 8 , 17 , 0 , 0 , 0, 0)
    end := t.add_date(start, 0, 6 , 0)
    ohlcvData := exch.ohlcv("binance", "BTC-USDT", "-", "SPOT", start, end, "1d")

    ret := bbands.calculate("close", ohlcvData.candles, 20, 2.0, 2.0, "sma")
    fmt.println(ret)
}

load()
