520Fx的大师 能不能帮我发一个 stop挂单脚本 一键挂单
离市价8个点 stop脚本 ,止损15.移动止损5 ,谢谢了 一键挂单路过的高人如果有现成的分享 分享! 亲 这个还需要别人帮助啊 这个很简单,自己编编了。 steven-hjzb 发表于 2014-9-6 12:35
亲 这个还需要别人帮助啊
亲 我就是不懂才问的,你会就帮我写个吧!谢谢了!有现成的 就分享下
本帖最后由 翻开一页 于 2014-9-6 15:26 编辑
Sell挂单:
#property strict
extern double Lots=0.1;
extern int OrderPos=8;
extern int StopLos=15;
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
double orderprice=Bid-OrderPos*PNT();
double stoploss=orderprice+StopLos*PNT();
int magicnumber=AccountNumber()+123;
int t=OrderSend(NULL,OP_SELLSTOP,Lots,orderprice,0,stoploss,0,"手工挂单",magicnumber,0,clrNONE);
}
//+------------------------------------------------------------------+
double PNT(){
double PNT=Point;
if(Digits==3||Digits==5)PNT=Point*10;
return(PNT);
}
BuyStop 挂单:
#property strict
extern double Lots=0.1;
extern int OrderPos=8;
extern int StopLos=15;
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
double orderprice=Ask+OrderPos*PNT();
double stoploss=orderprice-StopLos*PNT();
int magicnumber=AccountNumber()+124;
int t=OrderSend(NULL,OP_BUYSTOP,Lots,orderprice,0,stoploss,0,"手工挂单",magicnumber,0,clrNONE);
}
//+------------------------------------------------------------------+
double PNT(){
double PNT=Point;
if(Digits==3||Digits==5)PNT=Point*10;
return(PNT);
}
脚本是一次执行,不能移动止损,移动止损要靠别的办法 翻开一页 发表于 2014-9-6 15:25
Sell挂单:
#property strict
非常感谢 谢谢
善用论坛搜索,这样的脚本论坛提供过很多。 熙羽 发表于 2014-9-6 17:51
善用论坛搜索,这样的脚本论坛提供过很多。
谢谢无私分享!
:victory:谢谢无私分享 很好很强大 :lol:lol谢谢分享 熙羽 发表于 2014-9-6 17:51
善用论坛搜索,这样的脚本论坛提供过很多。
版主 能把止赢也加上去吗?谢谢了!
翻开一页 发表于 2014-9-6 15:25
Sell挂单:
#property strict
朋友 你好你那么懂,能把止赢也加上去吗?止赢20点那就更完美了!谢谢了!拜托!
路过挣钱
页:
[1]
2