Basic ATR based take and stop Expert Advisor For MT4
WE IMPROVED THIS EXPERT ADVISOR FOR YOU!!!
PLEASE NOTE: This expert advisor was publicly available for free usage on other websites and is not programmed by us. We explain the functionality and possible improvements of the EA. Furthermore, we are convinced that fully automatic Expert Advisors will fail in the long run. On the other hand, our semi-automatic approach with detecting the best setups and then activating our Expert Advisors (e.g. V-Power EA, EdgeZone EA) produced many successful traders and some of them even got prop traders at prop trading firms. Therefore, we added a similar semi-automatic trading feature (to allow only buy or only sell trades) to the free Expert Advisors. You can download the modified version here and enjoy!
Table Of Contents:
- Basic ATR based take and stop Expert Advisor For MT4
- The Basic ATR based take and stop Expert Advisor For MT4 – Entry Criteria
- The Basic ATR based take and stop Expert Advisor For MT4 – Exit Criteria
- The Basic ATR based take and stop Expert Advisor For MT4 – Room for Improvement
The Basic ATR based take and stop Expert Advisor For MT4 is as simple a trading system as its name sounds. It is developed for use in MT4 platform and can be applied in trading accounts with exchange rates given in five digits and three digits for dollar and yen pairs, respectively, and with price quotes expressed in four digits and two digits for dollar and yen pairs, respectively.
As the name suggests, this robot uses the average true range (ATR) indicator in its trading algorithm. As a versatile tool, the ATR can do a lot of things for traders. It can be used both for trade entry and trade exit despite the fact that it cannot tell the trend direction. Its primary use is to provide information about market volatility that can help the trader time the trade entry, define the risk on every trade and exit the market as the need arises. In this trading system, the ATR is being used to determine the stop loss and take profit of a trade.
Any user interested to implement this expert advisor in trading is advised to use it first in a demo account. Preferably, the user must consider running the robot in the strategy tester for some amount of time. This is to get an idea if the robot works as designed and to find the settings that work. This is a must as a short test run done did not turn out well. Further testing is necessary to identify the effectiveness of this trading system.
The Basic ATR based take and stop Expert Advisor For MT4 – Entry Criteria
The Basic ATR based take and stop Expert Advisor for MT4 does not perform initial checks prior to looking for trade entry, and it does not make lengthy calculations to obtain data and display objects on the chart to guide traders in their decision making or be used later in trade generation. When it is dropped on the chart, the expert advisor immediately loops through the orders in the trade pool to find open trades in the current symbol. If there is none, it will refer to the technical indicator for trade entry.
How ATR is used in this trading system and its settings are outlined below:
- Average true range (period 14) – This is the standard ATR indicator that comes with MT4 platform. It is applied to the current timeframe and current candle. Once the ATR value is obtained, it is multiplied by 1.5 to get the stop loss distance and by 2.0 to get the take profit distance. Due to the nature of the ATR indicator, the stop loss and take profit distances vary per trade. The distances go up and down as market volatility increases and decreases. This behavior of the ATR ensures that price has enough room to run in both directions before the market decides which direction to take.
In this expert advisor, the ATR is not used to determine the trend direction. It is only used for stop loss and take profit specification. Before a trade is taken, the robot checks first if there is enough free margin to handle new trades. If that is the case, a trade is immediately executed with a lot size of 0.01 (default value). The trade type is set by the user in Inputs, and the robot will take one trade at a time. If buy is selected, only buy trades are taken until the user decides to shift to the sell side. If sell is chosen, the robot will take only sell trades.
Upon trade execution, the robot does not immediately set the stop loss and take profit stop orders. Once a trade request is successful, the robot will use the ticket to adjust the stop loss and take profit. For a buy trade, the stop loss is placed below the current ask price at a distance of 1.5 times the ATR value, and the take profit is put above the current ask price at a distance of two times the ATR. This relative distance of the stop loss and take profit is generally acceptable and tips the scale a little in favor of reward on every trade.
The Basic ATR based take and stop Expert Advisor For MT4 – Exit Criteria
The Basic ATR based take and stop Expert Advisor for MT4 does not actively manage market orders. It relies on price to determine the outcome of a trade win or loss. A trade wins if price hits the take profit target, and a trade loses if price touches the stop loss price. Depending on market volatility, the risk and reward on every trade vary. If the market is volatile, the stop loss is placed quite far from the entry price and the take profit follows suit. Meanwhile, the risk and reward are reduced when market is calm.
The Basic ATR based take and stop Expert Advisor For MT4 – Room for Improvement
The Basic ATR based take and stop Expert Advisor for MT4 is not yet suitable to be used in live trading. The performance of the robot in the strategy tester cannot be determined yet. While sometimes it shows a positive result, this happens when the tester forcibly closes an order at the end of testing. By default, the buy parameter for entering trades is enabled. During testing, a buy trade run indefinitely due to program error and ended in positive territory as market price happened to be above the open price when testing culminated.
This means that any result that could be obtained when running the trading system in back tester is unreliable. The program code must be reviewed to correct an issue. A more robust programming solution should be implemented to ensure the robot functions as intended despite setbacks. Since the robot does not perform much functions, the robot can be programmed to check once in a while if an open trade has the correct stop loss and take profit values.
This expert advisor is too simple in its design, and it can be a bad thing in this instance. For example, the trader can choose only one direction to trade at a time. If a certain direction is chosen but the market is moving in the opposite direction, the robot is not primed for success at the outset. Nevertheless, the trader can adjust the trade direction at any time. In this case, the trading system becomes partially automated.
In addition, using ATR alone in trading is not a good idea as the indicator does not determine the trend. It only tells the recent volatility. Having a good money management strategy might not be enough to succeed trading with this expert advisor. Therefore, one or two technical tools that determine trend direction might boost the performance of this robot. An example of a technical indicator that can tell the trend direction is a moving average. One moving average is often enough to establish the trend. The important thing to achieve is that the robot does not take trades randomly so that traders can have more confidence if the trading system displays some positive results.
Everything mentioned so far means that the trading system needs to be improved programmatically. Only after this should testing, preferably with optimization, be considered. When the robot starts to show profitable passes in the testing results, these settings can be used to run testing again this time without optimization. This is to check if the optimization result is indeed correct. Forward testing can be done afterwards.