darwinex / dwxconnect

Seamlessly link any Trading Strategy in ANY programming language to Darwinex liquidity via MetaTrader 4 or 5. DWX Connect is your very own, fully customizable Trading API!
BSD 3-Clause "New" or "Revised" License
158 stars 84 forks source link

Error WRONG_FORMAT_START_IDENTIFIER #35

Closed hoanhax closed 1 year ago

hoanhax commented 1 year ago

Hi,

Thanks for the great project. I have used some connectors before (Metatrader 5, dwx-zeromq-connector), but now I have used dwxconnect for my project, because easy to use and removes zeromq dependency. When start using, I also worried about latency when using file to communicate between python and mql, but now I don't see any difference. Recently sometimes I got the error : WRONG_FORMAT_START_IDENTIFIER | Start identifier not found for command: I have checked code on file DCWX_Server_MT4.mq4 it seems this error was logged by following code: if (StringSubstr(text, 0, 2) != startIdentifier) { SendError("WRONG_FORMAT_START_IDENTIFIER", "Start identifier not found for command: " + text); return; }

I have set MILISECOND_TIMERS=5 in DWX_Server_MT4 expert.

elvinex commented 1 year ago

Hi, If there was no text after not found for command:, then it seems the file was empty. I think in theory the mql side should not be allowed to open the file while it is in write process from python. But maybe it does sometimes anyway. Hopefully the command still goes through the next time it reads it.

hoanhax commented 1 year ago

thanks for your reply. Yes, it can still read data next time.