Complete Suite: all 12 tools. 6 Premium desks inside.All 12 tools $606.98 one by one

$606.98 one by one $97 once Save $509.98Get the SuiteGet it
ProEA Lab · MT5, TradingView and trading research · Evidence standards
Order Flow

LuxAlgo Smart Money Concepts Settings, Read From the Code

LuxAlgo's Smart Money Concepts (180,940 boosts on TradingView) keeps its swing length in an unlabelled box beside Show Swings Points, fixes its internal structure at 5 candles in the code, and filters order blocks with a 200-candle ATR. Here is what each setting changes, read from its 848-line Pine v5 code, with a drill on simulated candles.

PL · 11 min read
Explainer cover titled LuxAlgo Smart Money Concepts settings, read from the code: the same simulated 15-minute candles drawn twice with swing and internal structure labels and order blocks, at swing length 50 with 1 swing break and at swing length 10 with 4.
Links to TradingView in this article are partner links: if you open a new TradingView account through one and buy a plan, TradingView may pay ProEA a commission, at no cost to you.
No LuxAlgo Smart Money Concepts setting is best, and reading its 848 lines shows two settings most guides miss. Smart Money Concepts (SMC) by LuxAlgo (180,940 boosts) keeps its swing length, 50 by default, in an unlabelled number box beside "Show Swings Points", and its internal structure runs at 5 candles, written into the code with no input. Change the swing length and what ends an order block below, and watch the labels and boxes move.
Two structures, one chartSwing structure at the length you pick, internal structure at a fixed 5, and the order blocks the internal breaks leave. Change the swing length and what ends a block, and watch the labels and boxes move.
SIMULATED · 15-MIN CANDLES · SWING 50 · INTERNAL 5 · OB ENDS ON A WICK100.50101.50102.50103.50104.50BOSBOSBOSCHoCHCHoCHBOSCHoCHCHoCHBOSCHoCHBOSBOS12:0018:00Thu06:0012:0018:00Fri06:00Filled label: swing break · plain, dashed: internal · filled box: order block still standing (newest 5) · dotted: ended
Swing length
Order Block Mitigation

50 is LuxAlgo's default swing length.

Swing length 50: 1 swing break (1 BOS and no CHoCH); the internal 5 adds 11 labels.

The first swing break is the Fri 05:00 candle's close through 102.54, a BOS. A swing is known 50 candles after it prints; the internal structure's 5 can't be changed. 11 internal order blocks: with High/Low, 7 ended and 4 still stand at the last candle; with Close, 6 end and 5 stand. Swing breaks at the other lengths: 10: 4, 25: 2.

Simulated 15-minute candles, not market data: a window of the seeded market our structure films use. The first 292 back-to-back 15-minute candles of the simulated market (100 before the shown ones, 192 shown) whose shown candles span no more than 30 times their median high-to-low range, and in which, on the shown candles, swing length 10 labels more swing breaks than 25 and 25 at least as many as 50, swing length 50 labels at least one, the two structures label 8 to 24 breaks between them, and ending an order block on a wick ends at least two of the internal blocks on an earlier candle than ending it on a close. Our own rules draw it: a swing beats the candles on each side and is known once they have closed, a close through it breaks it, the first break against the last one is a CHoCH; a block is the lowest candle (the highest, for a break down) between the swing and the break. It isn't LuxAlgo's code, which finds its swings and blocks its own way: the post says how. No outcomes are shown.

Read as text: the breaks and blocks at swing length 50, mitigation High/Low
  • Internal BOS down: the Wed 11:15 candle closed through 104.44, the swing low from Wed 07:30.
  • Internal bearish order block, the Wed 09:00 candle (105.05 to 105.23): still standing at the last candle.
  • Internal BOS down: the Wed 12:45 candle closed through 104.14, the swing low from Wed 11:15.
  • Internal bearish order block, the Wed 11:45 candle (104.39 to 104.88): ended by the Fri 10:30 candle's wick.
  • Internal CHoCH up: the Wed 16:15 candle closed through 104.14, the swing high from Wed 14:45.
  • Internal bullish order block, the Wed 16:00 candle (103.47 to 103.94): ended by the Wed 16:45 candle's wick.
  • Internal CHoCH down: the Wed 17:00 candle closed through 103.53, the swing low from Wed 14:15.
  • Internal bearish order block, the Wed 16:15 candle (103.66 to 104.17): ended by the Fri 09:30 candle's wick.
  • Internal BOS down: the Thu 02:15 candle closed through 101.41, the swing low from Wed 20:45.
  • Internal bearish order block, the Wed 22:30 candle (101.61 to 101.86): ended by the Thu 06:00 candle's wick.
  • Internal CHoCH up: the Thu 06:00 candle closed through 101.86, the swing high from Wed 22:30.
  • Internal bullish order block, the Thu 02:30 candle (101.32 to 101.48): ended by the Thu 10:15 candle's wick.
  • Internal CHoCH down: the Thu 10:15 candle closed through 101.54, the swing low from Thu 04:45.
  • Internal bearish order block, the Thu 07:30 candle (102.11 to 102.54): ended by the Fri 05:00 candle's wick.
  • Internal BOS down: the Thu 16:45 candle closed through 100.16, the swing low from Thu 15:00.
  • Internal bearish order block, the Thu 16:00 candle (100.76 to 101.05): ended by the Thu 19:30 candle's wick.
  • Internal CHoCH up: the Thu 19:30 candle closed through 101.05, the swing high from Thu 16:00.
  • Internal bullish order block, the Thu 17:00 candle (100.04 to 100.30): still standing at the last candle.
  • Internal BOS up: the Thu 23:15 candle closed through 101.65, the swing high from Thu 21:30.
  • Internal bullish order block, the Thu 22:00 candle (101.42 to 101.57): still standing at the last candle.
  • Internal BOS up: the Fri 03:45 candle closed through 101.93, the swing high from Fri 01:30.
  • Internal bullish order block, the Fri 02:45 candle (101.69 to 101.79): still standing at the last candle.
  • Swing BOS up: the Fri 05:00 candle closed through 102.54, the swing high from Thu 07:30.

What we read

On 12 November 2026 we searched TradingView's scripts for "smart money concepts", "smc luxalgo" and "smc" and kept the 83 whose names say smart money or SMC: 54 open source, 16 protected and 13 invite-only. The most boosted is LuxAlgo's Smart Money Concepts, with 180,940 boosts. We read all 848 lines of the Pine v5 source TradingView served that day; line numbers below are the script's own.

The script is shared under CC BY-NC-SA 4.0, which doesn't allow commercial use. So we quote it a line at a time, link it, and describe the rest in our own words; none of its code is in ours, and the drill above is our own rules. Our code read compares this suite with the other SMC scripts in best SMC indicators, repaint-checked; this page reads one script's inputs.

The settings, group by group

GroupSettingDefaultLineWhat the code does with it
Smart Money ConceptsModeHistorical76"Present" deletes the older label and line of each kind when a new one is drawn, so only the latest of each stays.
Smart Money ConceptsColor Candlesoff78Paints the candles by the internal structure's direction (line 767), not the swing structure's.
Real Time Internal StructureShow Internal Structureon80Labels breaks of the 5-candle structure, dashed.
Real Time Internal StructureBullish / Bearish StructureAll81, 83All, BOS only, or CHoCH only, each way.
Real Time Internal StructureConfluence Filteroff85Skips internal breaks on candles whose wicks fail a test (below).
Real Time Swing StructureShow Swing Structureon88Labels breaks of the swing structure, solid.
Real Time Swing StructureShow Swings Points, and the box beside itoff, 5094, 95The switch draws HH, HL, LH and LL labels; the unlabelled box is the swing length, 10 at least, and it works with the switch off.
Real Time Swing StructureShow Strong/Weak High/Lowon96Lines at the highest high and lowest low since the last swing points, named strong or weak.
Order BlocksInternal Order Blockson, 598, 99How many of the latest internal blocks are drawn, 1 to 20.
Order BlocksSwing Order Blocksoff, 5100, 101The same for blocks from swing breaks.
Order BlocksOrder Block FilterAtr102Atr or Cumulative Mean Range: the yardstick that marks a candle too volatile to be a block.
Order BlocksOrder Block MitigationHigh/Low103High/Low ends a block on a wick through it; Close on a close through it.
EQH/EQLEqual High/Lowon109Marks two highs or two lows that sit close together.
EQH/EQLBars Confirmation3110The swing length for those highs and lows.
EQH/EQLThreshold0.1111How close counts as equal, in multiples of a 200-candle ATR; 0 to 0.5, in steps of 0.1.
Fair Value GapsFair Value Gapsoff114Draws three-candle gaps.
Fair Value GapsAuto Thresholdon115Keeps only gaps whose middle candle moved more than twice the average move (on the chart's own timeframe; see below).
Fair Value GapsTimeframethe chart's116Reads the gaps from another timeframe.
Fair Value GapsExtend FVG1119How many candles past the gap its boxes reach.
Highs & Lows MTFDaily, Weekly, Monthlyoff121–129The previous day's, week's and month's high and low.
Premium & Discount ZonesPremium/Discount Zonesoff131Boxes at the top, middle and bottom of the latest swing range.

The swing length is the unlabelled box

Line 95 declares it:

swingsLengthInput               = input.int(    50,         '',                         group = SWING_GROUP,    minval = 10,                inline = 'swings')

An empty title and inline = 'swings' put the box on the same row as "Show Swings Points", which is off by default, so it reads like that switch's own option. It isn't: line 782 runs the swing structure on swingsLengthInput whether the swing points are shown or not, and line 783 runs the internal structure on a plain 5, getCurrentStructure(5,false,true). There is no input for that 5.

How a swing is found: line 339, newLegHigh = high[size] > ta.highest( size), asks whether the high size candles ago is above every high since. A swing is recorded when that turns the leg, so at the default a swing high is known 50 candles after it prints. A break is a close across the level, line 568, ta.crossover(close,p_ivot.currentLevel): a CHoCH when the structure pointed the other way, a BOS otherwise. Nothing in the 848 lines checks barstate.isconfirmed, so a label can print on the live candle and be gone at its close.

In the drill, which finds swings by our own rule (a high above the candles on both sides, where LuxAlgo's checks only the candles after it), swing length 10 labels 4 swing breaks, 25 labels 2 and 50 labels 1. The same Friday 05:00 close is a CHoCH at 10 and 25 and a BOS at 50, because at 50 there is no earlier swing break for it to change. The internal structure adds its own labels at every setting; in LuxAlgo's code an internal break of a level that is also the current swing level isn't labelled twice (line 565).

Order blocks: the filter and the mitigation

Which candle. After a break up, the script takes the candle with the lowest low from the broken swing high to the candle before the break, and boxes it from its high to its low (lines 513–518); a break down takes the highest high. Internal blocks come from internal breaks, swing blocks, off by default, from swing breaks.

Order Block Filter. Line 315 sets atrMeasure = ta.atr(200), and line 317 swaps in ta.cum(ta.tr)/bar_index, the average true range of every candle so far, when you choose "Cumulative Mean Range". Line 319 marks a candle whose high-to-low range is at least 2 times that measure, and lines 321–323 swap its high and low in the series the block search reads, so a wide candle is unlikely to be picked as the block. The tooltip on line 65 says: "It is recommended to use the cumulative mean range method when a low amount of data is available". A 200-candle ATR needs 200 candles.

Order Block Mitigation. With High/Low, the default, a bullish block is removed when a candle's low goes below its bottom (line 493), and a bearish one when a high goes above its top (line 487): a wick through is enough. With Close, the close has to get there. Either way the check runs on the live candle, and the block's alert, "Bullish Internal OB Breakout" and its three siblings, fires when a block is removed. In the drill's 11 internal blocks, a wick ends 7 and leaves 4 standing; a close ends 6 and leaves 5. One block shows the difference in time: the Wednesday 16:00 block is ended by the 16:45 candle's wick, but by the 17:00 candle's close.

The boxes themselves are drawn on the last historical candle and the live one (line 803), up to 5 internal blocks by default.

Equal highs and lows

Line 419 calls two lows equal when they are swings of Bars Confirmation candles, 3 by default, and sit closer than the Threshold times ta.atr(200): 0.1 times the 200-candle ATR. That ATR is used whichever Order Block Filter you pick. The input stops at 0.5 (line 111), though its tooltip on line 69 describes the threshold "in a range (0, 1)".

Fair value gaps: the threshold and the timeframe

Gaps are off by default. A bullish gap needs three things (line 641): the newest candle's low above the high two candles back, the middle candle's close above that high too, and the middle candle's move, close minus open over its open, above the threshold. With Auto Threshold on, line 639 sets that threshold to ta.cum(math.abs(newTimeframe ? barDeltaPercent : 0)) / bar_index * 2: on the chart's own timeframe, twice the average size of that move, so a gap left by an ordinary candle is skipped. With a higher Timeframe set, the moves are added up only on each new higher-timeframe candle but divided by every chart candle, so the bar sits lower. Off, the threshold is 0, and the middle candle only has to close up. A bullish gap is deleted when a later low goes below its bottom (line 627), and each gap is drawn as two boxes split at its middle.

The Timeframe input is where the code needs care. Line 635 asks for the gap's candles with lookahead = barmerge.lookahead_on, and the newest candle's high and low come as high[0], low[0], with no offset. On the chart's own timeframe, the default, that's just the current candle. Set a higher timeframe and, on history, the test runs on the first chart candle of each higher-timeframe candle with that candle's final high and low, values a live chart wouldn't have yet. TradingView's manual warns: "Scripts that use request.security() calls with lookahead to leak future data into the past are extremely misleading" (Pine manual, other timeframes and data, read 12 November 2026). The daily, weekly and monthly levels, by contrast, ask for high[1], low[1] with lookahead on (line 667): the previous period's values, the pattern the manual recommends.

Strong and weak highs, premium and discount, candle colour

Strong/Weak High/Low (lines 710–733) tracks the highest high and lowest low since the last swing points. The high is labelled "Strong High" while the swing structure is bearish and "Weak High" otherwise; the low is "Strong Low" while it is bullish.

Premium/Discount Zones (lines 756–761) are narrower than the words suggest: Premium is the top 5% of that range, Discount the bottom 5%, and Equilibrium a band from 47.5% to 52.5%. They aren't the upper and lower halves of the range.

Color Candles follows the internal structure (line 767), so with it on, candles can turn while the swing structure still points the other way.

Confluence Filter (lines 555–557) tests high - math.max(close, open) > math.min(close, open - low). As the parentheses are written, the right side is open - low on any normal price, so the filter compares the upper wick with the distance from the open to the low.

Alerts

There are 16 alert conditions (lines 827–846): BOS and CHoCH each way for both structures, an order block breakout for each kind, equal highs, equal lows, and a gap each way. Two carry the wrong word in their message. The swing structure's "Bullish BOS" and "Bullish CHoCH" alerts say 'Internal Bullish BOS formed' and 'Internal Bullish CHoCH formed' (lines 832–833); the bearish swing alerts say "Bearish BOS formed". If you run both structures' alerts, read the alert's name, not its message. All of them are decided on the live candle, like the labels.

Ours

Our SMC AI-Scored Toolkit is $39 once at its launch price, with its full Pine v6 source, and it makes different choices from LuxAlgo's suite. A candle has to close beyond the last confirmed swing, one with 15 candles on each side, so a swing is known 15 candles after it prints; the block is the last candle that closed the other way within the 20 before the breaking candle, its zone is that candle's body, and a close through the far edge takes it off the chart. Everything is boxed on closed candles. It also scores every zone 0–100 on five factors you can see: volume, displacement, liquidity sweep, higher-timeframe alignment and time of day. The score describes a zone; it isn't odds. In our own test on gold futures, the composite score didn't sort zones better than shuffled scores (the study has every number).

Where LuxAlgo's suite does more: it's free to add, it labels two structures at once, and it has 16 alert conditions to the toolkit's five alert types. If that's what you need, use it, with the live-candle and timeframe points above in mind. SMC Basics, in Pine Pro Library, is our plainer closed-candle version.

The rule we write down for each of these concepts, swing points, BOS, CHoCH and the MSS, order blocks and fair value gaps, is in our Smart Money Concepts Rule Book, one closed-candle check each.

The deep version, as a PDF

The Smart Money Concepts Rule Book

ICT and SMC as exact rules on closed candles, every concept set against the ones it's confused with, and what our data says about each.

  • 26 SMC and ICT terms, each one closed-candle rule: BOS, CHoCH, MSS, order blocks, breakers, fair value gaps, sweeps, OTE, killzones, SMT and more
  • The comparisons traders search for, side by side: BOS vs CHoCH vs MSS, breaker vs mitigation vs order block, sweep vs grab vs breakout, FVG vs imbalance vs IFVG
  • Every measurement we've published on these concepts, with its sample, period and costs, and why the book prints no win rate
See what's inside →

One payment, instant download. Refund within 7 days if you haven't downloaded it.

Check one yourself

  • The swing length: find ta.highest( or ta.pivothigh( and the number it gets. That many candles is how late a swing is known.
  • The break: ta.crossover(close breaks on a close; high > on a wick.
  • The close: search for barstate.isconfirmed. LuxAlgo's has none; a label you see live may not be there at the close.
  • Another timeframe: lookahead_on is safe with a [1] offset on the value, not without one.

What each concept these settings draw means, one written rule each: smart money concepts. More on each concept's indicators: best BOS and CHoCH indicators, best order block indicators and best FVG indicators, each code-read. None of these scripts, ours included, runs on MT5: Pine Script runs only on TradingView.

Limits

One code read, on 12 November 2026, of the version TradingView served that day (docs/seo/research/2026-11-12-luxalgo-smc-scripts.md). Scripts change, and boosts measure popularity, not quality. The drill's candles are simulated, and its swings and blocks come from our own rules, not LuxAlgo's code, so its counts show what each setting moves, not what LuxAlgo's script would print on a real chart. We haven't tested any of these settings as a trading rule. We build and sell the SMC AI-Scored Toolkit, SMC Basics and the Rule Book, and we have no relationship with LuxAlgo. Nothing here is financial advice.

Frequently asked questions

What are the default settings of LuxAlgo Smart Money Concepts?

Mode Historical; internal and swing structure on, showing both BOS and CHoCH; swing length 50; Strong/Weak High/Low on; internal order blocks on, 5 of them; swing order blocks off; Order Block Filter Atr; Order Block Mitigation High/Low; equal highs and lows on, 3 bars and a 0.1 threshold; fair value gaps, the daily, weekly and monthly levels and premium and discount zones off.

Where is the swing length in LuxAlgo Smart Money Concepts?

In the Real Time Swing Structure group, in the unlabelled number box on the same row as Show Swings Points: 50 by default, 10 at least. It sets the swing structure whether or not the swing points are shown. The internal structure's length is 5, written into the code, with no input to change it.

What are the best settings for LuxAlgo Smart Money Concepts?

We haven't tested any, so we don't name one. A shorter swing length labels more swing breaks and knows each swing sooner: on the drill's simulated candles, read by our own swing rule, 10 labels 4 swing breaks, 25 labels 2 and 50 labels 1. Pick the length and the mitigation before you test, and test on closed candles.

What does Order Block Filter do in LuxAlgo Smart Money Concepts?

It sets the volatility yardstick: Atr is a 200-candle ATR, Cumulative Mean Range the average true range of every candle so far. A candle whose high-to-low range is at least 2 times that yardstick has its high and low swapped in the series the order block search reads, so it is unlikely to be picked as a block. The script's tooltip recommends Cumulative Mean Range when a low amount of data is available.

What is the difference between High/Low and Close order block mitigation?

High/Low removes a bullish order block when a candle's low goes below its bottom, a wick through; Close removes it only when a candle closes below it. Bearish blocks mirror that with the high. On the drill's candles, a wick ends 7 of 11 internal blocks and leaves 4 standing; a close ends 6 and leaves 5.

Does LuxAlgo Smart Money Concepts repaint?

Its labels are decided on the live candle: a close through the level can print a BOS or CHoCH mid-candle that's gone at the close. A swing is known only 50 candles after it prints, by default. With the Fair Value Gaps timeframe set above the chart's, the gap test reads the newest higher-timeframe candle with lookahead on and no offset, so on history it uses that candle's final high and low.

Why does the swing Bullish BOS alert say Internal Bullish BOS formed?

Because that is the message written into the code. Of the script's 16 alert conditions, the swing structure's Bullish BOS and Bullish CHoCH carry the messages Internal Bullish BOS formed and Internal Bullish CHoCH formed. They fire on swing breaks; only the message text says internal.

Continue reading

Best VWAP Indicators on TradingView (2026), Code-Read.

We read the Pine source of eight popular open-source VWAP scripts on TradingView and its built-in VWAP: which compute true cumulative hlc3 volume-weighted variance, which decay volume with an EWMA or reset every 14 bars, which redraw swing polylines, and how to add a 09:30 ET cash-open anchor.

Nov 11 · ProEA Lab

Explainer cover titled Best VWAP indicators, code-read: a scorecard table of six popular TradingView VWAP scripts graded with ticks, halves and crosses across True Cumulative VWAP, Volume-Weighted StDev Bands, and Fixed Historical Bars.

Market Structure Indicators: BOS, CHoCH and MSS, Code-Read

We read the code of the most-boosted market structure scripts on TradingView, the ones that label BOS, CHoCH, MSS or MSB: what each calls a swing, whether a wick can break it, which show inducement (IDM), and whether any waits for the candle to close.

Oct 31 · ProEA Lab

Explainer cover titled Best BOS and CHoCH indicators, code-read: a table of six open-source TradingView scripts with ticks, crosses and halves for three checks: whether a close is needed to break structure, whether the script shows inducement, and whether it decides on a closed candle.

Best Breaker Block Indicators on TradingView (2026), Code-Read.

We read the code of the 14 most-boosted open-source breaker block scripts on TradingView: what turns an order block into a breaker, body or wick, what ends it, whether it tells a breaker from a mitigation block, and which decide on a closed candle.

Oct 31 · ProEA Lab

Explainer cover titled Best breaker block indicators, code-read: a table of six open-source TradingView scripts with ticks and crosses for three checks: whether the script waits for a structure break, whether it rules out boxing a mitigation block, and whether it decides on a closed candle.