|
可以用脚本下单..
多单
extern double orderLots = 0.01;
extern double 止损 = 200;
extern double 止盈 = 500;
extern double magic = 11111;
extern string memo="现价多单";
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
int buyNo = OrderSend(Symbol(), OP_BUY, orderLots, Ask, 100, Ask - 止损 * Point, Ask + 止盈 * Point, memo, magic, 0, CLR_NONE);
if(buyNo < 0.0001)
{
Print("多单下单失败,失败原因 = " + GetLastError());
}
return(0);
}
//+------------------------------------------------------------------+
空单
extern double orderLots = 0.01;
extern double 止损 = 200;
extern double 止盈 = 500;
extern double magic = 11111;
extern string memo ="现价空单";
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
int sellNo = OrderSend(Symbol(), OP_SELL, orderLots, Bid, 100, Bid + 止损 * Point, Bid - 止盈 * Point, memo, magic, 0, CLR_NONE);
if(sellNo < 0.0001)
{
Print("空单下单失败,失败原因 = " + GetLastError());
}
return (0);
}
//+------------------------------------------------------------------+
|
|