Errors, bugs, questions - page 2379

 
Vladimir Karputov:
I asked just recently about individual folders and the answer was "everything is in the pile" and they won't change it yet.

Apparently, the policy changed quite recently. It used to work as it should.

 

The search engine on the website is broken ...

The forum is not searching for anything ...

 
Good afternoon. The CodeBase section of the website is not working.
 

Hi all.

Found a critical bug in the MT5 tester (latest beta build 1981). When running debugging on historical data from the editor, the tester hangs stably dead. Windows 7 x64. Broker - Discovery. My account is Real. I checked with different indicators, including those that are included to the delivery (the standard TEMA indicator on the video). I tried to use MT5 and PC more than once, I rebooted. The problem is stable and appear all the time. I cannot test and debug it :( I videotaped it for illustration. I am asking developers to pay close attention.


 
Kuzmich:

Hi all.

Found a critical bug in the MT5 tester (last beta build 1981). When running debugging on historical data from the editor, the tester hangs stably dead. Windows 7 x64. Broker - Discovery. My account is Real. I checked with different indicators, including those that are included to the delivery (the standard TEMA indicator on the video). I tried to use MT5 and PC more than once, I rebooted. The problem is stable and appear all the time. I cannot test and debug it :( I videotaped it for illustration. I am asking developers to pay close attention.


Check it out
 
The website does not search by author or by date.
 
Slava:
Check

Checked. Corrected.

 
Slava:

Please note the following problem.

Standard library. Function for partial closing of a position.

//+------------------------------------------------------------------+
//| Partial close specified opened position (for hedging mode only)  |
//+------------------------------------------------------------------+
bool CTrade::PositionClosePartial(const ulong ticket,const double volume,const ulong deviation)
  {
//--- check stopped
   if(IsStopped(__FUNCTION__))
      return(false);
//--- for hedging mode only
   if(!IsHedging())
      return(false);
//--- check position existence
   if(!PositionSelectByTicket(ticket))
      return(false);
   string symbol=PositionGetString(POSITION_SYMBOL);
//--- clean
   ClearStructures();
//--- check filling
   if(!FillingCheck(symbol))
      return(false);
//--- check
   if((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY)
     {
      //--- prepare request for close BUY position
      m_request.type =ORDER_TYPE_SELL;
      m_request.price=SymbolInfoDouble(symbol,SYMBOL_BID);
     }
   else
     {
      //--- prepare request for close SELL position
      m_request.type =ORDER_TYPE_BUY;
      m_request.price=SymbolInfoDouble(symbol,SYMBOL_ASK);
     }
//--- check volume
   double position_volume=PositionGetDouble(POSITION_VOLUME);
   if(position_volume>volume)
      position_volume=volume;
//--- setting request
   m_request.action   =TRADE_ACTION_DEAL;
   m_request.position =ticket;
   m_request.symbol   =symbol;
   m_request.volume   =position_volume;
   m_request.magic    =m_magic;
   m_request.deviation=(deviation==ULONG_MAX) ? m_deviation : deviation;
//--- close position
   return(OrderSend(m_request,m_result));
  }

When a position is partially closed, the existing position comment is cleared. And the partial close function above does not provide an opportunity to write a comment. Please correct it to something like this:

//+------------------------------------------------------------------+
//| Partial close specified opened position (for hedging mode only)  |
//+------------------------------------------------------------------+
bool CTrade::PositionClosePartial(const ulong ticket,const double volume,const ulong deviation,const string comment)
  {
//--- check stopped
   if(IsStopped(__FUNCTION__))
      return(false);
//--- for hedging mode only
   if(!IsHedging())
      return(false);
//--- check position existence
   if(!PositionSelectByTicket(ticket))
      return(false);
   string symbol=PositionGetString(POSITION_SYMBOL);
//--- clean
   ClearStructures();
//--- check filling
   if(!FillingCheck(symbol))
      return(false);
//--- check
   if((ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY)
     {
      //--- prepare request for close BUY position
      m_request.type =ORDER_TYPE_SELL;
      m_request.price=SymbolInfoDouble(symbol,SYMBOL_BID);
     }
   else
     {
      //--- prepare request for close SELL position
      m_request.type =ORDER_TYPE_BUY;
      m_request.price=SymbolInfoDouble(symbol,SYMBOL_ASK);
     }
//--- check volume
   double position_volume=PositionGetDouble(POSITION_VOLUME);
   if(position_volume>volume)
      position_volume=volume;
//--- setting request
   m_request.action   =TRADE_ACTION_DEAL;
   m_request.position =ticket;
   m_request.symbol   =symbol;
   m_request.volume   =position_volume;
   m_request.magic    =m_magic;
   m_request.comment  =comment;
   m_request.deviation=(deviation==ULONG_MAX) ? m_deviation : deviation;
//--- close position
   return(OrderSend(m_request,m_result));
  }

And, similarly for this function:

bool CTrade::PositionClosePartial(const string symbol,const double volume,const ulong deviation)
 
Alexey Kozitsyn:

Please note the following problem.

Standard library. Function for partial closing of a position.

When a position is partially closed, the existing position comment is cleared. And the partial close function above does not provide an opportunity to write a comment. Please correct it to something like this:

And, similarly for this function:

Let's do it. Let's just think about it first.
 
Slava:
Let's do it. Just think about it first.

Are there any contraindications? I've made the changes I wrote about myself - everything works. If someone doesn't need a comment - inserts a blank one.

Reason: