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) // 'ctx' is already defined when we construct our bytecode from file. // To add debugging information to the request, see verbose.gct. To add account credentials, see account.gct ohlcvData := exch.ohlcv(ctx, "binance", "BTC-USDT", "-", "SPOT", start, end, "1d") if is_error(ohlcvData) { // handle error fmt.println(ohlcvData) return } ret := bbands.calculate("close", ohlcvData.candles, 20, 2.0, 2.0, "sma") fmt.println(ret) } load()