mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2026-01-15 03:14:26 +01:00
(feat) adapt pages to time
This commit is contained in:
@@ -51,7 +51,7 @@ with c3:
|
||||
# Fetch and process data
|
||||
candle_data = get_candles(connector_name, trading_pair, interval, max_records)
|
||||
df = pd.DataFrame(candle_data)
|
||||
df.index = pd.to_datetime(df['timestamp'], unit='ms')
|
||||
df.index = pd.to_datetime(df['timestamp'], unit='s')
|
||||
df = add_indicators(df, macd_fast, macd_slow, macd_signal, diff_lookback)
|
||||
|
||||
# Prepare data for signals
|
||||
|
||||
@@ -91,7 +91,7 @@ with c2:
|
||||
# Load candle data
|
||||
candle_data = get_candles(connector_name=candles_connector, trading_pair=candles_trading_pair, interval=interval, max_records=max_records)
|
||||
df = pd.DataFrame(candle_data)
|
||||
df.index = pd.to_datetime(df['timestamp'], unit='ms')
|
||||
df.index = pd.to_datetime(df['timestamp'], unit='s')
|
||||
candles_processed = add_indicators(df, observation_covariance, transition_covariance)
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@ def get_candles(connector_name="binance", trading_pair="BTC-USDT", interval="1m"
|
||||
df = pd.DataFrame(backend_client.get_historical_candles(connector_name, trading_pair, interval,
|
||||
start_time=int(start_time.timestamp() * 1000),
|
||||
end_time=int(end_time.timestamp() * 1000)))
|
||||
df.index = pd.to_datetime(df.timestamp, unit='ms')
|
||||
df.index = pd.to_datetime(df.timestamp, unit='s')
|
||||
return df
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ if get_data_button:
|
||||
)
|
||||
|
||||
candles_df = pd.DataFrame(candles)
|
||||
candles_df.index = pd.to_datetime(candles_df["timestamp"], unit='ms')
|
||||
candles_df.index = pd.to_datetime(candles_df["timestamp"], unit='s')
|
||||
|
||||
# Plotting the candlestick chart
|
||||
fig = go.Figure(data=[go.Candlestick(
|
||||
|
||||
Reference in New Issue
Block a user