Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1562

 

Hello, just started to learn MT5. I don't know if this is the right topic. Can you tell me, please, I create a deal to buy and when the price increases (circled in red) the profit increases, because the more expensive I buy, the profit should be lower? The price at the time of purchase is 1.11563, and at the current moment is 1.11623, so the sale is at a higher price or what does the price in the penultimate column mean? Or is it the selling price? That is, at the end of the transaction I will already have a sale?

Is it the same with a sale transaction, when the transaction is completed it is already a purchase? Otherwise, why is it that the higher the sale price in the penultimate column, the lower the profit? I have no experience in this field yet, but with many things in this programme I could already understand, but this moment I can not understand and I could not find information anywhere. Give me a hint, who can. Attached example

Files:
 
kompos12 #:

Hello, just started to learn MT5. I don't know if this is the right topic. Can you tell me, please, I create a deal to buy and when the price increases (circled in red) the profit increases, because the more expensive I buy, the profit should be lower? The price at the time of purchase is 1.11563, and at the current moment is 1.11623, so the sale is at a higher price or what does the price in the penultimate column mean? Or is it the selling price? That is, at the end of the transaction I will already have a sale?

Is it the same with a sale transaction, at the end of the transaction I already have a purchase? Otherwise, why the higher the sale price in the penultimate column, the lower the profit? I have no experience in this field yet, but with many things in this programme I could already understand, but this moment I can not understand and I could not find information anywhere. Give me a hint, who can. Attached example

This is the closing price of the deal at the current moment. That is, for Sell position it is the current Ask price, and for Buy position it is the current Bid price.

 
Alexey Viktorov #:

This is the closing price of the deal at the current moment. That is, for Sell position it is the current Ask price, and for Buy position it is the current Bid price.

Thank you, now I understand
 
Please help me, I accidentally cancelled the authorisation for one-click trading and now every time I have to close the pop-up window twice when opening or closing trades. how to fix it?
 
Stef Smith #:
Please help me, I accidentally cancelled the authorisation for one-click trading and now every time I have to close the pop-up window twice when opening or closing trades. how to fix it?
In MT5:
Tools - Options - Trade
and tick One Click Trading and press OK.
 

Sergey Golubev #
:

In MT5:
Tools - Options - Trading
and tick One Click Trading and click OK.

I don't see - Tools

 
Stef Smith #:

I can't see - Tools

.

 
Aleksandr Slavskii #:

.

!
 
Greetings, my EA opens positions for a percentage of the balance, I have managed to implement this, but how to leave the same risk on the position after receiving a stop loss. That is, I understand that I need to throw the current balance into some variable before each check of the conditions for entering a position, but how can I implement it so that at the next check for entry the variable is saved and it can be compared with the current balance, and if the current balance is less than the past balance, then use the past balance to calculate the variable kp rofit, which is responsible for the lotage.
if (условие)  
     {

   
        current_bid=SymbolInfoDouble(_Symbol,SYMBOL_BID);
        k = (float)current_bid;
        
        balance = AccountInfoDouble(ACCOUNT_BALANCE);
       
        kprofit = balance / 1000;
        
        lot1 = lot / k;
        lot1 = lot1 * kprofit;
        lot1 = MathRound(lot1);
        
        
      
       if (условие)
         
       
         
         trader.Buy();
 
statist247 opens positions for a percentage of the balance, I have managed to implement this, but how to leave the same risk on the position after receiving a stop loss. That is, I understand that I need to throw the current balance into some variable in advance, before each check of the conditions for entering a position, but how to implement it so that at the next check for entry the variable is saved and it can be compared with the current balance, and if the current balance is less than the past balance, then use the past balance to calculate the variable kp rofit, which is responsible for the lotage

Make a global variable and at initialisation remember the balance value. Then do the calculation from this constant.