Update Ind_ADX.py

This commit is contained in:
Redsandy 2022-03-05 23:52:45 +03:00 committed by GitHub
parent f4c647fae0
commit 81a827d2a2

View File

@ -34,7 +34,7 @@ class ADXI:
def __init__(self, base_df, options={ def __init__(self, base_df, options={
'dataType':'ohcl', 'dataType':'ohcl',
}, needShow=False,showOnlyIndex=True): }, needFig=False,showOnlyIndex=True,drawFig=False):
self.base_df=base_df.reset_index(drop=True) self.base_df=base_df.reset_index(drop=True)
self.options=options self.options=options
#self.norm_df=self.nornalize() #self.norm_df=self.nornalize()
@ -42,8 +42,8 @@ class ADXI:
#self.npCol=np.asarray(self.norm_df[self.col], dtype=np.float32) #self.npCol=np.asarray(self.norm_df[self.col], dtype=np.float32)
#self.options=options #self.options=options
self.ans=self.getAns() self.ans=self.getAns()
if needShow: if needFig:
self.fig=self.pltShow(showOnlyIndex) self.fig=self.pltShow(showOnlyIndex,drawFig)
def getDM(self): def getDM(self):
@ -116,7 +116,7 @@ class ADXI:
return ans return ans
def pltShow(self,showOnlyIndex): def pltShow(self,showOnlyIndex,drawFig):
ans=None ans=None
req=[] req=[]
@ -161,9 +161,11 @@ class ADXI:
}) })
self.figDict=req
ans = CoreDraw.coreDraw(req,True)
ans = CoreDraw.coreDraw(req,drawFig)
return ans return ans