![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Guys,
According to my username, I am your new friend.
Guys, a question. Although it will might look like I am requesting for a freelancer, its not true, I am not yet - just asking if something like that exist:
I am looking for blockage/skipping/preventive tool for Take Profit Line that would block/prevent Take Profit and its consequence** to happen (to execute) in case if particular conditions I set are met. Does something like this exist?
** consequence of executed Take Profit is obvious: In uptrend - if price either upward touches Take Profit or upward crosses it without touching it then position is immediately and guaranteed automatically closed. In downtrend - if price either downward touches Take Profit or downward crosses it without touching it then position is immediately and guaranteed automatically closed.
Why do I search for this? Guys look, I will tell you something: I want to set up Take Profit but in some conditions I don't want it (its consequence) to happen (to execute). Such conditions could be:
In uptrend: block Take Profit if minimum X (e.g. 3 but I would define number here) successive fully formed bullish green candles, each X time period (e.g. i would define 1 minute or 5 minutes or 15 whatever) and nothing else occurs just before Take Profit line.
In downtrend: block Take Profit if minimum X successive fully formed bearish red candles, each X time period, and nothing else occurs just before Take Profit line
''block'' obviously means the position must not be closed
Then I could set some subconditions, e.g.
- respect/disrespect upper shadow (if any) in uptrend
- respect/disrespect lower shadow (if any) in downtrend
- in uptrend: opening price of second candle must be same as closing price of first candle or above closing price of first candle
- in uptrend: opening price of third candle must be same as closing price of second candle or above closing price of second candle
- in downtrend: opening price of second candle must be same as closing price of first candle or above closing price of first candle
- in downtrend: opening price of third candle must be same as closing price of second candle or above closing price of second candle
first candle is the one which is in the group of three successive candles most far away (out of those three) from Take Profit. Third candle is the closest one, second is obviously the one in the beginning. Same for uptrend and downtrend.
Then i could set up also some more subconditions such as: height of candles, which candle (does not count in the group of three successive candles) must be or must not be BEFORE first candle, etc.
Idea of another condition I could set up and if condition is met then Take Profit should be blocked even if enabled:
in uptrend: block Take Profit if the latest candle*** is either of those patterns: bullish abandoned baby, inverted hammer, dragon-fly doji, hammer, bullish harami cross, grip bottom and hammer, green candlestick with long lower and small upper shadow, doji morning star, morning star, morning star 2, morning star 3, bullish engulfing pattern.
in downtrend: block Take Profit if the latest candle*** is either of those patterns: bearish abandoned baby, hanging man, gravestone doji, shooting star, bearish harami cross, grip top and gravestone, red candlestick with long upper and small lower shadow, doji evening star, evening star, evening star 2, evening star 3, bearish engulfing pattern, doji.
*** this latest candle is, in example of condition I named at the beginning, obviously the third candle in the group. So the one which is the closest, in group of those three, to the Take Profit.
Another idea where condition should be matched so Take Profit is blocked even if enabled:
in uptrend: block it if upward gap occurs before Take Profit but minimum X points below it
in downtrend: block it if downward gap occurs before Take profit but minimum X points above it
Another idea:
in uptrend: regardless of quantity of bullish candles before Take Profit: If either formed or not yet fully formed bullish candle before Take Profit is for minimum X % larger than previous candle which must be bullish too then block Take Profit.
in downtrend: regardless of quantity of bearish candles before Take Profit: If either formed or not yet fully formed bearish candle before Take Profit is for minimum X % larger than previous candle which must be bearish too then block Take Profit.
Of course there are many other possibilities for conditions.
The tool, I am asking for, could be further improved: e.g. three ideas how to improve the tool
idea 1: if Take Profit is blocked then delete it from the graph and obviously from the actual order window too
idea 2: if Take Profit is blocked then don't delete it, not even from order window, but color it differently on the graph
idea 3: if Take Profit is blocked then create new one on exact X price i choose. All Blocking conditions apply for new one(s).
Anyway, to conclude my message:
Does any such similar tool exist or anything else that would be created for Taking Profit and as similar as possible to what I described?
That would be amazing. :-) Replies appreciated!