Help in conversion of mql4 code to mql5

 

***

Please help me to convert this code of mql4 to mql5.

The code just check the order by magic number whether it is already traded by that magic number or not.

Documentation on MQL5: Integration / MetaTrader for Python / order_calc_margin
Documentation on MQL5: Integration / MetaTrader for Python / order_calc_margin
  • www.mql5.com
order_calc_margin - MetaTrader for Python - Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

About this topic/problem does exists al lot here just search for it and pick initially articles.

And for Code please use either ALT+S or the icon </> from the editor line.

MQL5 Articles
MQL5 Articles
  • www.mql5.com
MQL5 Programming Articles
 
Prateek Singh: Please help me t
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. p>Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help (2017)

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2018)

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
              No free help (2017)

  3. There are no open orders in MT5, research deals and positions.
              PositionClose is not working - MQL5 programming forum (2020.02.21)
              MagicNumber: "Magic" Identifier of the Order - MQL4 Articles (2006)
              Orders, Positions and Deals in MetaTrader 5 - MQL5 Articles (1 February 2011)

 
Carl Schreiber #:

About this topic/problem does exists al lot here just search for it and pick initially articles.

And for Code please use either ALT+S or the icon </> from the editor line.

Thank you for yoyr reply and i searched a lot to convert the code to the desired mql5 format.


Also this is the first time i have posted in any forum so please ignore my mistakes.

 
William Roeder #:
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  2. p>Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help (2017)

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2018)

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
              No free help (2017)

  3. There are no open orders in MT5, research deals and positions.
              PositionClose is not working - MQL5 programming forum (2020.02.21)
              MagicNumber: "Magic" Identifier of the Order - MQL4 Articles (2006)
              Orders, Positions and Deals in MetaTrader 5 - MQL5 Articles (1 February 2011)

Thank you for yoyr reply and i searched a lot to convert the code to the desired mql5 format.


Also this is the first time i have posted in any forum so please ignore my mistakes.

I am not asking anyone to code for me i just want what is that i am not able to find.

Reason: