6
6
import mplfinance as mpf
7
7
import sys
8
8
9
+ import matplotlib
10
+ print ('backend=' ,matplotlib .get_backend ())
11
+
9
12
coin = 'BTC'
10
13
bot_status = 'trading'
11
14
12
15
def limit ():
13
- timeout = 2 .5
16
+ timeout = 0 .5
14
17
print (end = '' )
15
18
rlist , _ , _ = select ([sys .stdin ], [], [], timeout )
16
- print ('rlist=' ,rlist )
17
19
if rlist :
18
20
s = sys .stdin .readline ().strip ()
19
- print ('s=' ,s )
20
21
if s == 'g' :
21
22
print ('033円 [1;34m show chart' )
22
23
chart ()
@@ -41,8 +42,8 @@ def dataframe():
41
42
42
43
def chart ():
43
44
df = dataframe ()
44
- df .index = pd .DatetimeIndex (df ['timestamp' ])
45
- df = df .iloc [::- 1 ]
45
+ # df.index = pd.DatetimeIndex(df['timestamp'])
46
+ # df = df.iloc[::-1]
46
47
s = mpf .make_mpf_style (base_mpf_style = 'charles' , gridcolor = '#555555' , gridstyle = "--" , rc = {'axes.edgecolor' : 'white' , 'font.size' : 5 })
47
48
fig , axlist = mpf .plot (df , type = 'candle' , style = s , title = coin , ylabel = 'Price (€)' , volume = True , warn_too_much_data = 9999999 , returnfig = True )
48
49
mpf .show (block = True )
0 commit comments