请观看如何免费下载自动交易
请在Telegram上找到我们!
加入我们粉丝页
有趣的脚本?
因此发布一个链接 -
让其他人评价
喜欢这个脚本? 在MetaTrader 5客户端尝试它
显示:
4004
等级:
(57)
已发布:
2014.01.10 08:28
已更新:
2016.11.22 07:33

依赖于经纪商的交易函数库, 可以在脚本和EA交易代码中使用.

您可以在文章"使用信号灯指标的简单交易系统"中获得基于本函数库的EA交易.

代码库中, 很多EA交易都使用了这个函数库, 它可以支持在MetaTrader 5客户终端上使用EA进行交易的任何经纪商:

  1. 支持提供非零点差并允许在建立仓位的同时设置止损和获利的经纪商;
  2. 支持提供零点差 并允许在 建立仓位的同时设置止损和获利的经纪商;
  3. 支持提供非零点差并允许在建立仓位之后设置止损和获利的经纪商;
  4. 支持提供零点差并允许在建立仓位之后设置止损和获利的经纪商;

所有的功能都归档在一个文件中- TradeAlgorithms.mqh. 对于在代码库中使用了这个函数库的EA交易, 只允许把 TradeAlgorithm.mqh文件按名称放置到一个客户终端的 terminal_data_folder\MQL5\Include\ 目录下!

在移动了此库文件以后, 使用它的所有EA交易都应该被编译. 为了这样做, 重启 MetaEditor, 打开浏览器窗口, 用鼠标右键单击 MQL5 标签并在弹出菜单中选择 "Compile".

函数

本函数库包含以下的主要交易函数:

bool BuyPositionOpen
(
    bool &BUY_Signal,          // 允许交易的标志
    const string symbol,       // 交易品种
    const datetime &TimeLevel, // 当前交易后多久可以进行下一个交易
    double Money_Management,   // 资金管理
    int Margin_Mode,           // 手数计算方法
    uint deviation,            // 滑点数
    int StopLoss,              // 止损点数
    int Takeprofit             // 获利点数
);

bool SellPositionOpen
(
    bool &SELL_Signal,         // 允许交易的标志
    const string symbol,       // 交易品种
    const datetime &TimeLevel, // 当前交易后多久可以进行下一个交易 
    double Money_Management,   // 资金管理
    int Margin_Mode,           // 手数计算方法
    uint deviation,            // 滑点数
    int StopLoss,              // 止损点数
    int Takeprofit             // 获利点数
);

bool BuyPositionOpen
(
    bool &BUY_Signal,          // 允许交易的标志
    const string symbol,       // 交易品种
    const datetime &TimeLevel, // 当前交易后多久可以进行下一个交易
    double Money_Management,   // 资金管理
    int Margin_Mode,           // 手数计算方法
    uint deviation,            // 滑点数
    double dStopLoss,          // 止损的图表价格单位
    double dTakeprofit         // 获利的图表价格单位
);

bool SellPositionOpen
(
    bool &SELL_Signal,         // 允许交易的标志
    const string symbol,       // 交易品种
    const datetime &TimeLevel, // 当前交易后多久可以进行下一个交易
    double Money_Management,   // 资金管理
    int Margin_Mode,           // 手数计算方法
    uint deviation,            // 滑点数
    double dStopLoss,          // 止损的图表价格单位
    double dTakeprofit         // 获利的图表价格单位
);

bool BuyPositionClose
(
    bool &Signal,        // 允许交易的标志
    const string symbol, // 交易品种
    uint deviation       // 滑点数
);

bool SellPositionClose
(
    bool &Signal,        // 允许交易的标志
    const string symbol, // 交易品种
    uint deviation       // 滑点数
);

bool BuyPositionModify
(
    bool &Modify_Signal, // 允许修改的标志
    const string symbol, // 交易品种
    uint deviation,      // 滑点数
    int StopLoss,        // 止损点数
    int Takeprofit       // 获利点数
);

bool SellPositionModify
(
    bool &Modify_Signal, // 允许修改的标志
    const string symbol, // 交易品种
    uint deviation,      // 滑点数
    int StopLoss,        // 止损点数
    int Takeprofit       // 获利点数
);

由MetaQuotes Ltd译自俄语
原代码: https://www.mql5.com/ru/code/1578

Float (浮点) Float (浮点)

本指标显示了趋势的开始和结束

建立卖出仓位的脚本 建立卖出仓位的脚本

这些脚本用于在当前价位水平上建立卖出仓位并固定止损和获利点数

Pinbar Detector (Pinbar 侦测器) Pinbar Detector (Pinbar 侦测器)

侦测图表上Pin Bar的指标

TradeBreakOut TradeBreakOut

局部极值突破指标