tfmt4.com

Donchian Filter Expert Advisor .mq4 file for $199

Final sale of $50 for all tfmt4 Expert Advisor and Indicator .mq4 files

This Expert Advisor in .mq4 format has fully commented code to let you test, customize, and automate price channel trading in MetaTrader 4. This system is the Price Channel breakout with additional Moving Average filtering. This adds a slow and a fast moving average to the inputs as compared to the Turtle system alone. Long positions are only taken when the faster (less bars) moving average is above the slower (more bars) moving average. Short positions are only taken when the faster (less bars) moving average is below the slower (more bars) moving average. A key benefit of this system is that the price channels will catch all good trends since they will have to make a new high or low. The moving average filters attempt to reduce the number of whipsaws as they are used to confirm the trend. Exits are through a trailing price channel that is less periods than the entry so the system is not in the market all the time. As the price moves in favor of your position, you can add additional positions through pyramiding and the stop will move to be in line with the latest entry price.

A quick visual example to show approximate entry and exit areas (arrows manually added):
Donchian Filter EA Example
Note: The default input values are not optimized. Adjust the inputs to find the optimized combination for your risk tolerance and to maximize profitability. Trend Following systems are designed around long term probabilities. Although Trend Following systems have lower win rates, profitability comes from large trends as Trend Following cuts losses short and lets winners run. Test on a portfolio of symbols as profits from trending symbols will offset the small losses and provide profits when other symbols are not trending.

Customizable Variables

Markets

Trade on any pair and any timeframe. Place the expert advisor on a chart and it will use the currency pair and timeframe of the chart. Choppy and sideways markets well will cause more whipsaws while markets that trend will produce more profitable trades.

Entry

Using price channels and two moving average lines, entry occurs when the price breaks the price channel and the moving average lines confirm the trend. The position is added as soon as the price makes a new high with confirming moving averages and does not wait until the following bar. Long positions are entered when the price goes above the high price channel and the short/fast moving average is above the long/slow moving average. Short positions are entered when the price goes below the low price channel and the short/fast moving average is below the long/slow moving average. One example from Curtis Faith's Way of the Turtle, is to use 20 day entry price channels with a 25 day short/fast moving average and a 350 day long/slow moving average. The other example he mentions is using a 50 day MA and 300 day MA. If you set the Max Unit variable above 1, additional entries will occur and pyramid in ATR increments specified by the ATR between Pyramids variable.

Position Sizing

This expert advisor uses Percent Volatility position sizing. Verify the tick value, minimum and maximum lot sizes, size of lot increments, etc to confirm each position will not exceed your set risk percentage. Using the stop level, if the position is stopped out, the position size is calculated to only lose the amount risked through the Risk Percent variable. The calculation looks at how many dollars are at risk, how many pips are in the distance from the entry to the stop and the value of that distance.

Stop

The stop is set using multiples of the ATR. Basing the stop on the ATR allows the stop to be placed out of the normal price range and account for volatility. If you choose 2 times the 14 day ATR, the stop on long positions would happen if the price touches or goes below the entry price minus ( 2 * ATR ). The stop on short positions would occur if the price touches or goes above the entry price plus ( 2 * ATR ). The stop is set when the position is entered. The stop accounts for gaps in price and is not set as a pending order. A position is only stopped out if the price reaches or exceeds the stop level. If you use the pyramiding option, the stop will change to be in line with the latest entry price when a new position is added.

Exit

Positions are exited when the price breaks an opposite price channel from the entry. Long positions are exited when the price touches or goes below the secondary low price channel. Short positions are exited when the price touches or goes above the secondary high price channel. Using the example of the turtles, their system 1 exited long positions when the price touched or broke the 10 day price channel or in other words, the price touched or went below the lowest low of the last 10 days. System 2 exited long positions when the price touched or went below the 20 day price channel. System 1 exited short positions when the price touched or went above the 10 day price channel. System 2 exited short positions when the price touched or went above the 20 day price channel.

Delivery

Once you complete checkout through Paypal, you will receive an automated email with the download link. The email will go to the email address that is on file with Paypal - make sure Paypal has your current and correct email address. The download link will be active for 24 hours so please download as soon as you get the link. The expert advisor comes as the MQL4 code so you will have to save it in the correct folder, read through the notes in the code, and compile it. After compiling it, start testing and finding your profitable variables. Use the installation tips page to get the file saved and compiled so you can start testing today.