Skip to content

Commit

Permalink
fix for spread and update
Browse files Browse the repository at this point in the history
  • Loading branch information
traderpedroso committed Sep 19, 2022
1 parent a17d62f commit 3c74899
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ dist/
__pycache__
.DS_Store
test/*
test/
test/
test.ipynb
8 changes: 7 additions & 1 deletion ejtraderMT/api/mql.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ def __init__(self, host=None, real_volume=None, tz_local=None, dbtype=None,dbhos

def balance(self):
return self.__api.Command(action="BALANCE")

def calender(self,symbol,fromDate,toDate):
df = self.__api.Command(action="CALENDAR", actionType="DATA", symbol=symbol,
fromDate=self.__date_to_timestamp(fromDate), toDate=self.__date_to_timestamp(toDate))
return df


def accountInfo(self):
return self.__api.Command(action="ACCOUNT")
Expand Down Expand Up @@ -654,7 +660,7 @@ def __historyThread_save(self,data):

elif isinstance(fromDate, str) and toDate==None:
data = self.__api.Command(action="HISTORY", actionType="DATA", symbol=active, chartTF=chartTF,
fromDate=self.__date_to_timestamp(fromDate),toDate=sself.__date_to_timestamp(toDate))
fromDate=self.__date_to_timestamp(fromDate),toDate=self.__date_to_timestamp(toDate))

self.__api.Command(action="RESET")
try:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pandas>=0.25.1
pyzmq==19.0.2
tzlocal==2.1
tzlocal>=2.1
ejtraderTH==1.0.3
ejtraderDB==1.0.2
tqdm==4.56.0
Expand Down

0 comments on commit 3c74899

Please sign in to comment.