Errors, bugs, questions - page 3183

 
Aliaksandr Hryshyn #:
Can we have brokers who do such requests :))?

No. It's a secret.

 
Alexey Viktorov #:

No. It's a secret.

The topic should be called Bugs bugs issues bad results)))

 
may I ask, ? AMD EPYC 7763 what PR does the tester show ?
 
There is an error in the manual in the example
 ENUM_PROGRAM_TYPE mql_program=(ENUM_PROGRAM_TYPE)MQLInfoInteger(MQL_PROGRAM_TYPE); 
   switch(mql_program) 
     { 
      case PROGRAM_SCRIPT: 
        { 
         Print(__FILE__+" is script"); 
         break; 
        } 
      case PROGRAM_EXPERT: 
        { 
         Print(__FILE__+" is Expert Advisor");s 
         break; 
        } 
      case PROGRAM_INDICATOR: 
        { 
         Print(__FILE__+" is custom indicator"); 
         break; 
        } 
      default:Print("MQL5 type value is ",mql_program); 
   //--- 
   Print("MQLInfoInteger(MQL_MEMORY_LIMIT)=", MQLInfoInteger(MQL_MEMORY_LIMIT), " MB"); 
   Print("MQLInfoInteger(MQL_MEMORY_USED)=", MQLInfoInteger(MQL_MEMORY_USED), " MB"); 
   Print("MQLInfoInteger(MQL_HANDLES_USED)=", MQLInfoInteger(MQL_HANDLES_USED), " handles");
Files:
 
I have downloaded the mt4 on my notebook but at the time of execution it asks for a server, name, and a password and I have tried everything and I can not complete the installation can someone help me please?
 

Is this code outdated in MQL5 for Counting the number of long Position, Please help me look into it. Have tried everything still not working or compiling. And it looks like nothing wrong with it. Can't figure how to fix it. thanks

//.....................................................................................................................................

#include <Trade\Trade.mqh>


#define MagicNumber = 0;   // Magic number


int OnInit()

{  
return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+

//| Expert deinitialization function                                 |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

  {

//---
   }

//+------------------------------------------------------------------+

//| Expert tick function                                             |

//+------------------------------------------------------------------+

void OnTick()

 {
   Comment("Number of Buy Positions: = ", OrdersCounter()); 
 }
//---------------------------------------------------------------  

int OrdersCounter()

  {

   int counter=0;

//---
   for(int i=OrdersTotal()-1; i>=0; i--) 
   {
   if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) && OrderSymbol() == Symbol() && OrderType() == OP_BUY)

    // if((OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) && (OrderSymbol() == Symbol()) && (OrderType() == OP_BUY))
              {

               counter++; //count the Position

              }
        return counter;
      }
    //----------------------------------------------------------------

 

 




   

 
Darker Host #: Is this code outdated in MQL5 for Counting the number of long Position,    
  1. The code is counting Orders not Positions.
    MT5: first select a position via CPositionInfo, directly, or by 'MT4Orders' library (2016)

  2. Don't double post! You already had another thread open.

              General rules and best pratices of the Forum. - General - MQL5 programming forum (2017)

 
William Roeder #:
  1. The code is counting Orders not Positions.
    MT5: first select a position via CPositionInfo, directly, or by 'MT4Orders' library (2016)

  2. Don't double post! You already had another thread open.

              General rules and best pratices of the Forum. - General - MQL5 programming forum (2017)


ok thanks

 

Possible bug: If a single test is started from the optimization results (in the tab "Optimization Results" -> right click -> Run Single Test) string inputs are reduced to 63 characters.

Build 3280


Files:
Test.mq5  4 kb
 

Can't validate, I don't even have the muving it's pointing to.

Reason: