Trendline breakouts decided at the candle close, with the stop and three targets drawn
Apex Break PRO joins confirmed swing highs into sloped resistance lines and swing lows into support lines on your TradingView chart, then prints a BUY or SELL when a closed candle clears a line by 0.1 x ATR while at least 2 of its 3 default filters agree.
- Sloped trendlines through 20 / 20 swing points, up to 5 resistance and 5 support lines, dashed once broken.
- BUY and SELL are decided only on a closed candle that clears the line by 0.1 x ATR(14).
- EMA 200, volume and RSI filters vote on every break; at least 2 must agree, shown as stars.
- Entry, a 1.5 x ATR stop and TP1, TP2, TP3 at 1:1, 1:2 and 1:3, plus nine alert conditions.
- The full Pine Script source code. Paste it into the Pine Editor, save, and add “Apex Break PRO [AlgoFXStore]” to your chart.
- A 4-page PDF guide with installation, every setting and how to read the chart. One-time €47.

See Apex Break PRO on a real chart
Press play; use the full-screen button to see every detail.
Hand-drawn trendlines move every time you look, and so do your breakouts
Give three traders the same chart and you get three different trendlines. Most breakout traders draw theirs by eye, nudge the line after the move, and count a break the moment a candle pokes through it. The line that broke is often not the line that was there before the move, and a poke that closes back inside still gets treated as a signal. Nothing in that routine can be repeated, so nothing in it can be checked on your own charts.
The second mistake comes after the break. A break against the long-term trend, on thin volume, with RSI already stretched gets the same weight as a clean one, and the stop goes wherever it feels safe at that moment. Without a stop decided before the entry you cannot size the position, and without a target you cannot judge whether the trade was worth taking at all.
Apex Break PRO replaces the eye with fixed rules. Swing points come from one pivot test, lines join consecutive swings, a break needs a closed candle beyond the line by a fraction of ATR, and three filters vote on it. The stop and three targets are calculated from ATR the moment the candle closes. It does not make breakouts hold more often. It makes the reading rule-based, so you judge every signal on the same terms.
What Apex Break PRO draws, and what each mark means
Read from the shipped TradingView edition.
| What you see | What it means |
|---|---|
| Red line through two swing highs | Resistance trendline; a closed candle above it (by 0.1 x ATR) is a buy breakout |
| Green-teal line through two swing lows | Support trendline; a closed candle below it is a sell breakout |
| Dashed line | That trendline was broken (or reached 500 bars) and is no longer watched |
| BUY diamond + ' ━━ BUY ━━ ' label | Buy breakout on the closed candle, with price and star rating, e.g. (5 stars) (3/3) = all 3 filters agreed |
| SELL diamond + ' ━━ SELL ━━ ' label | Sell breakout on the closed candle |
| 'BUY 2650.25' / 'SELL 2650.25' line | Entry of the latest signal (signal candle close) |
| 'SL 2635.10' red dashed line | Stop loss 1.5 x ATR(14) from entry, red zone = risk |
| 'TP1 (1:1)', 'TP2 (1:2)', 'TP3 (1:3)' green lines | Targets at 1, 2 and 3 times the stop distance, green zone = reward |
| tick after a TP in the dashboard | That target has been reached (shown in the dashboard only) |
From swing points to a scored breakout and a drawn trade plan
Everything is calculated from the chart's own candles; the Pine Script code requests no other symbol or timeframe. These are the rules in the shipped script, in the order they run.
- 1
Confirm swing highs and lows
A swing high is a candle whose high is the highest of the 20 candles on its left and the 20 on its right (Pivot Left Bars and Pivot Right Bars, 20 each, adjustable from 5 to 50). Swing lows mirror the rule. Because the 20 candles to the right have to exist first, a swing is only known 20 candles after it formed. That delay is what makes it a swing the later candles have proven.
- 2
Join consecutive swings into sloped lines
Each new swing high is joined to the previous swing high, giving a sloped resistance line in red; each new swing low is joined to the previous one, giving a support line in teal. The line is projected forward and watched for up to 500 bars after it was found (Max Line Extension). The newest 5 lines per side stay on the chart, width 3; set the limit to 0 to keep them all.
- 3
Test every active line on the closed candle
The break test runs only when the candle is confirmed. A close above a resistance line by more than 0.1 x ATR(14) is a break up (Min Breakout Margin on, Margin 0.1); a close below support by the same margin is a break down. The broken line is cut at that candle and turns dashed, as does a line that reaches its 500-bar limit. A candle that pierces the line and closes back inside does nothing.
- 4
Score the break with the filters
Each enabled filter that agrees adds one point. EMA 200: a buy scores with the close above it, a sell with the close below. Volume above 1.2 x its 20-bar average scores for both sides, and so does a symbol that reports no volume. RSI 14 below 75 scores for a buy, above 25 for a sell. ADX 14 above 20 is an optional fourth vote, off by default. A signal needs 2 points and more than 5 bars since the last signal on that side.
- 5
Print the signal with its strength
A BUY is a large green diamond under the candle with a label below it carrying BUY, the closing price and a five-place star rating with the fraction, for example (2/3). A SELL is the red mirror above the candle. Stars are the score scaled to five: with the three default filters, 2 of 3 shows three filled stars and 3 of 3 shows five. The alert text adds the word Moderate or Strong.
- 6
Draw the plan and track it
Entry is the signal candle's close. The risk is 1.5 x ATR(14), or 1.0 % of the entry with the ATR stop switched off. The stop sits one risk away, TP1, TP2 and TP3 at one, two and three risks, over a red risk zone and a green reward zone. The lines extend right and their price labels follow the current bar. The stop or TP3 ends the plan; a new signal of either side replaces it.
Apex Break PRO on 12 different markets
Every chart below is a screenshot of TradingView itself with the shipped Apex Break PRO [AlgoFXStore] attached at its default settings. Forex, metals, indices, energy and crypto, so you can see how it reads each kind of market. They show what the indicator draws; they are not trading results. Tap or click any chart to open it full size.












Apex Break PRO on a real TradingView chart, frame by frame
Frames of a screen recording of the shipped indicator at its default settings, as the chart updates. Nothing is edited into the chart.




How to trade a signal, step by step
The indicator gives you a rule-based break and a ready plan; the decision and the order stay with you. This routine uses only what it draws.
- 1
Load history and start on the defaults
Add it to the chart and keep the defaults for your first sessions. It needs about 200 bars before the EMA 200 filter can agree, and two confirmed swings per side before the first line appears, so scroll back if the chart is short. Let the past diamonds and dashed lines show you how the rules behave on that symbol and timeframe before you change a single input.
- 2
Wait for the candle to close
Do nothing while a candle is pushing through a line. The break test, the diamond, the label and the signal alerts only happen once the candle has closed beyond the line by the ATR margin. When you study past signals in Bar Replay, judge the diamonds and labels only: a line appears 20 bars after its second swing and is drawn back to the first, so it can look crossed before it existed.
- 3
Check which filters agreed
Read the stars first. Five stars with (3/3) means the close was on the right side of the EMA 200, volume was above 1.2 x its average and RSI was inside its boundary. Three stars with (2/3) means one of them failed, so a BUY can print below the EMA 200. Decide in advance whether you take 2 of 3 or only 3 of 3, and keep that rule.
- 4
Size the position from the drawn stop
The distance between the entry line and the red SL line is your risk per unit. Work out the position size so that a stop-out costs no more than you allow per trade, then place the order yourself in your trading account with the stop at the SL price. The indicator does not send or protect orders, and an alert is not a stop.
- 5
Manage the trade by the three targets
TP1 at 1:1 and TP2 at 1:2 are solid green lines, TP3 at 1:3 is dotted. The plan stays open after TP1 and TP2 and the stop never moves to break-even on its own, so decide your partial exits and any trailing before you enter. A reached target gets a tick mark in the dashboard and an alert; the stop or TP3 ends the plan.
- 6
Know when to skip a signal
Skip it when the stop is wider than your risk allows at your smallest size, when the missing point is the EMA side and you only trade with the trend, or when the symbol reports no volume, because then the volume point is given automatically and 2 of 3 can mean one real filter. A new signal replaces the drawn plan, so note your levels if you are still in the earlier trade.
The dashboard, row by row
- AlgoFXStore / Apex Break PRO v1.0.0
- SIGNAL
- Direction
- Strength
- FILTERS
- EMA (200)
- RSI (14)
- Volume
- ADX (14) (only when the ADX filter is on; off by default)
- TRADE
- Entry
- SL
- TP1
- TP2
- TP3
- AlgoFXStore / v1.0.0 (footer)

Everything Apex Break PRO does for you
One pivot rule on every chart
Swing points use the same 20-left, 20-right pivot test on every symbol and timeframe, and lines always join consecutive swings. Up to 5 resistance and 5 support lines stay on the chart, solid while watched and dashed once broken or expired, so you can see which lines already did their job.
Breaks decided at the close
The break test is gated to the confirmed candle and needs the close beyond the line by 0.1 x ATR(14). A spike through the line that closes back inside, or a close that only touches it, produces no diamond and no signal alert.
A score you can read at a glance
The EMA 200 side, volume above 1.2 x its 20-bar average and RSI 14 below 75 for a buy or above 25 for a sell each add a point; ADX 14 above 20 is optional. The label shows the score as stars and a fraction, and the alert adds Moderate or Strong.
Stop and targets before you act
When the signal prints, the entry, a stop 1.5 x ATR(14) away and TP1, TP2, TP3 at 1:1, 1:2 and 1:3 are on the chart with their prices. The stop is red and the targets green on buys and sells alike, and they follow your Buy and Sell colour inputs.
A dashboard that follows the trade
The table shows the last direction as LONG or SHORT with Active or Closed, its stars, a pass or fail mark for each filter with the EMA value, the RSI value and the volume ratio, and the entry, SL and three targets with a tick on each reached target. Six positions, Top Right by default.
Alerts in two forms
Nine alertcondition entries appear in TradingView's Create alert dialog: Buy, Sell, Any Signal, Resistance Break, Support Break, TP1, TP2, TP3 and Stop Loss Hit. Six alert() messages add the details: BUY and SELL with price, stars, SL and all three targets, plus the four hit messages with the entry, sent once per bar close.
Every part can be switched
46 inputs in nine groups. Arrows, labels, the TP/SL plan, each single level, the EMA line and the dashboard have their own switches. Each filter can be disabled, the stop can be ATR-based or a fixed percentage, and the three risk-reward ratios are free inputs.
Full Pine Script source, light on your plan
You receive the complete Pine Script v6 code, not a locked script, so you can read every rule described on this page. It uses only the chart's own candles with no request.security call, which is why it also runs on the free TradingView plan.
Apex Break PRO, feature by feature
Each picture is built from real platform screenshots of the shipped indicator at its default settings, labelled so you can see what every part does. Tap any picture to open it full size.






How traders put it to work
Forex intraday on 15 minutes and 1 hour
On a 15 minute chart a swing is confirmed 20 candles, five hours, after it formed; on 1 hour it takes 20 hours. If that feels slow, lower Pivot Right Bars: lines appear sooner and more often, but on less proven swings. The ATR stop follows volatility, so quiet hours give smaller stops than busy ones, and your position size has to follow.
Gold, indices and crypto
On XAUUSD, an index or BTCUSD the stop is still 1.5 x ATR(14), so it widens by itself when the symbol moves more. Expect a smaller position for the same risk rather than a tighter stop. The volume filter reads the volume TradingView shows for that symbol; one that reports none passes the filter automatically, which makes the score less selective there.
4 hour and daily swing trading
On higher timeframes there are fewer lines and they are watched longer, because 500 bars of daily candles is a long stretch. Signals are rare and the ATR stop is wide, so the sizing step matters most. Make sure enough history is loaded for the EMA 200 and for two swings per side before you judge the chart.
Stricter or looser filtering
Raise Min Confluence Score to 3 and only five-star signals print, with all three filters agreeing. Switch the ADX filter on to add a trend-strength vote; then you can ask for 3 or 4 of 4, where 3 of 4 shows four stars. Lower the score to 1 and a single agreeing filter is enough, which means more signals on weaker evidence.
Every setting, with its default
The names are the ones in the script's Settings dialog in TradingView (Inputs tab); the defaults are what every chart on this page uses.
| Setting | Default | What it does |
|---|---|---|
| Pivot Left Bars | 20 | Bars to the left that confirm a swing high or low |
| Pivot Right Bars | 20 | Bars to the right; a swing (and its new trendline) is confirmed this many bars later |
| Max Resistance Lines (0 = all) | 5 (Max Support Lines 5) | How many resistance / support trendlines stay on the chart |
| EMA Trend Filter | On, EMA Length 200 | Buys only with the close above the EMA, sells only below |
| Volume Spike Filter | On, Volume Multiplier 1.2, Volume Average Length 20 | Breakout candle volume must beat 1.2 x its 20-bar average |
| RSI Boundary Filter | On, RSI Length 14, Overbought 75, Oversold 25 | Blocks buys with RSI above 75 and sells with RSI below 25 |
| Min Confluence Score | 2 | How many switched-on filters must agree (3 on by default; ADX filter is off) |
| Min Breakout Margin | On, Margin (× ATR) 0.1 | The close must clear the line by 0.1 x ATR |
| Signal Cooldown (bars) | 5 | Minimum bars between two signals in the same direction |
| SL ATR Multiplier | 1.5 (ATR Period 14; TP1/TP2/TP3 Risk-Reward 1.0 / 2.0 / 3.0) | Stop distance = 1.5 x ATR(14); targets at 1, 2 and 3 times that distance |
The alert events, one by one
In TradingView: Create alert, choose “Apex Break PRO [AlgoFXStore]” as the condition and pick the event. TradingView then notifies you the way you set in that dialog: a pop-up in TradingView, a sound, the TradingView app on your phone or an e-mail.
- ABP Buy Signal
- ABP Sell Signal
- ABP Any Signal
- ABP Resistance Break
- ABP Support Break
- ABP TP1 Hit
- ABP TP2 Hit
- ABP TP3 Hit
- ABP Stop Loss Hit
Apex Break PRO next to the usual options
Where it wins, and where it does not.
| Apex Break PRO | Typical free trendline indicator | Reading it by hand | |
|---|---|---|---|
| How lines are drawn | Consecutive 20 / 20 swing points joined into sloped lines, up to 5 per side | Varies; many draw lines and leave the signal to you | Your own choice of touches, often adjusted later |
| When a break counts | Closed candle beyond the line by 0.1 x ATR(14) | Often any cross of the line | When you notice it, often during the candle |
| Context filters | EMA 200, volume and RSI scored as stars; ADX optional | Usually none | Whatever you remember to check |
| Stop and targets | 1.5 x ATR stop and TP1 to TP3 at 1:1, 1:2, 1:3, drawn with prices | Usually not included | Worked out by you for every trade |
| What can move after the close | Signals stay put; lines appear 20 bars late and only the newest plan stays drawn | Depends on the code | Your lines stay exactly where you put them |
| Freedom to draw any line | None: the pivot rule decides every line | Some let you adjust the lines | Complete |
| Cost | A one-time payment | Free | Free, paid for in screen time |
Honest about who this fits
A good fit if you
- You trade breakouts of sloped trendlines and want every line drawn by one rule instead of by eye.
- You want the stop and the targets decided before the entry, in price, so the position size can be worked out every time.
- You like to see why a signal printed: the stars and the dashboard's filter rows show which conditions agreed.
- You chart forex, gold, indices, stocks or crypto on TradingView from 15 minutes to daily and want the same rules on each.
- You prefer a few filtered signals per chart over an arrow on every touch of a line.
- You want the Pine Script source code itself, so the rules on this page are rules you can read.
Not for you if you
- Traders who want software that places, manages or closes trades: this indicator draws and alerts, and every order is yours.
- Anyone who expects each breakout to hold: breaks fail and stops are hit, and the stars count agreeing filters, they are not a probability.
- Traders who want to draw and move their own lines: the pivot rule decides every line and you cannot drag them.
- Scalpers who need a signal before the candle closes: nothing prints until the close, and swing points are only known 20 candles later.
The full code, one guide, installed in two minutes
- 1Pine Script source codeApex_Break_PRO_TradingView_Code.txt (40 KB): the full code. Paste it into the Pine Editor and it appears as “Apex Break PRO [AlgoFXStore]”.
- 4Page PDF guideInstallation, every setting with its default and how to read the chart.
- ✓Every main setting explainedThe table above lists the main settings with the defaults the charts use.
- ✓Alert eventsYou choose which ones are on in the settings.
- 60Day money-back guaranteeIf it is not for you, request a full refund within 60 days through your Digistore24 order e-mail.
Install in five steps
- Download the zip from the page Digistore24 sends you to after checkout and unzip it.
- Open Apex_Break_PRO_TradingView_Code.txt in a text editor, select all and copy the whole code.
- In TradingView, open the Pine Editor, paste the code over everything that is there and click Save.
- Click Add to chart: “Apex Break PRO [AlgoFXStore]” appears on your chart.
- Read the PDF guide; the defaults are the settings shown on this page.

Kestutis Balciunas
AlgoFXStore · chart indicators
Kestutis Balciunas builds and publishes chart indicators under the AlgoFXStore name. Every product page shows what the indicator draws on real charts, and every number on it comes from the shipped build.
The charts on this page were captured in TradingView from the shipped Apex Break PRO [AlgoFXStore] at its default settings and are shown unedited.
No get-rich claims and no quoted win rates. Every trade is uncertain, and no indicator changes that. If you want to know whether it suits the way you trade before you buy, e-mail [email protected] and you will get a straight answer.
One price, one payment
- The full Pine Script source code of Apex Break PRO and the 4-page PDF guide
- Delivered as a digital download: one zip with the code file and the PDF guide on your download page
- Return period: 60 days, with a full refund if it is not for you
- Free updates to the current version on the same download page
60-day money-back guarantee. Install it, run it on your own charts and read the guide. If Apex Break PRO is not for you within 60 days of purchase, request a full refund from Digistore24, no questions asked: use the refund link in your Digistore24 order e-mail or Digistore24's order page digistore24.com/en/cancel-revoke-contract. Digistore24 refunds to your original payment method. It is a digital download: right after checkout you land on your download page, and the link to it is also in your Digistore24 order e-mail.
Also by Kestutis Balciunas: Apex Break PRO for cTrader and MT4 and MT5 and NinjaTrader 8.
About the signals
Does it repaint?
The signals do not. The break test that creates a BUY or SELL runs only on the confirmed candle, the diamonds and labels are never moved or deleted by the script, and there is no request.security or lookahead in the code. Other parts do move, by design: a trendline appears 20 bars after its second swing and is drawn back to the first, the entry, SL and TP labels follow the current bar, a new signal removes the previous plan, and a target tick in the dashboard can appear before the candle closes.
Why does a trendline appear so late?
A swing high is only confirmed once the 20 candles after it all have lower highs (Pivot Right Bars 20), so the line from the previous swing is drawn 20 candles after the swing itself. A swing that later candles have not tested yet is not proven. Lower Pivot Right Bars if you want earlier lines on less proven swings.
What do the stars mean?
They are the number of enabled filters that agreed on the signal candle, scaled to five. With the three default filters, three stars with (2/3) means two agreed and five stars with (3/3) means all three did. The alert adds Moderate or Strong. The stars describe agreement on that candle; they are not a probability that the breakout will work.
Why did a BUY print below the EMA 200?
The default rule needs 2 of 3 filters, not all of them. If volume was above 1.2 x its average and RSI was below 75, a close above resistance prints a BUY even when it is under the EMA 200, and the label shows (2/3). If you only want breaks on the trend side, set Min Confluence Score to 3.
Why did price cross a line without a signal?
Four possible reasons: the candle did not close beyond the line by 0.1 x ATR(14); fewer filters agreed than Min Confluence Score asks for; a signal on the same side printed within the last 5 bars (Signal Cooldown); or the line had already ended, which you can see because it is dashed. A cross during the candle that closes back inside never counts.
What happens when a SELL prints while a BUY plan is open?
The new signal replaces the plan. Entry, stop, targets and zones are redrawn for the SELL, the dashboard switches to SHORT (Active) and the old levels leave the chart, because only the newest signal keeps a plan. The older diamond and label stay where they printed. After TP3 or the stop the lines stop at that bar and the dashboard shows Closed.
Settings, symbols and the code
Which symbols and timeframes does it work on, and on which plan?
Any symbol and any timeframe TradingView offers: forex, gold, indices, stocks, crypto and futures. It reads only the chart's own candles, with no request.security call, so there is no higher-timeframe limit and it runs on the free TradingView plan as well. Give it a few hundred bars of history so the EMA 200 and the first swings can form.
Should I change the defaults?
Start with them; they are the rules described on this page. Change one input at a time and compare on the same chart. The inputs that change the reading most are Pivot Left and Right Bars (how big a swing must be), Min Confluence Score (how many filters must agree), Signal Cooldown and SL ATR Multiplier (how far away the stop sits).
Can I use a fixed percentage stop instead of ATR?
Yes. Switch off 'SL = ATR x Multiplier' and the risk becomes 'SL % (if not ATR)' of the entry price, 1.0 % by default; the targets still sit at 1, 2 and 3 times that risk. An ATR stop reacts to how much the symbol is moving and a percentage stop does not, so check the distance on your symbol first. Keep 'Show TP/SL Levels' on: the plan, the dashboard TRADE rows and the level alerts are all calculated inside it.
What does the ADX filter add?
Switched on, ADX 14 above 20 becomes a fourth vote that counts for buys and sells alike, so it rewards breaks in a trending market. The maximum score becomes 4 and the stars rescale: 3 of 4 shows four stars and 4 of 4 shows five. Keep Min Confluence Score in mind, because 2 of 4 is a looser rule than 2 of 3.
Can I edit the code?
Yes. You get the full Pine Script v6 source, so you can read every rule, change defaults in the inputs or adapt the script for your own use. Keep a copy of the original file before you change anything, and change one thing at a time so you can tell what each edit does.
Dashboard, alerts and charts
What does each dashboard row show?
SIGNAL: Direction as LONG or SHORT with Active or Closed, or WAITING before the first signal, and Strength as stars with the fraction. FILTERS: EMA (200) Above or Below with its value, RSI (14) with its value, Volume as Spike or Low with the ratio to its average, ADX only when enabled. TRADE: Entry, SL, TP1, TP2, TP3 with a tick on reached targets. The FILTERS rows read the current candle, not the signal candle.
How do I set up the alerts?
Open Create alert and pick Apex Break PRO as the condition. For one event, choose one of the nine entries such as ABP Buy Signal or ABP Stop Loss Hit. For the detailed messages with price, stars, SL and all three targets, choose the alert() function call option instead; those six messages fire once per bar close and follow the 'Enable Alerts' switch. Each alert watches the symbol and timeframe of the chart you created it on.
Why did I get a Resistance Break alert without a diamond?
ABP Resistance Break and ABP Support Break fire on every raw line break, before the filters and the cooldown are applied. A break that scored too low, or came within 5 bars of the last same-side signal, still triggers them but prints no diamond. If you only want filtered signals, use ABP Buy Signal, ABP Sell Signal or ABP Any Signal.
Can I run it on several charts or with other tools?
Yes. Each chart runs its own copy with its own settings, lines and plan, so you can watch several symbols or timeframes side by side. It sits on the price pane next to your own drawings and other indicators; its Trend EMA line can be hidden with 'Show EMA on Chart' if you already use one.
How it works
Will it place trades for me?
No. Apex Break PRO is an indicator: it draws on the chart and can alert you. It never sends an order.
After you buy
How do I get it after paying?
Digistore24 runs the checkout. Right after payment it takes you to your download page with one zip holding the Pine Script source code file and the PDF guide; the link to that page is also in your Digistore24 order e-mail, so you can download again at any time.
How do I install it?
Open the code file, open the Pine Editor in TradingView, paste the whole code, click Save and then Add to chart: “Apex Break PRO [AlgoFXStore]” appears on your chart. The guide walks through it step by step.
Who is Digistore24?
Digistore24 is the reseller that sells Apex Break PRO for Kestutis Balciunas (AlgoFXStore): it runs the checkout, charges your card or PayPal, collects the VAT for your country and delivers the download. Its name is the one on your statement, and its order e-mail holds your download link and the refund link.
What is the refund policy?
A 60-day money-back guarantee, handled by Digistore24. If Apex Break PRO is not for you within 60 days of purchase, use the refund link in your Digistore24 order e-mail or Digistore24's order page (digistore24.com/en/cancel-revoke-contract) for a full refund, no questions asked. Digistore24 makes the refund to your original payment method.
Do I get the source code?
Yes. You get the full Pine Script source code as a text file for your own use; the licence line at the top of the code does not allow resale, sharing or republishing.
Apex Break PRO for TradingView.
Add Apex Break PRO to your TradingView charts and see which trendline breakouts pass its rules on your own symbols. The full code, the guide and every setting explained. Instant download for €47, one payment.
Get instant access