mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-17 12:48:11 +00:00
PyMtApi5: implemented function ChartClose
This commit is contained in:
@@ -497,7 +497,7 @@ class Mt5ApiClient:
|
||||
|
||||
# ChartOpen
|
||||
def chart_open(self, symbol: str, period: ENUM_TIMEFRAMES):
|
||||
cmd_params = {"Symbol": symbol, "Timeframe": period};
|
||||
cmd_params = {"Symbol": symbol, "Timeframe": period}
|
||||
return self.__send_command(self.__get_default_expert(), Mt5CommandType.ChartOpen, cmd_params)
|
||||
|
||||
# ChartFirst
|
||||
@@ -508,6 +508,10 @@ class Mt5ApiClient:
|
||||
cmd_params = {"ChartId": chart_id}
|
||||
return self.__send_command(self.__get_default_expert(), Mt5CommandType.ChartNext, cmd_params)
|
||||
|
||||
def chart_close(self, chart_id):
|
||||
cmd_params = {"ChartId": chart_id}
|
||||
return self.__send_command(self.__get_default_expert(), Mt5CommandType.ChartClose, cmd_params)
|
||||
|
||||
# Private methods
|
||||
|
||||
def __event_thread_func(self):
|
||||
|
||||
Reference in New Issue
Block a user