Questions from Beginners MQL5 MT5 MetaTrader 5 - page 659

 
new-rena:

Okay. It's sorted out.

The solution of fxsaber is good, I have applied it.

Basically, I converted my MQL4 program to MQL5 almost without any problems.

The details are described above.

Thank you all!

You'd better not to pull any tails and directly write in MQL5. I have tails one day and then in the morning they were cut off 😉 I will not give them to you.
 
new-rena:

Okay. It's sorted out.

The solution of fxsaber is good, I have applied it.

Basically, I converted my MQL4 program to MQL5 almost without any problems.

The details are described above.

Thank you very much!

I have good luck) I cannot rewrite mine, I think I will start freelancing a bit later. I don't use libraries in principle.
 
Vitaly Muzichenko:
Lucky) And I can not rewrite mine, apparently the road to freelancing a little later. I don't use libraries in principle.

I won't hide the fact that I used this article extensively too (AUTHOR RESPECT!!!):

https://www.mql5.com/ru/articles/81

And the rest is sort of here:

https://www.mql5.com/ru/docs/constants/structures/mqltraderequest

And the program is ready!

Переход с MQL4 на MQL5
Переход с MQL4 на MQL5
  • 2010.05.11
  • //www.mql5.com/ru/users/DC2008">
  • www.mql5.com
Данная статья, построенная в форме справочника по функциям MQL4, призвана помочь переходу с MQL4 на MQL5. Для каждой функции языка MQL4 приведено описание и представлен способ ее реализации на MQL5, что позволит вам значительно ускорить перевод своих программ с MQL4 на MQL5. Для удобства функции разбиты на группы, как в документации по MQL4.
 

Please help.

I translate a string with a number double into the corresponding variable, but the number is truncated by the last two numbers, how can I prevent this?

How can I use longo variables where ipses are allowed at most?

 

In MQL4 we can list the current pending orders and positions and address them through OrderSelect and get the OrderType.

But MQL5 will not allow it on a hedging account, as far as I understood, there are positions, what's already open and orders (pending in my case).

I.e., the data on pending orders and active positions should be obtained separately using "OrdersTotal();" and "PositionsTotal();". and after that using

"OrderSelect" and "PositionSelect" to perform the modification.

Correct me if I'm wrong.

How should we modify orders?

 
forexman77:

How do I modify orders?

https://www.mql5.com/ru/docs/constants/tradingconstants/enum_trade_request_actions

In OrderSend() specify the required type of trade operation.

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Типы торговых операций
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Типы торговых операций
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Типы торговых операций - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Thank you!
 
forexman77:
Thank you!
You're welcome).
 
Hi 2016.11.02_18:41 GMT+3. I've been having a hard time finalising the EA lately. Procedure file. The ArrayMinimum() function is not working as it should. I'm wondering, am I doing the right thing? How long will MetaTrader4 and procedural programming be supported? Could the MetaQuotes Corporation staff outline their plans for the next year at least? Otherwise, you write and write this Expert Advisor, and then it turns out that everything must be redone, and instead of a procedural file (files) you have to write it in object-oriented programming. And instead of an .ex4 file you need an .ex5 file ? I haven't checked the function yet, as new-rena wrote to me. I'll check it on occasion, it won't take long. That's all for now. 18:58 GMT+3. Inserted at 19:25 GMT+3.
 
Николай Никитюк:
Hi 2016.11.02_18:41 GMT+3. I've been having a hard time finalising the EA lately. Procedure file. The ArrayMinimum() function is not working as it should. I'm wondering, am I doing the right thing? How long will MetaTrader4 and procedural programming be supported? Could the MetaQuotes Corporation staff outline their plans for the next year at least? Otherwise, you write and write this Expert Advisor, and then it turns out that everything must be redone, and instead of a procedural file (files) you have to write it in object-oriented programming. And instead of an .ex4 file you need an .ex5 file ? I haven't checked the function yet, as new-rena wrote to me. I'll check it on occasion, it won't take long. That's all for now. 18:58 GMT+3. Pasted at 19:25 GMT+3.
Don't worry, mql5 supports procedural programming! no one is imposing OOP!
Reason: