ZigZag Indicator for Indian Markets: Settings, Swings, and Worked Examples
How the ZigZag indicator works on Nifty and Bank Nifty, with a real dated swing sequence, deviation settings, worked F and O and equity tax examples.
Key Takeaways
- 1.The ZigZag indicator is a charting filter, not a buy or sell signal generator. It draws straight lines between confirmed swing highs and swing lows once price moves more than a set percentage, so it cleans up the chart and makes the real structure of a trend visible.
- 2.It is a repainting tool. The last leg keeps redrawing until the next reversal is confirmed, which means the most recent swing point you see on a live Nifty or Bank Nifty chart can still shift. Never enter a trade on the freshest, unconfirmed ZigZag leg.
- 3.On Indian indices a 3 to 5 percent deviation suits Nifty swing charts, while individual high beta NSE stocks such as Adani or Zomato often need 6 to 10 percent to avoid noise. There is no single correct setting.
- 4.ZigZag is the backbone of Elliott Wave counting, Fibonacci retracement anchoring, and harmonic patterns, because all three need clean, objective swing pivots to measure from.
- 5.Profit and loss in this article are illustrative for learning only. F and O gains in India are taxed as business income at your slab, equity STCG is 20 percent and LTCG is 12.5 percent above Rs 1.25 lakh, and STT plus brokerage reduce every result. Nothing here is a guaranteed return.
What the ZigZag Indicator Actually Does
The ZigZag indicator connects significant peaks and troughs on a price chart with straight diagonal lines, ignoring everything in between. Its only job is to filter out small wiggles so the genuine swing structure of a move stands out. A trader looking at a messy five minute Bank Nifty chart sees dozens of tiny ups and downs. The same chart with a ZigZag overlay shows perhaps four or five clean legs, which is far easier to read for trend direction, swing highs, and swing lows.
The key word is significant. You define significance with a deviation setting, usually a percentage. If you set 5 percent, the indicator only acknowledges a reversal once price has retraced at least 5 percent from the last extreme. Anything smaller is treated as noise and the current leg simply extends. This is why ZigZag looks so clean. It deliberately throws away most of the data and keeps only the turning points that crossed your threshold.
Because it works backwards from confirmed extremes, ZigZag is best understood as a structure mapper rather than a momentum or trend strength tool. It tells you where the swings were, how long each leg ran, and whether each new high is higher than the last. It does not tell you anything about volume, momentum, or what happens next. Treat it as the skeleton on which you hang your other analysis.
How the ZigZag Is Calculated, Step by Step
The classic ZigZag uses a single input, the deviation, expressed either as a percentage or in absolute points. The algorithm walks through the price series and tracks the most recent extreme. When price reverses from that extreme by more than the deviation, it confirms a pivot and anchors a new line. Until that threshold is crossed, the current leg keeps stretching to each new high in an uptrend or each new low in a downtrend.
- Pick a starting pivot, usually the first significant high or low in your visible range.
- If the market is rising, keep updating the running high every time price makes a new high.
- Measure the drop from that running high. The moment the drop exceeds your deviation, for example 5 percent, lock in the high as a confirmed swing top and start a new down leg.
- Now track the running low. When price rallies more than the deviation off that low, lock in the swing bottom and start a new up leg.
- Repeat. Each confirmed pivot becomes a fixed point, and the line between the last two confirmed pivots is the finished leg.
The critical consequence of this logic is repainting. The final leg on your screen is provisional. If price is climbing and has not yet dropped by the full deviation, the ZigZag keeps redrawing that last line higher with every new high. The instant a qualifying reversal happens, the line snaps to the confirmed top. So the historical pivots never move, but the live leg is always tentative. This single fact is the reason most ZigZag mistakes happen.
A Real Nifty 50 Swing Sequence With Dates
The old version of this page used an abstract Rs 1000 high and Rs 950 low. That teaches nothing about how the tool behaves on a real Indian index. Below is an illustrative daily ZigZag walk on the Nifty 50 across late 2023 and 2024, using round, representative swing levels that match the broad path the index actually travelled. Treat the exact numbers as teaching figures, not tick precise quotes, but the sequence of swings and the dates are realistic for that window.
| Approx date | Nifty 50 level | ZigZag pivot | Leg move from prior pivot |
|---|---|---|---|
| 26 Oct 2023 | 18,840 | Swing low confirmed | Down leg ends |
| 08 Dec 2023 | 20,970 | Swing high confirmed | Up about 11.3 percent |
| 20 Dec 2023 | 20,980 | minor, ignored | Below deviation, no pivot |
| 19 Jan 2024 | 21,570 | Swing high extends | Running high updates |
| 31 Jan 2024 | 21,140 | minor pullback | Under 3 percent, ignored |
| 04 Jun 2024 | 21,280 | Swing low confirmed | Election day drop, down about 1.3 to 8 percent intraday |
| 27 Sep 2024 | 26,270 | Swing high confirmed | Up about 23.5 percent |
Read the table as a ZigZag would draw it with roughly a 3 percent deviation on the daily timeframe. The 26 October 2023 low near 18,840 is a confirmed pivot. The rally into early December crosses 3 percent many times over, so a clean up leg is drawn to the December high. The tiny 20 December tick and the late January dip are both smaller than 3 percent of the index level, so ZigZag ignores them and the up leg simply keeps extending toward the January peak around 21,570.
The sharp 4 June 2024 election result day, where Nifty swung violently intraday before closing near 21,280, is where a confirmed swing low gets anchored once the reversal off that area exceeds the deviation. From there the indicator draws one long, clean up leg all the way to the late September 2024 high near 26,270, an advance of roughly 23.5 percent. Notice how dozens of daily candles, including several scary one and two percent red days through the summer, collapse into a single ZigZag line. That is the filtering power, and also the danger: ZigZag hides the drawdowns you would actually have had to sit through.
Every pivot in the table above was only confirmed days or weeks after the actual high or low printed, once price had reversed by the full deviation. In live trading on 4 June 2024 you did not know it was the low. ZigZag labels turning points beautifully on history and lags badly in real time. Plan entries from price structure and confirmation, not from the freshest ZigZag leg.
Choosing Deviation Settings for Indian Instruments
There is no universal best setting. The right deviation depends on the instrument volatility and your timeframe. A broad index like Nifty 50 moves in a tighter percentage range than a single small cap stock, so it needs a smaller deviation to capture meaningful swings. A high beta name needs a wider deviation or the chart fills with whipsaw legs.
| Instrument | Timeframe | Suggested deviation | Why |
|---|---|---|---|
| Nifty 50 | Daily swing | 3 to 5 percent | Diversified index, lower volatility, swings of a few percent matter |
| Bank Nifty | Daily swing | 4 to 6 percent | More volatile than Nifty, larger intraday range |
| Bank Nifty | 5 to 15 min intraday | 0.4 to 0.8 percent | Captures intraday legs without locking on every candle |
| Reliance, HDFC Bank, TCS | Daily swing | 4 to 7 percent | Large cap single stocks, moderate volatility |
| High beta mid and small caps | Daily swing | 7 to 12 percent | Wide swings, needs a high threshold to filter noise |
The practical method is to start near these ranges, then adjust until the ZigZag draws the swings you would have traded by eye and ignores the ones you would not have. If the indicator marks every minor pullback, raise the deviation. If it skips reversals you consider important, lower it. Always confirm a setting across at least a year of history that includes both a trending phase and a sideways phase, because a setting tuned only to a bull run will whip you around in a range.
Worked F and O Example on Bank Nifty With Real Numbers
Here is a fully worked, illustrative options trade that uses ZigZag for structure. Suppose on an intraday 15 minute Bank Nifty chart with a 0.5 percent deviation, the ZigZag confirms a higher swing low at 48,200 after a dip, then breaks above the prior swing high at 48,600. A trader reads this as a confirmed higher low and higher high, a bullish structure, and decides to buy a slightly out of the money call. Bank Nifty lot size is 30.
- Entry: buy 1 lot of the 48,700 CE at a premium of Rs 180. Cost equals 180 multiplied by 15 equals Rs 2,700 plus charges.
- Index rallies to a new ZigZag swing high near 49,100, the call premium rises to Rs 320.
- Exit: sell the call at Rs 320. Gross gain equals 320 minus 180 equals 140 points, multiplied by 15 equals Rs 2,100.
- Stop logic: had price instead broken back below the confirmed 48,200 swing low, the bullish structure would be void and the trade cut for a loss.
Now the costs, because gross is never net. On the sell leg, STT on options is 0.1 percent of the premium value, so 0.1 percent of 320 multiplied by 15 equals roughly Rs 4.8. Brokerage at a typical Rs 20 per order flat means about Rs 40 for buy plus sell. Exchange transaction charges, GST on brokerage and STT plus SEBI and stamp fees add a few more rupees. Round all of it to roughly Rs 60 to Rs 70 of total charges. Net profit on this single lot is therefore around Rs 2,100 minus Rs 65, close to Rs 2,035 illustrative.
Profit from this Bank Nifty options trade is F and O income, which is treated as business income, not capital gains. It is added to your other income and taxed at your applicable slab rate. There is no special 20 percent or 12.5 percent rate for F and O. Keep a trade log, since F and O turnover usually requires reporting under business income and may trigger a tax audit depending on turnover and profit ratio. Always confirm with a qualified CA.
ZigZag for Equity Delivery and the Tax Difference
The same structure logic applies to cash equity, but the tax treatment is completely different from F and O. Suppose ZigZag on a daily Reliance chart confirms a swing low near Rs 2,800 and you buy 100 shares for delivery, total outlay Rs 2,80,000. Price runs to a confirmed ZigZag swing high at Rs 3,150 over two months and you sell, total Rs 3,15,000. Gross profit is Rs 35,000.
Because you held under twelve months, this is a short term capital gain, taxed at 20 percent under the rules effective from 23 July 2024. Tax on Rs 35,000 is Rs 7,000 plus applicable cess, before adjusting for any other capital losses you can set off. Delivery STT is 0.1 percent on both buy and sell, so roughly Rs 280 on the buy and Rs 315 on the sell, plus brokerage and exchange charges. If instead you had held the same position more than twelve months, it would be a long term capital gain taxed at 12.5 percent, and the first Rs 1.25 lakh of LTCG across the year is exempt.
| Scenario | Holding | Tax rate | Gross gain Rs 35,000 tax |
|---|---|---|---|
| Reliance delivery, sold in 2 months | Under 12 months | 20 percent STCG | Rs 7,000 plus cess |
| Reliance delivery, held over 1 year | Over 12 months | 12.5 percent LTCG, first Rs 1.25 lakh exempt | Often Rs 0 if total LTCG under Rs 1.25 lakh |
| Bank Nifty options intraday | F and O | Slab rate, business income | Depends on your slab |
The lesson is that the chart pattern is identical but the after tax outcome is not. A swing trader using ZigZag on cash equity should always think about the holding period and how STCG at 20 percent eats into short term moves, while an F and O trader using the same ZigZag pivots is taxed entirely differently. Structure tells you where to act, tax tells you what you keep.
Using ZigZag With Fibonacci and Elliott Wave
ZigZag earns its keep as an anchoring tool. Fibonacci retracements need two clean points, a swing high and a swing low, to measure from. ZigZag gives you exactly those, objectively. On the illustrative Nifty example, a Fibonacci retracement drawn from the 4 June 2024 swing low near 21,280 up to the 27 September swing high near 26,270 would project the 38.2 percent, 50 percent, and 61.8 percent pullback zones that swing traders watch for re entry. ZigZag removes the guesswork about which high and low to anchor to.
The same applies to Elliott Wave counting and harmonic patterns such as Gartley and Bat. All of these methods are built on labelled swing pivots. Without an objective way to mark those pivots, two analysts will count waves differently. ZigZag forces a consistent rule, which is its real value here. Many traders run ZigZag purely as a pivot finder, then hide the line and do their actual analysis on the marked points.
- Anchor Fibonacci retracements and extensions to confirmed ZigZag pivots for objectivity.
- Use ZigZag legs as candidate Elliott waves, then validate with the wave rules.
- Feed ZigZag pivots into harmonic pattern detection for cleaner X, A, B, C, D points.
- Compare ZigZag swing lengths to spot when an impulse leg is unusually short or extended.
Combining ZigZag With Confirming Indicators
Because ZigZag is silent about momentum, it pairs naturally with indicators that measure it. A common workflow is to use ZigZag to define the swing, then check the Relative Strength Index for divergence at the pivot. If Nifty prints a higher ZigZag high but RSI prints a lower high, that bearish divergence warns the trend may be tiring. The pivot gives you the exact candle to compare RSI against, which removes eyeballing.
Moving averages add trend context. If price and the ZigZag are making higher highs and higher lows while sitting above a rising 50 day average, the bullish structure has confirmation. The Average True Range helps set the deviation dynamically and size stops, since a wider ATR means you should expect deeper swings and may want a wider ZigZag threshold. None of these replace ZigZag, they answer the questions ZigZag cannot, namely momentum, trend, and volatility.
Run ZigZag on the higher timeframe to define the swing structure, then drop to a lower timeframe to time your entry. For example, mark the swing on the Nifty daily chart, then enter on the 15 minute chart when price confirms in the direction of the daily ZigZag leg. This keeps you trading with the larger structure instead of chasing the repainting lower timeframe leg.
Limitations, Repainting, and False Signals
The single biggest misuse of ZigZag is treating the last leg as a signal. Because that leg repaints until the next reversal confirms, anyone who buys when the line is pointing up may watch it snap downward minutes later as a reversal locks in. ZigZag does not predict, it confirms after the fact. Backtests that use the visible ZigZag pivots look magical precisely because they peek at confirmed pivots that were not knowable in real time. Always test with logic that only uses fully confirmed legs.
- The current leg repaints, so never enter on the freshest, unconfirmed swing.
- ZigZag lags. Pivots confirm only after price has already reversed by the full deviation.
- A setting tuned to a trending market will whipsaw in a range, and vice versa.
- It hides drawdowns. One clean up leg can contain painful multi percent pullbacks you would have had to endure.
- It gives no momentum, volume, or trend strength information on its own.
During news driven Indian market shocks, such as the 4 June 2024 election result session or a sudden RBI policy surprise, ZigZag can flip its provisional leg several times in a single session before settling. This is normal behaviour given how it works, but it traps traders who think the line is a live recommendation. Respect the deviation, wait for confirmation, and combine it with structure based stops.
A Practical ZigZag Workflow for Indian Traders
Put it together into a repeatable routine. First, set the deviation to match the instrument from the table above. Second, use ZigZag to label the higher timeframe swing highs and lows and decide whether structure is bullish, higher highs and higher lows, or bearish, lower highs and lower lows. Third, confirm momentum and trend with RSI and a moving average. Fourth, anchor Fibonacci levels to the latest confirmed ZigZag pivots to find entry zones. Fifth, drop to a lower timeframe for a precise entry in the direction of the higher timeframe leg.
- Match deviation to the instrument and timeframe.
- Label swing structure with ZigZag and classify the trend.
- Confirm with RSI divergence and a moving average.
- Anchor Fibonacci to confirmed pivots for entry and target zones.
- Time entries on a lower timeframe, set stops at the last confirmed swing.
- Log every trade with the after tax result so you know your real edge.
Finally, journal everything. A swing high on the chart means little until you record the entry, exit, charges, STT, and tax bucket, whether F and O business income or equity capital gains, and review whether the ZigZag structure actually helped. Over many trades that log tells you if the tool earns its place in your process, which matters far more than any single clean looking chart.
Sources and Further Reading
For authoritative data and current rules, refer to Zerodha Varsity, NSE Indices, NSE India for contract specifications and lot sizes, and Investopedia for indicator definitions. Always confirm current STT rates, lot sizes, and tax rules on the official source before you trade, since these change.
Sources and Further Reading
For authoritative data and further reading on this topic, refer to Zerodha Varsity, Investopedia, NSE Indices (Nifty Indices) and NSE India. Always confirm current rules, rates and contract specifications on the official source before you trade.
Related Topics
Related Articles
Understanding the Flag Pattern in Indian Markets
How to trade bullish and bearish flag patterns on Nifty, Bank Nifty and NSE stocks, with a worked example, costs, taxes and honest reliability data.
Understanding the Vertical Horizontal Filter in Indian Markets
How the VHF spots trending vs ranging Nifty, with real NSE regimes, a worked calculation, option tactics, and Indian F&O tax rules.
RSI 2 Period Strategy for Indian Markets
The RSI(2) mean reversion strategy for Indian markets: 200 DMA filter, exact entry and exit rules, and worked Reliance and Bank Nifty rupee examples.
Understanding Trading Psychology in Indian Markets
Learn trading psychology for Indian markets with a worked Nifty options example showing how fear and greed turned a Rs 3,600 loss into Rs 16,500.
Understanding Short Selling in Indian Markets
How short selling works in India: the intraday-only retail rule, SEBI SLB overnight borrowing with a real Reliance borrow-cost example, F&O shorts and tax.
How to Rebalance Your Portfolio in Indian Markets
How to rebalance your Indian portfolio with the correct post-2024 tax: 20% STCG, 12.5% LTCG above Rs 1.25 lakh, plus a worked Nifty example.
The trading journal built for Indian F&O traders. Track your trades, spot patterns, build discipline.
- Log one trade a day by hand, on purpose
- AI mentor finds your repeat mistakes
- Behavioural analytics catch tilt early
- Trading calendar with P&L heatmap
- Pre-trade checklist flags risks
Yearly ₹2,499 · No broker credentials