The Elder Ray Indicator (Amibroker And Tradestation Code)

The strategy in plain English:

The Elder Ray indicator was developed by Alexander Elder and published in his book Trading For A Living.

Unfortunately, we have not found this indicator to be very useful.

  1. The Elder Ray EMA must be higher than yesterday’s reading.
  2. BearPower must be below 0.
  3. BearPower must be bigger than yesterday’s reading.
  4. If 1-3 are true, go long at the close.
  5. Sell at the close when the buying rules are inversed.

Click here to see the original article.

Amibroker code:

ElderEMA= EMA(C,13);
BullPower= H-ElderEMA;
BearPower= L-ElderEMA;

Buy= ElderEMA>Ref(ElderEMA,-1) AND BearPower<0 AND BearPower>Ref(BearPower,-1) ;
buyPrice=Close;
Sell= ElderEMA<Ref(ElderEMA,-1) AND BullPower>0 AND BullPower<Ref(BullPower,-1);
sellPrice=Close ;

Tradestation code:

{
The Elder Ray Indicator (Strategy 70)
The Elder Ray EMA must be higher than yesterday's reading.
BearPower must be below 0.
BearPower must be bigger than yesterday's reading.
If 1-3 are true, go long at the close.
Sell at the close when the buying rules are inversed.
}

Inputs:
	Lookback(13);

Vars:
	ElderEma(0),
	BullPower(0),
	BearPower(0);
	
ElderEma = XAverage(Close, Lookback);
BullPower = High - ElderEma;
BearPower = Low - ElderEma;

if ElderEma > ElderEma[1] and BearPower < 0 and BearPower > BearPower[1] Then
	Buy this bar on close;
	
if ElderEma < ElderEma[1] and BullPower > 0 and BullPower < BullPower[1] Then
	Sell this bar on close;

Disclosure: We are not financial advisors. Please do your own due diligence and investment research or consult a financial professional. All articles are our opinions – they are not suggestions to buy or sell any securities.