init
This commit is contained in:
18
hts/HTS.py
18
hts/HTS.py
@@ -6,6 +6,8 @@ import pandas as pd
|
||||
from enum import Enum
|
||||
#import matplotlib.pyplot as plt
|
||||
#import plotly.graph_objects as go
|
||||
#import plotly.subplots as ms
|
||||
|
||||
|
||||
# enum 주문 상태 세팅용
|
||||
class EorderBS(Enum):
|
||||
@@ -552,9 +554,25 @@ class HTS:
|
||||
bolinger_lower = go.Scatter(x=data['Date'], y=lower, name="lower", line_color='#8B4513')
|
||||
candle_stick = go.Candlestick(x=data['Date'], open=data['Open'], high=data['High'], low=data['Low'], close=data['Close'], increasing_line_color='red', decreasing_line_color='blue')
|
||||
|
||||
"""
|
||||
# 그래프를 그린다.
|
||||
fig = go.Figure(data=[candle_stick, bolinger_upper, bolinger_lower, buy_check, sell_check])
|
||||
fig.update_layout(title=given_day + "_2x")
|
||||
"""
|
||||
|
||||
volume_bar = go.Bar(x=data['Date'], y=data['Volume'])
|
||||
fig = ms.make_subplots(rows=2, cols=1, shared_xaxes=True, vertical_spacing=0.02)
|
||||
fig.add_trace(candle_stick, row=1, col=1)
|
||||
fig.add_trace(volume_bar, row=2, col=1)
|
||||
fig.update_layout(
|
||||
title=given_day + "_2x",
|
||||
yaxis1_title='price',
|
||||
yaxis2_title='Volume',
|
||||
xaxis2_title='periods',
|
||||
xaxis1_rangeslider_visible=False,
|
||||
xaxis2_rangeslider_visible=True,
|
||||
)
|
||||
|
||||
fig.show()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user