MT4 to MT5

To add comments, please log in or register
1324007
151
1324007  

hello, while reading around I have come across an very interesting idea of an EA (sadly an MT4 one). it basically open an buy stop and a sell stop pending orders at a distance from current price, when one order is triggered the other one is canceled and two new pending orders are created at same distance from new current price.


all credit goes for author Zaymin Htet 

topic https://www.mql5.com/en/code/19057


however I am an MT5 user and i have no idea how to convert this free EA into MT5, can anyone help?

Open Two Pending Orders
Open Two Pending Orders
  • www.mql5.com
The Expert Advisor is intended for automatic placing of Buy Stop pending orders and Sell Stop pending orders simultaneously, Stop Losses and Take Profits on the user specified levels. As soon as the long position (BUY) is opened as ASK price crosses the levels, the remaining pending order (SELLSTOP) is deleted. Vice versa if the short position...
William Roeder
18888
William Roeder  
1324007: i have no idea … can anyone help?
Help you with what? You haven't stated a problem, you stated a want. You have only four choices:
  1. Search for it,
  2. Beg at
  3. learn to code it. If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
  4. or pay (Freelance) someone to code it.
We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
          No free help
          urgent help.
fxsaber
13261
fxsaber  
1324007:

hello, while reading around I have come across an very interesting idea of an EA (sadly an MT4 one). it basically open an buy stop and a sell stop pending orders at a distance from current price, when one order is triggered the other one is canceled and two new pending orders are created at same distance from new current price.


all credit goes for author Zaymin Htet 

topic https://www.mql5.com/en/code/19057


however I am an MT5 user and i have no idea how to convert this free EA into MT5, can anyone help?

#define MT4_TICKET_TYPE // Обязываем OrderSend и OrderTicket возвращать значение такого же типа, как в MT4 - int.
#include <KimIVToMT5.mqh> // https://c.mql5.com/3/263/KimIVToMT5.mqh

#define Magic Magic2

#include "Open Two Pending Orders.mq4" // https://www.mql5.com/en/code/19057

void OnTick() { start(); }
1324007
151
1324007  
thank you fxsaber, undoubtedly it will work perfect like all your pieces of code everywhere. will  look into it tomorrow
To add comments, please log in or register