Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1452

 
Can you please tell me how to add an Expert Advisor purchased on the Market to MT5? The purchase section is not displayed in MT5 for some reason.
 

why aren't my balance and trade histories populated in my signal?

 
thiago5 #:

Hello.

I'm new to the MT4 platform. I've entered the correct username and password, even the available balance appears, but the NEW ORDER button is inactive, even though I have the balance to trade; the same thing happens on smartphones.


Could someone help me by telling me how to solve this?



Thank you in advance.

Check your broker's minimum deposit and make sure you're looking at the right asset, because it could be that you're looking at the "full" asset and have deposited amounts for the "micro".
 
25476896 #:

why aren't my balance and trade histories populated in my signal?

Are you logged in? As far as I know, it only appears for subscribers or the owner of the signal.
 

Can there be such a case, when feedbacks indicate that the success of position opening

2023.04.21 13:06:24.961 MAllTradeV_0 (draft) (EURUSD,M1) PositionOpen() method executed successfully. Return code=10008 (placed)0 595 1682055000 lot 0.05000000

2023.04.21 13:06:25.952 MAllTradeV_0 (draft) (EURUSD,M1) The OrderOpen() method was executed successfully. Return code=10008 (placed)0 595 1682055000 lot 0.01000000

2023.04.21 13:18:03.075 MAllTradeV_0 (draft) (EURUSD,M1) The PositionOpen() method was executed successfully. Return code=10008 (placed)0 595 1682055000 lot 0.04000000


And in reality there is not one.


it did not close in the history.


I use a standard class for trading

  if(!m_trade.PositionOpen(position_buff[i].symbol,order_type,lot,position_buff[i].price,0,0,position_buff[i].comment))
         //--- сообщим о неудаче
         Print("Метод PositionOpen() потерпел неудачу. Код возврата=",m_trade.ResultRetcode(),
               ". Описание кода: ",m_trade.ResultRetcodeDescription(),")"+position_buff[i].comment+" lot "+DoubleToString(lot));
      else
        {
         position_buff[i].timeOp= TimeCurrent();     // Фиксировать время
         Print("Метод PositionOpen() выполнен успешно. Код возврата=",m_trade.ResultRetcode(),
               " (",m_trade.ResultRetcodeDescription(),")"+position_buff[i].comment+" lot "+DoubleToString(lot));//
       //  Sleep(1000);
        }


Help me how to catchReturn Code=10009 ???????

Who knows how to track specifically the order, whether it was executed or not? I understood the return code on request 10008 is not the final response.

 

10008 is "order placed", 10009 is "order executed"

Roughly, sending a market order via OrderSend, we get 10009, sending a pending order - 10008.

I gave up standard classes a long time ago, there are a lot of pitfalls there.

 
JRandomTrader standard classes a long time ago, there are a lot of pitfalls there.

Please, show me what you use!

 
Mikhail Toptunov #:

Please show us what you use!

I place orders via OrderSend or OrderSend Async, store the placed orders (or only one order - if market) in a sorted by price array and track their fate via OnTrade or OnTradeTransaction

Plus, periodically and at startup, checks for missed events - checking the array against the list of active orders.

 
Mikhail Toptunov #:

Is it possible that the feedbacks indicate that the success of the opening of a position

2023.04.21 13:06:24.961 MAllTradeV_0 (draft) (EURUSD,M1) PositionOpen() method executed successfully. Return code=10008 (placed)0 595 1682055000 lot 0.05000000

2023.04.21 13:06:25.952 MAllTradeV_0 (draft) (EURUSD,M1) The OrderOpen( ) method was executed successfully. Return code=10008 (placed)0 595 1682055000 lot 0.01000000

2023.04.21 13:18:03.075 MAllTradeV_0 (draft) (EURUSD,M1) The PositionOpen() method was executed successfully. Return code=10008 (placed)0 595 1682055000 lot 0.04000000


And in reality there is not one.


in history never closed.


I use the standard class for trading


Hint how to catchReturn Code=10009 ???????

Who knows how to track specifically the order, whether it was executed or not? I understand the return code on request 10008 is not the final answer.

And why are you looking for a pending order among positions?

 
Alexey Viktorov #:

Why are you looking for a pending order among the positions?

Thanks, I think I've figured it out. I had to open a position at the current price, but I was placing pending orders, so they were not placed because I specified the current price.

I used

   ENUM_ORDER_TYPE order_type= position_buff[i].type==0 ? ORDER_TYPE_BUY : ORDER_TYPE_SELL;


but I had to

 ENUM_POSITION_TYPE order_type= position_buff[i].type==0 ? POSITION_TYPE_BUY : POSITION_TYPE_SELL;