Errors, bugs, questions - page 3145

 
Nikita Chernyshov #:

And how do you get the name of the account from which the tester was started?

Read on. The rest is up to you.

 
fxsaber #:

Read on. The rest is up to you.

thanks, fxsaber, as always!

 
Hello. Can you please tell me how to delete a pending order? I tried all the methods provided by the terminal - nothing works, the system gives a "request rejected modify order" message.
 
iLiliya #:
Hello. Can you please tell me how to delete a pending order? I tried all the methods provided in the terminal, but nothing works, the system gives me a "request rejected modify order" message.

Where did you read the methods? Not in a book on tasty and healthy food, by any chance?

There's even an example in the documentation

//+------------------------------------------------------------------+
//| Удаляет все отложенные ордера с указанным ORDER_MAGIC            |
//+------------------------------------------------------------------+
void DeleteAllOrdersByMagic(long const magic_number)
  {
   ulong order_ticket;
//--- пройдем по всем отложенным ордерам
   for(int i=OrdersTotal()-1;i>=0;i--)
      if((order_ticket=OrderGetTicket(i))>0)
         //--- ордер с подходящим ORDER_MAGIC
         if(magic_number==OrderGetInteger(ORDER_MAGIC))
           {
            MqlTradeResult result={};
            MqlTradeRequest request={};
            request.order=order_ticket;
            request.action=TRADE_ACTION_REMOVE;
            OrderSend(request,result);
            //--- выведем в лог ответ сервера  
            Print(__FUNCTION__,": ",result.comment," код ответа ",result.retcode);
           }
//---
  }
Документация по MQL5: Торговые функции / OrderSend
Документация по MQL5: Торговые функции / OrderSend
  • www.mql5.com
OrderSend - Торговые функции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Alexey Viktorov #:

Where did you read the methods? Not in a book on delicious and healthy food, by any chance?

There's even an example in the documentation.

Hello, dear Alexey. Thank you for your help and support.

I have read the method for removing pending orders inMetaTrader 5 HelpTradesExecution of Trades.

I do not have a book on tasty and healthy food, unfortunately.

My understanding of programming is on the level of "What is it? Where do I put it? Or not to put it in? Is that really the answer for me? Oh, how embarrassing it was :( I'll have to admit that I didn't understand a thing. And wanted to get advice (a simple, well, that's very simple step by step instructions) for very, very (how can I put it more delicately) uninitiated. Or, even better, with pictures).

I'm off to reflect (maybe even cry).

Торговая платформа - Справка по MetaTrader 5
Торговая платформа - Справка по MetaTrader 5
  • www.metatrader5.com
Торговая платформа — это рабочий инструмент трейдера, позволяющий совершать торговые операции на финансовых рынках. В состав платформы входит все...
 
iLiliya #:

Hello, dear Alexey. Thank you for your help and support.

I have read the method of removing pending orders in:"MetaTrader 5 HelpTrading OperationsExecution of Trades".

I do not have a book on tasty and healthy food, unfortunately.

My understanding of programming is on the level of "What is it? Where do I put it? Or not to put it in? Is that really the answer for me? Oh, how embarrassing it was :( I'll have to admit that I didn't understand a thing. And wanted to get advice (a simple, well, that's very simple step by step instructions) for very, very (how can I put it more delicately) uninitiated. Or, even better, with pictures).

I'm off to reflect (maybe even cry).

Then only Fedoseyev can help you. I haven't read his book, but the reviews are good.
 

Very strange bug. When an intu field is decimal x.6 it turns into x.600000000001. In 3180 and in 3182. I don't think it happened before. In general, such strange double's pop up in different places - there is simply nothing else and it is the most obvious (in any indicator with field double can be reproduced)

: input bug

 

 
Is there any way to find out the size of the tick in mql5 after which a position was opened?
 
Wizard #:
Is it possible to find out the size of the tick in mql5, after which a position was opened?
Record the last and penultimate Ask and Bid and count the difference.