Hello there!
I'm working on an Expert advisor. I want it to close all positions when there is a 2 pips retracement.
I utilize Ctrade Standard library to open and close positions.
Yes, I'm aware of the SetAsyncMode() method, but it doesn't solve the issue.
I tried orderSendAsync(), it still doesn't fix the issue.
Help please 🥺
- Questions from Beginners MQL5 MT5 MetaTrader 5
- [ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5.
- [Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2.
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
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 MQL 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.
Hi
Based on your explanation i think you can use a trailing stop for your expert
Alfred Nwanokwai #: Hello 👋 I tried that approach as well, though it work only when I set stop loss to 5pips below entry. When I tried to set it to 2pips I got an error, Invalid stoploss
That is probably because you are violating the Stops Level or Freeze Level.
The checks a trading robot must pass before publication in the Market
- www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register