Update CoreTraidMath.py
This commit is contained in:
parent
fabc61302a
commit
13232c07ca
@ -29,13 +29,6 @@ class CoreMath:
|
||||
|
||||
def __init__(self, base_df, params={
|
||||
'dataType':'ohcl',
|
||||
'colName':{
|
||||
'open':'open',
|
||||
'close':'close',
|
||||
'high':'high',
|
||||
'low':'low',
|
||||
'date':'date'
|
||||
},
|
||||
'action': None,
|
||||
'actionOptions':{}
|
||||
}
|
||||
@ -44,7 +37,7 @@ class CoreMath:
|
||||
self.base_df=base_df.reset_index(drop=True)
|
||||
self.params=params
|
||||
if self.params['dataType']=='ohcl':
|
||||
self.col=self.base_df[self.params['colName'][self.params['actionOptions']['valueType']]]
|
||||
self.col=self.base_df[[self.params['actionOptions']['valueType']]]
|
||||
elif self.params['dataType']=='series':
|
||||
self.col=self.base_df
|
||||
self.ans=self.getAns()
|
||||
@ -122,3 +115,4 @@ class CoreMath:
|
||||
|
||||
return(ans)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user