Errors, bugs, questions - page 856

 
avoitenko:

First of all LR Correlation needs to be calculated. This is done in this library https://www.mql5.com/ru/code/1081

And then return this value via OnTester, like here https://www.mql5.com/ru/articles/286


Thank you! It's a pity that MQL5 built-in software does not allow to "pull" LR Correlation using TesterStatistics().
 

bug - MathRound returns the type double instead of a logical integer.

in fact, it's still a bug - if we round a number, it should be an int. xD

 
FiftyStars: Bug - MathRound returns type double instead of logical integer.

See my similar question in the next thread.

FiftyStars: Because of this there is no way to explicitly(!!!) convert double to integer

See section about explicit type conversion.

 
FiftyStars:

bug - MathRound ...

An explicit type conversion helps from issuing warnings:

int i = (int)MathRound(1.24);
 

Help, it's not working, translated from 4.

Thank you.

//----- Martingale
  if(Martingale == true)
  {
//----- Calcuulate number of losses orders without a break
    HistorySelect(0,TimeCurrent());
    int Total = HistoryDealsTotal();
    int Losses = 0;  // Number of losses orders without a break
    for(i = 0;i < Total;i++)
    {
      ulong Ticket=HistoryDealGetTicket(i);
      if(HistoryDealGetInteger(Ticket,DEAL_TYPE) < 2)
      {
        if(HistoryDealGetDouble(Ticket,DEAL_PROFIT)>0) break;
        if(HistoryDealGetDouble(Ticket,DEAL_PROFIT)<0) Losses++;
      }
      if(Losses<=MaxLossTrade) TradeLot=(TradeLot*MathPow(LotMultiply,Losses));
      else TradeLot=TradeLot;
    }
  }
//-----
 


From which line do the problems start and what exactly are they?

 
In the strategy tester, it does not increase the lot size after a losing trade.
 

G001:

Yedelkin:
From which line do the problems start and what exactly are they?

In the strategy tester, it does not increase the lot size after a losing trade.

Once again, where do the problems start and what exactly are they?

 

Sorry, I don't know what to say, I don't know where the problem is, I know it doesn't do what I need it to do.

 
G001:

Sorry, I don't know what to say, I don't know where the problem is, I know it doesn't do what I need it to do.

but when the engine won't start - what do they do?
Reason: