Questions from Beginners MQL5 MT5 MetaTrader 5 - page 875

 
Alexey Viktorov:

Peace, friendship, chewing gum.

There's no other way!

 

Here's a question:

there is a structure MqlTick in it has a parameter time_msc, how can it be converted to date/time, if there are such possibilities?

 
Andrii Djola:

Here's a question:

there is a structure MqlTick in it has a parameter time_msc, how can it be converted to date/time, if there are such possibilities?

//+------------------------------------------------------------------+
//| Выводит в журнал время с милисекундами                           |
//+------------------------------------------------------------------+
string TimeMSCtoString(const long time_msc)
  {
   return ::TimeToString(time_msc/1000,TIME_DATE|TIME_MINUTES|TIME_SECONDS)+"."+IntegerToString(time_msc%1000,3,'0');
  }
//+------------------------------------------------------------------+
 
Artyom Trishkin:

Thank you

 
Is it possible to use a panel or other controls in visual EA testing mode? If so, how can this be done?
 
Sergey Savinkin:
Is it possible to use the panel or other controls in the visual mode of testing an EA? If so, how to do it?

In mt5 half of the tester's capabilities are technically limited, for example the input field does not work, i.e. you cannot change the lot, lines cannot move. Only buttons work. Everything works in mt4, but it is not interesting.

 
Vitaly Muzichenko:

In mt5 half of the tester's capabilities are technically limited, for example the input field does not work, i.e. you cannot change the lot, lines cannot move. Only buttons work. Everything works in mt4, but it is not interesting.

I have never been interested in this kind of mechanism. Thank you. I would like to be able to place orders at least. Please send me a link to an article on this subject (MT5).

 
Sergey Savinkin:

Thank you. I should at least be able to place orders. Please throw me a link to an article on this topic (MT5).

Unfortunately I haven't come across the article, maybe someone else can tell me.

You will not be able to place orders because you will not be able to enter the required setting price. The same applies to lots

 
Vitaly Muzichenko:

Unfortunately, I haven't come across the article, maybe someone else can suggest it.

You won't be able to set orders because you won't be able to enter the right setting price. The same applies to lots.

What about "by market" orders? Is it possible to set table-loss and take-profit without specifying them in the form but calculating them as a percentage of APR, for example? The percentage is set in the code, not on the form. The form only contains buttons "Set BUY and SELL order".

 
Sergey Savinkin:

What about "by market" orders? Is it possible to set table-loss and take-profit without specifying in the form, but calculating, for example, as a percentage of APR? The percentage is set in the code, not on the control form. The form only contains buttons "SELL and BUY".

Yes, we can do that. Once again: only buttons work (press/push)

Reason: