Bull power's latest peak is higher than it was previously.
Bear power is moving higher from a bullish divergence.
Sell: The corresponding sell signal is realized when prices hit a new high but bull power reaches a lower peak than that of its previous rally.
The trend is down as indicated by 14 EMA.
Bull power is positive but falling.
Bear power's latest bottom is deeper than any previous bottom.
Bull power is declining from a bearish divergence. As in the case of buying.
Cover short positions: A new low in price with a new low in bear power points to a continued downtrend; however, with bear power tracing a shallower bottom than prices, a bullish divergence is realized: cover your shorts and prepare for the ensuing uptrend.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//**********NEOTRADE ANALYTICS PVT LTD **************************//
//**********www.neotradeanalytics.com ********************************//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
_SECTION_BEGIN("ERAY_BULL_BEAR");
period= Param("period", 14, 1, 240, 1);
//Calculate EMA for the defined period
EMA_prd = EMA(Close, period);
//Calculate ERay Bull and ERAY Bear
ERayBull= High - EMA(Close,period);
ERayBear= Low - EMA(Close, period);
//Calculate the HH and LL values for ERAY-Bull and ERAY-Bear
Eray_bear_llv = LLV(ERayBear,period);
Eray_bull_hhv = HHV(ERayBull,period);
//Buy is when
// A. when Close > Ema of Period defined
// B. when ERAY Bear Current LL value > ERAY Bear previous LL value
// C. when ERAY Bull Current HH Value > ERay Bull Previous HH value
Buy = (Close > EMA_prd) AND (Ref(Eray_bear_llv,-1) > Ref(Eray_bear_llv,-2)) AND (Ref(Eray_bull_hhv,-1) > Ref(Eray_bull_hhv,-2));
//Sell is when
// A. when Close < Ema of Period defined
// B. when ERAY Bear Current LL value < ERAY Bear previous LL value
// C. when ERAY Bull Current HH Value < ERay Bull Previous HH value
Sell = (Close < EMA_prd) AND (Ref(Eray_bear_llv,-1) < Ref(Eray_bear_llv,-2)) AND (Ref(Eray_bull_hhv,-1) < Ref(Eray_bull_hhv,-2));
//Filter excess buy or sell signals
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
plotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,H);
Plot(Close,"Close",colorGreen,styleCandle);
_SECTION_END();
Regards
Vivith
www.neotradeanalytics.com
(Authorized vendor of NSE supporting realtime data feeds for Amibroker, Metastock and Ninjatrader)