Skip to content

Commit

Permalink
fix date as index and merge on date for multiple datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
traderpedroso committed Jan 14, 2023
1 parent a3f0bd2 commit 3c8afb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ejtraderMT/api/mql.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,9 @@ def __historyThread_save(self,data):
current.columns = [f'{active}_open', f'{active}_high',
f'{active}_low', f'{active}_close', f'{active}_volume', f'{active}_spread']

main = pd.merge(main, current, how='inner',
left_index=True, right_index=True)
# main = pd.merge(main, current, how='inner',
# left_index=True, right_index=True)
main = pd.merge(main, current, on='date')
except KeyError:
pass

Expand Down

0 comments on commit 3c8afb9

Please sign in to comment.