Buy Stop - this is a pending order to buy, which is exposed by the trader for a certain price level and automatically triggered when the price reaches.
Why do we need the pending orders? When working in the Forex market is very important in time to enter the market. A trader has two options: to open the transaction manually, visually tracking the right time, and to use pending orders. In the first case the opening of the transaction takes place at the current market price. In the second transaction is automatically opened when the price reaches a specified level.
Terminal MetaTrader4 allows you to set four types of pending orders: Buy Stop, Sell Stop, Buy Limit and Sell Limit. In this review we will look at the purpose and use of the first option - Buy Stop.
A pending order Buy Stop - the purpose and use.
The name "pending order" indicates that its execution occurs with a certain time lag - that is, at a time when the price reaches a specified level of trader.
Buy Stop order for opening of the transaction for the purchase, as evidenced by the word «Buy» in its name. An important point: when placing this order, the current value of the Ask price must be lower than what you specify in the order. The calculation is based on the fact that the price will go higher reaches placed order and activates it.
To set the Buy Stop, click the button in the terminal "New Order," appears on the form with the fields. Select "Pending Order" and in the "Type» - «Buy Stop»:
Enter the opening price, it should be higher than the current. It should also be immediately set the stop-loss level. If this is not done, the order may fire when you are not present at the terminal, the price will go against you, and you get a loss. Look at the figure below - it shows an example of using orders Buy Stop.
Price for the pair EUR / USD has gone up, formed a local maximum, then followed by a slight pullback. Exhibited pending order Buy Stop just above the previous high, based on the sample and its further price growth. Red line shows the preset level Stop Loss. White dotted line - opening level of the day (daily_open_line indicator).
The following figure shows that the price, as expected, broke through the level of the pending order to buy load. I stand feet under the local minimum, and now have to wait, that the calculations were correct and the price will continue to move upward.
As already mentioned, usually warrant Buy Stop strategies used in the breakdown. breakdown levels may be different - for example, the previous maximum or minimum. They are natural areas of the resistance, and if price breaks them, chances are that it will go further. It can also be used the level of the opening day. Take a look at the previous figure - three times the price tested it, but could not break through.
Billing orders Buy Stop using a script.
Pending orders may be exhibited both manually and with the help of advisors or scripts. The second option is the most convenient - in the script you specify in advance the stop levels and profit, and then placing the order for the script enough drag on the chart.
As an example, a script that allows you to open orders Buy Stop and Buy Limit (SetOrderBuy). If the script to pull in the area above the current price, open Buy Stop, if it is below - Buy Limit. In the second case, an order to buy works, when the price goes down and reaches a predetermined value.
The script file must be added to the appropriate folder of the terminal. I note that it is harder than it looks. Recent updates of the trading platform has led to the fact that the addition of a standard script directly into the folder does nothing Terminal Scripts. You must open the following path (you it will look a little different):
C:\Пользователи\Admin\AppData\Roaming\MetaQuotes\Terminal\C693813A99124CDE07E7C4BA9CC615A2\MQL4\Scripts.
Instead Admin folder will be the name of your profile. It will be different and the long alpha-numeric name for the folder in the Terminal folder. After adding a script in the Scripts folder, restart MetaTrader4.
It is important to know how to configure the script to not display every time the required settings in the window that appears when you open. To do this, find the script in the "Navigator" menu, select it and then click "Change". The editor opens, in it you can set your preferences - in particular, the level of the stop and profit, lot size, and other parameters in the block "External parameters of the script." For example, if you work with 5-digit quotes, the stop level can be 200 points, if the 4-digit, must be set 20. Of course, the specific amount you have to choose for yourself, based on your strategy. Then click "Compile" - the script is ready.
The text of the code of the script has all the necessary comments, which will help to understand the logic of his work. In addition to the script SetOrderBuy, you can also download the application to be a useful script that removes all pending orders and said daily_open_line indicator. Do not forget that the indicator should be placed in the folder Indicators.
In conclusion, I recommend the article to see "concepts" section in the online tutorial "Forex for Beginners", which is given an explanation of the terms necessary for the efficient development of the trader.