def DrawHist(pl, shs):
"""??????, shs: ??? array"""
shs = np.array(shs, dtype=float)
#print "mean: %.2f"%shs.mean()
shs = shs[np.isnan(shs) == False]
if len(shs)>0:
pl.figure
pl.hist(shs)
def ShowHitCount(shs):
#????
go_count = len(shs) - len(shs[np.isnan(shs)])
#???
if len(shs) != 0:
v = float(go_count)/ float(len(shs))
#print("trade rato:%.2f%%"%(v*100))
#?????
if go_count>0:
v = float(len(shs[shs>0]))/float(go_count)
#print("win rato: %.2f%%"%(v*100))
pl.show()
#ShowHitCount(shs)
评论列表
文章目录