def overlap_process(event):
print(event.widget.get())
overlap = event.widget.get()
upperband, middleband, lowerband = ta.BBANDS(close, timeperiod=5, nbdevup=2, nbdevdn=2, matype=0)
fig, axes = plt.subplots(2, 1, sharex=True)
ax1, ax2 = axes[0], axes[1]
axes[0].plot(close, 'rd-', markersize=3)
axes[0].plot(upperband, 'y-')
axes[0].plot(middleband, 'b-')
axes[0].plot(lowerband, 'y-')
axes[0].set_title(overlap, fontproperties="SimHei")
if overlap == u'???':
pass
elif overlap == u'????????':
real = ta.DEMA(close, timeperiod=30)
axes[1].plot(real, 'r-')
elif overlap == u'??????? ':
real = ta.EMA(close, timeperiod=30)
axes[1].plot(real, 'r-')
elif overlap == u'??????——?????':
real = ta.HT_TRENDLINE(close)
axes[1].plot(real, 'r-')
elif overlap == u'???????????':
real = ta.KAMA(close, timeperiod=30)
axes[1].plot(real, 'r-')
elif overlap == u'?????':
real = ta.MA(close, timeperiod=30, matype=0)
axes[1].plot(real, 'r-')
elif overlap == u'MESA???????':
mama, fama = ta.MAMA(close, fastlimit=0, slowlimit=0)
axes[1].plot(mama, 'r-')
axes[1].plot(fama, 'g-')
elif overlap == u'????????':
real = ta.MAVP(close, periods, minperiod=2, maxperiod=30, matype=0)
axes[1].plot(real, 'r-')
elif overlap == u'???????':
real = ta.SMA(close, timeperiod=30)
axes[1].plot(real, 'r-')
elif overlap == u'????????(T3)':
real = ta.T3(close, timeperiod=5, vfactor=0)
axes[1].plot(real, 'r-')
elif overlap == u'????????':
real = ta.TEMA(close, timeperiod=30)
axes[1].plot(real, 'r-')
elif overlap == u'?????? ':
real = ta.TRIMA(close, timeperiod=30)
axes[1].plot(real, 'r-')
elif overlap == u'???????':
real = ta.WMA(close, timeperiod=30)
axes[1].plot(real, 'r-')
plt.show()
# ????
评论列表
文章目录