Smart money concepts (SMC) are a community vocabulary for price action, popularised within the forex community and associated with ICT (Inner Circle Trader) material. Terms include order block, fair value gap, break of structure, change of character and liquidity sweep. No single authoritative definition exists. To automate or test one, choose an explicit rule; the results then describe that rule, not the idea behind the name.

Smart money concepts at a glance
- What SMC is: a set of names for chart patterns, often explained as the footprints of large participants' orders.
- Where the terms come from: one widely used TradingView script describes the term as coined and popularised within the forex community and by ICT.[1]
- What is measurable: the price patterns themselves, once you fix bars, comparisons and confirmation times.
- What is not measurable from a chart: who placed the orders. A bar's open, high, low and close record prices, not participants.
- Evidence: the same script's author states there is “no supporting data regarding the validity of these teachings”.[1] This page makes no claim that any SMC pattern predicts price.
SMC sits beside other level-based ideas in the trading strategy library. Much of it reuses swing highs, swing lows and zones, so the support and resistance rules guide covers the same timing problems.
Why do SMC terms need your own definitions?
Published SMC scripts on TradingView each implement the vocabulary their own way. Three examples show how far they diverge:
- One script separates “internal” and “swing” market structure, each with its own break of structure (BOS) and change of character (CHoCH) labels.[1]
- Another shows order blocks based on a user-selected swing length.[3]
- A third lists six order-block types, two zone-width modes, and several fair value gap filters from “very aggressive” to “very defensive”.[2]
Two traders who both say “order block” may therefore be testing different rules. Write your definition down, give it a version number and keep it fixed while you test.
How can each SMC term become a testable rule?
The definitions below are illustrative choices, not the correct or original meanings. Each one is precise enough to code and check. Every definition depends on confirmed swings, so start there.
Scroll horizontally to read every column.
| Term | One testable definition | Choices you still make |
|---|---|---|
| Swing high / low | A pivot with L bars on the left and R bars on the right, via ta.pivothigh or ta.pivotlow. |
L and R; how equal highs are treated. |
| Break of structure (BOS) | A bar closes above the most recent confirmed swing high while the prior structure was rising. | Close or wick; what “rising structure” means. |
| Change of character (CHoCH) | The first close above the latest confirmed swing high after a sequence of lower swing highs. | How many lower highs define the prior structure. |
| Fair value gap (FVG) | Bullish: the current bar's low is above the high two bars earlier. Bearish: the current high is below the low two bars earlier. | Minimum width; fill rule; expiry. |
| Order block | The last down-closing bar before the move that produced a BOS; zone from its low to its high. | Body or wick; which bar; when the zone is spent. |
| Liquidity sweep | A bar's high exceeds a confirmed swing high, but the bar closes below that swing high. | Minimum excess; same-bar or later close back. |
The three-bar gap rule matches one published script's description of an FVG range: the distance between the wicks of the first and third candles.[2] The other rows are this page's own examples.
Worked example: one bar, two different labels
Illustrative EURUSD prices, not a recommendation.
- Fair value gap: bar 1's high is 1.1000 and bar 3's low is 1.1012. Because 1.1012 > 1.1000, the bullish gap is true on bar 3's close. Its width is 1.1012 − 1.1000 = 0.0012.
- A confirmed swing high: a later swing high at 1.1050 has been confirmed by its right-hand bars.
- The test bar: its high is 1.1056, which is 1.1056 − 1.1050 = 0.0006 above the swing high. Its close is 1.1044, which is 1.1050 − 1.1044 = 0.0006 below it.
- Sweep definition: high 1.1056 > 1.1050 and close 1.1044 < 1.1050, so the liquidity sweep is true.
- Close-based BOS: the close is not above 1.1050, so this BOS is false.
- Wick-based BOS: the high is above 1.1050, so a wick-based BOS would be true on the same bar.

Under one rule set the bar is a sweep; under another it is a structure break. Neither label is wrong. A test of “SMC” is really a test of whichever definitions were coded.
When is each SMC pattern actually known?
Structure-based terms depend on swing points, and a swing point needs later bars. ta.pivothigh(leftbars, rightbars) returns the pivot price only once the right-hand bars exist.[4] TradingView warns that scripts drawing confirmed pivots back on the pivot bar misrepresent when the information was available.[5]
- Fair value gap: known when the third bar closes. No later bars are needed.
- BOS, CHoCH and sweeps: known only after the reference swing is confirmed, then after the test bar closes.
- Order blocks: often identified after the move that follows them. A zone drawn on an earlier bar was not a usable input on that bar.
- Removed or “mitigated” zones: one script removes order blocks once price breaks through them, so the chart no longer shows the zones that were broken.[1]
Store two times for every pattern: where it is drawn and when it became knowable. The pivot confirmation guide works through that delay bar by bar. Even a published SMC script's own example describes a setup path “outlined in hindsight”.[1]
How do you code a three-bar gap in Pine Script?
Illustrative sketch; not compiled or tested. The minimum width is a placeholder, not a recommended setting.
//@version=6
indicator("Three-bar gap definition", overlay = true)
minWidth = input.float(0.0, "Minimum gap width", minval = 0)
bullGap = low - high[2] > minWidth
bearGap = low[2] - high > minWidth
bullEvent = barstate.isconfirmed and bullGap
bearEvent = barstate.isconfirmed and bearGap
plotshape(bullEvent, "Bullish gap", shape.triangleup, location.belowbar)
plotshape(bearEvent, "Bearish gap", shape.triangledown, location.abovebar)
alertcondition(bullEvent, "Bullish three-bar gap", "Bullish gap on a closed bar")
alertcondition(bearEvent, "Bearish three-bar gap", "Bearish gap on a closed bar")
With a minimum width of zero, the bullish test reduces to the current low being above the high two bars earlier. plotshape() draws the marker on the third bar, which is when the gap becomes known.[6] alertcondition() only exposes the event; you still create the TradingView alert and choose its frequency.[8]
How should you test an SMC rule set?
A test answers a narrow question: how did this exact definition behave on this data, after costs? Keep the question narrow.
- Freeze the definitions. Record every parameter from the table above, including equality and expiry.
- Count events before results. Check that gaps, sweeps and breaks appear where the definition says, including boundary cases.
- Use only knowable inputs. Evaluate each pattern at its confirmation time, never at its drawn location.
- Hold out data. TradingView describes splitting data into in-sample and out-of-sample parts to reduce overfitting.[7] The out-of-sample testing guide explains the procedure.
- Limit the variants. Trying many filters and zone modes on the same history is the overfitting problem in its plainest form.
A disappointing result tests your definition, not the whole vocabulary. A good result is not proof that large participants caused the pattern.
How does an SMC event reach an MT5 order?
An SMC event needs a separate action specification: direction, broker symbol, volume, stop, target and repeat handling. Test it on a demo account first, and choose your own symbol, size and rules. PineConnector's setup test checks processing separately from the broker trade.[9]
- Condition: the coded pattern is true on the closed bar.
- Alert: the TradingView alert triggers; check its log.
- Delivery: the webhook carries the message.
- Processing: match it in PineConnector Portal → Bridge.
- EA request: confirm whether an order request was submitted.
- Broker outcome: check acceptance, the deal or deals and the position.
MetaQuotes treats orders, deals and positions as separate records.[10] A stop beyond an order block exists at the broker only if the message sends it. Zone prices come from the TradingView feed; the broker's quotes can differ, as PineConnector's price-difference FAQ explains.[11]
What goes wrong when SMC is automated?
- Coding the name, not a definition. “Order block” with no body, wick or expiry rule cannot be checked.
- Backdating structure. A swing drawn on its origin bar was confirmed later.[5]
- Judging from a cleaned-up chart. Deleted zones and hindsight paths hide the cases that failed.
- Treating stories as data. Price bars cannot show institutional intent, stop clusters or “manipulation”.
- Switching definitions mid-test. Each change starts a new test on the same history.
Frequently asked questions
What are smart money concepts in trading?
Smart money concepts are a community vocabulary for price-action patterns, including order blocks, fair value gaps, breaks of structure, changes of character and liquidity sweeps. The terms are usually explained with stories about large participants. No single authoritative definition exists, and chart prices cannot show who placed the orders behind a pattern.
What is a fair value gap?
In one common definition, a bullish fair value gap is a three-bar pattern where the third bar's low stays above the first bar's high. The zone between those two prices is the gap. A bearish gap mirrors it. Scripts differ on minimum width, what counts as filling the gap and when it expires.
What is an order block?
An order block is usually described as the last opposing candle before a strong move, marked as a zone. Definitions vary: some use the candle body and others the full range, and scripts classify blocks in different ways. To test one, state exactly which bar qualifies, the zone's boundaries and when it stops counting.
Can ICT and SMC concepts be automated?
The price patterns can be automated once each term has an explicit, bar-by-bar definition and a confirmation time. The explanations about institutional behaviour cannot be coded, because price data does not identify participants. Automation executes whichever definitions you coded; it does not show that those definitions have an edge.
Reviewed 25 September 2026. Facts were checked against the linked sources on that date. Nothing in this article was tested on a trading account and no code was compiled.
Related reading
- Trading strategy library
- Support and resistance as testable rules
- Breakout trading rules
- Pivot confirmation and repainting
- Out-of-sample testing
Sources
- TradingView community script – Smart Money Concepts (SMC) [LuxAlgo], script description, accessed 25 September 2026.
- TradingView community script – Smart Money Concept [TradingFinder], script description, accessed 25 September 2026.
- TradingView community script – Smart Money Concepts by WeloTrades, script description, accessed 25 September 2026.
- TradingView – Pine Script v6 reference: ta.pivothigh, accessed 25 September 2026.
- TradingView – Repainting: plotting in the past, accessed 25 September 2026.
- TradingView – Pine Script v6 reference: plotshape, accessed 25 September 2026.
- TradingView – Strategies: overfitting, accessed 25 September 2026.
- TradingView – Alerts, accessed 25 September 2026.
- PineConnector – Test your setup, accessed 25 September 2026.
- MetaQuotes – Basic principles: orders, deals and positions, accessed 25 September 2026.
- PineConnector – Frequently asked questions: price differences, accessed 25 September 2026.
PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.