[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 961

 
artmedia70:

It's all individual and all IMHO.

"...I need to find the EA variant with the best results..." These results - mean almost nothing for the present and future - they are adjusted for HISTORY - and therefore for the past.

It's all about, in particular my attitude to speed and, even more so, to optimization - I try to bring adjustable EA parameters down to zero. According to my observations - optimization is just a matter of fitting to historical data which has no meaning for the present. Why do I need a toy that trades reasonably well in the past?

For this very reason, all of my Expert Advisors have self-adjustable parameters for the current market situation, and they don't react to history with rigidly written parameters, but to the current events, dynamically changing some of their parameters to fit the present moment... And I NEVER optimize them. It's enough for me to run a month or two of history to find errors and make sure my Expert Advisor logic works correctly and is profitable.

So, don't take my soldier's humour to heart. I apologise, I hope - no offence? :))

Artem, it's okay.) If you were a girl I'd give you virtual flowers )) Thank you. About the "green colour" - the results are attached not just to the history, but to the МА movement (yes, to the history, but otherwise you cannot see its possible behaviour and variants). If even a small pattern is detected - after all there will always be up and down movements - that will be the optimization. Perhaps all my initiatives are wrong, but I don't have any other options to run the Expert Advisor in order to determine at least some of its usability. I only want to optimize it once ) And I want to either refuse from this EA or take it to work. And if for 4 years there is a constant profit - is it a weak criterion ? After all, then some kind of regularity is caught. For example if current of river changes back and forth - small light stones will roll back and forth on small distance in any case - that is dependence.
 
volshebnik:
Nikolai, thank you. I use standard indicators - MA. The code is more than a thousand lines, who would want to bother with it, I think. The calculation is done once per one tick (I checked it with "alerts").
Perhaps there are some calculations we can do without, e.g. error and all kinds of abnormal situations handling, they are not needed at the development stage, and can be added to when the trading algorithm is ready and the EA can be set up for real trading. How many times does the Expert Advisor run through all orders? Are there a lot of iHigest/ilowest loops and functions? A thousand lines, yes, very few people would understand it, except for a cursory glance, in case something catches their eye...
 
Techno:
It is also possible that there are calculations without which you can do without, for example, handling errors and all sorts of abnormal situations is not needed at the development stage, they can be added when the trading algorithm is complete and you can start using the Expert Advisor for real. How many times does the Expert Advisor run through all orders? Are there a lot of iHigest/ilowest loops and functions? A thousand lines, yes, only very few people would understand it, except for a quick look around in case something catches their eye.
All orders are tried out on every tick (because orders are modified upon reaching a certain level, and this achievement can only be evaluated by a tick). I haven't implemented any abnormal situations yet; error handling does exist, yes. And cycles are counted only at opening of each hour (significant delay is noticeable, when each tick is checked, as described).
 
volshebnik:
All orders are replayed on every tick (because orders are modified when a certain level is reached, and this achievement can only be defined by a tick). I haven't implemented any abnormal situations yet, but error handling does exist. And cycles are counted only at opening of each hour (significant delay is noticeable, when each tick is checked, as described).
it seems there is nothing egregious, something more can already be said with the code...
 
Techno:
there doesn't seem to be anything egregious, something more can be said with the code...
Thanks, Nikolai, that's what I was wondering - would the speed of the tester increase significantly if I changed the processor?
 
volshebnik:
Thanks, Nikolai, that's what I was wondering - would the speed of the tester increase significantly if I changed the processor?
The problem is not in the processor, but in the EA code, somewhere there are bottlenecks, but you can't diagnose and fix them by words, you need the code
 
Hi all! Question: How do I modify a pending order and an already open position by pre-selecting them by magic number. If you can give me an example. I would like to ask you a question.
 
Can you tell me if, when enabled, an EA can take the price level of a market entry or pending order from an Excel cell (the corresponding numbers will be entered there in advance)?
 
Help "revive" the indicator. It works according to the historical data, but not according to the new data. At least give me the reason.
#property copyright "Stellar Space"
#property link      "http"

#property indicator_chart_window                                               // Индикатор рисуется в основном окне
#property indicator_buffers 2                                                  // Количество индикаторных буферов
#property indicator_color1 DarkGreen                                           // Цвет первой линии
#property indicator_width1 1                                                   // Ширина первой линии
#property indicator_color2 Crimson                                             // Цвет второй линии
#property indicator_width2 1                                                   // Ширина второй линии

extern int Code_1=159;                                                         // Код значка
extern int Code_2=159;                                                         // Код значка

extern int History=1000;                                                       // Количество баров истории

double Buf_0[],Buf_1[];                                                        // Объявление массива под буфер индикатора

//+------------------------------------------------------------------+
int init()
 {
 
 SetIndexBuffer(0,Buf_0);                                                      // Назначение массива буферу
 SetIndexStyle(0, DRAW_ARROW);                                                 // Стиль линии
 SetIndexArrow(0, Code_1);                                                     // Стиль Arrow
 SetIndexLabel(0,"Максимум (1 уровень)");                                      // Установка имени линии индикатора 
 SetIndexBuffer(1,Buf_1);                                                      // Назначение массива буферу
 SetIndexStyle(1, DRAW_ARROW);                                                 // Стиль линии
 SetIndexArrow(1, Code_2);                                                     // Стиль Arrow
 SetIndexLabel(1,"Минимум (1 уровень)");                                       // Установка имени линии индикатора 
  
 return(0);
 }

//+------------------------------------------------------------------+
int start()
 {
 
 int i;                                                                        // Индекс бара
 int a,b,c,d,e,f,g,h,j,k,l,m,n,o,p,q;                                          // Объявление переменых
 int Counted_bars=IndicatorCounted();                                          // Количество просчитанных баров
 
 
//+------------------------------------------------------------------+         // START
 i=MathMin(History,Bars-Counted_bars-1);

  while(i>0)                                                                    // Цикл по непосчитанным барам
 {

 
//+------------------------------------------------------------------+         // A

 for(a=i; a>0; a--)    
 {//Aa
 if (High[a+1]<High[a]&&Low[a+1]<Low[a])
    {b=a;}    
 else {break;}
 }//Aa
//--
 for(a=i; a>0; a--)    
 {//Ab
 if (High[a+1]>High[a]&&Low[a+1]>Low[a])
    {c=a;}
 else {break;}
 }//Ab
//--

 for(a=i; a>0; a--)    
 {//Ac
 if (b>c){d=b;}    
 else {break;}
 }//Ac 
//--
 for(a=i; a>0; a--)    
 {//Ad
 if (c>b){e=c;}    
 else {break;}
 }//Ad
//--

 for(a=i; a>0; a--)    
 {//Ae
 if (e>d&&d>c)
  {
   f=iHighest(NULL,0,MODE_HIGH,e-c,c);
   Buf_0[f]=High[f]+2*Point;
  }    
 else {break;}
 }//Ae 
 for(a=i; a>0; a--)    
 {//Af
 if (d>e&&e>b)
  {
   g=iLowest(NULL,0,MODE_LOW,d-b,b);
   Buf_1[g]=Low[g]-2*Point;
  }    
 else {break;}
 }//Af 
 

//+------------------------------------------------------------------+
 i--;
 }

//+------------------------------------------------------------------+         // FINISH

 //!

 return(0);
 }

//+------------------------------------------------------------------+
int deinit()
 {
 return(0);
 }
  
//+------------------------------------------------------------------+
 

Where can I get M30(or lower) quotes older than 2004 for ANY stocks or indices. NOT in currencies? Thanks