Script for moving stop loss on Forex
One of the biggest problems faced by both beginners and more experienced traders is closing a position prematurely.
Such an approach to the market, in which the trader closes a profitable position at the slightest opportunity, leads to the fact that the ratio of risk to potential profit changes far from the trader’s favor.
The real way to deal with this situation is to use a trailing stop.
However, trailing, which is present in its classic form in the MT4 trading platform, is far from ideal, since at the moment when the price begins to adjust, the position is closed early and profits are not received.
This is why many traders use two-way trailing, the essence of which is to move a stop order following the price at a certain distance from it. If desired, you can automate the process if you use Forex scripts.
For example, one of these tools is the stop loss StopLossMove.
A notable feature of the script is the ability to select the mode of dragging a stop order. The program can work on a principle similar to a standard trailing stop, and can also move the stop order at a certain distance from the price, regardless of which direction it will move.
The StopLossMove script is a universal addition to your trading platform, and it can work on all assets present in your terminal.
Installing the StopLossMove script
The stop loss movement script is a custom development that has been actively used by traders since 2006.
Since the script is not included in the trading platform by default, in order to use it you will need to download the StopLossMove file at the end of the article, and then install it in your MetaTrader 4 trading terminal.
The procedure for installing the StopLossMove script is no different from installing any other custom technical analysis tool, namely, you will need to drop the downloaded script file into the appropriate folder in the terminal data directory.
You can find more detailed instructions for installing custom tools, including scripts, by following the link http://time-forex.com/praktika/ustanovka-indikatora-ili-sovetnika.
After updating the trading terminal in the navigator panel or after a complete restart of the platform, StopLossMove will appear in the list of scripts, and in order to use it, drag the name of the instrument onto the chart.
How the script works.
Settings The StopLossMove script can work in two modes, namely as a standard trailing stop, pulling the price by a given number of points towards profit.
Or in the mode of automatically moving a stop order following the price at a certain distance, regardless of where the price moves. It is worth noting that when applying a script to a chart, you will not see the settings, as happens when applying advisors and other technical analysis tools .
In order to enter your parameters, you need to edit the script code.
To do this, launch Meta Editor in the top line of tools, then open the script in the editor.
So in the Distance line you can specify at what distance from the current price the stop order should move.
The UpDoun variable allows you to select the mode of operation of the script, namely, if you specify True, the script will drag the stop order, both during growth and during a rebound, and if you specify False, the script will work according to the principle of a classic trailing stop .
In conclusion, it is worth noting that the stop loss moving script is an auxiliary program that primarily allows you to save time when working with open orders.
One of the shortcomings of the script is the impossibility of making settings without basic code editing.
Download the script for moving the stop loss .