The Elder Impulse System Amibroker

I’m often asked how to program a certain trading strategy or indicator that one my readers has seen on another site or read about in a book/journal.

So for this new series of articles I will be selecting some of the strategies and indicators which have been highlighted by readers and then I will be showing you how to program them using Amibroker.

Elder Impulse System

Perhaps one of the most popular questions that I receive is related to the Elder Impulse System which was first presented by Dr Alexander Elder in his best-selling book “Come Into My Trading Room“.

So for this article I will be explaining how to create the Elder impulse system charts using Amibroker.

Elder Impulse System Charts

The Elder impulse system uses 2 indicators:

  1. A 13 period Exponential Moving Average (to measure market inertia).
  2. A MACD histogram (to measure market momentum).

An entry signal occurs when both indicators point in the same direction and an exit signal occurs when both indicators are not pointing in the same direction.

To identify the signals quickly, we will first create our Elder Impulse charts.

Note in the following example that when both indicators are pointing up, the candles are green. When both indicators are pointing down, the candles are red. And when both indicators are pointing in the opposite direction, the candles are blue:

Llewelyn James Trader Course MACD

 

Further to the above rules, Elder suggests that entries made from the daily charts are only permitted if the weekly charts confirm the direction of the market.

To gauge the weekly direction of the market, Elder suggests using a 26 weekly period EMA, a weekly MACD histogram, or both.

For this article, we’ll use both indicators and simply recreate the impulse system from above but using the weekly time-frame.

Note in the following example that you are viewing a daily impulse system chart but I’ve also included a ribbon beneath the price series.

When the ribbon is green, the weekly impulse system is bullish,  when it’s red the weekly impulse system is bearish, and when it’s blue the weekly impulse is neutral.

llewelyn-james-blog-prop-trader-tsla

As per the rules suggested in Elder’s book, you are only permitted to go long/short from the daily charts if the weekly impulse ribbon confirms the direction of the daily impulse.

For example, in Jan 2016 you would not have been permitted to go long TSLA because the weekly impulse was bearish.

Creating the Elder Impulse Charts with Amibroker

To create the Elder Impulse charts with Amibroker, please copy and paste the following formula to your formula editor and click apply:

////////////////////////////////////////////////////////////////////////////////////

ML = MACD(12, 26);
SL = Signal(12,26,9);
MACDH = ML – SL;

Bullish = EMA(C,13) > Ref(EMA(C,13),-1) AND MACDH > Ref(MACDH,-1);
Bearish = EMA(C,13) < Ref(EMA(C,13),-1) AND MACDH < Ref(MACDH,-1);

 

SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat(“{{NAME}} – {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}”, O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, “Close”, IIf(bullish,colorGreen,IIf(bearish,colorRed,colorBlue)), styleNoTitle | ParamStyle(“Style”) | GetPriceStyle() );

///////////////////////////////////////////////////////////////////////////////

To create the weekly ribbon indicator please copy and paste this formula to your formula editor and click apply:

/////////////////////////////////////////////////////////////////

TimeFrameSet( inWeekly );
WMACDH = MACD( 12, 26 ) – Signal( 12, 26, 9 );
WEMA = EMA(C,26);
WBullish = WEMA > Ref(WEMA,-1) AND WMACDH > Ref(WMACDH,-1);
WBearish = WEMA < Ref(WEMA,-1) AND WMACDH < Ref(WMACDH,-1);
TimeFrameRestore();

WBullish = TimeFrameExpand(Wbullish,inWeekly,expandlast);
WBearish = TimeFrameExpand(Wbearish,inWeekly,expandlast);

ribboncolor = IIf(WBullish,colorGreen,IIf(Wbearish,colorRed,colorBlue));
Plot(100,””,ribboncolor,styleArea|styleOwnScale,0,100);

//////////////////////////////////////////////////////////////////

Using the Elder Impulse Charts For Analysis

If we run the Elder Impulse Pull-Back System Amibroker explorer today we find just one stock on the S&P500 which meets the criteria for a long position ($PXD).

Note too that we can program our explorer to produce approximate values for the buy-stop order, stop-loss and initial profit target, as well as an approximate risk/reward ratio for the trade.

llewelyn-james-trader-pxd-trade-analysis

In the following video I explain how you can further analyse the signals found by the explorer and then structure a trade. (Please select HD for best viewing quality)

 

Leave A Response

* Denotes Required Field