SMCNexusFactsCoreV2SMCNexusFactsCoreV2 is an open-source, non-visual Pine Script library that maintains confirmed and bounded Smart Money Concepts market facts for use by importing indicators.
The library provides a stateful market-facts engine for swing structure, BOS, CHoCH, MSS, Fair Value Gaps, Order Blocks, liquidity pools, liquidity sweeps, Premium/Discount context and EMA-based context.
It does not draw chart objects, create inputs, request other timeframes, generate alerts, transmit data, calculate trade recommendations or place orders. The importing indicator supplies all chart series and decides how the returned facts are displayed or used.
ORIGINAL CONCEPT AND PURPOSE
The library maintains one consistent, confirmed market-state model instead of calculating unrelated labels independently.
Confirmed swing points become the shared source for:
• HH, HL, LH and LL classification,
• market bias,
• Break of Structure,
• Change of Character,
• Market Structure Shift,
• buy-side and sell-side liquidity pools,
• Premium and Discount dealing ranges.
Fair Value Gaps and Order Blocks use bounded lifecycle records. The library retains only a limited number of objects for each type and direction, preventing unbounded array growth.
Visual settings are not part of this library. An importing indicator can hide or show its own presentation without changing the underlying facts maintained by Facts Core.
CONFIRMED-ONLY PROCESSING
The importing indicator explicitly tells the library whether the current bar is confirmed.
Canonical state changes occur only when confirmed data is supplied. This includes:
• new swing confirmation,
• BOS or CHoCH confirmation,
• MSS confirmation,
• creation of FVG and Order Block facts,
• zone tests and mitigation,
• liquidity-pool creation and collection,
• sweep confirmation.
The library does not use future chart data, negative visual offsets to rewrite history or hidden lookahead requests.
MARKET STRUCTURE
The stateful swing engine stores the latest and previous confirmed swing highs and lows.
It classifies confirmed swings as:
• HH — Higher High
• HL — Higher Low
• LH — Lower High
• LL — Lower Low
The structure model tracks:
• latest swing prices,
• origin bars,
• swing types,
• current market bias,
• consumed structure levels,
• latest break type and direction,
• latest MSS direction and bar.
BOS AND CHOCH
A confirmed break can require a candle close beyond the structure level, depending on the supplied configuration.
The current market bias and the direction of the broken swing determine whether the event represents continuation or a Change of Character.
The library preserves the confirmed event level, direction, origin and confirmation bar in the returned snapshot.
MARKET STRUCTURE SHIFT
MSS can require:
• a confirmed close through structure,
• a previous opposite bias,
• a displacement candle,
• a minimum ATR-based displacement.
These requirements are provided through FactsConfiguration. The library does not silently relax a missing requirement.
FAIR VALUE GAPS
The library detects bullish and bearish three-candle imbalances from caller-supplied OHLC data.
Optional ATR filtering can require a minimum imbalance size.
Each FVG fact can contain:
• direction,
• upper and lower boundaries,
• origin bar and time,
• confirmation bar,
• mitigation state,
• invalidation state,
• test count,
• fill percentage,
• latest test bar,
• origin volume,
• origin average volume,
• origin Premium/Discount location,
• bounded strength,
• displacement confirmation.
ORDER BLOCKS
Order Block facts are created from a bounded lookback and can require a confirmed BOS or MSS.
The configuration controls whether candle bodies or full candle ranges define the zone.
Each Order Block uses the same auditable lifecycle metadata as an FVG, including origin, tests, fill, mitigation, invalidation, volume, relative volume context, strength and displacement confirmation.
ZONE LIFECYCLE
A zone can be:
• available,
• tested,
• partially filled,
• mitigated,
• invalidated.
The test counter and fill percentage are updated from confirmed interaction with the stored zone boundaries.
The library does not invent missing origin metadata. If a fact cannot be associated with a valid source, the unavailable value remains unavailable.
LIQUIDITY
The library maintains bounded arrays of confirmed swing-high and swing-low liquidity references.
It derives:
• BSL — Buy-Side Liquidity,
• SSL — Sell-Side Liquidity,
• EQH — Equal Highs,
• EQL — Equal Lows.
Equal-level classification uses the supplied ATR-based tolerance rather than exact floating-point equality.
Liquidity metadata includes:
• side and type,
• level,
• origin bar,
• collection state,
• collection time,
• sweep type and level.
A pool origin is preserved only when its price is genuinely associated with the originating swing. The library does not transfer unrelated swing metadata to a new liquidity level.
LIQUIDITY SWEEPS
Depending on configuration, a sweep can require price to move beyond the stored pool and close back inside it.
The returned snapshot distinguishes BSL and SSL sweep facts. A sweep is a confirmed market fact, not a BUY or SELL recommendation.
PREMIUM AND DISCOUNT
The library can build a dealing range from confirmed swing extremes.
The returned context can contain:
• range high,
• range low,
• equilibrium,
• current Premium, Discount or Equilibrium classification.
An unavailable or invalid range remains unavailable rather than using a synthetic fallback.
EMA AND CONTEXT FACTS
The importing indicator supplies the configured fast, medium and slow EMA values together with available higher-timeframe context.
Facts Core returns bounded contextual facts such as:
• EMA trend state,
• price relation to EMA values,
• available higher-timeframe trend and bias context.
The library does not request higher-timeframe data itself. This keeps data ownership and confirmation timing inside the importing indicator.
BOUNDED STATE
The implementation uses explicit limits:
• maximum six zones for each kind and direction,
• maximum eight swing references for each side.
This prevents unlimited state growth and makes runtime behavior predictable.
PUBLIC API
Exported records:
• FactsConfiguration
• ZoneFact
• FactsState
• StructureFacts
• ZoneFacts
• LiquidityFacts
• ContextFacts
• FactsSnapshot
Exported functions:
• contractVersion()
• defaultConfiguration()
• newState()
• advance(...)
• snapshotValid(...)
TYPICAL USAGE
An importing indicator should:
1. Create one persistent FactsState.
2. Create or resolve a FactsConfiguration.
3. Supply confirmed OHLCV, ATR, EMA and available context values to advance().
4. Store the returned state.
5. Read the returned FactsSnapshot.
6. Validate the snapshot with snapshotValid().
7. Present or transport only facts that are actually available.
Conceptual example:
```pine
import AreXoN_/SMCNexusFactsCoreV2/1 as facts
var facts.FactsState state = facts.newState()
facts.FactsConfiguration configuration =
facts.defaultConfiguration()
= facts.advance(
state,
configuration,
barstate.isconfirmed,
bar_index,
time,
open,
high,
low,
close,
volume,
atr14,
emaFast,
emaMedium,
emaSlow,
higherTimeframeTrend,
higherTimeframeBias,
localContext)
state := stateNext
bool validSnapshot = facts.snapshotValid(snapshot)
```
The example is conceptual. The exact function signature in the published source is authoritative. Replace the example import with the exact path assigned by PulseWire.
WHY THE CHART IS CLEAN
This is a non-visual market-facts library. It intentionally creates no plots, labels, boxes, lines, tables or chart drawings.
The publication chart is therefore intentionally clean and contains no other indicators or unexplained visual elements. An importing indicator is responsible for visual presentation.
LIMITATIONS
• Facts are based on the chart OHLCV series supplied by the importer.
• Swing confirmation necessarily occurs after the configured right-side bars.
• The library does not provide native bid/ask data, footprint or real order flow.
• Chart volume may be broker tick volume rather than centralized exchange volume.
• It does not verify spread, slippage or broker execution.
• It does not request macroeconomic information.
• It does not produce trading signals or recommendations.
• It does not place, modify or close orders.
• It produces no visual chart output by itself.
Contract version: 1.0.0.
This library is an analytical and software-development component. It is not investment advice, a trading recommendation or an automated trading system. Library

SMCNexusTradePlanCoreV2SMCNexusTradePlanCoreV2 is an open-source, non-visual Pine Script library for deterministic candidate-plan geometry.
The library receives already-detected market facts from an importing indicator and resolves candidate Entry, protective Stop Loss, real target clusters, risk-to-reward values, confluence and fail-closed plan validity.
It does not scan the chart independently, predict future prices, generate guaranteed signals, place orders or fabricate missing levels. The importing indicator remains responsible for detecting and confirming market structure, zones, liquidity, pivots and other market facts.
ORIGINAL CONCEPT AND PURPOSE
The library converts confirmed analytical facts into auditable candidate-plan geometry using fixed source priorities and strict validation rules.
Every Entry, Stop Loss and target must originate from a real level supplied by the importing indicator. Missing or contradictory information remains unavailable instead of being replaced with a synthetic price.
ENTRY RESOLUTION
The candidate direction is derived from the primary bias supplied by the importing indicator.
For a BUY candidate, the Entry zone is selected from the first available source in this fixed order:
1. Bullish Order Block
2. Bullish Fair Value Gap
3. Discount half of the current dealing range
4. S1 pivot
For a SELL candidate, the fixed order is:
1. Bearish Order Block
2. Bearish Fair Value Gap
3. Premium half of the current dealing range
4. R1 pivot
The candidate Entry is the midpoint of the selected zone. A single-price pivot remains a single-price zone.
The library does not search for the best historical result and does not reorder sources according to later price movement.
STOP LOSS RESOLUTION
Stop Loss candidates are checked using a fixed protective hierarchy.
For BUY candidates, a valid Stop Loss must be below Entry. For SELL candidates, it must be above Entry.
The available candidates are checked in this order:
1. Opposite-side liquidity level
2. Direction-matching Order Block edge
3. Dealing-range edge
4. Directional pivot
A candidate located on the wrong side of Entry is skipped without changing the priority of the remaining sources.
If no supplied level is directionally valid, Stop Loss remains unavailable. The library never creates a Stop Loss from a fixed percentage or an arbitrary distance.
REAL TARGET SELECTION
Targets must be genuine levels supplied by the importing indicator.
Possible sources may include:
• liquidity pools,
• opposing Order Blocks,
• opposing Fair Value Gaps,
• confirmed swing levels,
• pivots,
• Premium, Discount or Equilibrium levels.
The importing indicator owns one bounded TargetCandidate array and decides which confirmed levels are eligible.
Each candidate contains:
• real price,
• source identifier,
• origin type,
• stable origin key,
• confirmation bar,
• direction,
• active state.
Candidates located on the wrong side of Entry are rejected. The origin used for Entry or Stop Loss can also be excluded from the target collection.
TARGET CLUSTERING
Several analytical sources may describe practically the same price area. The library groups nearby candidates into separate clusters using a caller-provided distance.
The distance can be calculated from ATR using clusterDistance(). ATR controls cluster separation only. It never creates, moves or estimates a target price.
The nearest real representative from the first separate cluster becomes TP1. The nearest representative outside the TP1 cluster becomes TP2. The nearest representative outside the first two clusters becomes TP3.
Every selected target is therefore an actual price supplied by the importing indicator.
STABLE ORIGIN KEYS
The library provides helpers for creating auditable source identities:
• zoneKey(...)
• liquidityKey(...)
• swingKey(...)
• pdKey(...)
• pivotKey(...)
These keys help the importing indicator identify duplicate sources and prevent the same analytical object from being reused incorrectly.
FINAL VALIDATION
The final resolver calculates:
• risk distance,
• reward to TP1, TP2 and TP3,
• RR1, RR2 and RR3,
• candidate order type,
• latest structural confirmation,
• directional confluence,
• final sanity status.
The geometry must satisfy all required conditions:
• Entry and Stop Loss are available,
• Stop Loss is on the protective side of Entry,
• targets are on the correct side of Entry,
• targets are ordered nearest-to-farthest,
• required target data is complete.
Invalid geometry returns a specific fail-closed status instead of displaying an apparently valid plan.
PUBLIC API
Typed records:
• EntryResult
• TargetCandidate
• TargetSelection
• FinalResult
Exported functions:
• resolveEntry(...)
• sameLevel(...)
• zoneKey(...)
• liquidityKey(...)
• swingKey(...)
• pdKey(...)
• pivotKey(...)
• addCandidate(...)
• selectTargets(...)
• clusterDistance(...)
• riskDistance(...)
• resolveFinal(...)
INTENDED USE
The importing indicator should:
1. Detect and confirm its own structure, zones, liquidity and pivots.
2. Pass the current facts to resolveEntry().
3. Add only genuine eligible levels to one bounded candidate array.
4. Call selectTargets() using an explicit cluster distance.
5. Pass Entry, Stop Loss, targets and contextual facts to resolveFinal().
6. Display a candidate only when the returned validity state permits it.
Conceptual example:
```pine
import AreXoN_/SMCNexusTradePlanCoreV2/1 as plan
plan.EntryResult entry = plan.resolveEntry(
primaryBias,
bullishObActive, bullishObHigh, bullishObLow,
bearishObActive, bearishObHigh, bearishObLow,
bullishFvgActive, bullishFvgHigh, bullishFvgLow,
bearishFvgActive, bearishFvgHigh, bearishFvgLow,
dealingRangeValid, dealingRangeHigh, dealingRangeLow,
equilibrium,
pivotS1Available, pivotS1,
pivotR1Available, pivotR1,
lastSsl, lastBsl)
array candidates =
array.new()
// Add only confirmed real levels detected by the importing indicator.
float distance = plan.clusterDistance(atrValue, 0.55)
plan.TargetSelection targets =
plan.selectTargets(
candidates,
entry.isBuy ? 1 : -1,
distance)
```
The example import path should be replaced with the exact path assigned by PulseWire after publication.
WHY THE CHART IS CLEAN
This is a non-visual calculation library. It intentionally creates no plots, labels, tables, lines or boxes.
The publication chart is therefore intentionally clean and contains no additional indicators, drawings or unexplained visual elements. Visual presentation is the responsibility of an importing indicator.
LIMITATIONS
• The result depends entirely on the confirmed facts supplied by the importing indicator.
• It is a mechanical analytical candidate, not a recommendation.
• It cannot verify live spread, slippage, broker StopLevel or execution rules.
• It does not provide native bid/ask order flow.
• It does not place, modify or close orders.
• Missing real levels produce an incomplete result by design.
• Risk-to-reward values describe supplied geometry and do not predict outcome.
• It produces no chart output by itself.
This library is an analytical and software-development component. It is not investment advice, a trading recommendation or an automated trading system. Library

SMCNexusConfigurationCoreV2SMCNexusConfigurationCoreV2 is an open-source, non-visual Pine Script library for resolving deterministic indicator configuration profiles and bounded visibility settings.
The library separates pure configuration decisions from market detection, chart state and presentation code. It does not generate signals, place orders or draw objects.
The importing indicator supplies its saved manual settings, chart timeframe and supported-symbol state. The library returns typed effective configuration records without calling input functions, requesting external timeframes or changing the importing script's saved settings.
ORIGINAL CONCEPT AND PURPOSE
The library implements three explicit configuration modes:
• MANUAL — preserves every value supplied by the importing indicator.
• AUTO — applies an exact predefined profile only when the supplied symbol and timeframe combination is explicitly supported.
• HYBRID — applies automatic values only to individually selected categories while preserving manual values for all other categories.
The implementation does not use nearest-timeframe guessing. An unsupported symbol or timeframe falls back to the supplied manual settings.
Detection parameters and visual settings are resolved separately. This prevents a visibility option from unintentionally disabling the underlying analytical calculation. For example, hiding a market-structure label does not remove the structure state used elsewhere by the importing indicator.
SUPPORTED PROFILE CONTEXT
The profile resolver distinguishes exact chart timeframes:
• M1
• M5
• M15
• M30
• H1
• H4
• D1
• W1
The importing indicator decides whether the current symbol is supported. If the symbol or timeframe is unsupported, the automatic profile is not applied.
CONFIGURATION CATEGORIES
The resolved configuration includes separate categories for:
• swing structure,
• Market Structure Shift requirements,
• Fair Value Gap parameters,
• Order Block parameters,
• liquidity and sweep parameters,
• volume-profile range settings,
• structure visibility,
• zone visibility,
• liquidity and Premium/Discount visibility,
• EMA, pivot and volume-marker visibility,
• panel and Trade Plan visibility,
• trendline and volume-profile visibility.
ADAPTIVE GRID RESOLUTION
The library also contains a bounded adaptive-grid resolver for importing scripts that build a volume-profile approximation.
The resolver receives:
• the manual tick floor,
• the instrument minimum tick,
• the current range low and high,
• the requested target number of bins.
It calculates:
• whether the result is valid,
• effective ticks per bin,
• effective bin size,
• maximum permitted span,
• actual span in ticks,
• applied scale.
The effective tick step is never lower than the supplied manual floor. The resolver increases the step using a power-of-two scale when the requested price span would exceed the bounded target. Invalid or incomplete inputs return an unavailable result instead of an invented value.
PUBLIC API
Typed result records:
• ProfileContext
• CoreConfiguration
• StructureVisibility
• ZoneVisibility
• ContextVisibility
• OverlayVisibility
• PanelVisibility
• AuxiliaryVisibility
• AdaptiveGridResolution
Exported resolvers:
• resolveAdaptiveGrid(...)
• resolveProfileContext(...)
• resolveCoreConfiguration(...)
• resolveStructureVisibility(...)
• resolveZoneVisibility(...)
• resolveContextVisibility(...)
• resolveOverlayVisibility(...)
• resolvePanelVisibility(...)
• resolveAuxiliaryVisibility(...)
INTENDED USE
An importing indicator first creates a ProfileContext. It then passes that context together with its saved manual settings to the required resolver.
Conceptual example:
```pine
import AreXoN_/SMCNexusConfigurationCoreV2/1 as config
config.ProfileContext profile = config.resolveProfileContext(
configurationMode,
supportedSymbol,
timeframe.period,
autoStructure,
autoMss,
autoFvg,
autoOb,
autoLiquidity,
autoVolumeProfile,
autoVisibility)
config.CoreConfiguration effective = config.resolveCoreConfiguration(
profile,
manualSwingLeft,
manualSwingRight,
manualRequireCloseBreak,
manualRequireOppositeBias,
manualRequireDisplacement,
manualDisplacementAtr,
manualFvgCount,
manualFvgAtrFilter,
manualFvgAtrSize,
manualObCount,
manualObLookback,
manualObStructureRequirement,
manualObBodyMode,
manualLiquidityLookback,
manualEqualLevelTolerance,
manualSweepCloseBack,
manualProfileMode,
manualProfileBars)
```
The example import path should be replaced with the exact path assigned by PulseWire after publication.
WHY THE CHART IS CLEAN
This is a non-visual configuration library. It intentionally creates no plots, labels, tables, lines or boxes.
The publication chart is therefore intentionally clean and contains no additional indicators, drawings or unexplained visual elements. An importing indicator is responsible for presenting the resolved settings.
LIMITATIONS
• Automatic profiles are applied only to exact supported combinations.
• The library does not optimize settings or claim that a profile is profitable.
• It does not independently inspect a symbol or identify a broker feed.
• It does not read live market data.
• It does not preserve state between executions.
• It does not place, modify or close orders.
• It produces no chart output by itself.
This library is a reusable software-development component. It is not investment advice, a trading signal or an automated trading system. Library

SMCNexusScoringCoreV2SMCNexusScoringCoreV2 is an open-source, non-visual Pine Script library that calculates a deterministic Smart Money Concepts evidence score from market facts supplied by an importing indicator.
The library does not independently read chart state, request other timeframes, generate trading signals, place orders or draw chart objects. Its purpose is to separate the scoring calculation from detection and presentation code, making every component reusable and independently auditable.
ORIGINAL CONCEPT AND PURPOSE
The library combines twelve bounded Smart Money Concepts evidence components into one normalized 0–100 result while retaining each individual component in the returned ScoreResult record.
It also provides optional event-age decay for selected structural evidence. This prevents an old BOS, CHoCH, MSS or liquidity sweep from retaining the same influence indefinitely.
The importing indicator is responsible for detecting and confirming market events. This library receives those facts through typed parameters and performs deterministic calculations only. It does not infer missing events or substitute unknown data.
CALCULATION METHOD
The twelve components are:
1. Market Structure Shift
2. Break of Structure
3. Change of Character
4. Fair Value Gap
5. Order Block
6. Liquidity context
7. Liquidity sweep
8. Premium or Discount location
9. Volume state
10. Momentum state
11. Local Smart Money context
12. Primary trend
Each component contributes a bounded value based on the supplied state. The component total is divided by twelve and normalized to a value from 0 to 100.
The resulting descriptive classes are:
• VERY WEAK
• WEAK
• NEUTRAL
• STRONG
• ELITE
These classes describe the supplied analytical evidence. They are not trading recommendations and do not predict future performance.
AGE DECAY
When age decay is enabled, the selected structural and sweep components use a linear age factor.
The factor:
• remains at 1.0 until the configured full-strength age,
• decreases linearly between the full-strength and zero-strength ages,
• reaches 0.0 at or beyond the configured zero-strength age.
If the supplied age window is invalid, the calculation fails safely to full strength instead of producing a negative or undefined weight.
PUBLIC API
ScoreResult
The returned record contains:
• all twelve effective components,
• effective MSS age factor,
• effective BOS/CHoCH age factor,
• effective sweep age factor,
• component total,
• normalized score,
• descriptive class,
• compact text representation.
calculate(...)
This function accepts typed, confirmed market facts and returns one ScoreResult record.
INTENDED USE
An importing indicator should:
1. Detect and confirm its own market-structure events.
2. Determine its current FVG, Order Block, liquidity, volume, momentum and trend states.
3. Pass those facts to calculate().
4. Read the normalized result or inspect the individual returned components for a complete breakdown.
Conceptual example:
```pine
import AreXoN_/SMCNexusScoringCoreV2/1 as scoring
scoring.ScoreResult result = scoring.calculate(
scoringEnabled,
ageDecayEnabled,
bar_index,
lastMssBar,
lastBreakBar,
lastSweepBar,
structureFullStrengthBars,
structureZeroStrengthBars,
sweepFullStrengthBars,
sweepZeroStrengthBars,
mssDirection,
breakType,
breakDirection,
fvgType,
fvgMitigated,
obType,
obMitigated,
liquidityContext,
sweepType,
premiumDiscountZone,
volumeState,
momentumState,
smartMoneyState,
primaryTrendState)
```
The example import path should be replaced with the exact path assigned by PulseWire after publication.
WHY THE CHART IS CLEAN
This is a non-visual calculation library. It intentionally creates no plots, labels, tables, lines or boxes. Visual output is the responsibility of an importing indicator.
The publication chart is therefore intentionally clean and contains no additional indicators or unexplained drawings.
LIMITATIONS
• Output quality depends on the facts supplied by the importing indicator.
• The library does not independently verify market events.
• It does not provide native bid/ask order flow or broker execution data.
• It does not account for spread, slippage or broker restrictions.
• It does not place, modify or close orders.
• It produces no chart output by itself.
• A score or class is not a guarantee of future market behavior.
This library is an analytical and software-development component. It is not investment advice or an automated trading system. Library

TVA_MathLibraryLibrary "TVA_MathLibrary"
f_htfBundle(tf)
Parameters:
tf (simple string)
f_htfBias(c, e20, e50, e200, r, atrv, adxv)
Parameters:
c (float)
e20 (float)
e50 (float)
e200 (float)
r (float)
atrv (float)
adxv (float)
f_stdTrendScore(c, e20, e50, e200, r, adxv)
Parameters:
c (float)
e20 (float)
e50 (float)
e200 (float)
r (float)
adxv (float)
f_confirmationScore(setupDir, biasW, biasD, bias4H, bias1H)
Parameters:
setupDir (int)
biasW (float)
biasD (float)
bias4H (float)
bias1H (float)
f_confluenceScore(alignmentPct, momentumConverge, adxv, volatilityCtx, volumeConfirm)
Parameters:
alignmentPct (float)
momentumConverge (float)
adxv (float)
volatilityCtx (float)
volumeConfirm (float)
f_buyProbability(baseBullPct, c, e20, e50, e200, r, macdHist, macdHistPrev, vol, volEma20, distToSupportATR, adxv, adxRising)
Parameters:
baseBullPct (float)
c (float)
e20 (float)
e50 (float)
e200 (float)
r (float)
macdHist (float)
macdHistPrev (float)
vol (float)
volEma20 (float)
distToSupportATR (float)
adxv (float)
adxRising (bool)
f_sellProbability(baseBearPct, c, e20, e50, e200, r, macdHist, macdHistPrev, vol, volEma20, distToResistATR, adxv, adxFallingDown)
Parameters:
baseBearPct (float)
c (float)
e20 (float)
e50 (float)
e200 (float)
r (float)
macdHist (float)
macdHistPrev (float)
vol (float)
volEma20 (float)
distToResistATR (float)
adxv (float)
adxFallingDown (bool)
f_marketRegime(adxv, efficiencyRatio, atr20, atr50, bbWidth, bbWidthEma20)
Parameters:
adxv (float)
efficiencyRatio (float)
atr20 (float)
atr50 (float)
bbWidth (float)
bbWidthEma20 (float)
f_chopIndex(adxv, diPlus, diMinus, efficiencyRatio, bbWidth, bbWidthEma20)
Parameters:
adxv (float)
diPlus (float)
diMinus (float)
efficiencyRatio (float)
bbWidth (float)
bbWidthEma20 (float)
f_volatilityClass(atrPercentile, histVolPercentile, trExpansionRatio, bbWidthPercentile)
Parameters:
atrPercentile (float)
histVolPercentile (float)
trExpansionRatio (float)
bbWidthPercentile (float)
f_emaSmooth2(src)
Parameters:
src (float)
f_scoreColor(score, highIsGood)
Parameters:
score (float)
highIsGood (bool)
f_gaugeText(score, label)
Parameters:
score (float)
label (string)
f_alignmentBar(pct)
Parameters:
pct (float) Library

KC Institutional Core LibraryKC Institutional Core Library v1.0
KCInstitutionalCore is a reusable Pine Script v6 utility library created to support structured technical-analysis workflows without duplicating common helper logic across multiple indicators and strategies.
The library provides transparent and independently reusable functions for:
Score normalization and trade-quality grading
Premium, Discount and Equilibrium classification
Risk-to-reward calculation
Risk-based position-size estimation
Timeframe-aware trading-style classification
Adaptive higher-timeframe selection
Directional alignment analysis
Execution-blocker identification
The exported functions are deterministic utilities. They do not generate guaranteed trading signals, predict future price movement or execute trades.
Basic import example
import Kelly_Carter12/KCInstitutionalCore/1 as kc
string grade = kc.scoreToGrade(78)
string style = kc.tradeStyle(timeframe.in_seconds())
= kc.rangeLocation(close, ta.highest(high, 50), ta.lowest(low, 50))
The detailed function documentation below explains every exported function, parameter and return value.
Library "KCInstitutionalCore"
Reusable Pine Script v6 utilities for timeframe context, score grading, premium/discount classification, alignment, risk-to-reward and position-size calculations. Designed as a transparent helper library for indicators and strategies.
clamp(value, minimum, maximum)
Restricts a numeric value to the supplied minimum and maximum boundaries.
Parameters:
value (float) : Value to restrict.
minimum (float) : Lower boundary.
maximum (float) : Upper boundary.
Returns: The restricted value.
scoreToGrade(score)
Converts a numeric score into a concise quality grade.
Parameters:
score (float) : Score expressed on a 0–100 scale.
Returns: A grade string from AA to D.
normalizeScore(rawScore, maximumScore)
Normalizes a raw score to a 0–100 scale.
Parameters:
rawScore (float) : Current raw score.
maximumScore (float) : Maximum possible raw score.
Returns: Normalized score from 0 to 100, or na when maximumScore is not positive.
rangeLocation(price, rangeHigh, rangeLow)
Classifies the current price inside a supplied dealing range.
Parameters:
price (float) : Current or evaluated price.
rangeHigh (float) : Upper boundary of the range.
rangeLow (float) : Lower boundary of the range.
Returns: A tuple containing PREMIUM, DISCOUNT, or EQUILIBRIUM and the 0–100 range percentage.
riskReward(entry, stop, target)
Calculates reward-to-risk from entry, stop and target prices.
Parameters:
entry (float) : Entry price.
stop (float) : Stop-loss price.
target (float) : Target price.
Returns: Absolute reward-to-risk ratio, or na when the stop distance is zero.
positionSize(accountSize, riskPercent, entry, stop, pointValue)
Estimates position size from account risk and stop distance.
Parameters:
accountSize (float) : Account balance or planning capital.
riskPercent (float) : Percentage of account risked.
entry (float) : Entry price.
stop (float) : Stop-loss price.
pointValue (float) : Monetary value per price point for one unit.
Returns: Estimated units or lots according to the supplied pointValue, or na for invalid inputs.
tradeStyle(chartSeconds)
Maps chart duration in seconds to a general planning style.
Parameters:
chartSeconds (float) : Chart timeframe duration in seconds, normally supplied with timeframe.in_seconds().
Returns: SCALP, INTRADAY, SWING, or POSITION.
adaptiveTimeframes(chartSeconds)
Suggests two broader context timeframes from the chart duration.
Parameters:
chartSeconds (float) : Chart timeframe duration in seconds, normally supplied with timeframe.in_seconds().
Returns: A tuple containing primary and secondary context timeframe strings.
alignmentState(localBias, htfBias, mtfBias)
Summarizes local, higher-timeframe and multi-timeframe directional agreement.
Parameters:
localBias (int) : Local direction: 1 bullish, -1 bearish, 0 neutral.
htfBias (int) : Higher-timeframe direction: 1 bullish, -1 bearish, 0 neutral.
mtfBias (int) : Broader alignment direction: 1 bullish, -1 bearish, 0 neutral.
Returns: BULL ALIGNED, BEAR ALIGNED, PARTIAL, CONFLICT, or NEUTRAL.
executionBlocker(direction, htfBias, mtfBias, location, structureConfirmed, liquidityConfirmed, newsBlocked)
Returns the first material execution blocker in a transparent priority order.
Parameters:
direction (int) : Intended direction: 1 long, -1 short, 0 neutral.
htfBias (int) : Higher-timeframe direction: 1 bullish, -1 bearish, 0 neutral.
mtfBias (int) : Multi-timeframe direction: 1 bullish, -1 bearish, 0 neutral.
location (string) : PREMIUM, DISCOUNT, or EQUILIBRIUM.
structureConfirmed (bool) : True when the required structure event is confirmed.
liquidityConfirmed (bool) : True when the required liquidity event is confirmed.
newsBlocked (bool) : True when a manual news blackout is active.
Returns: A concise blocker description, or CLEAR when no listed blocker is active. Library

FractalMemoryLib [Jayadev Rana]FractalMemoryLib packages the pattern-memory engine used by the Fractal Memory Projection indicator and the Fractal Memory Strategy so any script can import it.
WHAT IT DOES
The library finds the historical window whose movement shape most resembles the most recent bars (mean squared distance between stdev-normalized log returns), replays what followed that window as a projected close path, and sizes stops and targets adaptively by volatility regime.
EXPORTED FUNCTIONS
logRet(src) - one-bar log return of a series.
bestMatch(src, winLen, scanDepth, gapAhead) - scans up to scanDepth bars back and returns the offset of the most similar window plus a 0-100 similarity score. gapAhead reserves bars after the match for a projection.
analogPath(src, offset, fcLen, scaleF) - array of fcLen projected closes built by replaying the returns that followed the match, rescaled by scaleF (for example current ATR over ATR at the match).
adaptiveR(atrLen, rankLen, base) - volatility-adaptive unit risk: ATR times (base plus its 0-1 percentile rank), plus the rank itself. Call on every bar.
volRegime(volRank) - "Low", "Normal" or "High" label from the rank.
targets(entry, dirSign, unitR, slMult) - stop loss and TP1/TP2/TP3 at 1R, 2R and 3R.
USAGE NOTES
Call adaptiveR on every bar for ta consistency. bestMatch and analogPath are loop-heavy; for display purposes call them on the last bar only, and make sure the chart has at least scanDepth plus gapAhead bars of history. When the library itself is added to a chart it draws a small demo projection line from the best analog.
The analog projection is a statistical reference to a similar past episode, not a prediction, and not financial advice. Library

PatternHelpersLibrary "PatternHelpers"
method update(atr, h, l, c, period)
Namespace types: WilderAtr
Parameters:
atr (WilderAtr)
h (float)
l (float)
c (float)
period (int)
method push(buf, o, h, l, c, t, idx, max_len)
Namespace types: CandleBuffer
Parameters:
buf (CandleBuffer)
o (float)
h (float)
l (float)
c (float)
t (int)
idx (int)
max_len (int)
method gap_candles(buf, prev_end_idx, next_start_idx)
Namespace types: CandleBuffer
Parameters:
buf (CandleBuffer)
prev_end_idx (int)
next_start_idx (int)
quantile_rail(vals, upper)
Parameters:
vals (array)
upper (bool)
has_acceptable_coverage(values, upper_bounds, lower_bounds)
Parameters:
values (array)
upper_bounds (array)
lower_bounds (array)
has_acceptable_coverage_const(values, upper, lower)
Parameters:
values (array)
upper (float)
lower (float)
has_low_directional_drift(closes, upper, lower)
Parameters:
closes (array)
upper (float)
lower (float)
has_balanced_rotation(values, shape_width)
Parameters:
values (array)
shape_width (float)
has_no_dominant_run(values, shape_width)
Parameters:
values (array)
shape_width (float)
ols_regression(y, x, origin_x)
Parameters:
y (array)
x (array)
origin_x (int)
residual_rail(highs_or_lows, indices, intercept, slope, origin_idx, upper)
Parameters:
highs_or_lows (array)
indices (array)
intercept (float)
slope (float)
origin_idx (int)
upper (bool)
WilderAtr
Fields:
prev_close (series float)
atr_val (series float)
count (series int)
CandleBuffer
Fields:
opens (array)
highs (array)
lows (array)
closes (array)
times (array)
indices (array)
start_idx (series int) Library

Library

Library

Library

Library

Library

AssetCorrelationUtilsAssetCorrelationUtils
Auto-detection library for correlated asset pairings across futures, CFD, and crypto markets. Given any chart, returns the correct secondary and tertiary (and optionally quaternary) tickers for multi-asset divergence analysis, along with inversion flags and asset-category metadata.
Designed to eliminate the boilerplate of hardcoded ticker lists and manual "if EURUSD then GBPUSD" branching in every indicator that needs correlated data.
What it does
Consumer scripts call one function — resolveCurrentChart() — and receive a fully resolved AssetConfig object describing the current chart's correlated pair or triad. The library handles:
Symbol root extraction from full ticker IDs (with expiry suffixes, exchange prefixes, micro variants)
Asset category routing (futures / CFD / crypto branches)
Family-specific triad or dyad selection
Inversion detection (e.g. 6C inverse of USDCAD, DXY inverse of EUR/GBP)
Futures session and back-adjustment modifiers
Optional GXT mode for metals (currency-cross triads on Gold/Silver)
Optional Quad mode for metals (four-leg configurations)
Micro contracts always resolve to their higher-volume full-size correlated partners — MNQ correlates against ES/YM, not MES/MYM — matching the "trade the micros, read the majors" convention.
Supported asset classes
Futures
Indices: NQ, ES, YM, RTY + micros (MNQ, MES, MYM, M2K)
Metals: GC, SI, HG + micros (MGC, SIL, MHG)
Forex: 6E, 6B, 6A, 6N, 6C + micros (M6E, M6B, M6A, M6C)
Energy: CL, RB, HO + micros (MCL, MRB, MHO)
Treasury: ZB, ZF, ZN
Crypto: BTC, ETH + micros (MBT, MET)
CFD / Spot
Forex: EURUSD, GBPUSD, DXY, USDJPY, USDCHF, USDCAD
Metals: XAUUSD, XAGUSD, COPPER + cross-pairs (XAUEUR, XAUGBP, XAGEUR, XAGGBP)
Indices: NAS100, SP500, DJ30
EU Stocks: GER40, EU50 (dyad only)
Crypto (spot / perp)
Major: BTC, ETH, SOL, XRP
Alt: ZEC, DOGE, ADA, BNB, TAO
All routed via BINANCE perpetual (.P) pairs for consistent OHLC quality
Core functions
resolveCurrentChart(gxtMode = false, quadMode = false)
The one-liner entry point for most consumers. Wraps resolveAssets() with sensible defaults (uses syminfo.ticker, syminfo.tickerid, syminfo.type, syminfo.session, back-adjustment on).
resolveAssets(ticker, tickerId, assetType, session, useBackadjust, gxtMode, quadMode)
The full-control entry point. Same detection logic, but with explicit control over back-adjustment and session modification — useful for indicators with a strategy toggle (e.g. RTH vs ETH sessions).
Category detectors
detectIndicesFutures(ticker)
detectMetalsFutures(ticker) / detectMetalsFuturesGxt(ticker) / detectMetalsFuturesQuad(ticker)
detectForexFutures(ticker) / detectCADFutures(ticker)
detectEnergyFutures(ticker)
detectTreasuryFutures(ticker)
detectCryptoFutures(ticker)
detectForexCFD(ticker, tickerId)
detectCrypto(ticker, tickerId)
detectMetalsCFD(ticker, tickerId) / detectMetalsCFDGxt(ticker, tickerId) / detectMetalsCFDQuad(ticker, tickerId)
detectIndicesCFD(ticker, tickerId)
detectEUStocks(ticker, tickerId)
Each returns an AssetPairing — usable directly if you want to bypass the automatic category routing.
Resolution helpers
resolveTriad(chartTickerId, pairing) — returns primary + secondary + tertiary with inversion flags
resolveDyad(chartTickerId, pairing) — returns primary + secondary for two-asset configs
resolveQuad(chartTickerId, pairing) — returns four-asset config with inversion flags
Utility functions
applySessionModifierWithBackadjust(ticker, session) / applySessionModifierNoBackadjust(ticker, session) — apply ticker.modify with back-adjustment on or off
isTriadMode(pairing) — check whether a pairing has a valid tertiary
getAssetTicker(tickerId) — extract the clean ticker string from a full ticker ID
Fallback
getDefaultFallback(tickerId) — returns a pairing with the chart ticker as primary and empty secondaries. Used automatically when no category matches.
Return types
AssetConfig
detected (bool) — true if the chart asset was recognized
isTriadMode (bool) — true if 3 assets resolved, false for dyad
isQuadMode (bool) — true if 4 assets resolved
primary (string) — resolved primary ticker ID
secondary (string) — resolved secondary ticker ID
tertiary (string) — resolved tertiary ticker ID (empty for dyad)
quaternary (string) — resolved quaternary ticker ID (empty unless quad mode)
invertSecondary (bool)
invertTertiary (bool)
invertQuaternary (bool)
assetCategory (string) — category tag (e.g. "index_futures", "metal_cfd_gxt")
AssetPairing
Internal pairing structure used by detector functions. Consumers rarely construct this directly, but resolveTriad / resolveDyad / resolveQuad accept it if you're bypassing the auto-routing.
Quick start
import I_quacker_I/AssetCorrelationUtils/7 as AC
AC.AssetConfig config = AC.resolveCurrentChart()
string secondary = config.secondary
string tertiary = config.tertiary
bool inv2 = config.invertSecondary
bool inv3 = config.invertTertiary
bool detected = config.detected
For metals with currency-cross triads:
AC.AssetConfig config = AC.resolveCurrentChart(true)
// On Gold: secondary = "FOREXCOM:XAUEUR", tertiary = "FOREXCOM:XAUGBP"
// On Copper or non-metals: identical to resolveCurrentChart(false)
Full integration patterns (Off / Auto / Manual tri-state, explicit back-adjust control, and manual pairing) are documented inline in the library source.
Design notes
Robust ticker matching. All detectors use str.contains() on the root symbol, so any ticker format is recognized — bare (NQ), continuous (NQ1!), or dated with expiry (NQZ2025). Exchange prefixes are ignored during detection.
Consistent inversion semantics. DXY as the third leg of USD-base forex triads is marked inverted (rises when the pair falls). 6C as USDCAD's futures counterpart is fully inverted. Micros carry their parent's inversion flags unchanged.
Category tags. Every resolved AssetConfig carries an assetCategory string ("index_futures", "metal_cfd_gxt", "crypto", "fallback", etc.). Useful for consumer scripts that want to conditionally enable features per category (e.g. "only compute GXT confluence on metals").
Fallback safety. When no category matches, the library returns the chart ticker as primary with empty secondary / tertiary, detected = false, and assetCategory = "fallback". Consumer scripts should check detected before assuming correlated data is available.
Credits
Original library concept — @fstarcapital
Modifications and extensions — @I_quacker_I
Crypto remapped to BINANCE .P perpetuals
Micro contracts always correlate against higher-volume mini/full contracts
AUD/NZD forex futures family (6A, M6A, 6N)
GXT mode for metals (currency-cross triads)
Quad mode for four-leg metal configurations
Crypto tertiary swapped from TOTAL3 (market-cap index, no clean OHLC) to XRP (tradeable asset with proper sweep behavior)
License: Mozilla Public License 2.0 Library

Library

OhMyHtfLibraryLibrary "OhMyHtfLibrary"
HTF candle platform: timeframe alignment, profiles, and (future) packed OHLC / draw helpers. Import as `import daggerok/OhMyHtfLibrary/1 as omhl`. Sweep/OB domain → future `OhMyHtfSweepLibrary` (`omhsl`).
resolveHtfContext(chart_tf_seconds, default_htf, default_candle_count, align_ctf_max_seconds, align_htf, align_enabled, profile_ctf_exact_seconds, profile_htf, profile_enabled, profile_candle_counts)
Resolves HTF string, enable flag, and candle count from Timeframes Alignment + Profiles.
TFA: first alignment row where `chart_tf_seconds <= align_ctf_max_seconds ` wins.
Profiles: first enabled row where `chart_tf_seconds == profile_ctf_exact_seconds ` overrides TFA.
Parameters:
chart_tf_seconds (int) : Chart timeframe in seconds.
default_htf (string) : Fallback HTF when no alignment rule matches.
default_candle_count (int) : Default HTF candle count (HTF Candles input).
align_ctf_max_seconds (array) : Upper-bound CTF seconds per TFA row (length 14).
align_htf (array) : HTF string per TFA row.
align_enabled (array) : Enabled flag per TFA row.
profile_ctf_exact_seconds (array) : Exact chart TF seconds per profile row (length 12).
profile_htf (array) : HTF string per profile row.
profile_enabled (array) : Profile row enabled flags.
profile_candle_counts (array) : Candle count per profile row.
Returns: `HtfContext` with resolved settings.
HtfContext
Resolved HTF timeframe settings for the current chart.
Fields:
htf (series string) : Higher timeframe string for `request.security` and draw logic.
is_enabled (series bool) : Whether HTF features are active for this chart TF (TFA enable flag or profile override).
candle_count (series int) : Number of HTF candles to display (profile may override default).
profile_override (series bool) : True when a profile row matched (exact CTF). Library

Library

lib_fvgLibrary "lib_fvg"
Fair Value Gap engine — detection, testing/inversion lifecycle, HTF nesting filters, entry-candidate selection, stop-loss derivation, and FVG drawing — extracted 1:1 from rewrite_strategy.pine.
method equals(this, other)
Namespace types: FVG
Parameters:
this (FVG)
other (FVG)
method remove(this, item)
Namespace types: array
Parameters:
this (array)
item (FVG)
method check_nested_in(this, htf_fvg, check_nested, check_untested, check_nearby, nearby_threshold, check_newer_ltf)
Namespace types: FVG
Parameters:
this (FVG)
htf_fvg (FVG)
check_nested (bool)
check_untested (bool)
check_nearby (bool)
nearby_threshold (float)
check_newer_ltf (bool)
method distance_to_price_post_inverse(this, price)
Namespace types: FVG
Parameters:
this (FVG)
price (float)
method is_higher_tf_or_closer_to_price_than(this, other)
Namespace types: FVG
Parameters:
this (FVG)
other (FVG)
method get_stop_loss(this, entry_price, session_extreme, enable_sl_at_fvg_created_swing_point, trail_session_level_tight_threshold)
Namespace types: FVG
Parameters:
this (FVG)
entry_price (float)
session_extreme (float)
enable_sl_at_fvg_created_swing_point (bool)
trail_session_level_tight_threshold (float)
method delete_bar(this)
Namespace types: Bar
Parameters:
this (Bar)
method delete_fvg(this)
Namespace types: FVG
Parameters:
this (FVG)
log_entry_rejection(enable_log, fvg, reason, smt, note)
Parameters:
enable_log (bool)
fvg (FVG)
reason (series EntryFilterReason)
smt (SMT type from Danieltrade29292/lib_smt/1)
note (string)
method invalidate_fvg(this, fvg, reason, entry_block_reason, lifecycle)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
fvg (FVG)
reason (series FVGFilterReason)
entry_block_reason (series EntryFilterReason)
lifecycle (series FVGLifecycle)
method add_fvg(this, fvg, enable_single_fvg_per_tf)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
fvg (FVG)
enable_single_fvg_per_tf (bool)
method detect_fvg(this, tf, tf_id, t2, h2, l2, h1, l1, h0, l0, min_gap_size, fvg_deprecation_period, enable_single_fvg_per_tf)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
tf (string)
tf_id (int)
t2 (int)
h2 (float)
l2 (float)
h1 (float)
l1 (float)
h0 (float)
l0 (float)
min_gap_size (float)
fvg_deprecation_period (int)
enable_single_fvg_per_tf (bool)
method invalidate_all_of_direction(this, fvg_is_bullish, reason)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
fvg_is_bullish (bool)
reason (series FVGFilterReason)
method invalidate_fvgs_inversed_pre_smt(this, smt_buffer, enable_log)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
smt_buffer (SMTBuffer type from Danieltrade29292/lib_smt/1)
enable_log (bool)
method try_park_in(this, htf_pool, check_nested, check_untested, check_nearby, nearby_threshold, check_newer_ltf)
Namespace types: FVG
Parameters:
this (FVG)
htf_pool (array)
check_nested (bool)
check_untested (bool)
check_nearby (bool)
nearby_threshold (float)
check_newer_ltf (bool)
method update_htf_relations(this, enable_filter_by_full_nest_in_HTF_fvg, enable_filter_by_untested, enable_filter_by_edge_nearby_HTF_fvg, nearby_HTF_threshold, enable_filter_by_newer_LTF_fvg)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
enable_filter_by_full_nest_in_HTF_fvg (bool)
enable_filter_by_untested (bool)
enable_filter_by_edge_nearby_HTF_fvg (bool)
nearby_HTF_threshold (float)
enable_filter_by_newer_LTF_fvg (bool)
method update_fvgs(this, tf2, tf2_updated, fvg2_o, fvg2_h, fvg2_l, fvg2_c, tf3, tf3_updated, fvg3_o, fvg3_h, fvg3_l, fvg3_c, tf4, tf4_updated, fvg4_o, fvg4_h, fvg4_l, fvg4_c, min_inversion_distance, max_inversion_distance, tested_by_mode, max_tests_before_inverse)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
tf2 (string)
tf2_updated (bool)
fvg2_o (float)
fvg2_h (float)
fvg2_l (float)
fvg2_c (float)
tf3 (string)
tf3_updated (bool)
fvg3_o (float)
fvg3_h (float)
fvg3_l (float)
fvg3_c (float)
tf4 (string)
tf4_updated (bool)
fvg4_o (float)
fvg4_h (float)
fvg4_l (float)
fvg4_c (float)
min_inversion_distance (float)
max_inversion_distance (float)
tested_by_mode (series FVGTestedByMode)
max_tests_before_inverse (int)
method find_next_best_waiting_fvgs(this, smt_buffer)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
smt_buffer (SMTBuffer type from Danieltrade29292/lib_smt/1)
method find_entry_candidate_fvg(this, smt_buffer, enable_filter_by_inversion_bar_close_in_untested_HTF_fvg, enable_log)
Namespace types: FVGBuffer
Parameters:
this (FVGBuffer)
smt_buffer (SMTBuffer type from Danieltrade29292/lib_smt/1)
enable_filter_by_inversion_bar_close_in_untested_HTF_fvg (bool)
enable_log (bool)
method draw_bar(this, is_bullish, bgcolor, border_color, labelcolor, txt, show_box)
Namespace types: Bar
Parameters:
this (Bar)
is_bullish (bool)
bgcolor (color)
border_color (color)
labelcolor (color)
txt (string)
show_box (bool)
method draw_fvg(this, color_bull, color_bear, debug)
Namespace types: FVG
Parameters:
this (FVG)
color_bull (color)
color_bear (color)
debug (bool)
method draw_fvgs(this, color_bull, color_bear, debug)
Namespace types: array
Parameters:
this (array)
color_bull (color)
color_bear (color)
debug (bool)
method draw_entry_fvg(this, color_bull, color_bear, debug)
Namespace types: FVG
Parameters:
this (FVG)
color_bull (simple color)
color_bear (simple color)
debug (bool)
method delete_fvgs(this)
Namespace types: array
Parameters:
this (array)
Bar
Fields:
o (series float)
h (series float)
l (series float)
c (series float)
top (series float)
btm (series float)
t_open (series int)
i_open (series int)
t_close (series int)
i_close (series int)
bar_box (series box)
bar_label (series label)
FVG
Fields:
is_bullish_original (series bool)
is_bullish_post_inverse (series bool)
tf (series string)
tf_id (series int)
top_left (chart.point)
bottom_right (chart.point)
hh (series float)
ll (series float)
deprecate_at (series int)
sl_level (series float)
is_active (series bool)
test_count (series int)
first_test_idx (series int)
is_inversed (series bool)
has_touched (series bool)
fvg_box (series box)
tooltip_label (series label)
hidden (series bool)
draw_signal_inversed (series bool)
draw_signal_text (series bool)
draw_signal_highlight (series bool)
draw_signal_set_candidate (series bool)
draw_signal_reset_candidate (series bool)
fill_state (series FVGFillState)
lifecycle (series FVGLifecycle)
filter_reason (series FVGFilterReason)
entry_filter_reason (series EntryFilterReason)
tf_inversion_bar (Bar)
inversion_idx (series int)
FVGBuffer
Fields:
items (array)
inversed (array)
invalidated (array) Library

lib_smtLibrary "lib_smt"
SMT divergence + session detection/lifecycle, SMT buffers, premium/discount zones, and their on-chart drawing — extracted 1:1 from rewrite_strategy.pine.
method equals(this, other)
Namespace types: SMT
Parameters:
this (SMT)
other (SMT)
method delete_smt(this)
Namespace types: SMT
Parameters:
this (SMT)
method delete_smts(this)
Namespace types: array
Parameters:
this (array)
method replace(this, value)
Namespace types: array
Parameters:
this (array)
value (Session)
method replace(sess, idx, value, remove_buffer)
Namespace types: array
Parameters:
sess (array)
idx (int)
value (Session)
remove_buffer (array)
method reset(this)
Namespace types: SessionSignals
Parameters:
this (SessionSignals)
method reset(this)
Namespace types: SessionLevel
Parameters:
this (SessionLevel)
method reset(this)
Namespace types: Session
Parameters:
this (Session)
method invalidate_smt(this, smt, reason)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
smt (SMT)
reason (series SMTFilterReason)
method invalidate_session(this, sess, reason)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
sess (Session)
reason (series SMTFilterReason)
method set_intra(this, smt)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
smt (SMT)
method reset_intra(this, reason, sess, reset_bull, reset_bear)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
reason (series SMTFilterReason)
sess (Session)
reset_bull (bool)
reset_bear (bool)
method invalidate_all_daily_smts(this, reason)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
reason (series SMTFilterReason)
method invalidate_all_session_smts(this, is_bullish, reason)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
is_bullish (bool)
reason (series SMTFilterReason)
method invalidate_entry_daily_smt(this, entry_smt, reason)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
entry_smt (SMT)
reason (series SMTFilterReason)
method invalidate_by_detected_session_id(this, id, reason)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
id (int)
reason (series SMTFilterReason)
method invalidate_swept_sessions(this, session_signals, overflow_buffer)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
session_signals (SessionSignals)
overflow_buffer (array)
method add_smt(this, smt)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
smt (SMT)
method update_smt(this, other_high, other_low, smt_buffer, enable_invalidation_by_distance, invalidation_dist_chart_led, invalidation_dist_other_led)
Namespace types: SMT
Parameters:
this (SMT)
other_high (float)
other_low (float)
smt_buffer (SMTBuffer)
enable_invalidation_by_distance (bool)
invalidation_dist_chart_led (float)
invalidation_dist_other_led (float)
method update_smts(this, other_high, other_low, enable_invalidation_by_distance, invalidation_dist_chart_led, invalidation_dist_other_led)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
other_high (float)
other_low (float)
enable_invalidation_by_distance (bool)
invalidation_dist_chart_led (float)
invalidation_dist_other_led (float)
method update_session_level_sweeps(this, other_high, other_low)
Namespace types: Session
Parameters:
this (Session)
other_high (float)
other_low (float)
method detect_smt(this, smt_h1, smt_l1, smt_c1, smt_other_h1, smt_other_l1, is_smt_tf_new_bar, smt_buffer, active_session_id, smt_min_age, is_intra, is_blocked_intra_smt_bull, is_blocked_intra_smt_bear, timeout_intra, touch_tolerance, intra_min_swing_age)
─────────────────────────────────────────────────────────────────────────────
session.detect_smt — check if chart/other has swept H or L
§2.2.1 Level SMT Detection / §2.2.2 Daily SMT Detection / §2.2.3 Intra SMT Detection
is_intra=true → called on live active session (§2.2.3); uses running H/L, equal high/low counts
is_intra=false → called on archived session (§2.2.1/§2.2.2); levels are fixed at capture time
active_session_id: session currently open, stored as detected_session_id on new SMTs
so §2.3.2 London-detected invalidation can filter correctly on NY open
─────────────────────────────────────────────────────────────────────────────
Namespace types: Session
Parameters:
this (Session)
smt_h1 (float)
smt_l1 (float)
smt_c1 (float)
smt_other_h1 (float)
smt_other_l1 (float)
is_smt_tf_new_bar (bool)
smt_buffer (SMTBuffer)
active_session_id (int)
smt_min_age (int)
is_intra (bool)
is_blocked_intra_smt_bull (bool)
is_blocked_intra_smt_bear (bool)
timeout_intra (int)
touch_tolerance (float)
intra_min_swing_age (int)
method detect_smts(this, signals, smt_h1, smt_l1, smt_c1, smt_other_h1, smt_other_l1, is_smt_tf_new_bar, smt_buffer, active_session_id, smt_min_age, touch_tolerance)
Namespace types: array
Parameters:
this (array)
signals (SessionSignals)
smt_h1 (float)
smt_l1 (float)
smt_c1 (float)
smt_other_h1 (float)
smt_other_l1 (float)
is_smt_tf_new_bar (bool)
smt_buffer (SMTBuffer)
active_session_id (int)
smt_min_age (int)
touch_tolerance (float)
method has_active_daily_smt(this, seeks_bullish)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
seeks_bullish (bool)
method find_best_smt_by_prio(this, minimum_prio, seeks_bullish)
Namespace types: array
Parameters:
this (array)
minimum_prio (int)
seeks_bullish (bool)
method find_best_smt_by_direction(this, intra_smts_enabled, seeks_bullish)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
intra_smts_enabled (bool)
seeks_bullish (bool)
method update_best_smts(this, pd_zone, intra_smts_enabled, allow_bullish_intra_smt_post_cutoff_if_has_daily_smt_active, allow_bearish_intra_smt_post_cutoff_if_has_daily_smt_active)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
pd_zone (int)
intra_smts_enabled (bool)
allow_bullish_intra_smt_post_cutoff_if_has_daily_smt_active (bool)
allow_bearish_intra_smt_post_cutoff_if_has_daily_smt_active (bool)
method rotate(this, sess, max)
Namespace types: array
Parameters:
this (array)
sess (Session)
max (int)
method add_session(this, sess, overflow_buffer)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
sess (Session)
overflow_buffer (array)
method evict_consumed_days(this, overflow_buffer, max_history_days)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
overflow_buffer (array)
max_history_days (simple int)
method clear_invalidated_smts(this, keep_level, keep_intra, keep_reason)
Namespace types: SMTBuffer
Parameters:
this (SMTBuffer)
keep_level (bool)
keep_intra (bool)
keep_reason (bool)
method archive(this)
Namespace types: SessionLevel
Parameters:
this (SessionLevel)
method archive(this)
Namespace types: Session
Parameters:
this (Session)
method update_levels(this, is_smt_tf_new_bar, other_high, other_low, smt_t1, smt_h1, smt_l1, smt_other_h1, smt_other_l1)
Namespace types: Session
Parameters:
this (Session)
is_smt_tf_new_bar (bool)
other_high (float)
other_low (float)
smt_t1 (int)
smt_h1 (float)
smt_l1 (float)
smt_other_h1 (float)
smt_other_l1 (float)
method update_session(this, signals, smt_buffer, new_day, other_high, other_low, smt_t1, smt_h1, smt_l1, smt_c1, smt_other_h1, smt_other_l1, is_smt_tf_new_bar, smt_min_age, timeout_intra, in_any_no_intra_smt_zone, enable_block_intra_smts_pre_high_prio_sweep, previous_session, intra_min_swing_age)
Namespace types: Session
Parameters:
this (Session)
signals (SessionSignals)
smt_buffer (SMTBuffer)
new_day (bool)
other_high (float)
other_low (float)
smt_t1 (int)
smt_h1 (float)
smt_l1 (float)
smt_c1 (float)
smt_other_h1 (float)
smt_other_l1 (float)
is_smt_tf_new_bar (bool)
smt_min_age (int)
timeout_intra (int)
in_any_no_intra_smt_zone (bool)
enable_block_intra_smts_pre_high_prio_sweep (bool)
previous_session (Session)
intra_min_swing_age (int)
method draw_session(this, show_chart, show_panel)
Namespace types: Session
Parameters:
this (Session)
show_chart (bool)
show_panel (bool)
method draw_session_consumed(this)
Namespace types: Session
Parameters:
this (Session)
method delete(this)
Namespace types: Session
Parameters:
this (Session)
method delete(this)
Namespace types: array
Parameters:
this (array)
method register(this, enabled, session, _fill_color, _text, _text_color, _border_color, prio, id, is_daily, is_session, enable_intra_smts, is_no_intra_smt_zone, smt_timeout, strategy_config)
Namespace types: array
Parameters:
this (array)
enabled (bool)
session (string)
_fill_color (color)
_text (string)
_text_color (color)
_border_color (color)
prio (int)
id (int)
is_daily (bool)
is_session (bool)
enable_intra_smts (bool)
is_no_intra_smt_zone (bool)
smt_timeout (int)
strategy_config (StrategyConfig)
method short_id(this)
Namespace types: SMT
Parameters:
this (SMT)
method label_text(this, other_ticker, include_filter_reason, is_leader)
Namespace types: SMT
Parameters:
this (SMT)
other_ticker (string)
include_filter_reason (bool)
is_leader (bool)
method draw_smt(this, other_ticker, show_label_leader, show_label_follower, verbose)
Namespace types: SMT
Parameters:
this (SMT)
other_ticker (string)
show_label_leader (bool)
show_label_follower (bool)
verbose (bool)
method draw_smts(this, other_ticker, show_label_leader, show_label_follower, show_filter_reason)
Namespace types: array
Parameters:
this (array)
other_ticker (string)
show_label_leader (bool)
show_label_follower (bool)
show_filter_reason (bool)
get_pd_range(enable, bars_lookback, new_hour)
Parameters:
enable (simple bool)
bars_lookback (int)
new_hour (bool)
draw_pd(new_hour, pd_start, pd_high, pd_equilibrium, pd_low)
Parameters:
new_hour (bool)
pd_start (int)
pd_high (float)
pd_equilibrium (float)
pd_low (float)
SMT
Fields:
detected_session_id (series int)
leader (series int)
leader_level (chart.point)
sweep (chart.point)
follow_level (chart.point)
session_id (series int)
prio (series int)
is_bullish (series bool)
deprecate_at (series int)
detection_bar (series int)
detection_close (series float)
valid_from (series int)
invalidated (series bool)
filter_reason (series SMTFilterReason)
leader_line (series line)
leader_label (series label)
follow_line (series line)
follow_intermediate_line (series line)
follow_label (series label)
smt_color (series color)
draw_remove_highlight (series bool)
used_for_trade (series bool)
trade_end_time (series int)
SessionLevel
tracks session H/L
Fields:
chart (chart.point)
other (chart.point)
chart_smt_tf (chart.point)
other_smt_tf (chart.point)
is_consumed (series bool)
smt (SMT)
StrategyConfig
Fields:
big_win_threshold (series float)
cutoff_hour (series int)
cutoff_tz (series string)
cutoff_mode (series SessionCutoffMode)
max_losses (series int)
max_wins (series int)
Session
Fields:
id (series int)
prio (series int)
timeout (series int)
session (series string)
h (SessionLevel)
l (SessionLevel)
_fill_color (series color)
_text (series string)
_text_color (series color)
_border_color (series color)
is_daily (series bool)
is_session (series bool)
is_no_intra_smt_zone (series bool)
enable_intra_smts (series bool)
strategy_config (StrategyConfig)
start_time (series int)
end_time (series int)
cutoff_at (series int)
is_active (series bool)
is_consumed (series bool)
box_chart (series box)
box_other (series box)
mean_sum (series float)
mean_count (series float)
mean (series float)
is_any_low_swept (series bool)
is_any_high_swept (series bool)
draw_signal_consumed (series bool)
tooltip_chart (series label)
tooltip_other (series label)
SessionSignals
Fields:
signal_session_started (series int)
signal_session_ending (series int)
signal_session_ended (series int)
signal_no_intra_smt_zone_started (series int)
signal_no_intra_smt_zone_ending (series int)
signal_no_intra_smt_zone_ended (series int)
signal_intra_smt_h (series int)
signal_intra_smt_l (series int)
signal_session_consumed (series bool)
SMTBuffer
Fields:
session_smts (array)
daily_smts (array)
intra_smts (array)
invalidated (array)
delete_buffer (array)
monitored_sessions (array)
monitored_days (array)
consumed_days (array)
max_days (series int)
best_bull_smt (SMT)
best_bear_smt (SMT) Library

MarketReactionLibrary "MarketReaction"
Modular library for sessions, Initial Balance, PSY ranges, VWAPs, alerts, and macro sentiment helpers.
getSessionConfig(source)
Returns session config by source name.
Parameters:
source (simple string) : Session source: Tokyo, New York, London, Jerusalem, EU B, US B.
Returns: SessionConfig.
sessionModule(session, timeZone, sessionText, sessionColor, sessionDuration, showVisuals, showLabels, showLines, showMiddleLine, showBg, bgTransp)
Builds session high/low/middle lines, label, background fill and VWAP.
Parameters:
session (simple string) : Session string.
timeZone (simple string) : IANA timezone.
sessionText (simple string) : Label text.
sessionColor (color) : Session color.
sessionDuration (simple int) : Approximate session duration in ms.
showVisuals (bool) : Show this session visuals.
showLabels (bool) : Show labels.
showLines (bool) : Show high/low lines.
showMiddleLine (bool) : Show middle line.
showBg (bool) : Show background fill.
bgTransp (int) : Background transparency.
Returns: SessionResult.
initialBalanceModule(session, ibSession, timeZone, sessionLabel, showDLabels, showWLabels, showMLabels, showPrevD, showPrevW, showPrevM, dColor, wColor, mColor)
Calculates Daily, Weekly, Monthly Initial Balance and W/M IB VWAPs.
Parameters:
session (simple string) : Full session string.
ibSession (simple string) : IB sub-session string.
timeZone (simple string) : IANA timezone.
sessionLabel (simple string) : Session label.
showDLabels (bool) : Show D.IB labels.
showWLabels (bool) : Show W.IB labels.
showMLabels (bool) : Show M.IB labels.
showPrevD (bool) : Calculate previous daily IB.
showPrevW (bool) : Calculate previous weekly IB.
showPrevM (bool) : Calculate previous monthly IB.
dColor (color) : Daily IB label color.
wColor (color) : Weekly IB label color.
mColor (color) : Monthly IB label color.
Returns: IBResult.
psyRangeModule(session, timeZone, showLabels, showPrev, sessionColor)
Calculates PSY high/low, previous PSY levels, labels, and VWAP.
Parameters:
session (simple string) : Session string.
timeZone (simple string) : Timezone.
showLabels (bool) : Show PSY labels.
showPrev (bool) : Show previous PSY levels.
sessionColor (color) : PSY color.
Returns: PSYResult.
rangeSignal(highLevel, lowLevel, price)
Returns enter/exit signals for a range.
Parameters:
highLevel (float) : Range high.
lowLevel (float) : Range low.
price (float) : Price source.
Returns: RangeSignal.
tablePosition(pos)
Converts table position string to Pine position.
Parameters:
pos (simple string) : Position text.
Returns: Pine table position.
SessionConfig
Session configuration.
Fields:
session (series string) : Full session time.
ib (series string) : Initial Balance sub-session time.
tz (series string) : Session timezone.
label (series string) : Session label.
col (series color) : Session color.
duration (series int) : Approximate session duration in milliseconds.
SessionResult
Session result.
Fields:
high (series float) : Session high.
low (series float) : Session low.
mid (series float) : Session middle.
vwap (series float) : Session VWAP.
inSession (series bool) : True if bar is inside session.
firstBar (series bool) : True on first session bar.
highLine (series line) : Session high line.
lowLine (series line) : Session low line.
midLine (series line) : Session middle line.
IBResult
Initial Balance result.
Fields:
dHigh (series float) : Daily IB high.
dLow (series float) : Daily IB low.
pdHigh (series float) : Previous daily IB high.
pdLow (series float) : Previous daily IB low.
wHigh (series float) : Weekly IB high.
wLow (series float) : Weekly IB low.
pwHigh (series float) : Previous weekly IB high.
pwLow (series float) : Previous weekly IB low.
mHigh (series float) : Monthly IB high.
mLow (series float) : Monthly IB low.
pmHigh (series float) : Previous monthly IB high.
pmLow (series float) : Previous monthly IB low.
wVwap (series float) : Weekly IB VWAP.
mVwap (series float) : Monthly IB VWAP.
inSession (series bool) : True if bar is inside selected full session.
inIB (series bool) : True if bar is inside selected IB session.
ibFirstBar (series bool) : True on first IB bar.
sessionFirstBar (series bool) : True on first full-session bar.
PSYResult
PSY range result.
Fields:
high (series float) : Current PSY high.
low (series float) : Current PSY low.
pHigh (series float) : Previous PSY high.
pLow (series float) : Previous PSY low.
vwap (series float) : PSY VWAP.
inSession (series bool) : True if bar is inside PSY range.
firstBar (series bool) : True on first PSY bar.
RangeSignal
Range signal result.
Fields:
enter (series bool) : True when price enters range.
exit (series bool) : True when price exits range.
topDn (series bool) : Crossunder from above high.
topUp (series bool) : Crossover above high.
botUp (series bool) : Crossover from below low.
botDn (series bool) : Crossunder below low. Library

AxiomMovingAverageLibraryAxiom Moving Average Library
Overview
If your Pine script offers a moving average type selector, you have probably written the same dispatch logic more than once. An enum, a switch, and a quiet hope that the next script you copy it into stays consistent with the last one.
This library replaces that pattern. Import it, use the MaType enum for your dropdown, and call get_ma() to route the user's choice to the right computation. Eight standard moving average types — SMA, EMA, RMA, WMA, VWMA, HMA, and SWMA — all backed by Pine's built-in ta.* functions. Nothing custom under the hood.
Why it exists
This is a maintenance problem, and it compounds.
Every Axiom indicator and strategy that gives users a moving average choice needs the same underlying infrastructure: a type list, a dispatcher, and correct parameter handling for each type. When that logic lives inside every script individually, it drifts. One script picks up HMA support; another doesn't. A third gets the defaults wrong. None of this is visible until someone notices that the same configuration produces different behavior across two Axiom tools.
That kind of inconsistency doesn't announce itself — it just erodes confidence in the products over time.
This library makes the dispatch code shared. Every consuming script references the same enum, calls the same wrappers, and gets the same result for the same inputs. The repetitive parts stay consistent so you can focus on the work that's actually yours — choosing which averages to offer, deciding what lengths make sense, and building the logic around the result. The plumbing shouldn't be something you rewrite every time.
Quickstart
import AxiomCharts/AxiomMovingAverageLibrary/1 as maLib
maChoice = input.enum(maLib.MaType.EMA, title = "MA Type")
maLength = input.int(20, title = "MA Length", minval = 1)
maValue = maLib.get_ma(maChoice, close, maLength)
Import the library, give your users a dropdown, and route their selection through get_ma(). That covers the standard integration.
Recommended alias : maLib — short, and it distinguishes this from the Pro library if you end up using both.
API
The library exports three things: an enum, eight individual wrapper functions, and one dispatcher.
MaType enum
Eight values, each mapping to a standard moving average:
MaType.SMA - Simple Moving Average
MaType.EMA - Exponential Moving Average
MaType.RMA - Wilder / Relative Moving Average
MaType.WMA - Weighted Moving Average
MaType.VWMA - Volume-Weighted Moving Average
MaType.HMA - Hull Moving Average
MaType.SWMA - Symmetrically Weighted Moving Average
The enum works directly with input.enum(), so you can wire it into a settings dropdown without building your own type list.
Wrapper functions
Each type has a named function: ma_sma(src, length), ma_ema(src, length), ma_rma(src, length), ma_wma(src, length), ma_vwma(src, length), ma_hma(src, length), and ma_swma(src).
Two behaviors worth knowing before you use them:
SWMA takes no length. Pine's ta.swma applies a fixed symmetrical weighting over 4 bars. The wrapper accepts src only. If you route through get_ma with MaType.SWMA, the length argument is accepted for signature consistency but ignored. The window is always 4.
get_ma dispatcher
Accepts a MaType value and routes to the correct wrapper. If an unrecognized value reaches the switch, it falls back to SMA as a safety net.
Examples
Direct wrapper call
When you only need one moving average type and don't need a dropdown:
import AxiomCharts/AxiomMovingAverageLibrary/1 as maLib
smoothed = maLib.ma_ema(close, 20)
For a single MA type in a single script, a direct ta.ema(close, 20) is simpler and carries no dependency. The library earns its keep when you need the shared enum or when multiple scripts need to stay in sync.
User-selectable dropdown
The most common pattern — let users pick the MA type from a settings menu:
import AxiomCharts/AxiomMovingAverageLibrary/1 as maLib
maChoice = input.enum(maLib.MaType.EMA, title = "MA Type")
maLength = input.int(20, title = "MA Length", minval = 1)
maValue = maLib.get_ma(maChoice, close, maLength)
Watch for: VWMA on symbols without volume
ta.vwma requires volume data. On symbols that don't report volume — some forex feeds, certain indices — the result is na. The library does not guard against this. If your script includes VWMA as an option, handle the no-volume case in your own code.
FAQ
What's the difference between Lite and Pro?
Lite covers eight standard moving averages. Each one wraps a Pine built-in — no custom math involved. The Pro library adds thirteen additional types on top of those eight, including DEMA, TEMA, KAMA, JMA, FRAMA, T3MA, VAMA, ZLMA, ZLEMA, Laguerre, and McGinley variants. If your needs outgrow the standard eight, that's when Pro becomes relevant.
Why doesn't SWMA accept a length?
That's a Pine constraint. ta.swma applies a fixed symmetrical weighting across 4 bars. There is no length parameter to pass, so the wrapper doesn't accept one either. If you route through get_ma with MaType.SWMA, the length argument is there for API consistency but doesn't affect the output.
Can I use VWMA on any symbol?
Only on symbols that report volume data. On instruments without volume, VWMA returns na. The library won't catch that for you — if your script offers VWMA, check for volume data and handle the na case in your own code.
What Pine version do I need?
Pine v6. The library uses v6 enum syntax, so scripts on v5 or earlier cannot import it.
Limitations
Pine v6 required. Scripts on earlier versions cannot import this library.
Eight standard types only. Adaptive averages (KAMA, JMA, FRAMA), lag-compensated filters (T3MA, ZLMA, McGinley), and other specialized types are not included. The Pro library covers those.
SWMA uses a fixed 4-bar window. The length parameter passed through get_ma is ignored for SWMA.
VWMA needs volume data. On symbols without volume, it returns na. Your script should account for this.
The SMA fallback is a safety net, not a feature. If an unrecognized value reaches get_ma, it defaults to SMA. In practice, Pine's enum type system prevents this at compile time. Don't build routing logic around it.
Versioning and release notes
Pin your import to a specific version number you have actually verified in the environment where you are using the library:
import AxiomCharts/AxiomMovingAverageLibrary/
If you later need to move from Lite to Pro, expect changes: a different library title and an expanded MaType enum with additional values. It's not a drop-in swap — your code will need updating.
Support and training
Visit our website at axiomcharts.com for any documentation or questions.
Disclaimer
This library is published for educational and informational purposes. It provides standardized moving average computation utilities for Pine Script developers. It does not generate trading signals, recommend positions, or guarantee any financial outcome. All trading decisions and their consequences are yours. Use this library as one part of your own research and process. Library

Library

Library
