Coding up a new EA based on Keltner channel breakouts

 

Hi All

I am pretty new to the world of trading with robots, but have been around for a few years now trading manually. I have a simple strategy which I have been manually testing, and it is working well. It is based on 2 indicators...a keltner channel, and a 360 simple moving average. It is a combination scalp/swing system, and the system rules are as follows -

Buy entry rules

Enter long with 2 trades when the price breaks above the high band of the Keltner channel. The centreline of the Keltner channel must be on or above the 360 simple moving average for an entry. The initial stoploss for both positions is at the value of the centreline of the Keltner channel.

As the trade progresses, run both stoplosses along the Keltner channel centreline to breakeven. For the scalp trade, continue to run the stoploss along the Keltner channel centreline, until the trade closes out. For the swing trade, run the stoploss along the 360 sma until the trade closes out.

Sell entry rules

Enter short with 2 trades when the price breaks below the low band of the Keltner channel. The centreline of the Keltner channel must be on or below the 360 simple moving average for an entry. The initial stoploss is for both positions is at the value of the centreline of the Keltner channel.

As the trade progresses, run both stoplosses along the Keltner channel centreline to breakeven. For the scalp trade, continue to run the stoploss along the Keltner channel centreline, until the trade closes out. For the swing trade, run the stoploss along the 360 sma until the trade closes out.

Rules for re-entry

A trade can be re-entered when the next entry signal is generated, providing the previous scalp and swing trades are at break even.

The first week I tested this system, it made well over 500 pips forthe week, and only generated 12 trades. Position size = 5% of capital per entry.

I am interested in getting this coded so we can develop an EA for the strategy. It is a trend following strategy, so will make best gains when the market is moving in one direction, but shouldn't lose very mch when the market is sideways.

Anyone who can help me with coding, please contact me either on the forum or by pm to my email address.

Cheers

Designmax

 

Hi Designmax,

Could you please provide more info about your system.

What timeframe do you use?

What parameters for keltner channel? I got two different descriptions for that indicator:

https://en.wikipedia.org/wiki/Keltner_channel

http://www.chartfilter.com/reports/c19.htm

It looks exactly as indicator Envelopes from MetaTrader. Could you try it and check if your system works the same way with it too? It can be very simple expert with three standard MT indicators: SMA 360, SMA(or EMA?) and Envelopes with period of your Keltner channel.

Regards,

Tim

 

Coding up an EA based on a Keltner Channel breakout

Hello Timbobo,

The setup for the system is:-

Timeframe = 3 minutes

Keltner channel settings - length = 100, width = 300%

Direction indicator = 360 simple moving average

That's it so far.

Cheers

Designmax

 

Well, here it is my version of that strategy.

1. Metatrader does not have 3 min timeframe, so I used 5 min. Periods for channel and big ma converted to get the same results on bigger timeframe: 100 on 3 min = 60 on 5 min and 360 on 3 min = 216 on 5 min. You can change/optimise them.

2. Metatrader does not have Keltner channel indicator but Envelopes looks very similar to description for Keltner channel I could find. So I did not know what width = 300% means. Env_deviation should be similar parameter to change width of channel. You can change/optimise it too.

3. TradeType - 1 is scalping, 2 - swing trade. Expert works with single order only.

4. Move_SL_to_breakeven - move (1) or not (0) stoploss to breakeven as it was recommended or just use the general trailing stop rule.

Look the code and you can find some stuff you can adjust: Mode for Moving Averages (deafaul is simple MA), applied price (default is typical price)

Finally, I could not make this strategy profitable on long history. But the similar one with trading inside the channel looks promising.

 

sorry, lost the expert...

Files:
 

hi

designmax:
Hi All

I am pretty new to the world of trading with robots, but have been around for a few years now trading manually. I have a simple strategy which I have been manually testing, and it is working well. It is based on 2 indicators...a keltner channel, and a 360 simple moving average. It is a combination scalp/swing system, and the system rules are as follows -

Buy entry rules

Enter long with 2 trades when the price breaks above the high band of the Keltner channel. The centreline of the Keltner channel must be on or above the 360 simple moving average for an entry. The initial stoploss for both positions is at the value of the centreline of the Keltner channel.

As the trade progresses, run both stoplosses along the Keltner channel centreline to breakeven. For the scalp trade, continue to run the stoploss along the Keltner channel centreline, until the trade closes out. For the swing trade, run the stoploss along the 360 sma until the trade closes out.

Sell entry rules

Enter short with 2 trades when the price breaks below the low band of the Keltner channel. The centreline of the Keltner channel must be on or below the 360 simple moving average for an entry. The initial stoploss is for both positions is at the value of the centreline of the Keltner channel.

As the trade progresses, run both stoplosses along the Keltner channel centreline to breakeven. For the scalp trade, continue to run the stoploss along the Keltner channel centreline, until the trade closes out. For the swing trade, run the stoploss along the 360 sma until the trade closes out.

Rules for re-entry

A trade can be re-entered when the next entry signal is generated, providing the previous scalp and swing trades are at break even.

The first week I tested this system, it made well over 500 pips forthe week, and only generated 12 trades. Position size = 5% of capital per entry.

I am interested in getting this coded so we can develop an EA for the strategy. It is a trend following strategy, so will make best gains when the market is moving in one direction, but shouldn't lose very mch when the market is sideways.

Anyone who can help me with coding, please contact me either on the forum or by pm to my email address.

Cheers

Designmax

Interesting system...but it's better for u to test it min a month to make sure there's no big drawdown ...how much initial equity did u use ?

=================

Forex Indicators Collection

 

Keltner channel breakout EA

prasxz:
Interesting system...but it's better for u to test it min a month to make sure there's no big drawdown ...how much initial equity did u use ?

=================

Forex Indicators Collection

Hi Prasxz

Initial equity = 100k.

Problem is I have run manual tests on a 3 min chart using Xtick charts. With Metatrader, there is no 3 min chart, so we have to run it on a 5 min one instead.

Cheers

Designmax

 

MT4 do have Keltner Channel indicator

MT4 do have Keltner Channel indicator, just do a search in Codebase.mql4.com and you can get it.

And the EA has been done in tradingsystemforex.com but it cannot be downloaded, have to pay for it.

Can you code it here for us to share?

 

Can someone make me a Keltner Channel breakout EA for MT4?

Can someone make me a Keltner channel breakout EA? I would make it if I knew how, it would be greatly appreciated. Basically I want it to place a trade with a specified lot size as soon as it breaks through the period 10 keltner channel, going the direction of the break (as soon as it breaks as in like a 5th decimal point off), and thats it, i would deal with the TP and SL myself. Oh and it would have to work on M15. What I want to test out is every time it does break have a TP of 2 pips and a SL of 3 or so with a 1.00 lot, I noticed prices break the channels multiple times a day and almost always hit 2 pips on the M15 chart, so accross a few different currency pairs with low spreads it could be some decent profits.

keltner_channels.mq4

Files:
 
have anyone made the EA with Keltner Channel strategy which is very effective when doing manually
 

Exp_XMA_Range_Bands - expert for MetaTrader 5

Trading system using the XMA_Range_Bands indicator of the universal Keltner channel. A signal to perform a deal is formed at bar closing, when the price is inside of the channel boundary.

----------------

xLiquidex_V2_Mod1 - expert for MetaTrader 4 

X-liquidex is an Impulsive/Volatility/Breakout Expert Advisor. It uses Range, Moving Averages and Keltner channel.

----------------

Volatility Trader and Breakout EA (X-liquidex) - expert for MetaTrader 4 

----------------

Keltner Channel main thread

Exp_XMA_Range_Bands
Exp_XMA_Range_Bands
  • www.mql5.com
Trading system using the XMA_Range_Bands indicator of the universal Keltner channel. A signal to perform a deal is formed at bar closing, when the price is inside of the channel boundary. Place XMA_Range_Bands...
Reason: