Flag Pattern
A sharp run-up, a tight pause on the rising average, and the close that breaks out of it - on the hourly to the monthly chart, bullish or bearish.
Examples taken from the live lists on 23 Oct 2026. Prices and rows change every hour; the steps do not.
What this tab finds
Flag Pattern lists stocks that drew one picture: a sharp run-up (the pole, called the leg), then a quiet pause just above a rising moving average (the flag, called the rest). The top of the pause is the pivot - a CLOSE above it is the breakout. Its bottom is the base low.
- The leg: the rise before the pause, measured in per cent and in candles. The engine asks for a real thrust, not a drift.
- The rest: the candles since the leg's top, sitting on or just above the average. The chart shades it as a box.
- The average: the fast or the slow exponential moving average (EMA) of that chart - the 21 or 50 on the hourly and daily charts, the 10- or 30-week on the weekly, the 10- or 20-month on the monthly.
- The pivot: the top of the box. On the current rule a wick that pokes over it moves the top up to it (the hover text says 'tested the pivot') instead of ending the pause.
- The breakout: the first candle that CLOSES above the pivot. The row is not dropped then: for twenty candles it follows what the breakout does.
- The Bearish list is the same picture upside down: a sharp sell-off, a pause just under the falling average, a close under the bottom of the box.
Only closed candles are judged. The rows are written with the trendlines, after the evening refresh and on the live updates during the session; the line under the controls says when ('as of 2026-10-25 13:27' for this guide's rows). The price, the coloured dot and the Pivot cell's 'now' distance are the live numbers on a row.
Example
A daily flag, 23 Oct 2026 close
SHIVAUM, daily, on the 21 EMA: "Leg +54% in 49 days · Rest 13 days, range 11.2%, right side 10.5% · closed ₹540.00, 0.27 ATR / 0.8% above the 21 EMA, 0 closes below · volume drying (0.2× leg) · Pivot ₹584.00 / base low ₹525.05". The run-up started on 24 Jul, topped on 5 Oct, and the stock has rested on its rising 21 EMA since.
Open the list on the site → (sign in to open it with this exact filter)Keep in mind. This is a finder, not a forecast. The tab's own measurement (below, under What this tab does not tell you) found these pauses dip 1.5 ATR as often as any day for the stock (54% against 55%). Nothing here is advice to buy or sell, and no price on the tab is a target or a stop.
The controls
The sidebar's stock list (Nifty 500 by default) and filters narrow the stocks first; then the control bar asks the question. Every control is kept in the page address, so a view can be bookmarked or kept with Save scan. Leaving a control at its default writes nothing, so the bare /averages is the default list.
| Control | Choices (address letter) | What it does |
|---|---|---|
| Rule | v3 (current) · v2 (earlier) · v1 (earliest) (v=) | Which detector drew the list. v3 judges six charts, each in its own time, ends a rest only when price ends it, and follows a breakout for twenty candles. v2 is the daily chart only. v1 hunts for the longest quiet stretch on eight chart speeds. Each rule prints its own measurement, never another's. Changing the rule clears Timeframe and Direction. |
| Direction | Bullish ↑ · Bearish ↓ (d=bear) | Which side of the flag. v3 only; v1 and v2 only ever drew the bull side. One side at a time: every count and sentence is about the side picked. |
| Timeframe | 1 hour · 2 hour · 4 hour · Daily (default) · Weekly · Monthly · Any speed (tf=) | Which chart. Daily is the main list. Any speed shows all six, with a TF column saying which chart drew each row. |
| Average | Fast or slow line (default) · Fast: 21 EMA · 10-week · 10-month · Slow: 50 EMA · 30-week · 20-month (p=21 / p=50) | Which line the rest is on. The fast line is the first pullback, a few candles; the slow line the long base. |
| Status | Resting (default) · Breaking out ↑ · Testing the pivot ↺ · Rest ended ✕ · All (st=breaking / retest / ended / any) | Where the picture is now. See the next-but-one section. |
| Quality | Strict (default) · All (q=all) | Strict applies six gates together, in the chart's own scale: the average rising over the chart's own span, the close above the 200 (not asked on the monthly, which has no 200), within 15% of the 52-week high, the first pause since the run-up, a run-up of at most 2 legs, and the base low within 8% of the close (or 2.5 candle-ranges). All switches every one of them off. There is no middle setting. |
| (no label) New high | New high: any (default) · Run-up at a 60-candle high (newhi=1) | Keeps rests whose leg ended at its highest price in sixty candles. Optional on purpose: a breakout from a long base has not made a new high by definition. |
| Trendline | Any · Trendline at the pivot · Trendline at the base low · At either (tl=pivot / stop / either) | Keeps rows where a trendline from the trendline engine lands ON the pivot or the base low - within a quarter of a candle's range, counted by the engine. A second opinion, not one of the Quality gates. |
| Pivot | Distance: default · Within 1% · 2% · 3% · 5% · 10% · Any distance (z=) | How far the live price is from the pivot. With Resting: within that much, either side. With Breaking out: within that much past it. With Testing the pivot: from 0.5% under to that much past it, never more than 2%. Default: no limit while resting, 5% after a break, 2% for a test. |
| Sort | Tightest right side (default) · Nearest the pivot · Biggest leg · A–Z (sort=pivot / leg / symbol) | Tightest is the range of the last few candles of the rest, then the longest rest. |
On v1 the New high and Trendline controls are not offered (v1 never computed those columns) and Strict applies three gates instead of six; on v1 and v2 there is no Direction. The ? beside Rule, Direction, Average, Status, Quality, Trendline and the Pivot header opens the help for the rule you picked.
Over the controls, one line gives the market: whether the Nifty 50 is above its 50 EMA, and the share of NSE stocks closing above their 21, 50 and 200 EMA. On the 23 Oct 2026 close it read 'Nifty 50 below its 50 EMA (-2.7%) · 8% / 10% / 22% over the 21 / 50 / 200 of 2,324 NSE stocks' - a weak tape.
Under the controls, a line counts what is listed: stocks, rests on the fast and the slow line, how many are breaking out or failed, the stock list, the rows before the filters, and the publish time. If the newest daily candle the scan judged is older than the last session, a tag says 'today's candle not judged yet · last judged' and the date.
Example
The default list can be empty - and says why
On the 23 Oct 2026 close the bare /averages (Nifty 500, Daily, Bullish, Resting, Strict) listed no stock: "No stock is resting on its average at these settings." and under it "Set: the daily chart only, Resting, Quality: Strict - loosen one of those." The same evening the weekly chart listed 13 Nifty 500 rests (PETRONET, BOSCHLTD, HAL first), the Bearish daily list 7, and switching the stock list to All NSE stocks brought back one daily bull rest, SHIVAUM.
Open the list on the site → (sign in to open it with this exact filter)Reading a row
One row per stock, read by its headline rest (the timeframe you picked, and the average you picked if you picked one). On a wide screen the row's full sentence is its hover text; on a phone it is printed on a second line under the row. The popup says all of it again.
| Column | What it shows |
|---|---|
| Stock | The symbol - click it for the chart with the rest boxed. Before it, a dot for the LIVE price against the box: grey still inside, green or red once it is past the pivot or the base low (the colour follows the price's direction). After it, ⌇pivot and / or ⌇low (⌇high on the Bearish list) when the engine counted a trendline on that price; hover it for the chart that drew the line and its touches. |
| Price | The last traded price - live, like the dot and the Pivot cell's 'now' distance. |
| TF | Which chart drew the row: 1H, 2H, 4H, 1D, 1W or 1M. Shown on v3 and v1, which judge more than one chart. |
| Rest | One chip per average the stock rests on (see the glyphs below), then how long the rest is and how tight its last few candles are, e.g. '13 days · 10.5% tight'. After a break it adds what the break has done; on an ended row, why it ended. |
| Pivot | The top of the box (the bottom on the Bearish list), then how far the live price is from it: '7.5% away now' while under it, '0.7% over now' once through. An ended rest prints '—': the box is gone. |
| Glyph | Meaning |
|---|---|
| ▭21·13 | Resting 13 closed candles on the 21 EMA (▭10·4 on the 10-week, ▭30·7 on the 30-week). Bold from 8 candles. |
| ↑21 | The newest closed candle closed above the box: the breakout candle (↓ on the Bearish list). |
| ↗21·3 | Three candles since the breakout and the close still above the pivot (↘ on the Bearish list). |
| ↺21·7 | Broke out, and the price is back at the pivot now. |
| ✕21 | Closed under the base low or the average, or back under the pivot after a break. |
| ·21 | The rest ended without a break. |
| ~ (suffix) | A close inside the rest slipped under the average and came back, e.g. ↺21·7~. |
The row's sentence, piece by piece: the leg ('Leg +54% in 49 days'); the rest, its range and its right side; the last close against the average, in ATR (a normal candle's range on that chart) and per cent, and how many closes went under it; the volume of the rest against the leg's ('volume drying (0.2× leg)'); the pivot and the base low; any trendlines on them; and where the close sits - '₹44.00 (8.1%) under the pivot' while resting, 'Breaking out: closed 0.7% over the pivot on 5.3× RVol' on the break, 'broke out 7 days ago · back at the pivot now' after it. Every number in it is the last closed candle's. The live price comes after it in its own fragment: 'now ₹540.00 · inside the box'.
The hover text adds the gates Strict judged ('21 EMA rising over 20 candles, above the 200, near the 52-week high ... 1st pullback since the leg, a leg of 2 steps, tested the pivot') and an 'Also:' line with the chart facts worth a second look ('10 of 13 candles red · right side loose').
Keep in mind. The sentence's distance and the Pivot column's can differ on the same price. SHIVAUM read '₹44.00 (8.1%) under the pivot' and '7.5% away now' at ₹540.00 with a ₹584.00 pivot: the first is the gap measured from the close up (584 / 540), the second from the pivot down (540 / 584). Neither is wrong; they are two ways of dividing the same ₹44.
Statuses: resting, breaking out, testing the pivot, ended
| Status | Which rows | Glyphs |
|---|---|---|
| Resting | The pause is still going: no close has ended it yet (a one- or two-day shakeout under the average is tolerated and marked ~). | ▭ |
| Breaking out ↑ | The newest closed candle closed above the pivot, or a breakout of the last twenty candles still holds above it - while the live price is no more than 5% past the pivot (set Pivot to change that) and not more than 0.5% back under it. A break that came back earlier and has held since is here too. | ↑ ↗ |
| Testing the pivot ↺ | Broke out, did not fail, and the live price is back at the pivot: from 0.5% under it to 2% over it. | ↺ |
| Rest ended ✕ | A close under the base low or the average, or - after a breakout - a close back under the pivot (✕). A rest that ended any other way, without a break, shows · and 'rest ended'. | ✕ · |
| All | Every row. With a Pivot distance set, every row whose price is within it, either side, except the ones that failed. |
Resting and Testing the pivot read the LIVE price where it matters (the distance controls), but the status itself changes only when a candle closes - except Testing the pivot ↺, which follows the live price. A rest whose live price is already above the pivot is still Resting until the candle closes there; the dot turns green and the 'now' fragment says 'over the pivot'.
Example
Testing the pivot, daily, 23 Oct 2026
COFORGE, daily 21 EMA, Quality on All: "... Pivot ₹1,888.0 / base low ₹1,793.8 · 6 trendlines sit at the pivot (the best a 6-touch 15 min line) · broke out 7 days ago · back at the pivot now", live price ₹1,900.5, 0.7% over the pivot. Strict leaves it out: it is the 2nd pullback since the leg, not the first.
Open the list on the site → (sign in to open it with this exact filter)Tip. Breaking out drops a breakout the price has run more than 5% away from. To see those too, set Pivot to Within 10% or Any distance.
The chart (click a stock)
Clicking a stock opens its candle chart on the row's own timeframe, with the rest drawn and nothing else in the way. Clicking a stock in the left pane does the same (the address gets ?s= and the symbol), even for a stock the table is not listing.
- The box: the rest, shaded from its first candle to its last (to the newest candle while it is still resting).
- The top edge, tagged 'pivot' on the price axis: the price a close has to clear. On the Bearish list the top is tagged 'base high'.
- The bottom edge, tagged 'base low': the low of the pause - a description of the picture, not a stop. On the Bearish list the bottom is the 'pivot'.
- A triangle under the candle the leg started from, labelled 'leg starts'. The chart opens wide enough to show it.
- The average the rest is on, as an EMA. The chart file draws the 21, 50, 100 and 200 of its own candles; a weekly or monthly row on the 10-, 30- or 20-candle line says 'the 10 EMA is not drawn on this chart yet; the 21 and 50 of its candles are'.
- Under the chart: the row's sentence, then the live price in its own colour ('now ₹540.00 · inside the box'), then 'Also:' and the chart facts.
The strip offers all twelve speeds. The six the rule judges carry the stock's chips beside them (Daily ▭21·13); any other speed shows that chart with its trendlines and averages and says so: 'Rests are judged on the 1-hour, 2-hour, 4-hour, daily, weekly and monthly charts. This is the 15 min chart itself ... - not a rest that is missing.' Stepping the strip keeps the row's average period, and the weekly lines are the 10 and 30, so a daily 21 row stepped to Weekly shows no box even when a weekly rest exists: read the Weekly chip in the strip instead.
- Click the stock name.
- Read the box: the pivot on top, the base low underneath, the leg's start marked.
- Read the line under the chart: the closed candle's numbers, then 'now' and the live price.
- Read the Weekly chip in the strip to see whether the slower chart is resting too.
Opening the popup changes none of your chart settings elsewhere on the site; the Layers pills inside it work on a copy that closes with it. If the row names a candle the chart file does not have yet, the popup says the row and the file are from different runs - refresh in a minute. Full chart help: /guide/chart.
Bear flags
Direction = Bearish ↓ (v3 only) runs the same rule on the mirrored chart: a sharp sell-off, a tight pause just under the falling average, and the breakdown - a CLOSE under the bottom of the pause. The heading adds 'Bearish ↓'.
- The Pivot column is the BOTTOM of the box (the breakdown price); the base high is its top. '1.5% away now' means the price is 1.5% above the breakdown price.
- The leg is negative ('Leg -13% in 33 days'), the closes counted are closes ABOVE the average, and the 'Also' count is green candles.
- The Strict gates are mirrored: the average falling, the close under the 200, within 15% of the 52-week low, the first pause since the sell-off, a sell-off of at most 2 legs, the base high within 8% of the close (or 2.5 candle-ranges).
- Glyphs point down: ↓ the breakdown candle, ↘ the candles since. Colours follow the price: a breakdown is red, a bear flag that failed (price went up) is green.
- The trendline mark reads ⌇pivot / ⌇high.
Example
A bear flag, daily, 23 Oct 2026
LT, daily 21 EMA, first on the Bearish list: "Leg -13% in 33 days · Rest 7 days, range 3.1%, right side 3.0% · closed ₹3,647.0, 0.88 ATR / 1.7% under the 21 EMA, 0 closes above · volume not drying (1.4× leg) · Pivot ₹3,592.9 / base high ₹3,702.6 · 9 trendlines sit at the pivot (the best a 7-touch 15 min line) · 4 trendlines at the base high · ₹54.10 (1.5%) over the pivot" · now ₹3,647.0 · inside the box.
Open the list on the site → (sign in to open it with this exact filter)Keep in mind. The Bearish heading prints the bear side's own measurement (11 Oct 2026; 459 Nifty 500 stocks, daily candles 2011 to 24 Sep 2026): 64% bounced 1.5 ATR within 20 days against 62% for any day, and on the 21 EMA the short side did 0.33 pts worse than a random day (band -0.55 to -0.08).
Worked examples, 23 Oct 2026
Real rows from the 23 Oct 2026 close (rule v3, published 25 Oct 2026 13:27). Numbers will have moved by the time you read this.
1. A bull flag resting on the daily chart.
- Leave Rule on v3, Direction Bullish, Timeframe Daily, Status Resting, Quality Strict.
- Set the stock list in the sidebar to All NSE stocks (on this date the Nifty 500 had none).
- Click the stock and read the box and the line under the chart.
Example
SHIVAUM, daily 21 EMA - ▭21·13
"Leg +54% in 49 days · Rest 13 days, range 11.2%, right side 10.5% · closed ₹540.00, 0.27 ATR / 0.8% above the 21 EMA, 0 closes below · volume drying (0.2× leg) · Pivot ₹584.00 / base low ₹525.05 · a 4-touch daily line sits at the pivot · 2 trendlines at the base low · ₹44.00 (8.1%) under the pivot" · now ₹540.00 · inside the box. Stock cell: ⌇pivot ⌇low. Pivot cell: ₹584.00 7.5% away now. Also: 10 of 13 candles red · right side loose. On the chart the box runs 5 Oct to 23 Oct and the leg is marked on 24 Jul.
Open the list on the site → (sign in to open it with this exact filter)2. A breakout on the weekly chart.
- Set Timeframe to Weekly and Status to Breaking out ↑.
- Read the Rest cell: ↑10 is the breakout candle itself; ↗ rows broke out earlier and still hold.
- Click the stock: the box runs from the leg's top week to the week before the breakout.
Example
CYIENT, weekly 10-week line - ↑10
"Leg +62% in 22 weeks · Rest 6 weeks, range 18.8%, right side 17.3% · closed ₹1,233.0, 1.33 ATR / 11.7% above the 10 EMA, 0 closes below · volume drying (0.8× leg) · Pivot ₹1,224.4 / base low ₹1,030.3 · 10 trendlines sit at the pivot (the best a 8-touch 1 hour line) · Breaking out: closed 0.7% over the pivot on 5.3× RVol" · now ₹1,233.0 · over the pivot. The rest ran from the week of 31 Aug to the week of 12 Oct; the week of 19 Oct closed over ₹1,224.4. Also: gave back 35% of the leg · right side loose. In the Nifty 500 it was one of two weekly breakouts that evening, with INDHOTEL (↗30·1).
Open the list on the site → (sign in to open it with this exact filter)3. A bear flag on the daily chart.
- Set Direction to Bearish ↓; leave the rest at their defaults.
- Read the Pivot column as the floor of the pause: how far the price sits above it.
- Click the stock: the bottom edge is tagged 'pivot', the top 'base high'.
Example
LT, daily 21 EMA - ▭21·7
"Leg -13% in 33 days · Rest 7 days, range 3.1%, right side 3.0% · closed ₹3,647.0, 0.88 ATR / 1.7% under the 21 EMA ... Pivot ₹3,592.9 / base high ₹3,702.6 ... ₹54.10 (1.5%) over the pivot". Pivot cell: ₹3,592.9 1.5% away now. The rest runs 13 Oct to 23 Oct, the sell-off is marked on 25 Aug. Seven Nifty 500 stocks rested under their falling 21 EMA that evening (LT, CIPLA, GODREJCP, ZFCVINDIA, JINDALSTEL, ABREL, SBICARD) and four were breaking down (EICHERMOT, BAJAJFINSV, UNOMINDA, NH).
Open the list on the site → (sign in to open it with this exact filter)4. Only flags with a trendline on the pivot.
- Set Trendline to Trendline at the pivot.
- Hover the ⌇pivot mark for the chart that drew the line and its touches.
- Open the chart and step the strip to that timeframe to see the line on its own candles.
Example
Two methods on one price
CYIENT weekly: 10 trendlines sit at its pivot of ₹1,224.4, the best an 8-touch 1 hour line. LT daily: 9 at its breakdown price of ₹3,592.9, the best a 7-touch 15 min line, and 4 at its base high.
Open the list on the site → (sign in to open it with this exact filter)What this tab does not tell you
The current rule was measured on 9 Oct 2026 over 459 Nifty 500 stocks, every daily candle since 2011 (5,824 stock-years), with the hourly charts from February 2025 to September 2026. The help under the ? beside Average prints it in full; in its own words:
- "About 54% of these pauses dip below a fixed distance under the close (1.5 ATR) within 20 days - the same as any day on any stock (55%) - so this is a list of pictures to watch, not a recommendation."
- "The one thing that separates them is the run-up: one clean leg ran +0.87 pts better than a random day over 20 days, a staircase -0.09 pts." That is why Strict keeps run-ups of at most two legs.
- After the break: "67% of breakouts come back to the pivot (usually the next day), 73% close back under it within a month" (daily breakouts since 2011).
- On the hourly charts "74% of their breakouts close back under the line within 20 candles, and the move after a pause is a random candle's".
- Which way a pause will resolve, or that a breakout will follow through. The row follows a breakout for twenty candles and says what it did; it does not say what it will do.
- That passing Strict is an edge. The gates describe the picture traders say they want; apart from the legs, none changed what followed by more than a few tenths of a point, which is why there is no score.
- That a trendline on the pivot makes the break work. Nothing measured that; it is a second opinion from another engine.
- Anything about the bear side from the bull side's numbers. The Bearish heading prints its own; the ? help beside Average and Quality still prints the bull side's numbers on both lists.
- Anything about the candle still forming. A rest stands until a CLOSED candle ends it, even when the live price is already outside the box.
Keep in mind. A finder, not a forecast. Nothing here is advice to buy or sell; the pivot and the base low are the edges of a picture already drawn, not an entry, a target or a stop.
Terms in this tab
| Word | Plain meaning |
|---|---|
| Leg (pole) | The sharp rise before the pause (the fall, on the Bearish list). |
| Rest (flag) | The pause after the leg, on or just past the average. Shaded as the box. |
| Pivot | The top of the box on the Bullish list, the bottom on the Bearish: the price a close has to clear. |
| Base low / base high | The other edge of the box. A close past it ends the rest. |
| EMA | Exponential moving average of the close on that chart's candles. |
| Fast / slow line | The 21 / 50 EMA on the hourly and daily charts, 10 / 30-week on the weekly, 10 / 20-month on the monthly. |
| Right side | The last few candles of the rest; its range is the 'tight' figure. |
| ATR | Average true range: the size of a normal candle on that chart. |
| RVol | The breakout candle's volume against the usual. |
| Tested the pivot | A wick went over the box top and the top moved up to it; the rest goes on. |
| Staircase | A leg that climbed in three or more steps rather than one. |
Related: Inside Bars (/inside-bars) for a coil inside one candle; Trendline Support (/trendlines) for stocks sitting on a line.