淘宝网上有卖的,有卖的,有卖的,有卖的,有卖的,有卖的,有卖的,有卖的。 - 页 40 1...333435363738394041424344454647...68 新评论 Евгений 2009.03.14 20:32 #391 Vovanych >> : 1.我把N7S_AO_772012_M1放在C:\Program Files\MetaTrader - Alpari\experts。我的做法正确吗? 2.iCus_N7S_TSM_forExp我把它放到C:Program Files\MetaTrader - Alpari\experts\indicators。我做得对吗? 我是否需要在终端进行一些设置,使N7S_AO_772012_M1与iCus_N7S_TSM_forExp指标一起工作?如果有,是哪些? 4.在N7S_AO_772012_M1或N7S_AO_772012_L9_2中应该做哪些修改才能在SystemForex终端上正确工作,即有四个标志? 我对损失和止损的解释是没有用的。你需要在EA的程序化文本中戳穿我,告诉我那里该怎么修。也就是说,我将能够理解EA中的某某行应该被替换成某某行。 答案是 。 1.正确 2)正确。 3.在设置专家顾问的参数时,选择Indctr=2 4. "向我解释麋鹿和停止是没有用的。" 在我看来,剩下的也是没有用的解释。就目前而言。 [Удален] 2009.03.14 21:15 #392 gorby777 писал(а)>> 回答 1.正确。 2)正确。 3.设置EA参数时选择Indctr=2 4. "我现在解释地段和止损是没有用的。" 我的看法是,解释其他的也是没有用的。再见。 谢谢 mate)))) 我甚至没有想到会有人回答。 关于第四点,是关于在程序文本的什么地方进行修改? 案文见附件。 //Sh N7S_AO_772012_9.mq4 v.77.2012 Sh//。 //Sh Hunter by profit Sh// //Sh Balashiha S&N@yandex.ru //// //2009年1月31日的Sh版本 /// //L2版本有明确的买卖分离功能 #财产版权 "版权©2007,Shooter777" #属性链接 "S7N@mail.ru" #include <WinUser32.mqh>. #include <stderror.mqh>. #include <stdlib.mqh>. //------------------------------------------------------------------// int HM_ALL = 18; // int Trade = 1; // //------------------------------------------------------------------// 外部 bool Trd_Up_X = true; int HM_Up_X = 1; // //// //------------------------------------------------------------------// //extern double tpx = 5; 外置双数slx=500;外置int px=10。 Extern int x1 = 0;extern int x2 = 0;extern int x3 = 0;extern int x4 = 0;int tx = 0。 //------------------------------------------------------------------// Extern bool Trd_Dn_Y = true; int HM_Dn_Y = 1; //// //------------------------------------------------------------------// //extern double tpy = 5;extern double sly = 500;extern int py = 10。 Extern int y1 = 0;extern int y2 = 0;extern int y3 = 0;extern int y4 = 0; int ty = 0。 //------------------------------------------------------------------// extern string Text0="BTS F=1"; 外部int F = 1;外部int pz = 10。 外部int z1 = 0; 外部int z2 = 0; 外部int z3 = 0; 外部int z4 = 0; int tz = 0。 //------------------------------------------------------------------// //------------------------------------------------------------------// Extern string Text1="Neyro G=4"; extern int G = 4; extern string Text2="XXXXXXXX"。 //extern 外置双倍数tpX=5;外置双倍数slX=500;外置int pX=10。 Extern int X1 = 0;extern int X2 = 0;extern int X3 = 0;extern int X4 = 0;int tX = 0。 //------------------------------------------------------------------// 外部字符串Text3="YYYYYYYYY"。 //extern double tpY = 5;extern double slY = 500;extern int pY = 10。 Extern int Y1 = 0; extern int Y2 = 0; extern int Y3 = 0; extern int Y4 = 0; int tY = 0。 //------------------------------------------------------------------// 外部字符串Text4="ZZZZZZZZ";外部int pZ = 10; 外部int Z1 = 0;外部int Z2 = 0;外部int Z3 = 0;外部int Z4 = 0;int tZ = 0。 //------------------------------------------------------------------// //------------------------------------------------------------------// 外来的双倍lot = 0.1。 外部inttern Indctr = 1; //------------------------------------------------------------------// bool TrBlnc = true; int StrtBlnc = 2500; int DBlnc = 2000; int UBlnc = 3500; //------------------------------------------------------------------// int mn;int mnx1 = 772012055;int mny1 = 772012155;int mnX1 = 772012011;int mnY1 = 772012111。 静态 int prvtm = 0;静态 double sl = 10;静态 double tp = 10。 bool cm15=false; bool cmH1=false; bool cmH4=false。 int MMH1;int MN ; static int bu,sll; static bool Flg=false; static bool FlqB=true; static bool FlqS=true。 int i;int ticket = -1;int total;int spread; datetime LFB; double prcptx1=0,prcpty1=0,prcptX1=0,prcptY1=0,prcptZ1=0。 static double Delta_G12,iCusAO_1,iCusAO_2,iCusTSM_1,iCusTSM_2,Dlt_AO12,Dlt_TSM12。 //+------------------------------------------------------------------+ //|专家的初始函数 | //+------------------------------------------------------------------+ int init(){MMH1 = Hour( ); LFB = iTime(Symbol(), 0, 0); H1(); Delta_G12 = G12( ); if ( IsOptimization( ) ) TrBlnc = false;if ( IsTesting( ) ) TrBlnc = false; if (VSR () !=0) {Flg=false;}else {Flg=true;} cmmnt();} //+------------------------------------------------------------------+ //|专家启动功能| //+------------------------------------------------------------------+ int start() { if ( x1==0&x2==0&x3==0&x4==0&y1==0&y2==0&y3==0&y4==0)返回(0)。 if (!Flg){if (VSR () ==0) {Flg=true; return (0);}}. total = OrdersTotal();//spread = MarketInfo(Symbol(), MODE_SPREAD); int iTm = iTime(Symbol(), 0, 0);if(LFB == iTm) return(0); LFB = iTime(Symbol(), 0, 0); int MMM15 = MathMod(Minute( ), 15); 如果(cm15) {如果(MMM15 ==0 ) {cm15 =false; }} 如果(MMM15 !=0){cm15=true;} if(Hour( ) != MMH1) {MMH1 = Hour( ); H1( );} int MMH4 = MathMod(Hour( ), 4); 如果(cmH4) {if(MMH4 == 0 ) {cmH4 =false; Delta_G12 = G12()。 FlqB = true ;FlqS = true ; }} 如果(MMH4 !=0){cmH4=true; } trl()。 startM5()。 cmmnt();} double G12() {switch(Indctr) {case 0: iCusAO_1 = iAO(NULL, 240, 1); iCusAO_2 = iAO(NULL, 240, 2)。 iCusTSM_1 = iCusTSM(24,1);iCusTSM_2 = iCusTSM(24,2)。 Dlt_AO12 = iCusAO_1 -iCusAO_2; Dlt_TSM12 = iCusTSM_1-iCusTSM_2。 如果 ( Dlt_AO12>=0 && Dlt_TSM12 <=0) 返回 (0)。 如果 ( Dlt_AO12<=0 && Dlt_TSM12 >=0) 返回 (0)。 返回(Dlt_AO12)。 案例1: iCusAO_1 = iAO(NULL, 240, 1); iCusAO_2 = iAO(NULL, 240, 2)。 Dlt_AO12 = iCusAO_1 -iCusAO_2; return(Dlt_AO12); 案例2: iCusTSM_1 = iCusTSM(24,1);iCusTSM_2 = iCusTSM(24,2)。 Dlt_AO12 = iCusTSM_1-iCusTSM_2; return(Dlt_AO12)。 案例3: iCusAO_1 = iMA(NULL,60,12,0,MODE_EMA,PRICE_CLOSE,1)-iMA(NULL,60,26,0,MODE_EMA,PRICE_CLOSE,1) 。 iCusAO_2 = iMA(NULL,60,12,0,MODE_EMA,PRICE_CLOSE,2)-iMA(NULL,60,26,0,MODE_EMA,PRICE_CLOSE,2) 。 Dlt_AO12 = iCusAO_1 -iCusAO_2; return(Dlt_AO12);}} //+--------------------------------------------------------------------------------------+ double iCusTSM (int pr, int shft) { 返回(iCustom(NULL, 240, "iCus_N7S_TSM_forExp", pr,1,shft)); } //+--------------------------------------------------------------------------------------+ 双重BTS() { 如果((prcptrnz1() > 0 || F==0))//& bu<HM_Up_X) {if (prcptx1 > 0 && Delta_G12>0) {sl = slx; tp = tpx*slx; mn= mnx1; return (1);}}。 如果((prcptrnz1() < 0 || F==0))//& sll<HM_Dn_Y) {if (prcpty1 > 0 && Delta_G12<0) {sl = sly; tp = tpy*sly; mn= mny1 ;return (-1);}}. 返回(0);} //+--------------------------------------------------------------------------------------+ double prcptrnAC(int q1,int q2,int q3,int q4,int pr,int at) {double qw = (q1-50)+((q2-50)*iA_C(pr)+(q3-50)*iA_C(2*pr)+(q4-50)*iA_C(3*pr))/iA_C(1)。 如果(MathAbs(qw)>at)返回(qw);否则返回(0);}。 //+--------------------------------------------------------------------------------------+ double iA_C (int pr){int tmfr=60; return(iAO(Symbol(), tmfr, pr)); } //+--------------------------------------------------------------------------------------+ void BuSll ( int pl, int OrdTp, int mgnmb) // pl-source 0-acting 1-closed // OrdTp=order type 1-market(0and1) 3-LIMIT(2and3) 5-STOP(4and5) { switch(pl) {case 0: bu=0; sll=0; int ChTpBu,ChTpSll; // Print (" OrdTp ",OrdTp); // count B&S market orders switch(OrdTp) {case 1: ChTpBu=OP_BUY; ChTpSll=OP_SELL; break; case 3: ChTpBu=OP_BUYSTOP; ChTpSll =OP_SELLSTOP; break; case 5: ChTpBu=OP_BUYLIMIT;ChTpSll =OP_SELLLIMIT; break; } for(int i=0;i<OrdersTotal();i++) {OrderSelect(i, SELECT_BY_POS, MODE_TRADES); int OMN=OrderMagicNumber(); 如果(OrderSymbol()!=Symbol()){继续;}。 如果(OrderType()==ChTpBu &&(OMN>=mgnmb && OMN<=mgnmb+99)){ bu++;}。 如果(OrderType()==ChTpSll &&(OMN>=mgnmb+100 && OMN<=mgnmb+199)){sll++;}。 }break; case 1: int pstv=0, ngtv=0; // 选择历史分析 打印("历史上的订单数");break;}}。 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ double prcptrnz1() {double qz =(z1-50)*(Close[1]-Open[pz])+(z2-50)*(Open[pz]-Open[pz*2])。 +(z3-50)*(Open[pz*2]-Open[pz*3])+(z4-50)*(Open[pz*3]-Open[pz*4]);return(qz);} //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ double prcptrnZ1() {double qZ =(Z1-50)*(Close[1]-Open[pZ])+(Z2-50)*(Open[pZ]-Open[pZ*2])。 +(Z3-50)*(Open[pZ*2]-Open[pZ*3])+(Z4-50)*(Open[pZ*3]-Open[pZ*4]);return(qZ);} //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 空白的trl(){ total= OrdersTotal(); spread = MarketInfo(Symbol(), MODE_SPREAD); for( i = total-1; i >= 0; i--) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); MN=OrderMagicNumber(); 如果(OrderSymbol() == Symbol() && MN>= 772012000 && MN<=772012199) { if (MN==772012055) {sl = slx; tp = tpx*slx; mn= mnx1; } if (MN==772012155) {sl = sly; tp = tpy*sly; mn= mny1; } if (MN==772012011) {sl = slX; tp = tpX*slX; mn= mnX1;}. if (MN==772012111) {sl = slY; tp = tpY*slY; mn= mnY1; } int prevticket = OrderTicket();if(OrderType() == OP_BUY) {if(FLG(0)) { OrderClose(prevticket,OrderLots( ),Bid,slppg( ),Black);} 如果(Bid > (OrderStopLoss() + (sl * 2 + spread) * Point) { 如果(VSR()< 0) { OrderClose(prevticket,OrderLots( ),Bid,slppg(),Black); } 否则 { OrderModify(OrderTicket(),OrderOpenPrice(),Bid - sl * Point,0, 0, Blue);}} 否则 {if(FLG(0)){ OrderClose(prevticket,OrderLots( ),Ask,slppg( ),Blue);}} 如果(Ask < (OrderStopLoss() - (sl * 2 + spread) * Point) {if(VSR() > 0) { OrderClose(prevticket,OrderLots( ),Ask,slppg( ),Blue);} else{ OrderModify(OrderTicket(),OrderOpenPrice(),Ask + sl * Point,0,0,Blue);}}}。 }}} //+shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh//+shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh double VSR() { prcptZ1 = prcptrnZ1(); if(G==4){ if(prcptZ1>0){if(prcptX1>0 && Delta_G12>0){sl = slX; tp = tpX*slX; mn= mnX1;返回( 1);}}。 else {if(prcptY1>0 && Delta_G12<0){sl = slY; tp = tpY*slY; mn= mnY1; return ( -1);}} 返回(BTS());} if(G==3){ if(prcptY1>0 && Delta_G12<0){sl = slY; tp = tpY*slY; mn= mnY1;返回(-1);}。 else {return (BTS());}}. if(G==2){ if(prcptX1>0 && Delta_G12>0){sl = slX; tp = tpX*slX; mn= mnX1;return ( 1);}. 否则{返回(BTS();}}。 if(G==9){ if(prcptX1>0 && Delta_G12>0 && bu <HM_Up_X){sl = slX; tp = tpX*slX; mn= mnX1;return ( 1);}。 if(prcptY1>0 && Delta_G12<0 && sll<HM_Dn_Y){sl = slY; tp = tpY*slY; mn= mnY1;返回 (-1);}。 返回(BTS());} 返回(BTS());} void H1() { prcptx1 = prcptrnAC(x1,x2,x3,x4,px,tx) ; prcpty1 = prcptrnAC(y1,y2,y3,y4,py,ty) ; prcptX1 = prcptrnAC(X1,X2,X3,X4,pX,tX) 。 prcptY1 = prcptrnAC(Y1,Y2,Y3,Y4,pY,tY) 。 //if (Symbol()!="GBPJPY" || Symbol()!="USDCHF"){ FlqB = true ;FlqS = true ; } BuSll(0,1,772012000)。 } //+------------------------------------------------------------------+ void startM5() {ticket = -1 ; RefreshRates(); if (total < HM_ALL) { BuSll (0,1,772012000); cmmnt(); 如果( FLG(1)) {if (Trd_Up_X && VSR() > 0 && bu <HM_Up_X && FlqB) { 如果(MOS( 0, lots, sl, tp, WindowExpertName(), mn)>=1) {FlqB=false;}}. 如果(Trd_Dn_Y && VSR() < 0 && sll<HM_Dn_Y && FlqS) { 如果(MOS( 1, lots, sl, tp, WindowExpertName(), mn)>=1) {FlqS=false;}}. }}} //+------------------------------------------------------------------+ bool FLG (int cs ) { int AE = AccountEquity( ) ; switch(cs) {case 0: if((DayOfWeek( ) ==5 && Hour( ) >=22) || (TrBlnc && (AE > UBlnc)) 返回(true);否则返回(false)。 案例1:如果(DayOfWeek( ) ==1 && Hour( ) <14){ string dttm = StringConcatenate (Year(),".",Month(),".",Day() )。 数据时间smtm=StrToTime(dttm)。 bool Gp; int shft = iBarShift(NULL,0,smtm); double iOpn = iOpen (NULL,0,shft); double iCls = iClose (NULL,0,shft+1) 。 double dOC = MathAbs ((iOpn - iCls)/(Point*10)); 如果(dOC>20)Gp = true ; //字符串var1=TimeToStr(smtm,TIME_DATE|TIME_SECONDS;) } 如果((TrBlnc && ((AE > UBlnc)|(AE < DBlnc)) || ((DayOfWeek( ) == 1 && Hour( ) <2) || (DayOfWeek( ) == 5 && Hour( ) >=18)) || ((DayOfWeek( ) ==1 && Hour( ) <14) && Gp)) 返回(false);否则返回(true)。 } } //+------------------------------------------------------------------+ int MOS(int Op_,double Vl,double StLs, double TkPt, string cmnt,int mgc) { bool OrSd = false; if(!(Op_==0 ||Op_==1)){Print ("Error!!!Order not set! Wrong type!");return (-1); } else {OrSd = true;} datetime Begin=TimeCurrent()。 int err,rslt; double prc; color clr; 开关 (Op_) {case 0: prc=Ask; clr=Green; StLs= Bid - StLs * Point; TkPt=Bid + TkPt * Point; break; case 1: prc=Bid; clr=Red; StLs= Ask + StLs * Point; TkPt=Ask - TkPt * Point ;break;} 如果( OrSd ) {rslt= OrderSend(Symbol(),Op_,Vl,prc,slppg(),StLs,TkPt,cmnt,mgc,0,clr); 如果(rslt==-1) {err=GetLastError(); Print("Error setting order!!(",err,") " )。 if(!IsTesting()) {while(! (( rslt>0 || TimeCurrent()-Begin>20)) {Sleep(1000); RefreshRates(); rslt= OrderSend(Symbol(),Op_,Vl,prc,slppg(),StLs,TkPt,cmnt,mgc,0,clr); }}}} return(rslt);} //+------------------------------------------------------------------+ int slppg() { int sprd =2*MarketInfo(Symbol(),MODE_SPREAD); return ( sprd );}. void cmmnt(){ if ( !IsOptimization( ) ){ Comment("Buy",bu," Sell",sll," symbol",Symbol(), "n Delta_G12",Delta_G12。 "n x",prcptx1," y",prcpty1," z",prcptrnz1()。 "n X",prcptX1," Y",prcptY1," Z",prcptrnZ1()。 "No VSR",VSR()。 "Flg",Flg," FlqBS",FlqB," @",FlqS。 "FLU",FLG(1), "FLD",FLG(0) );}}。 你能不能用红色标出应该纠正的内容,用蓝色打出要纠正的内容? EA N7S_AO_772012 回溯测试/优化 Backtesting/Optimization Евгений 2009.03.14 21:27 #393 作者已经在上面某个地方回答了类似的问题。 Николай 2009.03.14 21:33 #394 Vovanych писал(а)>> 你能用红色标出需要改正的地方,用蓝色 标出 需要改正的地方吗? 我必须检查,但我不认为有什么需要改变。这些变化涉及安装集文件。我已插入的自动选择滑块。我们来问问那些4位数的人。 [Удален] 2009.03.14 21:44 #395 SHOOTER777 писал(а)>> 我得检查一下,但我认为不需要改变什么。这些变化涉及安装集文件。我已经插入了自动选择的滑块。让我们来问问那些还在4位数上的人。 谢谢,我只是有两套你的设置集文件,分别是五个字符的,和四个字符的。 但我还是会问人的。 Николай 2009.03.14 21:45 #396 今天测试了我年初的其他EA,包括指标类的。在过去的两个星期里,没有一个人给出了积极的结果。 我也用不同的方法对M1进行了优化,但我所尝试的都是最后一周的损失。我认为上周对许多战略来说是困难的。 [Удален] 2009.03.14 21:47 #397 人们!!!谁在坐在四位数的引号上。 有没有人对N7S_AO_772012_M1 EA(或以前的版本)进行过任何修复,以便在四位数终端工作? 在四位数的终端上一切工作正常? Евгений 2009.03.15 00:08 #398 SHOOTER777 >> : 今天测试了我年初的其他EA,包括指标类的。在过去的两个星期里,他们都没有显示出积极的结果。 我还用不同的方法对M1进行了优化,反正最后一周是不利的。我认为上个星期对许多战略来说是困难的。 我原来是在加。因此,对于我的设置来说,这是一个不好的迹象。(( [Удален] 2009.03.15 11:09 #399 当用一个指标优化 N7S_AO_772012_M1专家顾问 时,在第二种情况下用两个指标,第二个指标iCus_N7S_TSM_forExp揭示了以下关系。 在第一种情况下,不同优化阶段的最大利润比第二种情况高30-100%。 在第一种情况下,不同阶段的最大利润的交易数量大约是第二种情况的两倍。 一般来说,交易的数量非常少。 谁知道在优化过程中,应该改变专家顾问的哪些参数,向什么方向改变,以增加交易的数量? Евгений 2009.03.15 12:14 #400 沃瓦尼克,甚至笑了起来。) 我们在这里都是为了共同找出:哪些参数,朝哪个方向,在什么时候改变,以赚取利润)))。 1...333435363738394041424344454647...68 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
1.我把N7S_AO_772012_M1放在C:\Program Files\MetaTrader - Alpari\experts。我的做法正确吗?
2.iCus_N7S_TSM_forExp我把它放到C:Program Files\MetaTrader - Alpari\experts\indicators。我做得对吗?
我是否需要在终端进行一些设置,使N7S_AO_772012_M1与iCus_N7S_TSM_forExp指标一起工作?如果有,是哪些?
4.在N7S_AO_772012_M1或N7S_AO_772012_L9_2中应该做哪些修改才能在SystemForex终端上正确工作,即有四个标志?
我对损失和止损的解释是没有用的。你需要在EA的程序化文本中戳穿我,告诉我那里该怎么修。也就是说,我将能够理解EA中的某某行应该被替换成某某行。
答案是 。
1.正确
2)正确。
3.在设置专家顾问的参数时,选择Indctr=2
4. "向我解释麋鹿和停止是没有用的。" 在我看来,剩下的也是没有用的解释。就目前而言。
回答
1.正确。
2)正确。
3.设置EA参数时选择Indctr=2
4. "我现在解释地段和止损是没有用的。" 我的看法是,解释其他的也是没有用的。再见。
谢谢 mate))))
我甚至没有想到会有人回答。
关于第四点,是关于在程序文本的什么地方进行修改?
案文见附件。
//Sh N7S_AO_772012_9.mq4 v.77.2012 Sh//。
//Sh Hunter by profit Sh//
//Sh Balashiha S&N@yandex.ru ////
//2009年1月31日的Sh版本 ///
//L2版本有明确的买卖分离功能
#财产版权 "版权©2007,Shooter777"
#属性链接 "S7N@mail.ru"
#include <WinUser32.mqh>.
#include <stderror.mqh>.
#include <stdlib.mqh>.
//------------------------------------------------------------------//
int HM_ALL = 18; //
int Trade = 1; //
//------------------------------------------------------------------//
外部 bool Trd_Up_X = true; int HM_Up_X = 1; // ////
//------------------------------------------------------------------//
//extern
double tpx = 5;
外置双数slx=500;外置int px=10。
Extern int x1 = 0;extern int x2 = 0;extern int x3 = 0;extern int x4 = 0;int tx = 0。
//------------------------------------------------------------------//
Extern bool Trd_Dn_Y = true; int HM_Dn_Y = 1; ////
//------------------------------------------------------------------//
//extern
double tpy = 5;extern double sly = 500;extern int py = 10。
Extern int y1 = 0;extern int y2 = 0;extern int y3 = 0;extern int y4 = 0; int ty = 0。
//------------------------------------------------------------------//
extern string Text0="BTS F=1";
外部int F = 1;外部int pz = 10。
外部int z1 = 0; 外部int z2 = 0; 外部int z3 = 0; 外部int z4 = 0; int tz = 0。
//------------------------------------------------------------------//
//------------------------------------------------------------------//
Extern string Text1="Neyro G=4"; extern int G = 4; extern string Text2="XXXXXXXX"。
//extern
外置双倍数tpX=5;外置双倍数slX=500;外置int pX=10。
Extern int X1 = 0;extern int X2 = 0;extern int X3 = 0;extern int X4 = 0;int tX = 0。
//------------------------------------------------------------------//
外部字符串Text3="YYYYYYYYY"。
//extern
double tpY = 5;extern double slY = 500;extern int pY = 10。
Extern int Y1 = 0; extern int Y2 = 0; extern int Y3 = 0; extern int Y4 = 0; int tY = 0。
//------------------------------------------------------------------//
外部字符串Text4="ZZZZZZZZ";外部int pZ = 10;
外部int Z1 = 0;外部int Z2 = 0;外部int Z3 = 0;外部int Z4 = 0;int tZ = 0。
//------------------------------------------------------------------//
//------------------------------------------------------------------//
外来的双倍lot = 0.1。
外部inttern Indctr = 1;
//------------------------------------------------------------------//
bool TrBlnc = true; int StrtBlnc = 2500; int DBlnc = 2000; int UBlnc = 3500;
//------------------------------------------------------------------//
int mn;int mnx1 = 772012055;int mny1 = 772012155;int mnX1 = 772012011;int mnY1 = 772012111。
静态 int prvtm = 0;静态 double sl = 10;静态 double tp = 10。
bool cm15=false; bool cmH1=false; bool cmH4=false。
int MMH1;int MN ;
static int bu,sll;
static bool Flg=false;
static bool FlqB=true; static bool FlqS=true。
int i;int ticket = -1;int total;int spread;
datetime LFB;
double prcptx1=0,prcpty1=0,prcptX1=0,prcptY1=0,prcptZ1=0。
static double Delta_G12,iCusAO_1,iCusAO_2,iCusTSM_1,iCusTSM_2,Dlt_AO12,Dlt_TSM12。
//+------------------------------------------------------------------+
//|专家的初始函数 |
//+------------------------------------------------------------------+
int init(){MMH1 = Hour( ); LFB = iTime(Symbol(), 0, 0); H1();
Delta_G12 = G12( ); if ( IsOptimization( ) ) TrBlnc = false;if ( IsTesting( ) ) TrBlnc = false;
if (VSR () !=0) {Flg=false;}else {Flg=true;}
cmmnt();}
//+------------------------------------------------------------------+
//|专家启动功能|
//+------------------------------------------------------------------+
int start()
{ if ( x1==0&x2==0&x3==0&x4==0&y1==0&y2==0&y3==0&y4==0)返回(0)。
if (!Flg){if (VSR () ==0) {Flg=true; return (0);}}.
total = OrdersTotal();//spread = MarketInfo(Symbol(), MODE_SPREAD);
int iTm = iTime(Symbol(), 0, 0);if(LFB == iTm) return(0); LFB = iTime(Symbol(), 0, 0);
int MMM15 = MathMod(Minute( ), 15);
如果(cm15) {如果(MMM15 ==0 ) {cm15 =false; }} 如果(MMM15 !=0){cm15=true;}
if(Hour( ) != MMH1) {MMH1 = Hour( ); H1( );}
int MMH4 = MathMod(Hour( ), 4);
如果(cmH4) {if(MMH4 == 0 ) {cmH4 =false;
Delta_G12 = G12()。
FlqB = true ;FlqS = true ;
}}
如果(MMH4 !=0){cmH4=true; }
trl()。
startM5()。
cmmnt();}
double G12() {switch(Indctr)
{case 0:
iCusAO_1 = iAO(NULL, 240, 1); iCusAO_2 = iAO(NULL, 240, 2)。
iCusTSM_1 = iCusTSM(24,1);iCusTSM_2 = iCusTSM(24,2)。
Dlt_AO12 = iCusAO_1 -iCusAO_2; Dlt_TSM12 = iCusTSM_1-iCusTSM_2。
如果 ( Dlt_AO12>=0 && Dlt_TSM12 <=0) 返回 (0)。
如果 ( Dlt_AO12<=0 && Dlt_TSM12 >=0) 返回 (0)。
返回(Dlt_AO12)。
案例1:
iCusAO_1 = iAO(NULL, 240, 1); iCusAO_2 = iAO(NULL, 240, 2)。
Dlt_AO12 = iCusAO_1 -iCusAO_2; return(Dlt_AO12);
案例2:
iCusTSM_1 = iCusTSM(24,1);iCusTSM_2 = iCusTSM(24,2)。
Dlt_AO12 = iCusTSM_1-iCusTSM_2; return(Dlt_AO12)。
案例3:
iCusAO_1 = iMA(NULL,60,12,0,MODE_EMA,PRICE_CLOSE,1)-iMA(NULL,60,26,0,MODE_EMA,PRICE_CLOSE,1) 。
iCusAO_2 = iMA(NULL,60,12,0,MODE_EMA,PRICE_CLOSE,2)-iMA(NULL,60,26,0,MODE_EMA,PRICE_CLOSE,2) 。
Dlt_AO12 = iCusAO_1 -iCusAO_2; return(Dlt_AO12);}}
//+--------------------------------------------------------------------------------------+
double iCusTSM (int pr, int shft)
{ 返回(iCustom(NULL, 240, "iCus_N7S_TSM_forExp", pr,1,shft)); }
//+--------------------------------------------------------------------------------------+
双重BTS() {
如果((prcptrnz1() > 0 || F==0))//& bu<HM_Up_X)
{if (prcptx1 > 0 && Delta_G12>0) {sl = slx; tp = tpx*slx; mn= mnx1; return (1);}}。
如果((prcptrnz1() < 0 || F==0))//& sll<HM_Dn_Y)
{if (prcpty1 > 0 && Delta_G12<0) {sl = sly; tp = tpy*sly; mn= mny1 ;return (-1);}}.
返回(0);}
//+--------------------------------------------------------------------------------------+
double prcptrnAC(int q1,int q2,int q3,int q4,int pr,int at)
{double qw = (q1-50)+((q2-50)*iA_C(pr)+(q3-50)*iA_C(2*pr)+(q4-50)*iA_C(3*pr))/iA_C(1)。
如果(MathAbs(qw)>at)返回(qw);否则返回(0);}。
//+--------------------------------------------------------------------------------------+
double iA_C (int pr){int tmfr=60; return(iAO(Symbol(), tmfr, pr)); }
//+--------------------------------------------------------------------------------------+
void BuSll ( int pl, int OrdTp, int mgnmb) // pl-source 0-acting 1-closed // OrdTp=order type 1-market(0and1) 3-LIMIT(2and3) 5-STOP(4and5)
{ switch(pl)
{case 0: bu=0; sll=0; int ChTpBu,ChTpSll; // Print (" OrdTp ",OrdTp); // count B&S market orders
switch(OrdTp)
{case 1: ChTpBu=OP_BUY; ChTpSll=OP_SELL; break;
case 3: ChTpBu=OP_BUYSTOP; ChTpSll =OP_SELLSTOP; break;
case 5: ChTpBu=OP_BUYLIMIT;ChTpSll =OP_SELLLIMIT; break; }
for(int i=0;i<OrdersTotal();i++)
{OrderSelect(i, SELECT_BY_POS, MODE_TRADES); int OMN=OrderMagicNumber();
如果(OrderSymbol()!=Symbol()){继续;}。
如果(OrderType()==ChTpBu &&(OMN>=mgnmb && OMN<=mgnmb+99)){ bu++;}。
如果(OrderType()==ChTpSll &&(OMN>=mgnmb+100 && OMN<=mgnmb+199)){sll++;}。
}break;
case 1: int pstv=0, ngtv=0; // 选择历史分析
打印("历史上的订单数");break;}}。
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
double prcptrnz1() {double qz =(z1-50)*(Close[1]-Open[pz])+(z2-50)*(Open[pz]-Open[pz*2])。
+(z3-50)*(Open[pz*2]-Open[pz*3])+(z4-50)*(Open[pz*3]-Open[pz*4]);return(qz);}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
double prcptrnZ1() {double qZ =(Z1-50)*(Close[1]-Open[pZ])+(Z2-50)*(Open[pZ]-Open[pZ*2])。
+(Z3-50)*(Open[pZ*2]-Open[pZ*3])+(Z4-50)*(Open[pZ*3]-Open[pZ*4]);return(qZ);}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
空白的trl(){
total= OrdersTotal(); spread = MarketInfo(Symbol(), MODE_SPREAD);
for( i = total-1; i >= 0; i--)
{ OrderSelect(i, SELECT_BY_POS, MODE_TRADES); MN=OrderMagicNumber();
如果(OrderSymbol() == Symbol() && MN>= 772012000 && MN<=772012199)
{ if (MN==772012055) {sl = slx; tp = tpx*slx; mn= mnx1; }
if (MN==772012155) {sl = sly; tp = tpy*sly; mn= mny1; }
if (MN==772012011) {sl = slX; tp = tpX*slX; mn= mnX1;}.
if (MN==772012111) {sl = slY; tp = tpY*slY; mn= mnY1; }
int prevticket = OrderTicket();if(OrderType() == OP_BUY)
{if(FLG(0)) { OrderClose(prevticket,OrderLots( ),Bid,slppg( ),Black);}
如果(Bid > (OrderStopLoss() + (sl * 2 + spread) * Point)
{ 如果(VSR()< 0) { OrderClose(prevticket,OrderLots( ),Bid,slppg(),Black); }
否则 { OrderModify(OrderTicket(),OrderOpenPrice(),Bid - sl * Point,0, 0, Blue);}}
否则 {if(FLG(0)){ OrderClose(prevticket,OrderLots( ),Ask,slppg( ),Blue);}}
如果(Ask < (OrderStopLoss() - (sl * 2 + spread) * Point)
{if(VSR() > 0)
{ OrderClose(prevticket,OrderLots( ),Ask,slppg( ),Blue);}
else{ OrderModify(OrderTicket(),OrderOpenPrice(),Ask + sl * Point,0,0,Blue);}}}。
}}}
//+shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh//+shhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
double VSR() { prcptZ1 = prcptrnZ1();
if(G==4){ if(prcptZ1>0){if(prcptX1>0 && Delta_G12>0){sl = slX; tp = tpX*slX; mn= mnX1;返回( 1);}}。
else {if(prcptY1>0 && Delta_G12<0){sl = slY; tp = tpY*slY; mn= mnY1; return ( -1);}}
返回(BTS());}
if(G==3){ if(prcptY1>0 && Delta_G12<0){sl = slY; tp = tpY*slY; mn= mnY1;返回(-1);}。
else {return (BTS());}}.
if(G==2){ if(prcptX1>0 && Delta_G12>0){sl = slX; tp = tpX*slX; mn= mnX1;return ( 1);}.
否则{返回(BTS();}}。
if(G==9){ if(prcptX1>0 && Delta_G12>0 && bu <HM_Up_X){sl = slX; tp = tpX*slX; mn= mnX1;return ( 1);}。
if(prcptY1>0 && Delta_G12<0 && sll<HM_Dn_Y){sl = slY; tp = tpY*slY; mn= mnY1;返回 (-1);}。
返回(BTS());}
返回(BTS());}
void H1() { prcptx1 = prcptrnAC(x1,x2,x3,x4,px,tx) ;
prcpty1 = prcptrnAC(y1,y2,y3,y4,py,ty) ;
prcptX1 = prcptrnAC(X1,X2,X3,X4,pX,tX) 。
prcptY1 = prcptrnAC(Y1,Y2,Y3,Y4,pY,tY) 。
//if (Symbol()!="GBPJPY" || Symbol()!="USDCHF"){ FlqB = true ;FlqS = true ; }
BuSll(0,1,772012000)。
}
//+------------------------------------------------------------------+
void startM5() {ticket = -1 ; RefreshRates();
if (total < HM_ALL) { BuSll (0,1,772012000); cmmnt();
如果( FLG(1))
{if (Trd_Up_X && VSR() > 0 && bu <HM_Up_X && FlqB) {
如果(MOS( 0, lots, sl, tp, WindowExpertName(), mn)>=1) {FlqB=false;}}.
如果(Trd_Dn_Y && VSR() < 0 && sll<HM_Dn_Y && FlqS) {
如果(MOS( 1, lots, sl, tp, WindowExpertName(), mn)>=1) {FlqS=false;}}.
}}}
//+------------------------------------------------------------------+
bool FLG (int cs )
{ int AE = AccountEquity( ) ;
switch(cs)
{case 0: if((DayOfWeek( ) ==5 && Hour( ) >=22) || (TrBlnc && (AE > UBlnc))
返回(true);否则返回(false)。
案例1:如果(DayOfWeek( ) ==1 && Hour( ) <14){
string dttm = StringConcatenate (Year(),".",Month(),".",Day() )。
数据时间smtm=StrToTime(dttm)。
bool Gp;
int shft = iBarShift(NULL,0,smtm);
double iOpn = iOpen (NULL,0,shft); double iCls = iClose (NULL,0,shft+1) 。
double dOC = MathAbs ((iOpn - iCls)/(Point*10));
如果(dOC>20)Gp = true ;
//字符串var1=TimeToStr(smtm,TIME_DATE|TIME_SECONDS;)
}
如果((TrBlnc && ((AE > UBlnc)|(AE < DBlnc))
|| ((DayOfWeek( ) == 1 && Hour( ) <2) || (DayOfWeek( ) == 5 && Hour( ) >=18))
|| ((DayOfWeek( ) ==1 && Hour( ) <14) && Gp))
返回(false);否则返回(true)。
}
}
//+------------------------------------------------------------------+
int MOS(int Op_,double Vl,double StLs, double TkPt, string cmnt,int mgc)
{ bool OrSd = false;
if(!(Op_==0 ||Op_==1)){Print ("Error!!!Order not set! Wrong type!");return (-1); }
else {OrSd = true;}
datetime Begin=TimeCurrent()。
int err,rslt; double prc; color clr;
开关 (Op_)
{case 0: prc=Ask; clr=Green; StLs= Bid - StLs * Point; TkPt=Bid + TkPt * Point; break;
case 1: prc=Bid; clr=Red; StLs= Ask + StLs * Point; TkPt=Ask - TkPt * Point ;break;}
如果( OrSd )
{rslt= OrderSend(Symbol(),Op_,Vl,prc,slppg(),StLs,TkPt,cmnt,mgc,0,clr);
如果(rslt==-1)
{err=GetLastError(); Print("Error setting order!!(",err,") " )。
if(!IsTesting())
{while(! (( rslt>0 || TimeCurrent()-Begin>20))
{Sleep(1000); RefreshRates();
rslt= OrderSend(Symbol(),Op_,Vl,prc,slppg(),StLs,TkPt,cmnt,mgc,0,clr); }}}}
return(rslt);}
//+------------------------------------------------------------------+
int slppg()
{ int sprd =2*MarketInfo(Symbol(),MODE_SPREAD); return ( sprd );}.
void cmmnt(){ if ( !IsOptimization( ) ){
Comment("Buy",bu," Sell",sll," symbol",Symbol(),
"n Delta_G12",Delta_G12。
"n x",prcptx1," y",prcpty1," z",prcptrnz1()。
"n X",prcptX1," Y",prcptY1," Z",prcptrnZ1()。
"No VSR",VSR()。
"Flg",Flg," FlqBS",FlqB," @",FlqS。
"FLU",FLG(1), "FLD",FLG(0) );}}。
你能不能用红色标出应该纠正的内容,用蓝色打出要纠正的内容?
你能用红色标出需要改正的地方,用蓝色 标出 需要改正的地方吗?
我必须检查,但我不认为有什么需要改变。这些变化涉及安装集文件。我已插入的自动选择滑块。我们来问问那些4位数的人。
我得检查一下,但我认为不需要改变什么。这些变化涉及安装集文件。我已经插入了自动选择的滑块。让我们来问问那些还在4位数上的人。
谢谢,我只是有两套你的设置集文件,分别是五个字符的,和四个字符的。
但我还是会问人的。
人们!!!谁在坐在四位数的引号上。
有没有人对N7S_AO_772012_M1 EA(或以前的版本)进行过任何修复,以便在四位数终端工作?
在四位数的终端上一切工作正常?
今天测试了我年初的其他EA,包括指标类的。在过去的两个星期里,他们都没有显示出积极的结果。 我还用不同的方法对M1进行了优化,反正最后一周是不利的。我认为上个星期对许多战略来说是困难的。
我原来是在加。因此,对于我的设置来说,这是一个不好的迹象。((
当用一个指标优化 N7S_AO_772012_M1专家顾问 时,在第二种情况下用两个指标,第二个指标iCus_N7S_TSM_forExp揭示了以下关系。
在第一种情况下,不同优化阶段的最大利润比第二种情况高30-100%。
在第一种情况下,不同阶段的最大利润的交易数量大约是第二种情况的两倍。
一般来说,交易的数量非常少。
谁知道在优化过程中,应该改变专家顾问的哪些参数,向什么方向改变,以增加交易的数量?
沃瓦尼克,甚至笑了起来。)
我们在这里都是为了共同找出:哪些参数,朝哪个方向,在什么时候改变,以赚取利润)))。