СloseAll - MetaTrader 4 Script | Trading Script Download - MT4/MT5 Resources
Collection of scripts for closing various types of orders.
Ignored parameters
When a parameter is omitted, conditions involving that parameter will automatically evaluate to true (as if it did not exist in the script).
The script ignores parameters of type string (order comment and order symbol) when their value is NULL or an empty string.
The script ignores real type parameters (Profit, Loss and Magic) when they have a value of -1.
Use exact match
To get an exact match, the parameter should exactly equal true. The script takes into account ignored parameters when searching for an exact match.
When exact = false, however, the script will close the order if at least one condition is met. This means that scripts should not ignore parameters. Otherwise, all orders will evaluate to true (order closed).
Attachment download
📎 closeall_complete.mq4 (1.84 KB)
📎 closeall_comment.mq4 (1.57 KB)
📎 closeall_loss.mq4 (1.83 KB)
📎 closeall_magic.mq4 (1.58 KB)
📎 closeall_market.mq4 (1.31 KB)
📎 closeall_pending.mq4 (1.31 KB)
📎 closeall_profit.mq4 (1.67 KB)
📎 order_exit.mqh (4.38 KB)
Source: MQL5 #11452
СloseAll - Important points before using the MetaTrader 4 script
This page has been supplemented with structured instructions, focusing on the purpose of trading scripts, MT4/MT5 platform compatibility, testing procedures and risk control. Before downloading or deploying, it is recommended to first determine whether it is consistent with your own variety, cycle and account environment.
Suitable for who to use
- Users who want to quickly screen trading scripts and are willing to do simulation verification first.
- People who need to compare MT4/MT5 EAs, indicators, scripts or source code projects.
- Traders who wish to record backtests, parameters and risk boundaries before placing a trade.
Testing and risk control suggestions
- First verify the default parameters in the strategy tester or demo account, and then adjust the symbol, period, spread and trading period one by one.
- Scalping, grid, martin, and high-frequency strategies should focus on observing maximum drawdowns, consecutive losses, slippage, and trading frequency.
- It is not recommended to run any document directly on the real disk. At least observe the simulated disk performance for 2-4 weeks first.
FAQ
Can MT4 and MT5 be used interchangeably?
Usually cannot be used directly. EX4/MQ4 corresponds to MT4, EX5/MQ5 corresponds to MT5, and the source code needs to be compiled in the corresponding MetaEditor.
Is this resource guaranteed to be profitable?
cannot. EAs, indicators and scripts can only be used as trading tools, and the results depend on parameters, market environment, spreads, slippage and risk control.
What else can I continue to watch?
Forex EA download , foreign exchange indicator download , EA evaluation , MQL5 CodeBase .
English Search Notes
This page is also optimized for English search intent around СloseAll - MetaTrader 4 script . Related search terms include: trading script, MT4 script, MT5 script. Test any Forex EA, Expert Advisor, MT4/MT5 indicator, script or MQL source code with historical data and a demo account before live trading.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •