init
This commit is contained in:
@@ -101,7 +101,12 @@ class Simulation:
|
||||
sell_check = go.Scatter(x=data['date'], y=sell_line, mode='markers', name="sell", marker=dict(size=14, color=sell_colors, line_width=0))
|
||||
bolinger_upper = go.Scatter(x=data['date'], y=data["upper"], name="upper", line_color='#8B4513')
|
||||
bolinger_lower = go.Scatter(x=data['date'], y=data["lower"], name="lower", line_color='#8B4513')
|
||||
avg5 = go.Scatter(x=data['date'], y=data["avg5"], name="avg5", line_color='#000000')
|
||||
avg2 = go.Scatter(x=data['date'], y=data["avg2"], name="avg2", line_color='#000000')
|
||||
avg3 = go.Scatter(x=data['date'], y=data["avg3"], name="avg3", line_color='#c0c0c0')
|
||||
avg5 = go.Scatter(x=data['date'], y=data["avg5"], name="avg5", line_color='#800080')
|
||||
avg10 = go.Scatter(x=data['date'], y=data["avg10"], name="avg10", line_color='#ff00ff')
|
||||
avg20 = go.Scatter(x=data['date'], y=data["avg20"], name="avg20", line_color='#00ffff')
|
||||
avg30 = go.Scatter(x=data['date'], y=data["avg30"], name="avg30", line_color='#008000')
|
||||
|
||||
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')
|
||||
volume_line = go.Scatter(x=data['date'], y=data["volume"], mode='lines', name='volume')
|
||||
@@ -112,7 +117,7 @@ class Simulation:
|
||||
rsis_line = go.Scatter(x=data['date'], y=data["rsis"], mode='lines', name='rsis')
|
||||
|
||||
#candle_data = [candle_stick, bolinger_upper, bolinger_lower, buy_check, sell_check, avg1, avg2, avg5, avg10, avg20, avg30, avg40, avg50, avg60]
|
||||
candle_data = [candle_stick, bolinger_upper, bolinger_lower, avg5, buy_check, sell_check]
|
||||
candle_data = [candle_stick, bolinger_upper, bolinger_lower, avg2, avg3, avg5, avg10, buy_check, sell_check]
|
||||
volume_data = [volume_line]
|
||||
stochastic_data = [slow_k_line, slow_d_line]
|
||||
rsi_data = [rsi_line, rsis_line]
|
||||
@@ -180,9 +185,9 @@ if __name__ == "__main__":
|
||||
given_days = ['20210901','20210902','20210903','20210906','20210907','20210908','20210909','20210910','20210913',
|
||||
'20210914','20210915','20210916','20210917','20210923','20210924','20210927','20210928','20210929',
|
||||
'20210930','20211001','20211005','20211006','20211007','20211008','20211012','20211013','20211014',
|
||||
'20211018', '20211019','20211020','20211021','20211022']
|
||||
|
||||
simulation = Simulation(stock_codes[1])
|
||||
'20211018', '20211019','20211020','20211021','20211022','20211025']
|
||||
#given_days = ['20211006']
|
||||
simulation = Simulation(stock_codes[0])
|
||||
|
||||
given_days = sorted(given_days, reverse=True)
|
||||
for given_day in given_days:
|
||||
|
||||
Reference in New Issue
Block a user