Skip to content

Instantly share code, notes, and snippets.

@saleh-old
Created June 28, 2020 08:10
Show Gist options
  • Save saleh-old/21cae386c58b06024f49c5d99fdc8fd9 to your computer and use it in GitHub Desktop.
Save saleh-old/21cae386c58b06024f49c5d99fdc8fd9 to your computer and use it in GitHub Desktop.
# docs for self.get_candles:
# https://docs.jesse-ai.com/docs/strategies/api.html#get-candles
all_daily_candles = self.get_candles(self.exchange, self.symbol, '1D')
# notice that "-1" would have have given me the current candle,
# hence "-2" gives me the one before that which is yesterday's
previous_day_candle = all_daily_candles[-2]
previous_day_candle_low = previous_day_candle[4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment