Freqtrade: hourly high and low

Created on 25 Sep 2019  路  3Comments  路  Source: freqtrade/freqtrade

Step 1: Have you search for this issue before posting it?

yes about 2 days
If you have discovered a bug in the bot, please search our issue tracker.
If it hasn't been reported, please create a new issue.

Step 2: Describe your environment

  • Operating system: ____Windows 10 64x
  • Python Version: _____ (python -V) Python 3.7.4
  • CCXT version: _____ (pip freeze | grep ccxt)
  • Branch: Master | Develop
  • Last Commit ID: _____ (git log --format="%H" -n 1)

Step 3: Describe the problem:

Explain the problem you have encountered
sorry if this newbie questions but i use 1m interval but i want to get 1hr high/low price,i dont want to change my interval to 1hr,so to get 1hr low i run like this: dataframe['low'].shift(1).......dataframe['low'].shift(60),what should i do to get 1hr low and hight price?

Question

All 3 comments

If this is the only information you need, you can use something like dataframe['low'].rolling(60).max() and dataframe['low'].rolling(60).min(), which will give you a rolling 1h window.

Alternatively, you can use resample to resample the candles to hourly candles (these are REAL 1h candles, not rolling candles) - and take the min/max from there.

this strategy has a sample about this - and you will want this library for resample and merge (or code it yourself ...).

If this is the only information you need, you can use something like dataframe['low'].rolling(60).max() and dataframe['low'].rolling(60).min(), which will give you a rolling 1h window.

Alternatively, you can use resample to resample the candles to hourly candles (these are REAL 1h candles, not rolling candles) - and take the min/max from there.

this strategy has a sample about this - and you will want this library for resample and merge (or code it yourself ...).

thanks xmatthias for ur answer,I'm just sad why I didn't ask the question earlier

@moeen25 you can also ask questions at our Slack channel instead of opening an issue here for each question.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psionyx2311 picture psionyx2311  路  3Comments

Mesengeros picture Mesengeros  路  4Comments

shusso picture shusso  路  4Comments

Andi1990 picture Andi1990  路  4Comments

rraallvv picture rraallvv  路  3Comments