- How to code?
- Experts: Stop & Limit Bots
- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
-
If the TP closes the order at 8, you can only place a pending (stop) order at 5. If the market keeps going up, nothing happens.
You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
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 issue is interesting).
No free help (2017) -
You can't move stops (or pending prices) closer to the market than the minimum: MODE_STOPLEVEL * _Point or SymbolInfoInteger(SYMBOL_TRADE_STOPS_LEVEL).
Requirements and Limitations in Making Trades - Appendixes - MQL4 TutorialOn some ECN type brokers, the value might be zero (the broker doesn't know). Use a minimum of two (2) PIPs.
The checks a trading robot must pass before publication in the Market - MQL5 Articles (2016)
-
There is no need to create pending orders in code.
-
The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)
Don't worry about it unless you're scalping M1 or trading news.
-
Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.
-
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use