开仓 止损不正确 出错130 请高手帮忙修改成功 谢谢
我说你喜欢我
|
5345 人阅读
|
17 人评论
|
2011-09-20
//+------------------------------------------------------------------+
//| Function Script 开多单+自动设止损,止盈 |
//| |
//| uid: ppsulot |
//+------------------------------------------------------------------+
#property link \"http://bbs.520fx.com\"
extern double Lots=0.01; //手数
extern int StopLoss=360; //止损点数
extern int TakeProfit=960; //止盈点数
extern int SlipPage=3; //滑点
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
int Ticket; //宣告:记录下单状态
switch(MarketInfo(\"EURUSD\",MODE_DIGITS)) //检查位数
{
case 5:
StopLoss*=10;
TakeProfit*=10;
SlipPage*=10;
break;
default:
//不变
break;
}
switch(MarketInfo(Symbol(), MODE_STOPLEVEL))
{
case 1: //需先下单后再更改止损、止盈
Ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,SlipPage,0,0,\"Order_By_Script\",0,0,0);
if (Ticket |
|
|
|
|