FXCCCBBS 外汇交易 MT4 MT5 FXCCC 外汇分析 交易系统 自动交易 EA 经纪商

热搜: 活动 交友 discuz
查看: 334|回复: 0

[脚本] 多种方式关闭持仓和挂单









Rank: 9Rank: 9Rank: 9

发表于 2018-11-15 17:20:09 | 显示全部楼层 |阅读模式
This free product closes all trades based on specific properties such as magic, profit, type, etc.
It is based on one of the scripts found in one of my Code Base articles, CloseAll.
A collection of scripts for closing various types of orders.
  • closeall_comment - closes all orders based on a specific comment
  • closeall_loss - closes all orders with profit/loss exceeding a specific loss threshold value
  • closeall_profit - closes all orders with profit/loss exceeding a specific profit threshold value
  • closeall_magic - closes all orders by order magic number
  • closeall_market - closes all market orders
  • closeall_pending - closes all pending orders
  • closeall_complete - contains all the features of six scripts + option for closing position at a symbol
Ignored Parameters
When a parameter is ignored, the condition involving that parameter would automatically evaluate to true (as if it is not present on the script).
Parameters of string type (order comment and order symbol) are ignored by the script when their value is either NULL or empty string.
Parameters of real type (profit, loss, and magic) are ignored by the script when their value is -1.
Using Exact Match
In order to get an exact match, the parameter exact match should be equal to true. When searching for an exact match, the script respects ignored parameters.
When exact match=false, however, the script would close an order if at least one criterion is satisfied. This means that the script should not have ignored parameters. Otherwise, all orders would evaluate to true (closing the order).



9.43 KB, 下载次数: 37

您需要登录后才可以回帖 登录 | 立即注册


GMT+8, 2019-6-27 04:17 , Processed in 1.324651 second(s), 21 queries .
Powered by Discuz! X3.4 Template By Blue whale
© 2001-2013 Comsenz Inc.