Trading assistant in parts of closing positions
- ユーティリティ
- Roman Shiredchenko
- バージョン: 0.1
- アクティベーション: 5
A trader's assistant that closes positions in parts with a simple trail to take the optimal profit size when the price of the symbol moves towards the position (s). Initially, the stop loss is moved to breakeven + (the so-called breakeven greed level) - this is when the price closes the stop-loss position during the reverse movement and as a result some profit will still be received. Further, while maintaining the movement in the direction of the position, it is closed in parts on price rollbacks with a simple trawl. Those. the closed position is divided into 10 parts and closed in profit one at a time, thereby letting the profit flow. After all, it is never known whether this is a price reversal, a traded symbol, or not a significant rollback from the main movement.
How you can use it in your trading, examples from my practice:
1. I trade with Expert Advisors using a reversal trading system in a range, I often see that the price, having broken through the range, went towards the position, but did not reach a much larger take profit than the stop loss, respectively, I open a chart with the same symbol, I remember the magic position number and throw this assistant on this chart, converting (modifying) the stop loss to breakeven on my own and removing the take profit altogether or making it much larger than the previously set one (10 times). That's it - the robot closes the position in profit in parts - it is on rollbacks of the price movement (by a simple trawl). This is a key - ideological point, that the profit is not fixed in the direction of the price movement towards the position, that is, you will not cut off the profit, but will let it flow, closing the profit in parts on rollbacks.
2. I entered the symbol manually and set a stop loss and take profit - a much larger stop loss. Then I throw this robot on the chart with magic number "0" and it is already trading on its own - closing parts of the position in profit. If you open a position or positions using a script, don't forget to set the value of the magic number of the position in this trading advisor to the same value as the open position - to modify the stop loss and close in the trail on rollbacks in profit.
3. You can place pending stop orders, for example, along the borders of the range, when one of them works, you can also put this assistant - expert on trading on the symbol chart to close the position in profit in parts.
In general, this trading advisor is your indispensable assistant in trend trading, which closes parts of the position into profit on rollbacks (with a possible price reversal), allowing profit to flow. If the movement continues towards the position after its partial closure, then the profit will also continue to grow on your account equity, until the next correction, on which part of it (the position) will also be closed into profit by a simple trailing stop. You can see his work on the attached screenshots.
Trading in an optimal way and observing the "bell" of the normal probability distribution - a trading advisor is presented that closes positions in parts, since it is never known whether the price will reach take profit.
Often, there are even random entries (as they say from the hand), in general, when market positions are opened by you or your trading advisor, then you already place the proposed robot - trailing on the traded symbol, indicate the magic number of the position to close or "0" if it is not there . And this robot will do everything for you - namely, it will partially close the entire market position into profit, saving you from routine monitoring of it, visual support and control, and it will select the entire profit in the direction of the price movement, exiting the position in parts on minor rollbacks. A more detailed explanation of the process of closing positions is presented to your attention in the screenshots and in the description of external variables of the Expert Advisor.
Such closing allows you to take the entire market movement of the symbol in parts into profit, without guessing and predicting the final exit point at the price of the entire position at once (take profit) - it simply does not exist, because we do not limit profit and let profits flow using this Expert Advisor.
From the practice of its application, I would like to inform you that the size of a simple trailing is set at about 20-30% of the values of the ATR (14) indicator - the true range of symbol prices on a daily period (you can choose the value of the period at your discretion).
Thus, you take the entire course of the market in an optimal way and the profit is poured into your balance. You can see such a fan-shaped closing in profit of a position on the presented screenshots. Also, a form of growth in the account balance with such an optimal closing of the position.
In addition, you can observe trading using this assistant on my trading signals published in our community:
https://www.mql5.com/ru/signals/2013479?source=Site+Profile+Seller
https://www.mql5.com/ru/signals/2014654?source=Site+Signals+From+Author
How to use a trading expert:
You - manually or using a script, open a position or positions with a certain magic number, set a stop loss and/or take profit.
Next is placed submitted to your to the attention of the expert - assistant, and he is already doing his own thing, namely, he closes the position with ten (10) parts in profit by the best option, making it possible to take the entire course of the market throughout the entire closing time.
Lots for partial closures are divided into 10 parts and, if less than 0.1 lots, they are closed in minimum parts of 0.01 lots.
This fan close corresponds to the so-called normal probability distribution of the price move of the symbol, since sometimes it is not known whether the price will reach the take profit previously set or not. Or it will turn around and you can miss the possible profit, which just the same can be obtained with its partial fixation.
It works on the opening prices of the timeframe of the symbol on which the Expert Advisor is placed.
The description of external variables is quite simple and speaks for itself:
TrailingStop // size of a simple trailing in pips of the position being closed in parts in points
extern int Breakeven = 150; // Greed (profit margin) breakeven - stop loss transfer distance in pips to "breakeven" from the position opening price
extern int Transfer_to_breakeven = 350; // Enable the transfer to breakeven, in points, the distance of the current price from the position opening price
// The value of Transfer_to_breakeven must be greater than Breakeven, at least by the STOPLEVEL size, by the spread size
extern int SPREAD_MAX=100; //spread size for stop trades (wait for it to be lower), with a Huge spread, trading is not interesting.
extern int Magic =3; //individual expert number (set the position magic to close)
extern int NumberOfTry = 10; // number of attempts to close a position (if your broker does not execute orders to close a position the first time).
// this is the processing of possible errors in the execution of trading orders by your broker
How you can use it in your trading, examples from my practice:
1. I trade with Expert Advisors using a reversal trading system in a range, I often see that the price, having broken through the range, went towards the position, but did not reach a much larger take profit than the stop loss, respectively, I open a chart with the same symbol, I remember the magic position number and throw this assistant on this chart, converting (modifying) the stop loss to breakeven on my own and removing the take profit altogether or making it much larger than the previously set one (10 times). That's it - the robot closes the position in profit in parts - it is on rollbacks of the price movement (by a simple trawl). This is a key - ideological point, that the profit is not fixed in the direction of the price movement towards the position, that is, you will not cut off the profit, but will let it flow, closing the profit in parts on rollbacks.
2. I entered the symbol manually and set a stop loss and take profit - a much larger stop loss. Then I throw this robot on the chart with magic number "0" and it is already trading on its own - closing parts of the position in profit. If you open a position or positions using a script, don't forget to set the value of the magic number of the position in this trading advisor to the same value as the open position - to modify the stop loss and close in the trail on rollbacks in profit.
3. You can place pending stop orders, for example, along the borders of the range, when one of them works, you can also put this assistant - expert on trading on the symbol chart to close the position in profit in parts.
In general, this trading advisor is your indispensable assistant in trend trading, which closes parts of the position into profit on rollbacks (with a possible price reversal), allowing profit to flow. If the movement continues towards the position after its partial closure, then the profit will also continue to grow on your account equity, until the next correction, on which part of it (the position) will also be closed into profit by a simple trailing stop. You can see his work on the attached screenshots.
Trading in an optimal way and observing the "bell" of the normal probability distribution - a trading advisor is presented that closes positions in parts, since it is never known whether the price will reach take profit.
Often, there are even random entries (as they say from the hand), in general, when market positions are opened by you or your trading advisor, then you already place the proposed robot - trailing on the traded symbol, indicate the magic number of the position to close or "0" if it is not there . And this robot will do everything for you - namely, it will partially close the entire market position into profit, saving you from routine monitoring of it, visual support and control, and it will select the entire profit in the direction of the price movement, exiting the position in parts on minor rollbacks. A more detailed explanation of the process of closing positions is presented to your attention in the screenshots and in the description of external variables of the Expert Advisor.
Such closing allows you to take the entire market movement of the symbol in parts into profit, without guessing and predicting the final exit point at the price of the entire position at once (take profit) - it simply does not exist, because we do not limit profit and let profits flow using this Expert Advisor.
From the practice of its application, I would like to inform you that the size of a simple trailing is set at about 20-30% of the values of the ATR (14) indicator - the true range of symbol prices on a daily period (you can choose the value of the period at your discretion).
Thus, you take the entire course of the market in an optimal way and the profit is poured into your balance. You can see such a fan-shaped closing in profit of a position on the presented screenshots. Also, a form of growth in the account balance with such an optimal closing of the position.
In addition, you can observe trading using this assistant on my trading signals published in our community:
https://www.mql5.com/ru/signals/2013479?source=Site+Profile+Seller
https://www.mql5.com/ru/signals/2014654?source=Site+Signals+From+Author
How to use a trading expert:
You - manually or using a script, open a position or positions with a certain magic number, set a stop loss and/or take profit.
Next is placed submitted to your to the attention of the expert - assistant, and he is already doing his own thing, namely, he closes the position with ten (10) parts in profit by the best option, making it possible to take the entire course of the market throughout the entire closing time.
Lots for partial closures are divided into 10 parts and, if less than 0.1 lots, they are closed in minimum parts of 0.01 lots.
This fan close corresponds to the so-called normal probability distribution of the price move of the symbol, since sometimes it is not known whether the price will reach the take profit previously set or not. Or it will turn around and you can miss the possible profit, which just the same can be obtained with its partial fixation.
It works on the opening prices of the timeframe of the symbol on which the Expert Advisor is placed.
The description of external variables is quite simple and speaks for itself:
TrailingStop // size of a simple trailing in pips of the position being closed in parts in points
extern int Breakeven = 150; // Greed (profit margin) breakeven - stop loss transfer distance in pips to "breakeven" from the position opening price
extern int Transfer_to_breakeven = 350; // Enable the transfer to breakeven, in points, the distance of the current price from the position opening price
// The value of Transfer_to_breakeven must be greater than Breakeven, at least by the STOPLEVEL size, by the spread size
extern int SPREAD_MAX=100; //spread size for stop trades (wait for it to be lower), with a Huge spread, trading is not interesting.
extern int Magic =3; //individual expert number (set the position magic to close)
extern int NumberOfTry = 10; // number of attempts to close a position (if your broker does not execute orders to close a position the first time).
// this is the processing of possible errors in the execution of trading orders by your broker