revese order

 

i need the mql4 script to do

if any order (buy or sell) hit take profit, should place a reverse order

 
mangomsms:

i need the mql4 script to do

if any order (buy or sell) hit take profit, should place a reverse order

You need an expert advisor. Script runs only once.
Unfortunately there is no trade transaction event in mql4. So you have to keep track of trades or read historical trades to check if any position has TPed and open the new trade accordingly.
 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
  • Usually people who can't code don't receive free help on this forum.
  • If you show your attempts and describe your problem clearly, you will most probably receive an answer from the community. Use the CODE button (Alt-S) when inserting code.
  • To learn MQL4 programming, you can research the many available Articles on the subject, or examples in the Codebase, as well as reference the online Documentation.
  • If you do not want to learn to code, that is not a problem. You can either look at the Codebase if something free already exists, or in the Market for paid products (also sometimes free). However, recommendations or suggestions for Market products are not allowed on the forum, so you will have to do your own research.
  • Finally, you also have the option to hire a programmer in the Freelance section.
Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • 2023.12.18
  • www.mql5.com
The largest freelance service with MQL5 application developers
 
Fernando Carreiro #:
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Thank you
 
Yashar Seyyedin #:
You need an expert advisor. Script runs only once.
Unfortunately there is no trade transaction event in mql4. So you have to keep track of trades or read historical trades to check if any position has TPed and open the new trade accordingly.
thank you