Open Order Immediately after last order hits SL or TP

To add comments, please log in or register
Robin Brimalm
296
Robin Brimalm  

Hello! 


My question is simple. I need help coding a script that places a pending prder that is exactly the same as the last order closed by SL or TP.

It should be placed at the same place with the same SL and TP as the last order and right after the last order is closed. 


Example:

I place a buy order at 1.19400 with SL 1.19200 and TP 1.19600.

Market goes from 1.19400 to 1.19600 and that order is closed by TP. 

Right after that order is closed i want a new pending buy-limit order to be created exactly like the one that was just closed: buy at 1.19400 with SL 1.19200 and TP 1.19600.


I also want this to work with multiple orders open at the same time.


Thanks in advance!! <3

Basic Principles - Trading Operations - MetaTrader 5
Basic Principles - Trading Operations - MetaTrader 5
  • www.metatrader5.com
is an instruction given to a broker to buy or sell a financial instrument. There are two main types of orders: Market and Pending. In addition, there are special Take Profit and Stop Loss levels. is the commercial exchange (buying or selling) of a financial security. Buying is executed at the demand price (Ask), and Sell is performed at the...
whroeder1
17943
whroeder1  
Robin Brimalm: My question is simple. I need help coding a script

That isn't a question. 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 Will code your trading systems for free - Free Expert Advisors - Trading Systems - MQL5 programming forum, or Coding help - MQL4 and MetaTrader 4 - MQL4 programming forum, or Need help with coding - General - MQL5 programming forum, or Free MQL4 To MQL5 Converter - General - MQL5 programming forum, or Requests & Ideas (MQL5 only!).
  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.

To add comments, please log in or register