Questions from Beginners MQL5 MT5 MetaTrader 5 - page 977

 
Vladimir Karputov:

The answer to this question can be found in the agreement you signed (if you are talking about a broker) when you opened your account. Based on practice, yes, you will be obliged to withdraw the trading account to zero and cover the loss on the trading account.

EVEN IF IT WAS ALL SIGNED REMOTELY THROUGH THE APP?
 
IMPREZA1982:
EVEN IF IT WAS ALL SIGNED REMOTELY THROUGH THE APP?

Yeah. You have been verified by your documents, right? Did you agree to the rules of your broker?

 
IMPREZA1982:
EVEN IF IT WAS ALL SIGNED REMOTELY VIA APPS?

This is a forum about MQL5. I recommend contacting the technical support of the organisation where you opened your trading account. And yes: money management involves logic and care.

 
Alexandr Saprykin:

Yeah. You have been verified by your documents, haven't you? Have you agreed to the rules of your broker?

And why didn't the broker close the trades in advance to avoid a big loss?
 
IMPREZA1982:
And why didn't the broker close the trades in advance to avoid a big minus?

Have you tried asking your broker's customer service? 🤔
 
Alexandr Saprykin:

Have you tried asking your broker's customer service?
they don't pick up the phone
 
IMPREZA1982:
They're not picking up the phone.
Must be on holiday. Get in touch by any other means available. Email, chat etc.
 

What do we have showing the profit of a trade out in history (when testing for example) for a hedge account?

Is it the current result of the trade, as in MT4? Or a position... The position in our hedge account is like the orders/trades in MT4? That is, if we have entered with 2 lots and exited with 2 lots, the trade's profit out will show the profit of this "trade"?

 

-> With independent position representation (ACCOUNT_MARGIN_MODE_RETAIL_HEDGING) several positions can be opened for each symbol at the same time. In this case, PositionSelect will select the position with the smallest tick.

How can the other positions be selected?

P.S. Why is there no quote button here in the editor?

 
Juer:

-> With independent position representation (ACCOUNT_MARGIN_MODE_RETAIL_HEDGING) several positions can be opened for each symbol simultaneously. In this case, PositionSelect will select the position with the smallest tick.

How can the other positions be selected?

P.S. Why is there no quote button here in the editor?

The "Reply" button is the quote. Bypass the positions - see my any of the last codeexpert.

Example from the last codeIeNTri.mq5

//+------------------------------------------------------------------+
//| Calculate all positions                                          |
//+------------------------------------------------------------------+
void CalculateAllPositions(int &count_buys,double &volume_buys,double &volume_biggest_buys,
                           int &count_sells,double &volume_sells,double &volume_biggest_sells)
  {
   count_buys  =0;   volume_buys   = 0.0; volume_biggest_buys  = 0.0;
   count_sells =0;   volume_sells  = 0.0; volume_biggest_sells = 0.0;
   for(int i=PositionsTotal()-1;i>=0;i--)
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         if(m_position.Symbol()==m_symbol.Name() && m_position.Magic()==m_magic)
           {
            if(m_position.PositionType()==POSITION_TYPE_BUY)
              {
               count_buys++;
               volume_buys+=m_position.Volume();
               if(m_position.Volume()>volume_biggest_buys)
                  volume_biggest_buys=m_position.Volume();
               continue;
              }
            else if(m_position.PositionType()==POSITION_TYPE_SELL)
              {
               count_sells++;
               volume_sells+=m_position.Volume();
               if(m_position.Volume()>volume_biggest_sells)
                  volume_biggest_sells=m_position.Volume();
              }
           }
  }
Reason: