What is everyone looking for? - page 15

 
AlexEro писал(а) >>

Please.

Both from myself and von Neumann....

...well, if that's the case, then also from Eric Nyman (I don't know him, but I know a couple of people from his circle).


Clinique - I don't know the man but he sends his regards to you. :)
Well, thanks for saying hi. :)) You tell him I said hi, too. :))
 

There you go - what an expert this is -

// Эксперт SUPPER-SMART-1 --  "SS1" :)
int init(){ return(0); }
int deinit()  {   return(0);  }

int sti=-1;
int bti=-1;

int start(){
  
   double sell_sig = iCustom ( 0, 0, "ideal", 60,15,60, 0, 0 );
   double buy_sig  = iCustom ( 0, 0, "ideal", 60,15,60, 1, 0 );
    
   if ( sell_sig != EMPTY_VALUE ){
      if ( bti > 0 ){
         OrderClose ( bti, 0.1, Bid, 0  );
         bti=-1;
      }  
      if ( sti < 0 )
         sti=OrderSend( Symbol(), OP_SELL, 0.1, Bid, 0, 0,0 );
   }
   if (  buy_sig != EMPTY_VALUE ){
      if ( sti > 0 ){
         OrderClose ( sti, 0.1, Ask, 0  );
         sti=-1;
      }
      if ( bti < 0 )       
         bti=OrderSend( Symbol(), OP_BUY, 0.1, Ask, 0, 0,0 ); 
   }  
   return(0);
}
 
#property indicator_chart_window

#property  indicator_buffers 2
#property  indicator_color1  Yellow
#property  indicator_color2  Red

extern int p1=60,p2=15,p3=60;

double Sales_buffer[];
double Buys_buffer[];

datetime times[];
double   signals[];
#define SALE_SIGNAL 1
#define BUY_SIGNAL 2

/*

некий абстрактный идеальный индикатор - который знает будущее и всегда показывает идеальные входы и выходы. 

Служит только для сравнения с рельными индикторами как единица отсчета. Все не совпадения с этим индикатором ухудшают 
показатели реального. Входные параметры теже что и у стандартоного зигзага.

Использовать надо так. 

1) На графике, не в тестере добавляем этот индикатор, который при своем первом запуске создаст файл данных и именем ideal_data.dat
2) Этот файл надо перенести в файлы тестера 
3) При тестировании из советника надо обратится к этому индикатору таким образом  

  double sell_sig = iCustom ( 0, 0, "ideal", 60,15,60, 0, 0 );
  double buy_sig  = iCustom ( 0, 0, "ideal", 60,15,60, 1, 0 );
  
4) Наличие сигнала на продажу или покупку определяется как не равенство пустому значению значения в соответствующем буфере .


Пример эксперта использующего этот псевдо-индикатор 


int init(){ return(0); }
int deinit()  {   return(0);  }

int sti=-1;
int bti=-1;

int start(){
  
   double sell_sig = iCustom ( 0, 0, "ideal", 60,15,60, 0, 0 );
   double buy_sig  = iCustom ( 0, 0, "ideal", 60,15,60, 1, 0 );
    
   if ( sell_sig != EMPTY_VALUE ){
      if ( bti > 0 ){
         OrderClose ( bti, 0.1, Bid, 0  );
         bti=-1;
      }  
      if ( sti < 0 )
         sti=OrderSend( Symbol(), OP_SELL, 0.1, Bid, 0, 0,0 );
   }
   if (  buy_sig != EMPTY_VALUE ){
      if ( sti > 0 ){
         OrderClose ( sti, 0.1, Ask, 0  );
         sti=-1;
      }
      if ( bti < 0 )       
         bti=OrderSend( Symbol(), OP_BUY, 0.1, Ask, 0, 0,0 ); 
   }  
   return(0);
}



*/

int init()
{
   SetIndexBuffer(0,Sales_buffer);
   SetIndexBuffer(1,Buys_buffer);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(0,SYMBOL_STOPSIGN);
   SetIndexArrow(1,SYMBOL_STOPSIGN);
   
   int i;
   int h=FileOpen ( "ideal_data.dat", FILE_BIN | FILE_READ );
   if ( h >= 1 ){
      
      
      int s = FileSize(h) / (LONG_VALUE+LONG_VALUE);
      
      ArrayResize(times, s);
      ArrayResize(signals,s);
      
      for( i=0;i<s;i++){
         if (  FileIsEnding(h) ){
            Print("Err22");
            break;
         }
         
         times[i] = FileReadInteger(h,LONG_VALUE);
         signals[i]= FileReadInteger(h,LONG_VALUE );
   //      Print("i=",i,"t=",times[i],"s=",signals[i]);

      }
      
      FileClose(h);
      Print("Ok Read");
      
   }
   else{
      h=FileOpen ( "ideal_data.dat", FILE_BIN | FILE_WRITE ); 
      if ( h < 1 ){
         Print("Err");
         return;
      }
      int j=0;
      
      ArrayResize(times, Bars);
      ArrayResize(signals,Bars);
      
      for (  i=0;i<Bars;i++){
          double pr0=iCustom(0,0,"Zigzag",p1,p2,p3,0,i);
          double pr1=iCustom(0,0,"Zigzag",p1,p2,p3,1,i);
          double pr2=iCustom(0,0,"Zigzag",p1,p2,p3,2,i);
          
          if ( pr0 != 0.0 ){
            times[j]=Time[i];
            
            FileWriteInteger(h,Time[i],LONG_VALUE);
            if ( pr1 != 0.0 ){
               FileWriteInteger(h,SALE_SIGNAL,LONG_VALUE);
               signals[j]=SALE_SIGNAL;
            }
            else{
               FileWriteInteger(h,BUY_SIGNAL,LONG_VALUE);
               signals[j]=BUY_SIGNAL;
            }
            
//            Print("j=",j,",t=",times[j],",p=",signals[j],",p1=",pr1,",p2=",pr1,",p3=",pr2);
            j++;   
          }
      } 
      
      ArrayResize(times, j);
      ArrayResize(signals,j);
      
      FileClose(h);  
      Print("Ok write");
   }
   

   return(0);
}
int deinit()
{
   return(0);
}

int start()
{

   int j=0;
   
   int limit;

   int counted_bars = IndicatorCounted();

   if(counted_bars>0) 
      counted_bars--;
  
  limit = Bars-counted_bars;

  for(int i=0; i<limit; i++){
      
      while ( Time[i] < times[j] )
         j++;     
    
    //  Print("i=",i,",j=",j,",T[i]=",Time[i],",T[j]=",times[j],",s=",signals[j]);
      if ( times[j] == Time[i] ){
         if ( signals[j] == BUY_SIGNAL ){
            Buys_buffer [i]= Low[i];
            Sales_buffer[i]=EMPTY_VALUE;
         }
         else{
            Sales_buffer[i]= High[i];
            Buys_buffer [i]= EMPTY_VALUE;
         }
      }
      else{
         Sales_buffer[i]=EMPTY_VALUE;
         Buys_buffer[i]= EMPTY_VALUE;
      }            
   }
      
   return(0);
}
 
SProgrammer >>:


Уважаемый - я уже все сказал для тебя, Ты меня утомил, причем тут все эти твои сентенции про перерисовку и прочую ахинею. Твое мнение уже озвученно, спасибо - все прочитали. Думаю впечатление сложилось правильное. Мне же нечего тебе ответить - просто успокойся и не переживай - все хорошо.

Well, if I'm told that today is April 5th, I think I'll agree too.
And concerning the approach to indicators I said in the next thread: ".... In any case, if we are talking about indicators, we should talk about how accurately they reflect what we want to track.
That's why I have nothing against it...)))
But to the essence of the branch, the essence is the following: the topiksaturter does not need someone's opinion. Or rather, he does need it, but only for the sole purpose of convincing himself once again how dumb it is, any other people's opinion. That's true of most of his forays onto the forum, though.
To participate in this is ...)))
===
Sorry - I'm not talking to you - my mistake. Was responding to AlexEro's post:

What, the meds aren't coming in again? Well, the Relenium is said to help.

Well, to calm you down and be kind, I'll tell you this - I agree with you (and some other colleagues on this forum) about the REFERENCE part.

Personally, I don't understand why almost everyone here thinks that if an indicator overdraws, it is "bad". On the contrary, it is "good". The market environment is constantly changing, the mechanical simple models don't work, and therefore REAL re-rising means that the indicator is adapting to the changes in the market.



 
Svinozavr писал(а) >>

Well, if I am told that today is April 5th, I think I would agree too.
As for the approach to the indicators I said in the next thread: "... In any case, if we are talking about indicators, we should talk about how accurately they reflect what we want to track.
That's why I have nothing against it...)))
But to the essence of the branch, the essence is the following: the topiksaturter does not need someone's opinion. Or rather, he does need it, but only for the sole purpose of convincing himself once again how dumb it is, any other people's opinion. That's true of most of his forays onto the forum, though.
To participate in this is ...)))




Don't judge by yourself. :)
 
Mathemat писал(а) >>

There was a thread about this as well. A fake problem statement.

The problem is that these light bulbs-signals will be dependent. And even if you put a million of them, not 100, reliability of complex prediction for a given correlation of bulb signals will be limited and will not be as close to 1.

In Metastock all indicators are divided into groups: trend, volatility, momentum, volume, overbought/oversold and something else - a total of six groups. It is suspected that these are independent indicators. The same Metastock states that a good TS should contain indicators from each group. Some time ago I already resented that a set of metaquote indicators is out of the ballpark, no thought. One of the authors likes it and that's it. As a result, the entire population of this quorum is not familiar with the idea of an orthogonal set of indicators.
 
faa1947 писал(а) >>


In Metastock all indicators are divided into groups: trend, volatility, momentum, volume and so on - six groups in total. It is suspected that these are independent indicators. The same Metastock claims that good TS must contain indicators from each group. Some time ago I already resented that a set of metaquote indicators is out of the box, no thought. One of the authors likes it and that's it. As a result, the whole population of this quorum is not familiar with the idea of an orthogonal set of indicators.


The thing is that we should understand that if we have some object and it has only two properties then only four indicators are possible in principle and all the rest are surplus. For the eye - yes they may be useful - but for the computer does not matter, so you need to understand how many properties we have in our object.

 



Good for the eyes - agree :)))

 
SProgrammer писал(а) >>


The thing is that we need to understand that if we have an object and it has only two properties, then only four indicators are possible in principle, the rest will be redundant. So we should think about how many properties we have for our object.


We all have one object - BP, but nobody asks the question about the number of orthonormal parameters for identification of this BP. Actually it is not necessary. We need an orthonormal set of indicators for the TS which would have a forecasting property for the sufficient number of bars for profit withdrawal. But the idea of orthonormality is just a common culture of selection or elaboration of indicators. Everyone who has worked in Metastock has this level, but with metaquotes it does not. This is not the first time I've written about this. I don't care, though I've already implemented the algorithm. In MQL5 instead of orthonormality they added some programmer's crap and are happy.
 

Well BP has VERY few independent properties. The first derivative, and the spectrum, well the spectrum itself includes the amplitude at a certain frequency - so we have essentially mashups (spectrum properties) and the first derivative. And that's it. The first derivative is calculated as follows: by average price ((High(i) + Low(i))/2) - ((High(i-1) + Low(i-1))/2). Well, (Open-+-Close) is in fact the most probable value of BP. And I wouldn't take Open and Close into account - it's in the spanktrap.

Reason: