论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
  • 1
  • 2
前往
共 23 条
帖子
作者
回复/查看
最后发表
2011-04-30 12:29
2664
145794
2023-11-27 06:55
2011-05-02 14:40
2010-01-14 08:32
50
4655
2010-01-22 15:26
2008-05-09 10:57
126
29361
2017-08-08 18:26
基于五线谱开仓出现的价位的滞后性,自己写了一个简单的EA,因为自己水平,ea写得不好,但其中的开仓条件可以提供大家做参考 //+------------------------------------------------------------------+ //| This MQL is generated by Expert Advisor Builder | //| http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/ | //| | //| In no event will author be liable for any damages whatsoever. | //| Use at your own risk. | //| | //+------------------- DO NOT REMOVE THIS HEADER --------------------+ #define SIGNAL_NONE 0 #define SIGNAL_BUY 1 #define SIGNAL_SELL 2 #define SIGNAL_CLOSEBUY 3 #define SIGNAL_CLOSESELL 4 #property copyright "Expert Advisor Builder" #property link "http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/" extern int MagicNumber = 0; extern bool SignalMail = False; extern bool EachTickMode = False; extern double Lots = 1.0; extern int Slippage = 3; extern bool UseStopLoss = True; extern int StopLoss = 30; extern bool UseTakeProfit = True; extern int TakeProfit = 250; extern bool UseTrailingStop = True; extern int TrailingStop = 55; int BarCount; int Current; bool TickCheck = False; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { BarCount = Bars; if (EachTickMode) Current = 0; else Current = 1; return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { int Order = SIGNAL_NONE; int Total, Ticket; double StopLossLevel, TakeProfitLevel; if (EachTickMode && Bars != BarCount) TickCheck = False; Total = OrdersTotal(); Order = SIGNAL_NONE; //+------------------------------------------------------------------+ //| Variable Begin | //+------------------------------------------------------------------+ double Buy1; double Buy2; double Buy3; double Sell1; double Sell2; //均线;ADX; double MA100now =iMA(NULL, 0, 100, 0, MODE_EMA, PRICE_CLOSE, Current + 0); double MA100a =iMA(NULL, 0, 100, 0, MODE_EMA, PRICE_CLOSE, Current + 1); double MA200now =iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 0); double MA200a =iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 1); double Closenow =iClose(NULL, 0, Current + 0); double Close1 =iClose(NULL, 0, Current + 1); double pAO =iAO(NULL, 0, Current + 0); //buy信号 if(MA200now>=MA100now &&Closenow>MA200now&&Close1<=MA100a&&pAO>0) Buy1=true; if(MA200now>=MA100now &&Closenow>MA200now&&Close1<=MA200a&&pAO>0) Buy2=true; if(MA100now>=MA200now &&Closenow>MA100now&&Close1<=MA200a&&pAO>0) Buy3=true; //////////////////////////////////////// /////sell if(MA100now>=MA200now &&Closenow=MA200a&&pAO<0) Sell1=true; if(MA100now<=MA200now &&Closenow=MA200a&&pAO<0) Sell2=true; ///////////// double CloseBuy1_1 = pAO; double CloseBuy1_2 = 0; double CloseSell1_1 = pAO; double CloseSell1_2 = 0; //+------------------------------------------------------------------+ //| Variable End | //+------------------------------------------------------------------+ //Check position bool IsTrade = False; for (int i = 0; i < Total; i ++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) { IsTrade = True; if(OrderType() == OP_BUY) { //Close //+------------------------------------------------------------------+ //| Signal Begin(Exit Buy) | //+------------------------------------------------------------------+ if (CloseBuy1_1 <= CloseBuy1_2) Order = SIGNAL_CLOSEBUY; //+------------------------------------------------------------------+ //| Signal End(Exit Buy) | //+------------------------------------------------------------------+ if (Order == SIGNAL_CLOSEBUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) { OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen); if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Close Buy"); if (!EachTickMode) BarCount = Bars; IsTrade = False; continue; } //Trailing stop if(UseTrailingStop && TrailingStop > 0) { if(Bid - OrderOpenPrice() > Point * TrailingStop) { if(OrderStopLoss() < Bid - Point * TrailingStop) { OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, MediumSeaGreen); if (!EachTickMode) BarCount = Bars; continue; } } } } else { //Close //+------------------------------------------------------------------+ //| Signal Begin(Exit Sell) | //+------------------------------------------------------------------+ if (CloseSell1_1 >= CloseSell1_2) Order = SIGNAL_CLOSESELL; //+------------------------------------------------------------------+ //| Signal End(Exit Sell) | //+------------------------------------------------------------------+ if (Order == SIGNAL_CLOSESELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) { OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, DarkOrange); if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Close Sell"); if (!EachTickMode) BarCount = Bars; IsTrade = False; continue; } //Trailing stop if(UseTrailingStop && TrailingStop > 0) { if((OrderOpenPrice() - Ask) > (Point * TrailingStop)) { if((OrderStopLoss() > (Ask + Point * TrailingStop)) || (OrderStopLoss() == 0)) { OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, DarkOrange); if (!EachTickMode) BarCount = Bars; continue; } } } } } } //+------------------------------------------------------------------+ //| Signal Begin(Entry) | //+------------------------------------------------------------------+ if (Buy1==true || Buy2 ==true||Buy3==true) Order = SIGNAL_BUY; if (Sell1==true || Sell2==true) Order = SIGNAL_SELL; //+------------------------------------------------------------------+ //| Signal End | //+------------------------------------------------------------------+ //Buy if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) { if(!IsTrade) { //Check free margin if (AccountFreeMargin() < (1000 * Lots)) { Print("We have no money. Free Margin = ", AccountFreeMargin()); return(0); } if (UseStopLoss) StopLossLevel = Ask - StopLoss * Point; else StopLossLevel = 0.0; if (UseTakeProfit) TakeProfitLevel = Ask + TakeProfit * Point; else TakeProfitLevel = 0.0; Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue); if(Ticket > 0) { if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) { Print("BUY order opened : ", OrderOpenPrice()); if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy"); } else { Print("Error opening BUY order : ", GetLastError()); } } if (EachTickMode) TickCheck = True; if (!EachTickMode) BarCount = Bars; return(0); } } //Sell if (Order == SIGNAL_SELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) { if(!IsTrade) { //Check free margin if (AccountFreeMargin() < (1000 * Lots)) { Print("We have no money. Free Margin = ", AccountFreeMargin()); return(0); } if (UseStopLoss) StopLossLevel = Bid + StopLoss * Point; else StopLossLevel = 0.0; if (UseTakeProfit) TakeProfitLevel = Bid - TakeProfit * Point; else TakeProfitLevel = 0.0; Ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, StopLossLevel, TakeProfitLevel, "Sell(#" + MagicNumber + ")", MagicNumber, 0, DeepPink); if(Ticket > 0) { if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) { Print("SELL order opened : ", OrderOpenPrice()); if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Open Sell"); } else { Print("Error opening SELL order : ", GetLastError()); } } if (EachTickMode) TickCheck = True; if (!EachTickMode) BarCount = Bars; return(0); } } if (!EachTickMode) BarCount = Bars; return(0); } //+------------------------------------------------------------------+
2008-05-30 13:47
2008-05-26 08:57
整理出来了策略 遂道交易法则+顺势而为系统 将遂道法则与我的顺势而为综合起来 选用的指标:EMA13 EMA34 EMA55 EMA89 EMA144 ADX14 AO 开仓条件:多头市场持续做多头。 当价格运行在EMA89与EMA144之间时准备下单(最好弄个提示信号) 仓位:每次出现交易信号时开4张单A,B,C,D 开多仓:1.EMA13向上穿过EMA89与EMA144之间的遂道(我们通常说的金叉)建议使用交叉涵数,而不是简单的EMAA>,<.,=,EMAB这样就避免了条件存在时系统不断地开仓。 2.ADX14的值大于25 3.AO在O轴上 开空仓:1.EMA13向下穿过EMA89与EMA144之间的遂道(我们通常说的死叉)建议使用交叉涵数,这样就避免了条件存在时系统不断地开仓。 2.ADX14的值大于25 3.AO在O轴下 平仓:价格触及EMA34平A单;价格触及EMA55平B单;价格触及EMA89平C单;价格触及EMA144平D单。也就是说每出现一次条件就平一张。 顺势加码:汇价继续运行在EMA89与EMA144之间的遂道上面或下面,也就是说趋势在延续。EMA13与EMA34出现金叉或死叉。注意这里是两个条件。 加开多仓:1.汇价继续运行在EMA89与EMA144之间的遂道上面,也就是说趋势延续多头。 2.EMA13由下向上交叉EMA34(注意要用金叉表示) 加开空仓:1.汇价继续运行在EMA89与EMA144之间的遂道下面,也就是说趋势延续空头。 2.EMA13由上向下交叉EMA34(注意要用死叉表示) 加开仓也是4单,平仓条件方法如上面。(这一个加仓方法可能用C语言写出来比较复杂,如果不好写就不要写加仓。一个交易信号开4张单也够了)
2008-05-23 10:52
谢谢!www.520fx.com将我的策略做成了EA,但我根据520fx论坛上的老师说的写了代码,发现只能做几回交易。你懂编程我将它贴上来你看看。具体要求请看http://bbs.520fx.com/viewthread.php?tid=5012&extra=page%3D1 //+------------------------------------------------------------------+ //| MT4_EA_制作速成班模板.mq4 | //| Copyright 2008, MT4_EA_制作速成班模板. | //| http://www.MT4_EA_制作速成班模板.net
| //+------------------------------------------------------------------+ #property copyright "MT4_EA_制作速成班模板" #property link "http://www.MT4_EA_制作速成班模板.net" //////////////////////// extern string _资金管理_ ="任选一个"; extern bool zijiguanli1= true;//false true、、 extern bool zijiguanli2= false;//false true、、 extern bool zijiguanli3= false;//false true、、 /////////////////////////////////// extern double cheng=1; double aa=0; int s=0,b=0,i; double CurrentBasket=0; double LotMM=0; double lotstart=0; double LotsMax=100; extern double lotab=0.1; double lots=0; double TP=200,TPP=0,SL=60,SLL=0; int slip=6; ////////////////////////////////// double mode=0; double LastOrderType; double LastPricesell; double LastPricebuy; double LastPrice; double OpenSells; double OpenSellStops; double OpenBuys; double OpenBuyStops; double SLauto; double Stoploss; /////////////////////////////// int cnt; extern int TrailingStop=40; /////////////////////////////// string text=""; //////////////////////// extern double macd12_1=12, macd12_2=26, macd12_3=9; double macd12now; extern double ma1=1,ma5=5,ma21=21,ma55=55,ma89=89; double ma1now,ma5now,ma21now,ma55now,ma89now; extern double adx14=14; double adx14now; //////////////////////////// double BaoZhenJing; ////////////////////////////// int panduan; //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- jiancha();//检查判断 资金管理(); macd指标管理(); ma指标管理(); adx指标管理(); zhangchang();//战场管理 xianshi();//显示管理 TrailingStop();//移动止赢 //---- return(0); } //+------------------------------------------------------------------+ void jiancha() { b=0;s=0; for (int cnt=0; cnt<=OrdersTotal(); cnt++) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol()==Symbol() ) { mode=OrderType();LastOrderType=OrderType(); if (OrderType() == OP_SELL){ s++; LastPricesell=OrderOpenPrice();} if (OrderType() == OP_BUY ){ b++; LastPricebuy=OrderOpenPrice();} LastPrice=OrderOpenPrice(); if (OrderType()==OP_SELL) {OpenSells++;} if (OrderType()==OP_SELLSTOP) {OpenSellStops++;} if (OrderType()==OP_BUY) {OpenBuys++;} if (OrderType()==OP_BUYSTOP) {OpenBuyStops++;} } } }//end jiancha //+------------------------------------------------------------------+ void 资金管理() { lotstart=(AccountBalance()*lotab/10000); lots=lotstart; if(cheng==0){cheng=1;} CurrentBasket=AccountEquity()-AccountBalance(); ///////////////////////////////////////////////////////////////// if(zijiguanli1){ LotMM = lots;} ///////////////////////////////////////////////////////////////// if(zijiguanli2){ if(CurrentBasket<0 ) {LotMM=NormalizeDouble(lots*(OrdersTotal()*cheng)+lotstart,2); } if(CurrentBasket==0 ) {LotMM=NormalizeDouble(LotMM*0,2); } } ///////////////////////////////////////////////////////////////// if(zijiguanli3){ if(s+b==0){aa=1;} if(s+b==1){aa=3;} if(s+b==2){aa=7;} if(s+b==3){aa=11;} if(s+b==4){aa=20;} if(s+b==5){aa=31;} if(s+b==6){aa=42;} if(s+b==7){aa=54;} if(s+b==8){aa=66;} if(s+b==9){aa=76;} if(s+b>=10){aa=66;} if(CurrentBasket<0 ) {LotMM=NormalizeDouble(lotstart*aa,2); } if(CurrentBasket==0 ) {LotMM=NormalizeDouble(LotMM*0,2); } } ///////////////////////////////////////////////////////////////// if(LotMMLotsMax){LotMM=LotsMax;} }//end zijiguanli //+------------------------------------------------------------------+ void macd指标管理() { macd12now = iMACD(NULL,0,macd12_1,macd12_2,macd12_3,PRICE_CLOSE,MODE_MAIN,0); } //+------------------------------------------------------------------+ void adx指标管理() { //由MT4_EA_制作速成班学员asp_win提供 adx14now = iADX(NULL, 0, adx14, PRICE_CLOSE, MODE_MAIN, 0); } //+------------------------------------------------------------------+ void ma指标管理() { ma1now = iMA(NULL,0,ma1,0,MODE_EMA,PRICE_CLOSE,0); ma5now = iMA(NULL,0,ma5,0,MODE_EMA,PRICE_CLOSE,0); ma21now = iMA(NULL,0,ma21,0,MODE_EMA,PRICE_CLOSE,0); ma55now = iMA(NULL,0,ma55,0,MODE_EMA,PRICE_CLOSE,0); ma89now = iMA(NULL,0,ma89,0,MODE_EMA,PRICE_CLOSE,0); } //+------------------------------------------------------------------+ void zhangchang() { //--- 如果开仓保证金超过上限,则返还不交易。 ------------------ if( AccountMargin() / (AccountMargin() + AccountFreeMargin()) >= 1 ) { return(0); } BaoZhenJing = MarketInfo( Symbol(), MODE_MARGINREQUIRED); // 一个标准手需保证金金额。 BaoZhenJing = BaoZhenJing * LotMM ; // 下单需用的保证金 if( (AccountMargin()+BaoZhenJing) / (AccountMargin()+AccountFreeMargin()) >= 1 ) { return(0); } //--------------------------------------------------------------------- //这边编写策略(下面if(s+b==100)暂时是故意这样写的,其实是为了防止出错) if(s+b==0){sellme();buyme();closebuy();closesell();} /////第一部分///////////////////// if(s+b==0 //判断没有交易才能判断1 && panduan==0 //判断0才能判断1 && ma5now>ma55now //ma5大过ma55才能判断1 && ma5now25 //判断ADX14大过25才能交易 && macd12now<0 //判断macd12小过0才能交易 && Close[0]ma89now && adx14now>25 && macd12now>0 && Close[0]>Open[0] //判断是在上升 ){buyme();panduan=0;} //////第四部分///////////////////// if(ma89now>ma55now){SLauto=(ma89now-ma55now)/Point;} //止损点数计算[//老师我不知道这个是什么原理,也判断不了是否有错] if(ma89nowStoploss){SL=SLauto;} //如果判断自动止损大一点,就选自动止损 if(SLautoma21now ){closesell();} if(s+b==1 && ma5now0) { TPP=Ask+TP*Point; } if (SL==0) { SLL=0; } if(SL>0) { SLL=Ask-SL*Point; } OrderSend(Symbol(),OP_BUY,LotMM,Ask,slip,SLL,TPP,"M"+Period()+"",0,0,Violet); return(0); } //+------------------------------------------------------------------+ void sellme(){ if (TP==0) { TPP=0; } if(TP>0) { TPP=Bid-(TP*Point); } if (SL==0) { SLL=0; } if(SL>0) { SLL=Bid+(SL*Point); } OrderSend(Symbol(),OP_SELL,LotMM,Bid,2,SLL,TPP,"M"+Period()+"",0,0,GreenYellow); return(0); } //+------------------------------------------------------------------+ //平倉持有的買單 由MT4_EA_制作速成班学员asp_win提供 void closebuy() { if(s+b==1 && ma5nowma21now ); } //+------------------------------------------------------------------+ void xianshi() { string name_8 = "xianshi1"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8, "伺服器时间::"+TimeToStr(CurTime( ))+"", 13, "Arial", White); ObjectSet(name_8, OBJPROP_CORNER, 0); ObjectSet(name_8, OBJPROP_XDISTANCE, 200); ObjectSet(name_8, OBJPROP_YDISTANCE, 5); text="EA制作速成班"; name_8 = "xianshi2"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8, ""+text+"", 15, "Arial", Yellow); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 15); ObjectSet(name_8, OBJPROP_YDISTANCE, 5); name_8 = "Lableyeddrice1"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8, "M"+Period()+" 货币 "+Symbol()+"", 10, "Arial", Silver); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 130); ObjectSet(name_8, OBJPROP_YDISTANCE, 32); //////这个显示上方 name_8 = "LableCurPrice2"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8,""+DoubleToStr(Ask, Digits)+"::买上", 15, "Arial", Lime); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 15); ObjectSet(name_8, OBJPROP_YDISTANCE, 30); //////这个显示下方 name_8 = "Lab345rPrice3"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8,""+DoubleToStr(Bid, Digits)+"::卖下", 15, "Arial", Lime); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 15); ObjectSet(name_8, OBJPROP_YDISTANCE, 50); name_8 = "Acc87lance"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8,""+DoubleToStr( AccountBalance(), 2)+"::账面资金", 13, "Arial", Lime); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 15); ObjectSet(name_8, OBJPROP_YDISTANCE, 70); name_8 = "LableC5rice6"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8,""+DoubleToStr( AccountEquity(), 2)+"::净值资金", 13, "Arial", Lime); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 15); ObjectSet(name_8, OBJPROP_YDISTANCE, 90); name_8 = "Labl456rice6"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8,""+DoubleToStr( AccountMargin(), 2)+"::保证资金", 13, "Arial", Lime); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 15); ObjectSet(name_8, OBJPROP_YDISTANCE, 110); name_8 = "Labl4hcjce6"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8,""+DoubleToStr( AccountFreeMargin(), 2)+"::可用资金", 13, "Arial", Lime); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 15); ObjectSet(name_8, OBJPROP_YDISTANCE, 130); name_8 = "Accvf7lance"; ObjectDelete(name_8); ObjectCreate(name_8, OBJ_LABEL, 0, 0, 0); ObjectSetText(name_8,""+DoubleToStr( AccountProfit(), 2)+"::账面盈亏", 13, "Arial", Lime); ObjectSet(name_8, OBJPROP_CORNER, 1); ObjectSet(name_8, OBJPROP_XDISTANCE, 15); ObjectSet(name_8, OBJPROP_YDISTANCE, 150); //我们可以无限的加 } //+------------------------------------------------------------------+ /////////////////////// void TrailingStop() { for(cnt=OrdersTotal();cnt>=0;cnt--) { OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() == Symbol() )//&& OrderMagicNumber()==MAGICMA) { if (OrderType()==OP_SELL) { if(TrailingStop>0) { if((OrderOpenPrice()-Ask)>(Point*TrailingStop)) { if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0)) { OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red); return(0); } } } } if (OrderType()==OP_BUY) { if(TrailingStop>0) { if(Bid-OrderOpenPrice()>Point*TrailingStop) { if(OrderStopLoss()
2008-05-20 08:23
  • 1
  • 2
前往
共 23 条

本站免责声明:

1、本站所有广告及宣传信息均与韬客无关,如需投资请依法自行决定是否投资、斟酌资金安全及交易亏损风险;

2、韬客是独立的、仅为投资者提供交流的平台,网友发布信息不代表韬客的观点与意思表示,所有因网友发布的信息而造成的任何法律后果、风险与责任,均与韬客无关;

3、金融交易存在极高法律风险,未必适合所有投资者,请不要轻信任何高额投资收益的诱导而贸然投资;投资保证金交易导致的损失可能超过您投入的资金和预期。请您考虑自身的投资经验及风险承担能力,进行合法、理性投资;

4、所有投资者的交易帐户应仅限本人使用,不应交由第三方操作,对于任何接受第三方喊单、操盘、理财等操作的投资和交易,由此导致的任何风险、亏损及责任由投资者个人自行承担;

5、韬客不隶属于任何券商平台,亦不受任何第三方控制,韬客不邀约客户投资任何保证金交易,不接触亦不涉及投资者的任何资金及账户信息,不代理任何交易操盘行为,不向客户推荐任何券商平台,亦不存在其他任何推荐行为。投资者应自行选择券商平台,券商平台的任何行为均与韬客无关。投资者注册及使用韬客即表示其接受和认可上述声明,并自行承担法律风险。

版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]