支持中心 帮助文档 联系我们
📱 微信: 18391752892 | 💬 QQ: 3313198376 | ✈️ Telegram | 📧 fishfx123@gmail.com
EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34% EURUSD 1.0856 +0.12% GBPUSD 1.2678 +0.08% USDJPY 149.23 -0.15% XAUUSD 2034.56 +0.34%

Position Selective Close MT4

👤 作者: Francisco Manuel Vicente Berardo

4.5 分

¥0.00

📌 版本: v1.2
📥 下载: 0
⭐ 评分: 4.5

📝 产品详情

Position Selective Close MT4

作者Francisco Manuel Vicente Berardo
版本v1.2
更新5 十月 2024
激活数63550

The Position Selective Close is a multi-symbol multi-timeframe script used to close simultaneously various positions. 

General Description 

The Position Selective Close possesses three operation modes (Intersection, Union and All) that control the way as four position features (symbol, magic number, type and profit) are used. The modes, available through the Selection Mode input parameter, relate to the features, available through the “Select by Feature” and “Feature” input parameters, as follows: 

  • Intersection – contains only the positions whose features match all the features opted in the script. 
  • Union – contains all the positions whose features match at least a feature opted in the script. 
  • All – contains all the positions, regardless of any feature opted or not in the script. 

    The Intersection and Union operations in the script are similar to those in set theory, with the features selection and feature values representing the sets and set elements, respectively. 

    To use a given feature in the Intersection and Union modes, the respective “Select by Feature” needs to be activated, and the “Feature” needs to be selected with the intended value, except in the Select by Symbol case, whose value is always the chart’s symbol where the script is executed. 

    As an example of the script’s operation modes, consider four positions with different features and all the 3 modes with the same features setting (the symbol and type aren’t used): 


    Position 1 
    Position 2 
    Position 3 
    Position 4 
    Each mode 
    Symbol 
    AUDUSD 
    USDJPY 
    GBPUSD 
    USDCAD 
    --------------
    Magic 
    14758 
    32978 
    67389 
    90336 
    32978 
    Type 
    Buy 
    Buy 
    Sell 
    Sell 
    --------------
    Profit 
    Profit 
    No Profit 
    Profit 
    No Profit 
    No Profit 

    Each mode determines the following positions to close: Intersection – position 2, Union – positions 2 and 4, and All – positions 1 to 4. 

    Input Parameters 

    • Selection Mode: Positions’ selection mode – Intersection/Union/All (see the General Description section above). 
    • Select by Symbol: Selection based on the position symbol. 
    • Select by Magic: Selection based on the position magic number. 
    • Select by Type: Selection based on the position type. 
    • Select by Profit: Selection based on the position profit/no profit. 
    • Magic: Position magic number. 
    • Type: Position type. 
    • Profit: Position profit/no profit. 
    • Deviation: Maximum allowed slippage from the requested price (pips). 

      Some of the available parameters accept values that lead to particular options. 

      • Select by Symbol, Select by Magic, Select by Type and Select by Profit: The “true” value at just one of these parameters means that the Intersection and Union modes coincide. 
      • Magic: A null value means positions opened manually or automatically with the 0-default value. 

        Displayed Information 

        The script possesses a few messages to inform the user about errors that might occur during its execution. The messages are shown through the Alert function (by a pop-up window), its content includes: 

        1. The warning that an input parameter has been incorrectly set. 
        2. The Trade Server Return Codes description. 
        3. The symbol’s quotes (immediately) before the trade request’s formation, followed by the symbol’s quotes (immediately) after the trade server’s decision (only relevant to the programmer). 
        4. The Runtime Errors description. 
        5. The standard function in the include file where the runtime error was detected (only relevant to the programmer). 

                Note: Some elements of the list are displayed simultaneously (in the same text line): 2 and 3; 4 and 5. 

                Conclusion 

                The Position Selective Close is a helpful and efficient tool regarding the manual closing of positions, especially when these reach a significant number, enabling a simple and intuitive selection of the positions to close. 


                安全须知

                本产品仅通过 MQL5.com 官方渠道获取。其他渠道版本可能缺少完整功能和技术支持。

                EA 配置

                交易品种XAUUSD
                时间框架H1 (推荐)
                推荐经纪商IC Markets, IC Trading
                最低存款$300 / 0.01手

                📸 截图预览