Errors, bugs, questions - page 2921

 
Alexandr Andreev:

correlation) there seems to be nothing else, you don't need to compare all bars for speed, you can control 100 points

One point seems to be enough.

 
fxsaber:

One point seems to be enough.

I seem to have misunderstood the problem, find the least different instead of finding the same.... In the second case, yes, one point is enough.

 
Alexandr Andreev:

Seems to have misunderstood the task, find the least different instead of finding the same.... In the second case, yes, one point is enough.

The same are different fids of the same character.

 

The tester gives an error. The number is outside the array.
I've been struggling for 4 hours. Tried everything, but the error is still there...

2020.12.09 04:37:30.325 Wai_v_5.0 EURUSD,H1: array out of range in 'Wai_v_5.0.mq4' (656,18)

Please help me if you know how.

if (Model == 1){
      dmin = iLowest(NULL,TF1,0,InBasic,1);
      dmax = iHighest(NULL,TF1,0,InBasic,1);
      if(dmin!=-1) lmin = Low[ iLowest(NULL,TF1,0,InBasic,1)];
      if(dmax!=-1) lmax = High[ iHighest(NULL,TF1,0,InBasic,1)];      
      }
   
   if (Model == 2){
      dmin = iLowest(NULL,TF1,0,InBasic,1);
      dmax = iHighest(NULL,TF1,0,InBasic,1);
      if(dmin!=-1) lmin = Low[iLowest(NULL,TF1,1,InBasic,1)];
      if(dmax!=-1) lmax = High[iHighest(NULL,TF1,2,InBasic,1)];
      }
      
   if (Model == 3){
      dmin = iLowest(NULL,TF1,0,InBasic,1);
      dmax = iHighest(NULL,TF1,0,InBasic,1);
      if(dmin!=-1) lmin = Low[iLowest(NULL,TF1,3,InBasic,1)];
      if(dmax!=-1) lmax = High[iHighest(NULL,TF1,3,InBasic,1)];
      }
      
   if (Model == 4){
      dmin = iLowest(NULL,TF1,0,InBasic,1);
      dmax = iHighest(NULL,TF1,0,InBasic,1);
      if(dmin!=-1) lmin = (Low[iLowest(NULL,TF1,0,InBasic,1)]+Low[iLowest(NULL,TF1,1,InBasic,1)])/2;
      if(dmax!=-1) lmax = (High[iHighest(NULL,TF1,0,InBasic,1)]+High[iHighest(NULL,TF1,2,InBasic,1)])/2;
      }
        
   if (Model == 5){
      dmin = iLowest(NULL,TF1,0,InBasic,1);
      dmax = iHighest(NULL,TF1,0,InBasic,1);
      if(dmin!=-1) lmin = (Low[iLowest(NULL,TF1,3,InBasic,1)]+Low[iLowest(NULL,TF1,1,InBasic,1)])/2;
      if(dmax!=-1) lmax = (High[iHighest(NULL,TF1,3,InBasic,1)]+High[iHighest(NULL,TF1,2,InBasic,1)])/2;
      } 
      
   if (Model == 6){
      dmin = iLowest(NULL,TF1,0,InBasic,1);
      dmax = iHighest(NULL,TF1,0,InBasic,1);
      if(dmin!=-1) lmin = (Low[iLowest(NULL,TF1,0,InBasic,1)]+Low[iLowest(NULL,TF1,3,InBasic,1)])/2;
      if(dmax!=-1) lmax = (High[iHighest(NULL,TF1,0,InBasic,1)]+High[iHighest(NULL,TF1,3,InBasic,1)])/2;
      } 
 

Good afternoon!

There is an error of creating an indicator inside an Expert Advisor through the function: IndicatorCreate

When the input parameters of the indicator have the table of contents: input group

When I remove aninput group from an indicator and rebuild it, theIndicatorCreate functionin the Expert Advisor works correctly ,

Sometimes theIndicatorCreate function works fine when the input parameters of the Expert Advisor have only INT variables and useinput group, as soon as STRING variables are added, theIndicatorCreate functionbreaks, when I remove theinput group, everything works again...

I am asking to correct it otherwise I will not be able to use input group in indicators!

MT5, build 2715

 
Daniil Kurmyshev:

Good afternoon!

There is an error of creating an indicator inside an Expert Advisor through the function: IndicatorCreate

When the input parameters of the indicator have the table of contents: input group

When I remove aninput group from an indicator and rebuild it, theIndicatorCreate functionworks correctly in the Expert Advisor ,

Sometimes theIndicatorCreate function works fine when the input parameters of the Expert Advisor have only INT variables and useinput group, as soon as STRING variables are added, theIndicatorCreate functionbreaks, when I remove theinput group, everything works again...

I am asking to correct it otherwise I will not be able to use input group in indicators!

MT5, build 2715

Figured it out... I'll tell myself, maybe somebody will need the information...

....input group must be declared asa STRING variablein MqlParamand added to the common list of parameters, despite the fact that it is a header...

P.S. It would be good to add this information oninput group in MQL5when it is used in indicators.

 

Hello.

Margin is not calculated correctly in the tester, the problem is described here

https://www.mql5.com/ru/forum/160683/page1317#comment_19639149

Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
  • 2020.12.08
  • www.mql5.com
В этой ветке я хочу начать свою помощь тем, кто действительно хочет разобраться и научиться программированию на новом MQL4 и желает легко перейти н...
 

Another bug in mt4

After a broker's leverage has been changed, margin with the new leverage is calculated only after reconnection to the account.

The leverage is calculated only after the account is reconnected, and if trades are opened, then the margin is displayed with account of the leverage that was before the change.

 
How does a retailer change the price of a product in a marketplace?
 
Not a bug, of course, but I would like to see an implementation
input int r=5;
const int r1=6;
double Arr[r];  // инвалид индекс
double Arr1[r1];   // инвалид индекс
 // проверка на отрицательное значение индекса проводится, еще бы на константность и целость переменной. можно разрешить 
//вид только положительных целых констант например.
Reason: