UTrailing – universal trailing stop, made in the form of an EA, but without its own mechanism for opening orders. UTrailing EA is useful to any trader, but most of all like traders who trade hands, for them it will be a great assistant.
Important: in the strategy tester, you can see a demonstration of the EA's work, if trailing of pending orders is allowed, then you can see how the EA works with pending orders, and if it is allowed to exit the "lock" at breakeven, then you can see how orders are closed at breakeven.
Enter the key = 0 – it is enough to enter the numerical key in the field once so that the EA can operate on a real account. After the key is checked, the EA will create a special file which will be stored in the created folder "General_key" (MQL4 -> Files -> General_key). With each new launch, the EA finds the key file itself and checks it for compliance with this account. You do not need to re-enter the key. The key is common to all of our free advisors and indicators that are installed on this account.
If you already have a real account and the key to the real account is activated (see above), then to get access to trading on a demo account, you need to: install the EA on the demo account in the "Enter the key" window, enter your real account number and click OK.
Hot buttons are designed for quick execution of one command. After pressing the button, its color changes, and the button is blocking, when pressed again, removed the blocking and leads to the original state of the button. Any press of the button EA fixes in its log, you can see the current position of the button on the tab "Experts". You can also unblock the button using the new initialization of the EA (for example, switching to another timeframe). In this case, you do not need to press anything, the blocking is removed automatically.
Close All – closes all open positions and deletes all pending orders.
Close Loss – closes only orders that have a loss.
Close Profit – closes only orders with profit.
Delete PO – removes only pending orders.
Delete SL – removes stop loss from open orders.
Important: if the command "All symbols" = true is active, then when you press the "hot" button, the task will be executed for all orders and all positions currently open in the terminal! If "All symbols" = false, then the task will be performed only on the current currency pair on which the EA is installed.
Shift + 0 – closes all open positions and deletes all pending orders.
To do it, you need to place the cursor over the price chart, where the EA is running, click on the chart with the left mouse button (select the chart) and then press "Shift" and "0" buttons in sequence. To unlock, again press "Shift" and "0".
Allow the EA to work = true - if you select false, the EA will suspend its work, stop monitoring orders and will not move the stop loss.
Magic number (-1 for all) = -1 - allows you to specify the EA, which orders (with which magic number) it needs to track. The magic number will be displayed on the chart for your convenience and appear in the right corner of the terminal’s screen to the left of the EA.
The magic number -1 (the message "-1" will be displayed on the chart) means that the EA will work with all orders for this currency pair, including orders opened manually.
If you set the magic number 0, the chart will display the message "0" and the EA will monitor and work only with orders that were opened manually on this currency pair.
All symbol = false, if true, the EA will work with all orders opened in the terminal, on all symbols, and the message “All symbols” will be displayed at the top of the chart.
Positions:
Add SL or TP for all open orders = true, the EA will set a stop loss or take profit for all open orders.
Stop Loss by:
Stop Loss in points = 30 - the stop loss in the points.
Virtual stop loss = false - the stop loss is invisible to the broker, if true, the horizontal line of the virtual stop loss will appear on the chart. The line can be moved by hand, in any direction.
Take Profit in points = 120 - the take profit in the points.
Breakeven for one direction: -breakeven mode:
Profit to enable a breakeven = 12 – level of take-profit in points, at which a breakeven is enabled.
Breakeven level = 2 – sets the level, at which a stop-loss must be moved: if set to 1, then the position will be closed, when the profit is 1 point, if set to 0, then the position will be closed with the profit of 0 points.
Important
Slippage = 3 - the level of slippage in points on the volatile market it is better to increase.
Close by Equity = false - if true, allow closing all open positions and deleting all pending orders when the account Equity reach the set value.
Amount of Equity, in the currency of the deposit = 0.0 - the amount of Equity at which all orders will be closed, the value can be higher or lower than the account Balance.
Profit/Loss percent = false - if true, the EA will close orders when reaching a certain percentage of the profit or loss.
Profit % for close orders = 20, if the Equity become more than the Balance by the set percentage, all orders will be closed.
Loss % for close orders = 70, if Equity becomes less than the Balance by the set percentage, all orders will be closed.
Exit from the "lock" at breakeven = false - exit from the "lock" is possible only if there is a difference between the sums of the volumes of lots. If there is such a difference, then a horizontal dotted line of the breakeven level will appear on the chart. If you select true, the color of the line will change to orange and when the price reaches this line, all orders will be closed.
Mini profit to exit the "lock" = 0.2 - here you can set the minimum profit value (in the deposit currency) at which all orders will be closed at breakeven.
Important: if "All symbols" = true, and there are open positions on other currency pairs, the EA will calculate the difference in lot volumes for all currency pairs, and when you exit the "lock" at breakeven, all orders in the terminal will be closed.
Trend lines (TL): - trend lines will appear on the chart, the position of which you can change:
Close when breaking through the TL = false - if true, when the price breaks the upper trend line, all open positions on Sell will be closed, and when the lower trend line is broken, all positions on Buy will be closed.
Signal when the price breaks the TL = true - when the price breaks the trend line, a sound signal will sound.
Continuation of TL to the right = false - if true, the trend line will continue to the right, to the right edge of the chart.
Important: trend lines work only on the current chart on which the EA is installed, so when the trend line is broken, positions will be closed only on this currency pair.
Pending orders trailing = false, if true, the EA will trail pending orders.
Trailing orders by:
Timeframe for trailing orders: = «30 Minutes» - choice of the timeframe by which you want to work with trailing stop for pending orders.
Pending orders type:
Direction trailing:
Important: the trading direction for pending orders does not depend on the choice of the "Positions:" (Long only or Short only).
Indent from High/Low and fractals = 5 in points.
Trailing level for Stop orders = 15 - in points, the distance of pending orders from the current price, if it becomes larger the EA pulls pending orders closer to the price.Trailing level for Limit orders = 20 - in points, the distance of pending orders from the current price, if it becomes larger the EA pulls pending orders closer to the price.
Step for trailing Limit orders = 3 in points.
Mode selection:
Timeframe for trailing stop: = «1 Hour» - choice of the timeframe by which you want to work with trailing stop (except for Points).
Trailing stop by: - selecting the type of trailing stop on the instrument:
Virtual trailing stop = false - virtual (not visible for broker) a trailing stop, for a trader in the lower right corner of the graph displays information about the position of the virtual stop loss.
Trailing stop level = 20 - trailing stop level in points.
Trailing step = 2 - step of trailing, if the profit is 30 points, trailing will move a stop-loss to 2 points.
Indent in points, except by "Points" = 1.0 - distance in points from the stop loss when selecting "High/Low", "Fractals" or "ATR".
ATR period = 14 - ATR (Average True Range) indicator period, you can adjust the trailing stop distance from the price using "Indent in points, except by Points" by increasing or decreasing its value. If Buy order, then the amount "Indent ..." + the ATR level is deducted from the Bid price. If Sell order, then the amount "Indent ..." + the ATR level is added to the Ask price.
Level of Volumes = 100 - sets the level volumes. Trailing stop is work if columns of a volume histogram are lower than a pre-set level – 100, if the columns are higher than the level, then trailing will be temporarily disabled, until the columns are lower than the pre-set level, for 5-digit brokers automatically increases to 10.
Moving Average period = 34 - period moving average.
MA shift = 0 - shift moving average.
MA method: = Exponential - the choice method of calculation of the moving average.
Applied price the MA: = Close price - choosing price to calculate the moving average.
Step Parabolic SAR = 0.02.
Maximum Parabolic SAR = 0.2.
_ _Trailing by percents:_ _
1_Reduction in the lot on: = 10 % - the choice of the first percentage for a first reduction of lot size.
1_Take Profit, points = 20 - the first Take Profit after which there will be the first partial closure of the position, reducing the volume of the lot by a fixed percentage.
1_Level breakeven, points = 5 - the first level of breakeven before the first partial closing of the position.
2_Reduction in the lot on: = 30 % - the choice of the second percentage for a second reduction of lot size.
2_Take Profit, points = 30 - the second Take Profit after which there will be a second partial closure of the position, reducing the volume of the lot by a fixed percentage.
2_Level breakeven, points = 10 - the second level of breakeven before the second partial closing of the position.
3_Reduction in the lot on: = 80 % - the choice of the third percent for a third reduction of lot size.
3_Take Profit, points = 50 - the third Take Profit after which there will be a third partial closure of the position, reducing the volume of the lot by a fixed percentage.
3_Level breakeven, points = 20 - the third level of breakeven before the third partial closing of the position.
Important: if after finishing the trailing stop by percentage, if the position is still saved and if the price continues to move in the desired direction, then the usual trailing stop will start working, here you can pre-set any initiator or select by "Points".
Alerts modified stop loss = true - stop loss modification sound signal if false, the sound is disabled.
Language: = English – switch the language on the info messages can be English or Russian.
Background: = Dark1 - selects the color background of the chart Dark1 or Dark2 and Light.
Font size in messages: = Small - you can choose the font size small, medium, big.
Show info messages = true - displays textual information about the financial status of the account and currently active commands on the chart, if false, it does not show messages.
Show hot buttons = true - yes, show, false - no, do not show, "hot buttons" in the strategy tester do not work!
Multiplier for cryptocurrency = Disabled - disabled, select and set the desired multiplier.
The multiplier for cryptocurrencies or how much you need to increase all the parameters in the EA to make it work on this instrument correctly, you can find out from the specification of the instrument.
For example: in InstaForex for an account with a 4-digit quote, the spread and stop level for #Bitcoin is 12000 points. Therefore, you need to choose the multiplier "x1000", then the stop loss of 30 points will be set at a distance of 300000 points from the price (30 x 1000). For #Ethereum spread of 200 points means you need to choose the multiplier "x100" and then stop loss will be 3000 points (30x100). For #Ripple spread 50 points - you need to select "x10" and stop loss will be 300 points (30x10).
Deleting objects from the chart = true - allow clearing the chart from unnecessary graphical objects (modifications of stop loss levels, take profit, etc.).
Delete objects, in minutes = 120 - clears the chart from unnecessary graphical objects (arrows, modified stop-loss and take-profit levels, etc.) in a certain period of time set in minutes (120) passed from the moment, when an object is created.