The Problem with Trailing Stop in MetaTrader 5 - Forcing Trailing Stop to Activate at a Certain Profit Level
There are many "Trailing Stop" solutions (with various options), available in the CodeBase section and also available in the Market place, both free and paid options.
Please following the two links I provided in the previous sentence and do some research on your own, because recommendations or suggestions for products are not allowed on the forum.
EDIT: And if nothing is to your satisfaction, then you can always code your own or hire a programmer in the Freelance section to do it for you.
- 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.
- 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.
There is no "work-around". You have to code a MQL program to do it the way you want.
The CodeBase is for publishing your own code contributions, not for posting coding requests.
If you wish to hire someone to code it for you, do it in the Freelance section.
- 2023.10.25
- www.mql5.com
Exactly. If you want to “profiting 300 point” then set the take profit (TP) to that level.
Exactly. If you want to “profiting 300 point” then set the take profit (TP) to that level.
There is no "work-around". You have to code a MQL program to do it the way you want.
The CodeBase is for publishing your own code contributions, not for posting coding requests.
If you wish to hire someone to code it for you, do it in the Freelance section.
It's made sense since the beginning, but unfortunately that is not how trading works.
You certainly free to try program such a trailing-stop, but you may find that it's not always possible nor practical to achieve it exactly as you perceive it.
For one, if the broker has a stops-level or freeze-level in play, you will not be able to place the trailing-stop so close. You would have to implement a virtual trailing-stop in that case.
Also, the price may just suffer a slight negative slippage and the position will immediately close, so you will need to have a little bit of a "buffer" room for price to deviate.
For it to work as you envision it, price will need to have a very strong momentum at the moment you set the trailing-stop equal to the target price, so that there is no negative slippage at all at the time.
In any case, since it seems you don't know how to code it yourself, you will have to hire someone to do it for you, but please understand that it may not be possible to achieve 100% what you want.
It's made sense since the beginning, but unfortunately that is not how trading works.
You certainly free to try program such a trailing-stop, but you may find that it's not always possible nor practical to achieve it exactly as you perceive it.
For one, if the broker has a stops-level or freeze-level in play, you will not be able to place the trailing-stop so close. You would have to implement a virtual trailing-stop in that case.
Also, the price may just suffer a slight negative slippage and the position will immediately close, so you will need to have a little bit of a "buffer" room for price to deviate.
For it to work as you envision it, price will need to have a very strong momentum at the moment you set the trailing-stop equal to the target price, so that there is no negative slippage at all at the time.
In any case, since it seems you don't know how to code it yourself, you will have to hire someone to do it for you, but please understand that it may not be possible to achieve 100% what you want.
Thank you for the great explanation. I do understand that there's no such thing as 100% guarantee. What I meant was as close to it as possible. But yes, you're right, it absolutely needs some “buffer”, I just skipped explaining that part, I thought it was understood.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In other words, when a Trailing Stop is set for a trade, it only activates at the initial trading level and it goes up from there. What if I wanted the Trailing Stop to activate at the 300-point profit mark instead, and not at the ZERO level (the initial trading level)?
Is coding this difficult? Also, can it be done automatically? So for instance, you open a buy position, and the EA or the script automatically sets the Trailing Stop (at for example 300 points), and then if the market goes up 300 points, the Trailing Stop activates at the current market level (which is 300 points above your initial long level) or a little below it (280 points above your long level). This way if the market reverses, you at least profit 280 points, instead of zero profit.