In search of the sacred 'grail'...

 

Afternoon...or night, everyone. I'm working on a maniacal EA here. I'm not going to post it yet, it's just not finished yet, but I'll post it for sure...for FREE. I just need help. Question namba van - how to make auto-optimization ... say 8-16 napametrov? Article about auto-optimization, which looms large on the site ... not that does not work ... there to 4 parameters can be put on the optimum, and how dodgy everything works. In general, maybe someone will prompt Chago of their own developments? MY DEAR KIM, IT WOULD BE WORTH REFERRING TO YOU IN PARTICULAR. If I've got a good idea, I may try to draw some of them on the market but I don't have any good ones. Sometimes it overdraws, sometimes slows down, sometimes shows nothing worthwhile. I am not saying "give me a subomega indicator and I will change the world". The essence of my strategy in the Expert Advisor is the percentage ratio of a group signal of 8 indicators and a little filtered one. So I have indicators of standard collection and I want to experiment with individual indicators. In general, maybe the collective mind will win.

 
Let's be specific. What, as they say, comrade cherchez la (or le, or at least les) ? Indicators? What kind - there are plenty of them. All the more so because their nature is very varied.
 
Let's be specific. First I took Stochastic - it's the fastest, then I diluted it with a filter from Osma... and then I had HighLow, Aligator, Mashki, CCI. That's what I got out of them...But when converting all the signals into percentages, some are ignored. Clearly, you have to prioritise based on optimisation. But we may go another way - to add more or less adequate indicator (or a couple of indicators) to the existing ones with 0 and 1 signal output. At this stage I have a drawdown of couple percents with 1.85 expected payoff and 50 positions per day. Quite good in my opinion. But here is the problem - there is a moment or, to be more exact, usually these two moments per day (moreover, any day in history) when the Expert Advisor is severely mistaken. So I wanted to filter these moments as much as possible. Perhaps, I have a Zig-Zag that would not overdraw and would work faster. I think that is something I once saw somewhere ... but alas did not attach importance to it then, and now I can not find. Or here's another - Extrapolator....would be GREAT...but this thing redraws...how do I do that?
 
     StH11v=iStochastic(NULL, TF1, stK, stP, stD,MODE_SMA,0,MODE_MAIN,0);   StH1pr1v=iStochastic(NULL, TF1, stK, stP, stD,MODE_SMA,0,MODE_SIGNAL,0);
     StH41v=iStochastic(NULL, TF2, stK, stP, stD,MODE_SMA,0,MODE_MAIN,0);   StH4pr1v=iStochastic(NULL, TF2, stK, stP, stD,MODE_SMA,0,MODE_SIGNAL,0);
     StD11v=iStochastic(NULL, TF3, stK, stP, stD,MODE_SMA,0,MODE_MAIN,0);   StD1pr1v=iStochastic(NULL, TF3, stK, stP, stD,MODE_SMA,0,MODE_SIGNAL,0);
     
     if ( StH11v<25 && StH1pr1v<25 && StH11v> StH1pr1v){ Stx1TF1x= S; Stx1TF1y=0;}
     if ( StH11v>75 && StH1pr1v>75 && StH11v< StH1pr1v){ Stx1TF1y= S; Stx1TF1x=0;}
     if ( StH41v<25 && StH4pr1v<25 && StH41v> StH4pr1v){ Stx1TF2x= S; Stx1TF2y=0;}
     if ( StH41v>75 && StH4pr1v>75 && StH41v< StH4pr1v){ Stx1TF2y= S; Stx1TF2x=0;}
     if ( StD11v<25 && StD1pr1v<25 && StD11v> StD1pr1v){ Stx1TF3x= S; Stx1TF3y=0;}
     if ( StD11v>75 && StD1pr1v>75 && StD11v< StD1pr1v){ Stx1TF3y= S; Stx1TF3x=0;}
                                                                             
     if ( StH11v>25 && StH1pr1v>25 && StH11v> StH1pr1v){ Stx1TF1x=0; Stx1TF1y=0;}
     if ( StH11v<75 && StH1pr1v<75 && StH11v< StH1pr1v){ Stx1TF1y=0; Stx1TF1x=0;}
     if ( StH41v>25 && StH4pr1v>25 && StH41v> StH4pr1v){ Stx1TF2x=0; Stx1TF2y=0;}
     if ( StH41v<75 && StH4pr1v<75 && StH41v< StH4pr1v){ Stx1TF2y=0; Stx1TF2x=0;}
     if ( StD11v>25 && StD1pr1v>25 && StD11v> StD1pr1v){ Stx1TF3x=0; Stx1TF3y=0;}
     if ( StD11v<75 && StD1pr1v<75 && StD11v< StD1pr1v){ Stx1TF3y=0; Stx1TF3x=0;}
 
     OSH1=iOsMA(NULL, TF1, W, H, C,PRICE_CLOSE,0);
     OSH4=iOsMA(NULL, TF2, W, H, C,PRICE_CLOSE,0);
     OSD1=iOsMA(NULL, TF3, W, H, C,PRICE_CLOSE,0);
          
     if ( OSH1<- OS){ OSTF1x= O; OSTF1y=0;}
     if ( OSH1> OS) { OSTF1x=0; OSTF1y= O;}
     if ( OSH4<- OS){ OSTF2x= O; OSTF2y=0;}
     if ( OSH4> OS) { OSTF2x=0; OSTF2y= O;}
     if ( OSD1<- OS){ OSTF3x= O; OSTF3y=0;}
     if ( OSD1> OS) { OSTF3x=0; OSTF3y= O;}
 
   double sigyH1=iLowest (NULL, TF1,MODE_CLOSE,3,0);
   double sigyH4=iLowest (NULL, TF2,MODE_CLOSE,3,0);
   double sigyD1=iLowest (NULL, TF2,MODE_CLOSE,3,0);
   double sigxH1=iHighest(NULL, TF1,MODE_CLOSE,3,0);
   double sigxH4=iHighest(NULL, TF2,MODE_CLOSE,3,0);
   double sigxD1=iHighest(NULL, TF3,MODE_CLOSE,3,0);

   if ( sigyH1==1){ SigYTF1= I; SigXTF1=0;}
   if ( sigyH4==1){ SigYTF2= I; SigXTF2=0;}
   if ( sigyD1==1){ SigYTF3= I; SigXTF3=0;}
   if ( sigxH1==1){ SigYTF1=0; SigXTF1= I;}
   if ( sigxH4==1){ SigYTF2=0; SigXTF2= I;}
   if ( sigxD1==1){ SigYTF3=0; SigXTF3= I;}
 
   double Gator1H1=iAlligator(NULL, TF1,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORJAW,0);
   double Gator1H4=iAlligator(NULL, TF2,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORJAW,0);
   double Gator1D1=iAlligator(NULL, TF3,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORJAW,0);
   
   double Gator2H1=iAlligator(NULL, TF1,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORTEETH,0);
   double Gator2H4=iAlligator(NULL, TF2,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORTEETH,0);
   double Gator2D1=iAlligator(NULL, TF3,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORTEETH,0);
   
   double Gator3H1=iAlligator(NULL, TF1,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORLIPS,0);
   double Gator3H4=iAlligator(NULL, TF2,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORLIPS,0);
   double Gator3D1=iAlligator(NULL, TF3,13,8,8,5,5,3,MODE_SMMA,PRICE_WEIGHTED, MODE_GATORLIPS,0);
    
     if ( Gator3H1> Gator1H1+ shirina){ GatorX1= G; GatorY1=0;}                
     if ( Gator3H4> Gator1H4+ shirina){ GatorX2= G; GatorY2=0;}
     if ( Gator3D1> Gator1D1+ shirina){ GatorX3= G; GatorY3=0;}
         
     if ( Gator1H1> Gator3H1+ shirina){ GatorX1=0; GatorY1= G;} 
     if ( Gator1H4> Gator3H4+ shirina){ GatorX2=0; GatorY2= G;}
     if ( Gator1D1> Gator3D1+ shirina){ GatorX3=0; GatorY3= G;} 
 
   double MACD1H1=iMACD(NULL, TF1, F_EMA, S_EMA, SMA,PRICE_WEIGHTED,MODE_MAIN,0);
   double MACD1H4=iMACD(NULL, TF2, F_EMA, S_EMA, SMA,PRICE_WEIGHTED,MODE_MAIN,0);
   double MACD1D1=iMACD(NULL, TF3, F_EMA, S_EMA, SMA,PRICE_WEIGHTED,MODE_MAIN,0);
  
   double MACD2H1=iMACD(NULL, TF1, F_EMA, S_EMA, SMA,PRICE_WEIGHTED,MODE_SIGNAL,0);
   double MACD2H4=iMACD(NULL, TF2, F_EMA, S_EMA, SMA,PRICE_WEIGHTED,MODE_SIGNAL,0);
   double MACD2D1=iMACD(NULL, TF3, F_EMA, S_EMA, SMA,PRICE_WEIGHTED,MODE_SIGNAL,0);
  
   double MACD3H1=iMACD(NULL, TF1, S_EMA*2, F_EMA*2, SMA*2,PRICE_WEIGHTED,MODE_MAIN,0);
   double MACD3H4=iMACD(NULL, TF2, S_EMA*2, F_EMA*2, SMA*2,PRICE_WEIGHTED,MODE_MAIN,0);
   double MACD3D1=iMACD(NULL, TF3, S_EMA*2, F_EMA*2, SMA*2,PRICE_WEIGHTED,MODE_MAIN,0);
   
   double MACD4H1=iMACD(NULL, TF1, S_EMA*2, F_EMA*2, SMA*2,PRICE_WEIGHTED,MODE_SIGNAL,0);
   double MACD4H4=iMACD(NULL, TF2, S_EMA*2, F_EMA*2, SMA*2,PRICE_WEIGHTED,MODE_SIGNAL,0);
   double MACD4D1=iMACD(NULL, TF3, S_EMA*2, F_EMA*2, SMA*2,PRICE_WEIGHTED,MODE_SIGNAL,0);
   
     if(( MACD1H1< MACD2H1)&&( MACD2H1>0)&&( MACD3H1< MACD4H1)&&( MACD4H1>0)){ MACDy1= M; MACDx1=0;}
     if(( MACD1H4< MACD2H4)&&( MACD2H4>0)&&( MACD3H4< MACD4H4)&&( MACD4H4>0)){ MACDy2= M; MACDx2=0;}
     if(( MACD1D1< MACD2D1)&&( MACD2D1>0)&&( MACD3D1< MACD4D1)&&( MACD4D1>0)){ MACDy3= M; MACDx3=0;}
      
     if(( MACD1H1> MACD2H1)&&( MACD2H1<0)&&( MACD3H1> MACD4H1)&&( MACD4H1<0)){ MACDy1=0; MACDx1= M;}
     if(( MACD1H4> MACD2H4)&&( MACD2H4<0)&&( MACD3H4> MACD4H4)&&( MACD4H4<0)){ MACDy2=0; MACDx2= M;}
     if(( MACD1D1> MACD2D1)&&( MACD2D1<0)&&( MACD3D1> MACD4D1)&&( MACD4D1<0)){ MACDy3=0; MACDx3= M;}
 
   double CCIH1=iCCI(NULL, TF1, CCI,PRICE_CLOSE,0);
   double CCIH4=iCCI(NULL, TF1, CCI,PRICE_CLOSE,0);
   double CCID1=iCCI(NULL, TF1, CCI,PRICE_CLOSE,0);
     
     if( CCIH1>120){ CCIx1= CC; CCIy1=0;}
     if( CCIH4>120){ CCIx2= CC; CCIy2=0;}
     if( CCID1>120){ CCIx3= CC; CCIy3=0;}
     
     if( CCIH1<-120){ CCIx1=0; CCIy1= CC;}
     if( CCIH4<-120){ CCIx2=0; CCIy2= CC;}
     if( CCID1<-120){ CCIx3=0; CCIy3= CC;}

And calculate-

   double resultz1 = ( Stx1TF1x + Stx1TF2x + Stx1TF3x + OSTF1x + OSTF2x + OSTF3x + SigXTF1 + SigXTF2 + SigXTF3 + GatorX1 + GatorX2 + GatorX3 + MACDx1 + MACDx2 + MACDx3 + CCIx1 + CCIx2 + CCIx3) * 5.5555555555555555555555555555556;

   double resultz2 = ( Stx1TF1y + Stx1TF2y + Stx1TF3y + OSTF1y + OSTF2y + OSTF3y + SigYTF1 + SigYTF2 + SigYTF3 + GatorY1 + GatorY2 + GatorY3 + MACDy1 + MACDy2 + MACDy3 + CCIy1 + CCIy2 + CCIy3) * 5.5555555555555555555555555555556;

     if ( resultz1< Skill && resultz2< Skill) { Signal=0; Comment("КУРИМ");}

     if ( resultz1> Skill)  { Signal=1; Comment("Неплохо бы BUY");}
     if ( resultz2> Skill)  { Signal=-1;Comment("Неплохо бы SELL");}
     
     if ( resultz1> SkillMAX)  { Signal=2; Comment("АФИГЕННО BUY");}
     if ( resultz1> SkillMAX)  { Signal=-2; Comment("ФАИГЕННО SELL");}
 
This is the format the indicator needs... Yes, don't forget the auto-optimisation of a dozen parameters... Also a problem...
 

First of all, it is necessary to formalise as clearly as possible the market conditions under which it is "hard" to make mistakes. In addition, it is important to exclude repetitive indicators - the same wipers and the alligator, which is the essence of wipers.

At the same time, you should initially run the auto-optimization on something simpler. The fact is that optimisation, and with it auto-optimisation, is a rather controversial phenomenon and more often than not requires a "life" check. Also, optimising on 10 parameters to align test history is a fitting in a way. I think you should first deal with these indicators, so that the system could easily enter without external help, and most importantly, it profits.

This is of course IMHO - your grail, and any in general should have a stop and take (if any), or just a formalized exit, based on its internal trading principles, rather than a simple (or the same GA) selection on the history.

Reason: