[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 624

 
Can anybody advise how to open MT4 (from one demo account, on one computer) several times at once, so that one can test the Expert Advisor on several pairs simultaneously. So as not to wait until one pair finishes and then manually set the test on the other one?
 
paladin80:
Can anybody advise how to open MT4 (from one demo account, on one computer) several times at once, so that one can test the Expert Advisor on several pairs simultaneously. So as not to wait until one pair finishes and then manually set the test on the other one?
Copy the folder several times.
 
paladin80:
Can anybody advise how to open MT4 (from one demo account, on one computer) several times at the same time, so that one can test the Expert Advisor on several pairs simultaneously. So as not to wait until one pair finishes and then manually set the test on the other one?

Can the cantuper withstand this kind of cruelty? Two testers are loading the CPU 100% in parallel, the computer is not of the "Internet and typewriter" category at all.
 

Good afternoon!

Why don't the iTime time and the tester time (in the picture) match?

Here is a crude sketch of the code:

int start()
  {
   int counted_bars=IndicatorCounted();
   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
    
   int  limit = Bars - counted_bars;
     
     for (int i=limit; i>=0; i--)
     {
       
    tm1=iTime(NULL,PERIOD_D1,i);           //--- Определяю время (Выводит текущую дату. Не совпадает с временем в тестере.)
    int shift=iBarShift(NULL,PERIOD_H4,tm1,false);  //---По этому времени ищем бар
   
    hgh = iHigh(NULL,PERIOD_H4,shift);   //---High бара
    lwo = iLow(NULL,PERIOD_H4,shift);    //---Low бара
          
     flatline("Lev_Up",tm1,hgh,tm2,lwo,Green,1);
     flatline("Lev_Dn",tm1,hgh,tm2,lwo,Green,1);
     }
     
     SetText("Tm1","Tm2",TimeToStr(tm1),TimeToStr(tm1),Red,Blue,12);
     SetText2("Shift",shift,Red,12);
     SetText5("High","Low", hgh,lwo,Red,Blue,12);
           
     //----
   return(0);
  }

 

Good afternoon.

Can you tell me why this code is not trading?

And the alert doesn't work.

The log is completely silent...

In the screenshot you can see that the conditions match.

int start()
  {
  double ma= iMA(Symbol(), 0, PerMa, 0, 0, 0, 0);
//----
//GetLot(1, 0.1, 100, 0.1, 10, Symbol());
if (Filtre()=="S" && NormalizeDouble(Bid, Digits*pip)==NormalizeDouble(ma, Digits*pip)) OrderSend(Symbol(),OP_SELL,0.1,Bid,2,Ask+SL*pip*Digits,Ask-TP*pip*Digits,0,0,0,CLR_NONE);
if (Filtre()=="B" && NormalizeDouble(Bid, Digits*pip)==NormalizeDouble(ma, Digits*pip)) OrderSend(Symbol(),OP_BUY,0.1,Ask,2,Bid-SL*pip*Digits,Bid+TP*pip*Digits,0,0,0,CLR_NONE);
Comment (Filtre(),"  ",NormalizeDouble(ma, Digits*pip),"  ",NormalizeDouble(Bid, Digits*pip));
if (NormalizeDouble(Bid, Digits*pip)==NormalizeDouble(ma, Digits*pip)) Alert("!!!!!!!!!!!");


//----
   return(0);
  }
 
MarkTrade:

Good afternoon.

Can you tell me why this code is not trading?

And the alert doesn't work.

The log is completely silent...

In the screenshot you can see that the conditions match.

Check what pip equals. The second parameter in the NormalizeDouble function must be equal to the number of decimal places (which is an integer), usually written simply as Digits if comparing prices.
 
atztek:

There is a file in the "experts" folder that needs to be copied each time the Custom Indicator is started.

- Is it possible to copy files from the code and if so, how?

Thank you!


If using MQL, only inside the experts\files folder
 
Fox_RM:

Good afternoon!

Why don't the iTime time and the tester time (in the picture) match?

Here is a crude sketch of the code:

Your iTime function takes the i-th bar from a file (for each tamframe separately) in the tester\history folder, perhaps the history files for D1 and H1, where the last bar corresponds to January 13, are lying there from some old run.
 
alsu:
Check what the pip is equal to. The second parameter in the NormalizeDouble function must be equal to the number of digits after the decimal point (which is an integer). Usually we just write Digits if we are comparing prices.

if (Digits == 3||Digits==5) pip=10; else pip=1;

this is to normalize to 4 or 2 digits. (if the quotes are 5 digits)

The normalized values are displayed in comment and in the screenshot we can see that they are equal. So, the condition has been met but the order still won't open...

Oh! An alert appeared in the log but the order did not open.

 
MarkTrade:

if (Digits == 3||Digits==5) pip=10; else pip=1;

this is to normalize to 4 or 2 digits. (if the quotes are 5 digits)

The normalized values are displayed in comment and in the screenshot we can see that they are equal. So, the condition has been met but the order still won't open...

Oh! The alert appeared in the log but the order did not open.


Can I ask why "normalise to 4 or 2 digits. (if the quotes are 5 digits)"? 5 and 3 digits should also work, as it were...