关闭所有持仓单及挂单
#property copyright "Rui"#property link "https://www.mql5.com"
#property version "1.00"
#property strict
#property script_show_inputs
#include <stderror.mqh>
#include <stdlib.mqh>
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
input string mdversion="--------------版本v1.1.0--------------"; //版本号
extern string aab2 = "------------商品类型------------";//
input bool MoneyType = false;//全部商品=true;当前商品=false;
void OnStart()
{
//---
if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
{
Alert("自动交易按钮未开启!");
return;
}
if(CloseAll())
{
MessageBox("所有单关闭成功");
}
else
{
MessageBox("所有单关闭失败");
}
}
感谢楼主分享!!!! {:1_180:} 顶下
页:
[1]