---
title: "MetaTrader 5 build 2860：增强改进Wine和SQL集成 - 更新历史"
description: "我们重点优化了macOS和Linux系统中Wine下的程序端操作 - 更新历史"
image: "https://www.metatrader5.com/c/17/0/terminal-1__40.png"
url: "https://www.metatrader5.com/zh/releasenotes/terminal/2188"
---

# MetaTrader 5 build 2860：增强改进Wine和SQL集成

## 我们重点优化了macOS和Linux系统中Wine下的程序端操作

26 三月 2021

### 程序端

1. 添加启用/禁用其他MQL5.community服务的功能。例如，如果您对[MQL5编程文章](https://www.mql5.com/zh/articles)或[信号](https://www.mql5.com/zh/signals)服务的复制交易特性不感兴趣，您可以禁用相关部分，进而优化资源和程序端工作空间。

   ![](https://www.metatrader5.com/c/17/0/terminal-1__40.png)

   默认启用所有服务。
2. 我们重点优化了[macOS](https://www.mql5.com/zh/articles/619)和[Linux](https://www.mql5.com/zh/articles/625)系统中Wine下的程序端操作：

     - 现在，未锁定的服务窗口（导航器、工具箱）不可以被拖拽出程序端边界。之前，这可能会导致很难将窗口拖回程序端。
     - 修正在更改窗口大小时调整服务窗口的内容。
     - 修正任务管理器中显示性能指标的问题。
     - 改进工具栏上图标的显示。
     - 修正聊天中的未读消息计数。
     - 修正显示图表系统命令：隐藏、展开和关闭。
     - 修正日志显示。
     - 修正显示图表工具提示。
     - 修正图表打印命令。
     - 修正使用Linux皮肤时顶部菜单的显示。
     - 修正MetaEditor中GitHub、MSDN和堆栈溢出的[搜索](https://www.metatrader5.com/zh/metaeditor/help/development/source_code_find#community)。

   > 我们建议所有用户将Wine更新到[最新稳定版](https://www.mql5.com/go?link=https://wiki.winehq.org/Download)。这会提高平台的性能和稳定性。
3. 添加在BORSA Istanbul（伊斯坦布尔交易所）交易时对"Market To Limit"订单的支持。这类订单最初作为市价单执行。如果流动性不足，则剩余交易量将作为限价单添加到订单簿中，并带有最后交易价格。
4. 修正[波动图表](https://www.metatrader5.com/zh/terminal/help/trading/options_board#volatility_smile)的显示。现在，将根据选项板上选择的到期日期来构建图表。
5. 修正通过快速搜索条将交易品种添加到市场深度。如果交易品种名称带有空格，则该交易品种将不会添加到列表中。

   ![](https://www.metatrader5.com/c/17/0/terminal-2__32.png)

### MQL5

1. 扩展使用SQL数据库的可能性。现在，查询支持多种统计和数学函数。**统计函数**

     - [模式](https://en.wikipedia.org/wiki/Mode_(statistics))
     - [中值](https://en.wikipedia.org/wiki/Median)（50百分位）
     - [percentile_25](https://en.wikipedia.org/wiki/Quantile)
     - percentile_75
     - percentile_90
     - percentile_95
     - percentile_99
     - stddev或stddev_samp — 采样标准偏差
     - stddev_pop — 总体标准偏差
     - variance或var_samp — 采样方差
     - var_pop — 总体方差

   **数学函数**

     - [acos(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#acos)
     - [acosh(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#acosh)
     - [asin(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#asin)
     - [asinh(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#asinh)
     - [atan(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#atan)
     - [atan2(X,Y)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#atan2)
     - [atanh(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#atanh)
     - [ceil(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#ceil)
     - [ceiling(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#ceil)
     - [cos(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#cos)
     - [cosh(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#cosh)
     - [degrees(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#degrees)
     - [exp(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#exp)
     - [floor(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#floor)
     - [ln(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#ln)
     - [log(B,X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#log)
     - [log(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#log)
     - [log10(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#log)
     - [log2(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#log2)
     - [mod(X,Y)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#mod)
     - [pi()](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#pi)
     - [pow(X,Y)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#pow)
     - [power(X,Y)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#pow)
     - [radians(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#radians)
     - [sin(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#sin)
     - [sinh(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#sinh)
     - [sqrt(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#sqrt)
     - [tan(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#tan)
     - [tanh(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#tanh)
     - [trunc(X)](https://www.mql5.com/go?link=https://sqlite.org/lang_mathfunc.html#trunc)

   **例如**

   ```
   select   count(*) as book_count,   cast(avg(parent) as integer) as mean,   cast(median(parent) as integer) as median,   mode(parent) as mode,   percentile_90(parent) as p90,   percentile_95(parent) as p95,   percentile_99(parent) as p99 from moz_bookmarks;
   ```
2. 添加新[宏](https://www.mql5.com/zh/docs/constants/namedconstants/compilemacros)：

     - __COUNTER__ — 每次调用逐一添加。在模板和宏中使用时，提供单独的计数器。
     - __RANDOM__ — 生成一个随机ulong数；它类似于[MathRand](https://www.mql5.com/zh/docs/math/mathrand)函数。
3. 修正当图表交易品种不存在情况下同步图表请求的操作。现在，函数将返回一个相关的错误，而不是无限期等待结果。不存在交易品种的情况则由使用不同交易品种设置的交易账户之间切换引起的。
4. 优化并加快[CopyTicks*](https://www.mql5.com/zh/docs/series/copyticks)函数的速度。

### MetaEditor

1. 使用历史数据更改[分析](https://www.metatrader5.com/zh/metaeditor/help/development/profiling#start)和[调试](https://www.metatrader5.com/zh/metaeditor/help/development/debug#start)的顺序。现在，性能分析始终以非可视模式运行。默认调试也以非可视模式运行。相应选项可在MetaEditor设置中手动启用：

   ![](https://www.metatrader5.com/c/17/0/terminal-3__24.png)
2. 添加配置[服务](https://www.metatrader5.com/zh/terminal/help/algotrading/trade_robots_indicators#service)的功能。这个过程类似于其他MQL5程序。
3. 修正[性能分析报告](https://www.metatrader5.com/zh/metaeditor/help/development/profiling)中函数名称的显示。在某些情况下，名称可以指定为<uknown>。

文档已更新。

**请参阅前面的新闻：**

- [MetaTrader 5 build 2815: 从Python访问市场深度，改进调试器和分析工具](https://www.metatrader5.com/zh/releasenotes/terminal/2186)
- [MetaTrader 5 build 2755：弹出价格窗口和改善调试器](https://www.metatrader5.com/zh/releasenotes/terminal/2180)
- [MetaTrader 5 build 2715: 功能改进](https://www.metatrader5.com/zh/releasenotes/terminal/2172)
- [MetaTrader 5 build 2690：改进MetaEditor](https://www.metatrader5.com/zh/releasenotes/terminal/2168)
- [新版MetaTrader 5平台build 2650：背景图表加载和MQL5代码分析工具改进](https://www.metatrader5.com/zh/releasenotes/terminal/2163)
