Skip to content
Script type
Indicator
Source code
Open-source
Purpose
Trade signals

Flag & Pole Pattern Tp-sl [JPT]

Also known as F & P JPT

Spots bull and bear flags and marks the bar that closes through the flag line.

Difficulty Beginner

No.VOW-000124

All it puts on the chart is two dashed lines, a flag label, and BUY/SELL signals, so once you learn which colors and positions belong to the bullish and bearish sides, it is quick to read. Two things are worth understanding up front: momentum is measured as the gap between the current close and the close 20 bars earlier, and the label shows up a few bars late because pivots need time to confirm. With those two points in mind, even setups where a label fires without a BUY make sense, so anyone who already uses indicators regularly should find it easy to pick up.

Repainting
Backpaints
  1. Live barChanges
  2. On closeFixed
  3. HistoryBackpaints
On detection, the dashed lines are drawn back to earlier swing highs and lows, and the previous lines are removed when the next flag in the same direction forms, but labels and BUY/SELL only print on confirmed bars and never repaint.
Best timeframes
  • Lower TFs≤15m
  • Mid TFs30m–4H
  • Higher TFs1D+
Tested on BTCUSD (1m, 5m, 30m, 1H, 4H, 1D, 1W)
Alerts
4 conditions
Buy/sell signals
Yes
Market conditions
Trending
Display
Overlay
Chart elements
LinesLabels
Trading style
Swing TradingDay Trading
SignalsBreakout

How to Catch Bull and Bear Flag Breakouts With “Flag & Pole Pattern Tp-sl”

Diagram gallery 8

Article Summary
What does this indicator do?
Bottom line

Flag & Pole Pattern Tp-sl automatically finds flags from three lower (or higher) highs and lows plus momentum over the last 20 bars, then prints BUY or SELL on the bar that closes through the flag line. Everything is evaluated on confirmed bars only, and you are expected to bring your own exit.

Tell me more
Key points
  • It automatically scans for bull and bear flags, draws dashed lines above and below each flag, and prints BUY/SELL signals.
  • Bullish Flag fires when three pivot highs and three pivot lows step lower and the close is 3x ATR above the close 20 bars ago.
  • BUY prints once, on the bar that closes above the upper line's extension from below, within 40 bars of the label.
  • Labels and BUY/SELL are evaluated on bar close, so they never flicker on the live bar or vanish after the fact.
  • Lines are drawn back to past pivots on detection and get replaced by the newest set when a new flag forms in the same direction.
  • On the defaults the momentum check starts inside the flag, so on fast moves the label can land after the breakout with no BUY.
  • Raising Pole Lookback to 40–50 makes it easier to catch textbook flags measured from the start of the pole.
  • No take-profit or stop-loss levels are drawn, so pair it with something like Chande Kroll Stop and use the four alerts.

Auto-Detects Flags and Poles, Then Marks the Breakout Bar

Price rips higher, then drifts down in a tight, orderly pullback. That is the classic flag. The sharp leg is the pole, the shallow pullback is the flag, and the textbook play is to catch the continuation when price breaks out of the top of the flag.

Flag & Pole Pattern Tp-sl hunts for these flags on your TradingView chart, draws dashed lines along the top and bottom of the flag, and prints BUY or SELL on the bar that closes through a line. It handles both bull flags and their mirror image, bear flags.

I ran it on Bitcoin across seven timeframes, from the 1-minute to the weekly. All it puts on the chart is two dashed lines and a few labels, and the candles almost never got buried. If you are used to connecting highs and lows by hand to spot flags, handing that whole search over to the indicator is the real win here.

Flag & Pole Pattern Tp-sl on a Bitcoin 30-minute chart, boxing in a downward-sloping flag with dashed lines and printing BUY on the breakout bar.
Flag & Pole Pattern Tp-sl on a Bitcoin 30-minute chart, boxing in a downward-sloping flag with dashed lines and printing BUY on the breakout bar.
Why the name says Tp-sl

The name says Tp-sl (take profit / stop loss), but in the version I tested there were no take-profit or stop-loss zones on the chart, and no risk-to-reward input in the settings either. What you get is the flag lines, the labels, and the BUY/SELL signals. Plan on bringing your own exit as you read on. I cover a pairing for that later in the article.

Two Dashed Lines and Three Kinds of Labels

There is not much on screen. The bullish and bearish sides simply swap colors and placement, so it is worth getting familiar with what each element means first.

ElementBull flagBear flagWhen it appears
Upper dashed lineLime greenOrangeBar where the flag is detected
Lower dashed lineLight blueRedBar where the flag is detected
Flag labelGreen “Bullish Flag” (below the bar)Red “Bearish Flag” (above the bar)Bar where the flag is detected
Breakout triangleLime ▲ with “BUY” (below the bar)Red ▼ with “SELL” (above the bar)Bar that closes through the line
Breakout labelGreen “FLAG BREAKOUT BUY”Red “FLAG BREAKDOWN SELL”Bar that closes through the line

The figure below walks through a full bull flag sequence. A line connecting three lower highs is drawn on top and a line connecting three lower lows on the bottom Figure 1, then “Bullish Flag” fires on the bar where upside momentum kicks in Figure 2. After that, “BUY” prints on the bar that closes above the extension of the upper line Figure 3.

The basic Flag & Pole Pattern Tp-sl sequence (bull flag)

Once three lower highs and three lower lows line up and the latest push higher has momentum, Bullish Flag fires. BUY prints on the bar that closes above the upper dashed line.

The basic Flag & Pole Pattern Tp-sl sequence (bull flag)① Upper line through three lower highs ② Bullish Flag fires (lines are drawn on this bar) ③ BUY on the close above the upper lineBUYBullish FlagFLAG BREAKOUTBUYBullish FlagUpper line throughthree lower highsBullish Flag fires(lines are drawn on this bar)BUY on the closeabove the upper lineIf conditions still hold,the label fires again

Vowars DE ver.3.23.1

The upper line is lime green and the lower line is light blue, both dashed. The BUY triangle and the FLAG BREAKOUT label overlap on the same bar.

The BUY triangle and the “FLAG BREAKOUT BUY” label both sit under the low of the same bar, so on a live chart they read as one cluster. If the text feels crowded, turn off Show Breakout Labels and you are left with just the triangle, which keeps things clean.

At the right edge of the figure, “Bullish Flag” shows up again after the BUY. A BUY ends the monitoring for that flag, but if all three conditions are still true at that point, the indicator starts counting the same structure as a new flag from the next bar. I saw the same “Bullish Flag → BUY → Bullish Flag → BUY” sequence on the 5-minute chart. It is easiest to read the second and later labels as “momentum is still there.”

Bear Flags Flip the Colors and the Direction

For a bear flag, “Bearish Flag” fires above the bar once a strong drop follows a series of higher highs and higher lows Figure 1. When a bar closes below the extension of the red lower line, SELL prints on that bar Figure 2.

Bear flag, SELL, and where the lines stop

A strong drop after higher highs and higher lows fires Bearish Flag, and a close below the lower dashed line prints SELL.

Bear flag, SELL, and where the lines stop① Bearish Flag prints above the bar ② SELL on the close below the lower line extension ③ After SELL the extension is gone; lines end at the third swing pointSELLBearish FlagFLAG BREAKDOWNSELLBearish Flagprints above the barSELL on the close belowthe lower line extensionAfter SELL the extension is gone;lines end at the third swing point

Vowars DE ver.3.23.1

The upper line is orange and the lower line is red, both dashed. After SELL, the lines stop extending right and only the span between the three swing points remains.

The other thing worth knowing is when the lines stop. Once BUY or SELL fires, or more than 40 bars pass after the label, the dashed lines stop extending to the right and only the segment between the three swing points remains Figure 3. That is why the lines look cut off partway through the flag when you scroll back through history. Nothing is missing from the display.

Flag & Pole Pattern Tp-sl on a Bitcoin 4-hour chart, showing a Bearish Flag followed by a SELL label.
Flag & Pole Pattern Tp-sl on a Bitcoin 4-hour chart, showing a Bearish Flag followed by a SELL label.

The Three Conditions Behind a Bullish Flag

Once you know what the indicator checks behind each label, it becomes much clearer why a flag fired where it did, or why it did not fire at all. Bullish Flag prints when all three of these line up on the same bar.

  1. Three consecutive pivot highs, each lower than the last
  2. Three consecutive pivot lows, each lower than the last
  3. The current close is at least 3x ATR(14) above the close from 20 bars ago

A pivot here means a bar whose high (or low) is above (or below) the six bars on either side of it. On top of that, the gap between the second and third pivot highs has to be at least Minimum Trendline Slope (%) (0.02% by default). Bearish Flag is the exact mirror: higher highs and higher lows, plus a close at least 3x ATR below the close from 20 bars ago.

From Bullish Flag to BUY: the decision flow

All three conditions on the same bar fire Bullish Flag. A close above the upper line within the next 40 bars prints BUY.

From Bullish Flag to BUY: the decision flow① Momentum is measured 20 bars back from now ② Checked only on bar close ③ After a BUY, the lines also stop extending Flow: Three pivot highs in a row, each lower(Last two at least 0.02% apart) → Bullish Flag(Label plus two dashed lines), Three pivot lows in a row, each lower(6 bars each side to confirm) → Bullish Flag(Label plus two dashed lines), Close is 3x ATR+ above 20 bars ago(Pole check) → Bullish Flag(Label plus two dashed lines), Bullish Flag(Label plus two dashed lines) → Close above upper line within 40 bars? → (Yes) BUY + FLAG BREAKOUT / (No) Monitoring ends(Lines stop extending right)。 Group "All on the same bar": Three pivot highs in a row, each lower(Last two at least 0.02% apart), Three pivot lows in a row, each lower(6 bars each side to confirm), Close is 3x ATR+ above 20 bars ago(Pole check)。All on the same barYesNoThree pivot highsin a row, each lowerLast two at least 0.02% apartThree pivot lowsin a row, each lower6 bars each side to confirmClose is 3x ATR+above 20 bars agoPole checkBullish FlagLabel plus two dashed linesClose aboveupper line within40 bars?BUY + FLAG BREAKOUTMonitoring endsLines stop extending rightMomentum is measured20 bars back from nowChecked only on bar closeAfter a BUY, the linesalso stop extending

Vowars DE ver.3.23.1

Everything is evaluated on confirmed bars only. Bearish Flag follows the same flow in reverse, with SELL printing on the bar that closes below the lower line.

Two points in the flow matter most: momentum is measured from the current bar Figure 1, and every check waits for the bar to close Figure 2. Whether a BUY fires or 40 bars go by, that is where monitoring ends Figure 3.

Pole Strength Is Measured 20 Bars Back From the Current Bar

This is where the character of the indicator really shows. It does not go looking for the rally before the flag to measure the pole. Instead, it compares the close of the bar it is about to label Figure 2 with the close 20 bars earlier Figure 1, and if the difference is at least 3x ATR, the pole counts as valid Figure 3.

The pole check: current close vs. the close 20 bars ago

On the Bullish Flag bar, the close is at least 3x ATR(14) above the close from 20 bars earlier.

The pole check: current close vs. the close 20 bars ago① Close 20 bars ago ② Current close ③ If this gap is 3x ATR(14)+, the pole is validBullish Flag20 bars+5.14Close 20 bars agoCurrent closeIf this gap is 3x ATR(14)+,the pole is valid

Vowars DE ver.3.23.1

Calculated with the defaults: Pole Lookback 20, Minimum Pole Size (ATR) 3.0, ATR Length 14. The size of the move is just one example from this chart.

With the defaults, a pivot needs six bars to confirm, so the bar 20 bars back usually lands inside the flag itself. In other words, out of the box Flag & Pole Pattern Tp-sl catches the moment price swings sharply higher over the last 20 bars while the lower-highs structure is still intact. That is why the label tends to fire when price snaps back from the bottom of the flag to the top, right before or right after the breakout.

If you would rather catch the textbook “sharp rally, then slow pullback” shape and measure it from the start of the rally, lengthen Pole Lookback. I show concrete values, with a figure, in the settings section.

The Label Shows Up at Least Six Bars After the Third Pivot

A pivot only confirms once six bars (the Pivot Length value) have printed to its right. So from the third swing low Figure 1 until those six bars have passed Figure 2, Bullish Flag will not fire no matter how hard price rallies. It finally prints on the bar where the pivot is confirmed and the momentum condition is also met Figure 3.

The label comes 6+ bars after the third swing low

A pivot only confirms once six bars have printed to its right, so Bullish Flag always appears on a later bar than the third swing low.

The label comes 6+ bars after the third swing low① Third swing low ② These 6 bars hold above the low, confirming the pivot ③ Fires once momentum also qualifiesBullish Flag6 barsThird swing lowThese 6 bars hold above the low,confirming the pivotFires once momentum also qualifies

Vowars DE ver.3.23.1

Shown with the default Pivot Length of 6. Lower values shorten the confirmation wait; higher values lengthen it.

The dashed lines are drawn on that signal bar, reaching back to the earlier pivots. Looking at it later, it seems as if the lines were there before the flag finished forming, but they actually appear on the bar where the label prints.

Historical bars vs. real time

Both the labels and the BUY/SELL signals are evaluated on bar close. They do not flicker on and off on the live bar, and once printed they never disappear later. The dashed lines, however, are drawn back in time to pivots several to dozens of bars earlier at the moment the flag is detected. When you compare lines and labels on historical bars, treat the label’s position, not the line, as the bar where that information became available.

When BUY/SELL Prints, and When You Only Get the Label

BUY prints on the bar that closes above the extension of the upper line, from below, within 40 bars of the label. The check is a cross: the previous close is at or below the line and the current close is above it. You get one BUY per flag. Going through all seven timeframes, the signals fell into three broad patterns.

1 Label first, BUY a few bars later

This is the standard pattern. When the label fires, price is still inside the flag, and a later bar breaks through the upper line. In this test, the bull flags on the 30-minute, 1-hour, 4-hour, and daily charts all played out this way. You get some lead time after the label to get ready, which makes this the easiest pattern to trade.

2 Label and BUY on the same bar

When a big momentum candle punches straight through the line, the label and the BUY land on the same bar. On the 4-hour chart, during the March selloff, the Bearish Flag and SELL labels printed almost on top of each other. It is a bit harder to read because of the overlap, but the meaning is simple: the flag broke on the same bar it was detected.

3 Label only, no BUY

If the close is already above the line on the bar where the label fires, there is no cross from below, so BUY will not print unless price dips back under the line and breaks out again. In this test, I saw this on a 1-minute bull flag and on the daily and weekly bear flags. It is the flip side of measuring momentum over the last 20 bars: the faster the move, the more likely the label shows up after the breakout has already happened.

Flag & Pole Pattern Tp-sl on a Bitcoin 5-minute chart, with Bullish Flag and BUY printing twice in a row.
Flag & Pole Pattern Tp-sl on a Bitcoin 5-minute chart, with Bullish Flag and BUY printing twice in a row.
Treat the label and the BUY as two separate signals

Bullish Flag is the heads-up that structure and momentum are in place. BUY is the trigger that confirms a close above the upper line. When the label fires, check where the upper line sits and how far price is from the most recent high, then make the actual decision on the BUY bar. With that two-step approach, a Case 3 setup with no BUY will not catch you off guard.

How It Behaved Across Different Timeframes

I checked the indicator on seven timeframes: 1-minute, 5-minute, 30-minute, 1-hour, 4-hour, daily, and weekly. This is only what I saw on my own charts, but the feel was clearly different from one timeframe to the next.

On the 1-minute chart, small flags kept popping up one after another, and there were spots where Bearish Flag and SELL labels stacked on top of each other and got hard to read. That is because it picks up even tiny wiggles as three pivots. I found it easier to work with after adjusting the settings covered later than running it as is.

From the 30-minute to the 4-hour chart, the sequence of a pullback boxed in by downward-sloping dashed lines, then Bullish Flag, then BUY was easy to follow. This is the range where the indicator’s strengths came through most clearly. On the 1-hour chart there were also cases where the label fired on the bounce after a sharp drop, with BUY following a few bars later.

On the daily chart, after the lines boxed in the decline from May through July, Bullish Flag fired in mid-July and BUY followed in mid-August, right before a strong rally. With fewer bars, signals are rare, but the structure is very clear when they do show up.

On the weekly chart the flags stretch out much longer, and the lines kept extending to the right because the 40-bar monitoring window (about nine months) had not run out yet. On the weekly, it works better as a way to confirm the shape of the bigger trend than as something to wait on for signals.

Flag & Pole Pattern Tp-sl on a Bitcoin daily chart, detecting a downward-sloping flag and printing BUY on the breakout bar.
Flag & Pole Pattern Tp-sl on a Bitcoin daily chart, detecting a downward-sloping flag and printing BUY on the breakout bar.

Flags tend to form in markets that trend in one direction, so beyond Bitcoin, it should pair well with instruments whose trends tend to persist, such as gold (XAUUSD) and stock indices. In a choppy market that just chops back and forth, clean lower-highs or higher-lows sequences are hard to come by, so the label itself fires less often.

Settings and How to Tune Them for Your Setup

The settings are split into three groups: “Pole Detection,” “Flag Detection,” and “Display Settings.” The suggested values are starting points based on the behavior covered above and how the indicator looked on each timeframe.

Parameters
SettingDefaultSuggestedEffect
Pole Lookback2020 (standard) / 40–50 (to measure from the start of the pole)How many bars back the momentum comparison looks. Higher values compare against the start of the pole; lower values react only to recent sharp snap-backs
Minimum Pole Size (ATR)3.02.5–3.0Momentum threshold as a multiple of ATR. Lower values give more labels; higher values give fewer, but the label is more likely to land after the breakout
ATR Length1414ATR period used to measure momentum. Shorter tracks recent volatility; longer tracks average volatility
Pivot Length64–5 (15m and below) / 6–8 (1H and above)Bars on each side that define a pivot. Lower values pick up smaller flags and confirm faster; higher values keep only larger structures and delay the label
Touch Tolerance (%)0.30Leave as isIn the tested version, changing this value does not change the display
Maximum Flag Length (Bars)4020–30 (short-term) / 40–60 (daily and above)How many bars after the label the indicator waits for BUY/SELL. After that, monitoring ends and the lines stop extending
Minimum Trendline Slope (%)0.020.02–0.1Minimum gap (%) between the second and third pivot highs. Raising it filters out nearly flat structures
Show Pole LabelsOnOnShows the Bullish Flag / Bearish Flag labels
Show Flag TrendlinesOnLeave as isIn the tested version, the dashed lines still show even when this is off
Show BUY / SELL SignalsOnOnShows the triangles with BUY/SELL text
Show Breakout LabelsOnPersonal preferenceShows the FLAG BREAKOUT / FLAG BREAKDOWN labels

You might want to raise Minimum Pole Size (ATR) when there are simply too many labels. Keep in mind, though, that the stricter the threshold, the longer the indicator waits for momentum to build up, so you get more Case 3 setups where the label fires after the breakout. If you just want fewer signals, raising Pivot Length first to filter on structure tends to keep the label-then-BUY sequence intact.

The 0.02% default for Minimum Trendline Slope (%) works out to about $16 when price is at $80,000. On Bitcoin at 1-hour and above, almost every structure clears that bar. If you feel it is picking up patterns where the highs are basically flat, more consolidation than flag, raise it to 0.05–0.1% and only flags with a clear slope will remain.

A Longer Pole Lookback Catches Textbook Flag-and-Pole Setups

As mentioned above, with the default Pole Lookback of 20, the comparison point falls inside the flag. The cleaner the flag, with a slow pullback after the pole, the smaller the difference between now and 20 bars ago, so the label shifts to after the breakout and no BUY prints Figure 1. On the same price action, setting Pole Lookback to 50 pushes the comparison point back into the middle of the pole’s rally. The label then fired right after the third swing low confirmed Figure 2, and BUY printed on the very next bar Figure 3.

A longer Pole Lookback catches textbook flag-and-pole setups

On the same price action, a Pole Lookback of 20 puts the label after the breakout, while 50 fires it right after the third swing low confirms.

A longer Pole Lookback catches textbook flag-and-pole setups[Pole Lookback 20 (default)]① Comparison point is inside the flag, so the label comes after the breakout. No BUY [Pole Lookback 50]② Compared with the start of the pole, it fires right after the third low confirms ③ BUY on the next bar through the upper linePole Lookback 20 (default)Bullish Flag20 barsComparison point is inside the flag,so the label comes after the breakout. No BUYPole Lookback 50BUYBullish FlagFLAG BREAKOUTBUYBullish Flag50 barsCompared with the start of the pole,it fires right after the third low confirmsBUY on the next bar through the upper line

Vowars DE ver.3.23.1

Top: default 20. Bottom: changed to 50. Everything else is default. Setting Pole Lookback longer than the flag portion pushes the comparison point back into the pole’s rally.

The rule of thumb is to set it longer than the flag portion itself. With Pivot Length at 6, three pivots plus the confirmation wait already take 20+ bars, so 40–50 is a good starting point. The trade-off is that a more distant comparison point also counts older rallies as momentum, so in choppy markets the label can fire because of a rally from quite a while back. I recommend choosing based on which shape you want to trade.

Example Setups by Goal

GoalSuggested timeframePivot LengthPole LookbackMaximum Flag Length (Bars)
Catch smaller flags too5m–15m4–52020–30
Run the defaults30m–4H62040
Focus on the pole-to-flag shape1H–Daily6–840–5040–60

Lowering Pivot Length on lower timeframes shortens the pivot confirmation wait so the label fires as early as possible. Since that also produces more flags, Maximum Flag Length (Bars) is shortened too, so old lines do not hang around forever. On the daily, the opposite applies: the flag’s pullback itself tends to run longer, so the monitoring window is given more room.

Two settings that do not change the display

Touch Tolerance (%) and Show Flag Trendlines are listed in the settings, but in the version I tested they are not used in the detection logic or for toggling anything on the chart. Even if you switch Show Flag Trendlines off to hide the dashed lines, the dashed lines stay on the chart. They may be wired up in a future update, so it is worth checking them again whenever the script is updated.

Two-Stage Alerts: Detection and Breakout

Flag & Pole Pattern Tp-sl comes with four alert conditions. The figure shows how they map to what you see on the chart: you can get alerted on the label bar Figure 1 and on the BUY/SELL bar Figure 2, separately for the bullish and bearish sides.

How the four alerts map to the chart

You can be alerted at two stages, on the label bar and on the BUY/SELL bar, separately for the bullish and bearish sides.

How the four alerts map to the chart[Bull flag side]① Bullish Flag Detected [JPT] ② Bullish Flag Breakout [JPT] [Bear flag side]① Bearish Flag Detected [JPT] ② Bearish Flag Breakdown [JPT]Bull flag sideBUYBullish FlagFLAG BREAKOUTBUYBullish FlagDetected [JPT]Bullish FlagBreakout [JPT]Bear flag sideSELLBearish FlagFLAG BREAKDOWNSELLBearish FlagDetected [JPT]Bearish FlagBreakdown [JPT]

Vowars DE ver.3.23.1

The text in the figure matches the condition names in the Create Alert dialog. Every alert is evaluated on bar close.
Alert conditionWhen it firesWhat the message includes
Bullish Flag Detected [JPT]When the bar with Bullish Flag closesSymbol
Bullish Flag Breakout [JPT]When the bar with BUY closesSymbol and close price
Bearish Flag Detected [JPT]When the bar with Bearish Flag closesSymbol
Bearish Flag Breakdown [JPT]When the bar with SELL closesSymbol and close price

An efficient workflow is to use “Detected” on a higher timeframe to know a flag has formed, open the chart to check where the lines are, and then act on “Breakout” or “Breakdown.”

1 Add the indicator to your chart

Add Flag & Pole Pattern Tp-sl to a chart of the symbol and timeframe you want to watch. On the chart it shows up under its short name, “F & P JPT.”

2 Pick the condition in the Create Alert dialog

Open the Create Alert dialog, select this indicator in the Condition field, then choose which of the four conditions you want.

3 Create as many alerts as you need

Each alert can only use one condition, so if you want all four, you need four separate alerts. The number of alerts you can create depends on your TradingView plan, so narrowing it down to the two you use most is also a solid option.

Adding an Exit After the BUY

As noted earlier, Flag & Pole Pattern Tp-sl stops at flagging the breakout bar and does not draw a stop level for an open position. Where to get out after the BUY is up to you. A good fit for that job is Chande Kroll Stop, one of TradingView’s built-in indicators.

Chande Kroll Stop plots two stop lines based on recent highs, lows, and ATR. TradingView’s help center describes the blue line as the stop level for long positions and the other line as the stop level for short positions. In the figure, after the BUY Figure 1, the blue line (Stop Long) ratchets higher as price rises Figure 2, and the first bar that closes below it is used as the exit cue Figure 3.

Adding an exit after BUY with Chande Kroll Stop

Flag & Pole Pattern Tp-sl stops at flagging the breakout bar, so the blue Chande Kroll Stop line (Stop Long) can serve as the exit guide while you are in the trade.

Adding an exit after BUY with Chande Kroll Stop① BUY on the break of the upper line ② The blue line steps up as price rises ③ Exit cue: first close below the blue lineBUYBullish FlagFLAG BREAKOUTBUYBullish FlagBUY on the break of the upper lineThe blue line steps upas price risesExit cue: first closebelow the blue line

Vowars DE ver.3.23.1

Chande Kroll Stop uses its defaults (ATR Length 10, ATR Coefficient 1, Stop Length 9). The blue line is Stop Long and the orange line is Stop Short.

There are two reasons I like this pairing. First, both use ATR to size the move, so how volatile the flag bar was and how wide the stop sits feel consistent. Second, while the uptrend continues, the blue line steps up like a staircase, so compared with keeping your stop at the low of the BUY bar or the lower flag line, it moves to a level that locks in more of the gain.

There are other good pairings depending on what you need. If you want to confirm there was real buying behind the breakout bar, Elder’s Force Index (EFI), which combines price change with volume, is a candidate. If EFI spikes well above zero on the BUY bar, you can read it as a breakout backed by volume. And if you want to know whether the market is even in flag-friendly conditions, check the Choppiness Index (CHOP) first to see whether price is trending or chopping sideways. That should save you time waiting for labels that are unlikely to come.

Display Quirks Worth Knowing Before You Use It

Only the Latest Set of Lines Stays for Each Direction

When a new Bullish Flag fires, the bullish lines that were on the chart are removed and replaced with the new ones (the bearish side works the same way). Past labels and BUY signals stay, so when you scroll back you will see a row of flags with labels but no lines. If you want to see the old lines, rewind to that point with TradingView’s Bar Replay and you can check the lines as they were calculated up to that bar. How far back you can go depends on your plan and the timeframe.

BUY Signals When a New Pivot Forms During Monitoring

If a new pivot high confirms after the label while you are waiting for the BUY, the BUY check switches to a line through the latest three pivots at that point. The dashed lines on the chart are not redrawn, so BUY can print a little away from the dashed line, or not print even though price closed through it. If the dashed line and the BUY look out of sync, check whether a new high formed after the label. SELL on bear flags works the same way, with the check line shifting on a new pivot low.

Lines When a Flag in the Opposite Direction Appears

When a Bullish Flag fires, any Bearish Flag that was being monitored at that time is dropped (and vice versa). In that case, the bearish lines may not stop extending and can keep stretching to the right. They look the same as an active flag, but SELL will not print even if price closes below them. Use the most recent label to tell which direction is actually live.

Do not trade on BUY/SELL alone

Flag breakouts that get pushed right back into the flag, classic fakeouts, are not unusual. Because Flag & Pole Pattern Tp-sl waits for the bar to close, it keeps you from chasing a move on the live bar, but a confirmed breakout is still no guarantee of follow-through. The basics still apply: set your stop before you take the BUY, and check that the higher-timeframe trend points the same way. Also, since this is an indicator, you cannot get backtest results from the Strategy Tester as is. For a quick check, step through bars one at a time in Bar Replay and watch how the labels and BUY signals play out.

What it handles for you

  • Connects three highs and three lows for you and scans for both bull flags and bear flags
  • Shows only dashed lines and labels, so the chart stays readable even with other indicators on it
  • Labels and BUY/SELL are evaluated on bar close, so printed signals never disappear later
  • Detection and breakout can be sent as separate alerts
  • Changing just Pole Lookback switches between catching momentum snap-backs and measuring from the start of the pole

What you will want to add yourself

  • No take-profit or stop-loss levels are drawn, so exits have to come from another indicator or your own rules
  • On fast moves the label can fire after the breakout, and no BUY prints
  • Only the latest set of lines per direction is kept, so older flags show up without lines
  • On very low timeframes like the 1-minute, labels tend to pile up with the default settings

Let It Find the Flags So You Can Focus on the Decision

Flag & Pole Pattern Tp-sl [JPT]

Flag & Pole Pattern Tp-sl flags the spot where three lower (or higher) highs and lows line up and strong momentum shows up over the last 20 bars, then prints BUY or SELL on the bar that closes through the line. Every check runs on bar close, so you can rely on signals that do not flicker or vanish.

The key to getting the most out of it is understanding that momentum is measured against the close 20 bars before the current bar. On the defaults it catches the momentum snap-back right before a breakout, and stretching Pole Lookback to 40–50 makes it easier to catch the textbook pole-to-flag shape. Decide which one you are after, then tune the settings to match.

Since it does not draw exits, pairing it with a trailing stop like Chande Kroll Stop is the practical way to go. On the 30-minute through daily charts, keeping it on as your dedicated flag scanner for day trading or swing trading should free up more of your screen time for actual decisions.

Sources: This article is based on hands-on testing and in-depth analysis of the indicator Flag & Pole Pattern Tp-sl [JPT] by Jos-ProTrader on the charting platform TradingView.

Disclaimer: This article summarizes our own testing and analysis of how an indicator published on TradingView works and behaves. The symbols, timeframes, and settings used here were chosen to check how the indicator displays—they are not a recommendation to trade those instruments or to use the suggested settings. Indicators can change when their authors update them, so this article reflects the version we tested. All investment decisions are your own.

Never miss a new indicator
Get Vowars in Google search, a browser alert on publish, or updates on X.
YUZURU
AuthorYUZURUFounder & Reviewer, Vowars
View profileClose

An editor for content sites at a web agency, I started trading crypto in 2018. Working my way from spot to futures got me hooked on chart analysis, and I now build my own custom indicators on TradingView. On Vowars, I test TradingView indicators one by one on my own charts and review everything from the math behind them to how to use them and where they fall short, with custom visuals throughout.…

Created by

Vowars Picks

Stochastic Heat Map

“Stochastic Heat Map” Tested: Bottom-to-Top Color Shifts That Show How Real a Move Is

"Stochastic Heat Map" is an oscillator that stacks 28 Stochastics with lengths from 10 to 280 as colors, showing where price sits in its range on every lookback at once. The way color spreads from the bottom rows to the top tells you how strong a move is, but red stays pinned in strong trends, so it works best with direction handled separately by something like an EMA.

DifficultyIntermediate 8 figures

CME Institutional Order Flow & AMT Lens

Auction Market Theory on One Chart: An Indicator That Flags Volume Absorption by Color

“CME Institutional Order Flow & AMT Lens” is a TradingView indicator that combines a volume profile, candle coloring, shelves, and a dashboard in one. It gives no buy or sell signals and instead automatically marks key prices such as the POC and Value Area.

DifficultyAdvanced 7 figures

Fibonacci Trend Continuation Signals [AlgoAlpha]

Measure Pullback Depth Inside a Trend With “Fibonacci Trend Continuation Signals”

"Fibonacci Trend Continuation Signals" is a free TradingView indicator that automatically draws a Fibonacci range in the direction of the trend and prints a continuation signal the moment price starts moving again after a pullback or bounce. It gives you an objective read on pullback depth.

DifficultyIntermediate 5 figures

Smart Trader, Episode 06, Isotropic Trend Lines

Isotropic Trend Lines: Measuring Trend Strength with a Volatility-Adjusted Angle

Isotropic Trend Lines is a channel indicator that puts price on a log scale and divides it by volatility (σ) to produce a trend angle that does not depend on chart scaling. On one screen you get direction, strength, and position in the channel, plus breakout and retest status.

DifficultyIntermediate 10 figures

Strong Burst Fader

Strong Burst Fader: Measure Overextension with Diamond Stacks and Color for Mean-Reversion Fades

“Strong Burst Fader” measures how far the wick pokes outside a hidden moving average plus ATR band and shows that depth as diamond stack height and color, making it a mean-reversion indicator for fading overextended moves. The taller and redder the stack, the deeper the overshoot, and the best setups come when the burst stops at one stack and price closes back inside the band.

DifficultyBeginner 9 figures

Divergence for Many Indicators v4

Divergence for Many Indicators v4 : How to Read Divergence Across 10 Indicators in One Label

"Divergence for Many Indicators v4" is a TradingView indicator that detects divergence across 10 indicators, including RSI and MACD, and shows how many line up in a single label. Signals come early, but only the last one survives within the same swing. It works best once you've defined market direction.

DifficultyIntermediate 6 figures

Browse by goal

1 / 5