Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

5 EMA High Low Strategy: Use the 5-EMA (High-Low) Band to Make the Right Entry

3 min read

The 5 EMA high low strategy uses two short exponential moving averages, one of the daily highs and one of the daily lows, to form a band around price. You stay out while Nifty closes inside the band, go long only on a close above the 5 EMA of highs and go short only on a close below the 5 EMA of lows. We first posted this setup on 30 November 2009 with live Nifty levels, and this page explains the method in full.

Key takeaways

  • Upper band = 5-period EMA of the high. Lower band = 5-period EMA of the low.
  • Inside the band means no position. The market has not shown its hand.
  • Trade only on an end-of-day (EOD) close outside the band, not on an intraday spike.
  • In the November 2009 example, Nifty longs were above 5071 and confirmed shorts were below 4946.
  • It is a simple trend filter, so it gives whipsaws in sideways markets. Combine it with a stop and position sizing.

What is the 5 EMA high low band?

An exponential moving average gives more weight to recent prices than a simple average. TradingView gives the formula as EMA = closing price x multiplier + previous EMA x (1 – multiplier), with a smoothing factor that most traders set at 2 (TradingView). With that smoothing, the multiplier for a 5-period EMA is 2 / (5 + 1), or about 0.33, so the latest bar carries a third of the weight.

The band applies this to the highs and the lows instead of the close:

Build desktop apps with Claude Code
LIVE COURSE · DEC 2026

Build desktop apps with Claude Code

Plan, build, package and distribute desktop apps for Windows, macOS and Linux, with Claude Code as your development partner.

  • 5 live sessions, 10 hours, starts 7 December 2026
  • CRM, algo trading and NSE Bhavcopy projects
  • Installers for Windows, macOS and Linux
Join the course →by Marketcalls
  • 5 EMA (High): tracks the recent highs and acts as the upper boundary.
  • 5 EMA (Low): tracks the recent lows and acts as the lower boundary.
  • 5 EMA (Close): optional middle line, which we used in 2009 as an early warning level.

Because only five bars are used, the band hugs price closely. A daily close outside it is a sign that buyers or sellers have taken control for now.

5 EMA high low strategy rules

Ideal stance: no position inside the band

Our original rule was “No positions until Nifty either breaks and closes above or below either of the 5 EMA (High-Low) band.” Inside the band, price is undecided, and most false moves happen there.

Entry and exit rules

  • Long entry: Nifty closes above the 5 EMA (High) on EOD basis.
  • Early short warning: Nifty closes below the 5 EMA (Close).
  • Confirmed short: Nifty closes below the 5 EMA (Low) on EOD basis.
  • Exit long: close back below the 5 EMA (Low). Exit short: close back above the 5 EMA (High).

Using the opposite band as the exit keeps you in a trend while it lasts. A tighter trader can exit on a close back inside the band instead. We added more rules in some rules to trade using the 5 EMA low and high.

Worked example: Nifty levels from November 2009

These were the levels on the date of the original post, when Nifty was trading close to 5,000. They are history, not current levels.

LineNifty level (30 Nov 2009)Action on EOD close
5 EMA (High)5071Enter longs above
5 EMA (Close)5022Shorts possible below
5 EMA (Low)4946Confirmed shorts below

With Nifty between 4946 and 5071, the strategy said stay flat. Only a close outside that 125-point band would trigger a trade.

5 EMA high low strategy in AmiBroker

Here is a minimal AFL to plot the band and mark entries. EMA(), Cross() and PlotShapes() are standard AmiBroker functions.

// 5 EMA High-Low band
emaH = EMA( H, 5 );   // 5 EMA of highs (upper band)
emaL = EMA( L, 5 );   // 5 EMA of lows (lower band)

Plot( C, "Price", colorDefault, styleCandle );
Plot( emaH, "5 EMA High", colorGreen, styleLine );
Plot( emaL, "5 EMA Low", colorRed, styleLine );

Buy   = Cross( C, emaH );   // close moves above the upper band
Sell  = Cross( emaL, C );   // close moves below the lower band
Short = Sell;
Cover = Buy;

PlotShapes( Buy * shapeUpArrow, colorGreen, 0, L, -12 );
PlotShapes( Short * shapeDownArrow, colorRed, 0, H, -12 );
  • emaH and emaL calculate the upper and lower band.
  • The three Plot() lines draw candles and both bands.
  • Buy fires when the close crosses above the upper band, Sell when it crosses below the lower band.
  • Short and Cover mirror them, so the system is always in or reversing.
  • PlotShapes() marks the signals with arrows below or above the bars.

Paste it into a new formula in AmiBroker, apply it to a daily Nifty chart, and run a backtest from the Analysis window. For our earlier versions, see the simple AFL code for the 5 EMA (High-Low) band.

For traders: making the band work

  • Use it on daily or weekly charts. On 1-minute charts the band is too tight and noise dominates.
  • Add a trend filter, such as trading longs only above a 13 EMA. We combined the two in the Nifty 5 EMA (High-Low) and 13 EMA strategy.
  • Place a stop beyond the opposite band and size positions so one loss is a small part of capital.
  • Expect a series of small losses in range-bound markets. The edge comes from the few strong trends.

Frequently Asked Questions

What is the 5 EMA high low strategy?

It is a band strategy where the 5-period EMA of highs and the 5-period EMA of lows form a channel. You go long on a close above the upper band, short on a close below the lower band, and stay flat inside.

Which timeframe suits the 5 EMA band?

Daily and weekly charts. The original Nifty rules were all on an end-of-day basis.

Can I use the 5 EMA band for Bank Nifty or stocks?

Yes, the rules work on any liquid chart. Backtest each instrument, because volatility and whipsaw frequency differ.

Why use EMA and not SMA for the band?

An EMA reacts faster to the latest bars, so the band follows price more closely and signals come earlier.

Marketcalls Elite Traders Club

MEMBERSHIP

Marketcalls Elite Traders Club

Every Marketcalls course and live mentorship in one membership: 127 courses and 2,500+ hours of learning.

  • Market Profile, Orderflow, AFL, Pine Script and Python
  • Live mentorship and TradEdge trading room
  • Premium tools and the Elite Slack community

Learn by watching: free videos every week

Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.

Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

One Reply to “5 EMA High Low Strategy: Use the 5-EMA (High-Low)…”

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More