Skip to content

MtApi (MT4) and MtApi5 (MT5) version 2.1.0

Latest

Choose a tag to compare

@vdemydiuk vdemydiuk released this 26 Nov 08:37
· 2 commits to master since this release

Important (MT5): times are now transferred between MtApi5 and the expert as 64-bit values (#340). MtApi5.dll 2.1.0 is not compatible with older MtApi5.ex5 experts. Update the expert in your terminals together with the library (the installer copies it automatically, see #343).

MT5:
Issue #322: iCustom with double parameters crashes the expert (array out of range)
Issue #323: iStochastic passes Slowing as the MA method
Issue #324: CopyBuffer by start time / by time range calls the start-position overload
Issue #325: PositionCloseAll skips positions and always reports all closed
Issue #326: ChartRedraw truncates the 64-bit chart id
Issue #327: OnTick crashes when CopyRates fails at a new bar
Issue #328: init fails if the first pending command is GetQuote, and the expert is never deinitialized
Issue #329: OrderCloseAll always returns false to the client
Issue #330: backtesting wait loops cannot be stopped and never exit if the client is gone (new input BacktestingReadyTimeout)
Issue #331: ObjectCreate crashes the expert with more than 30 points
Issue #332: IndicatorCreate copies JSON objects by value, risking double delete
Issue #333: OrderCheck ignores TradeRequest parse failure
Issue #334: GetJsonPayload leaks the parsed value when the payload is not a JSON object
Issue #335: GetSymbols silently drops symbols that are not 6 characters long
Issue #336: OnTradeTransaction event request has no Position/PositionBy
Issue #337: debug log build does not compile and PositionModify always logs
Issue #338: global state is not reset when the chart symbol or timeframe changes
Issue #339: command payload is truncated to 1000 characters
Issue #340: times are transferred as 32-bit int (year 2038 limit)
Issue #342: ObjectCreate does not send the first point (time, price) to the expert
Issue #343: installer copies MtApi5.ex5 into the Experts folder of installed MetaTrader 5 terminals (COPY_EXPERT=0 skips it)
Fixed ChartId(expertHandle) always querying the executor expert
Fixed iSAR truncating the step parameter to integer
Fixed loss of order expiration time in MqlTradeRequest and MqlTradeTransaction events
Fixed RpcClientLogger forwarding Error, Info and Warn messages as Debug
Faster Copy* functions (numeric arrays are serialized directly to JSON)

MT4:
Issue #339: command payload is truncated to 1000 characters
Installer copies MtApi.ex4 into the Experts folder of installed MetaTrader 4 terminals again (COPY_EXPERT=0 skips it)
Fixed RpcClientLogger forwarding Error, Info and Warn messages as Debug

MT4 and MT5 experts (json.mqh, hash.mqh):
Fixed unescaped strings in JSON output, NaN/Infinity output, duplicate key leak, parsing of empty arrays and \uXXXX escapes, hang on trailing backslash
JSON serialization is now linear-time, faster hashing and array growth

MtService:
Issue #313: log messages are not formatted when their log level is disabled
Issue #314: TCP_NODELAY is set on accepted connections
Issue #316: commands no longer need two blocking round trips and do not wait behind queued tick events
Issue #317: send queue per connection is limited to 3000 events (oldest events are dropped, responses are never dropped)
Issue #318: removed unneeded strand and post per message
Issue #319: removed unnecessary payload copies on the command and event paths
Issue #320: single map lookup in MtServiceImpl
Issue #321: MTConnector, MT5Connector - replaced deprecated std::wstring_convert with WinAPI UTF-8 conversion

Other:
Removed obsolete MTApiService project (and its vulnerable log4net 2.0.10 dependency)
PyMtApi5 (Python client for MT5): added trade, position, order, history, global variable, chart, chart object, terminal info, time, indicator and common functions; fixed PERIOD_H12 value
Added unit tests for MtApi5 (MtApi5.Tests) and PyMtApi5
Fixed exception in MtApi5TestClient and TestApiClientUI when closing the app while connected