您需要 登录 才可以下载或查看,没有帐号?注册
//+------------------------------------------------------------------+
//| 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
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!