PyMtApi5: implemented function SymbolInfoTick

This commit is contained in:
Vyacheslav Demidyuk
2025-01-22 13:57:19 +02:00
parent 33bff44b39
commit fdb9ebb5de
2 changed files with 27 additions and 0 deletions
+9
View File
@@ -39,6 +39,7 @@ class Mt5ApiApp:
"SymbolInfoDouble": self.process_symbol_info_double,
"SymbolInfoInteger": self.process_symbol_info_integer,
"SymbolInfoString": self.process_symbol_info_string,
"SymbolInfoTick": self.process_symbol_info_tick,
}
def on_disconnect(self, error_msg=None):
@@ -215,6 +216,14 @@ class Mt5ApiApp:
result = mtapi.symbol_info_string(symbol, prop_id)
print(f"> SymbolInfoString: response = {result}")
def process_symbol_info_tick(self, mtapi, parameters):
if len(parameters) == 0:
print(f"! Invalid parameters for command SymbolInfoTick: {parameters} - {len(parameters)}")
return
symbol = parameters
result = mtapi.symbol_info_tick(symbol)
print(f"> SymbolInfoTick: response = {result}")
def mtapi_command_thread(self, mtapi):
while mtapi.is_connected():
filename = "client.cmd"