CryptonianFibStructure

200
Library "CryptonianFibStructure"
[Cryptonian] Fibonacci confirmed swing scanner. v1 / engine v0.2.0.
ALL candidate pivots must be provided by the host chart after right-side confirmation.
No requests, inputs, forward-looking calculations, plots, or signal generation.

advance(state, pivotHigh, pivotLow, pivotBar, pivotTime, confirmedBar, confirmedTime, minimumMove, minimumBars, minimumATR, pivotATR)
  Advance ONE confirmed-bar structural degree. Caller must gate with barstate.isconfirmed.
  Parameters:
    state (Track): Persistent Track instance for this degree.
    pivotHigh (float): Confirmed ta.pivothigh value, otherwise na.
    pivotLow (float): Confirmed ta.pivotlow value, otherwise na.
    pivotBar (int): Original pivot bar_index, computed by host as bar_index - rightBars.
    pivotTime (int): Original pivot time, computed by host as time[rightBars].
    confirmedBar (int): Current closed bar_index; no backdated publishing.
    confirmedTime (int): Current time_close; time confirmation became available.
    minimumMove (float): Minimum swing absolute price movement (normally ticks * syminfo.mintick).
    minimumBars (int): Minimum positive separation between actual pivots.
    minimumATR (float): Additional minimum swing displacement in multiples of ATR (zero to disable).
    pivotATR (float): Confirmed ATR at the pivot, e.g. ta.atr(14)[rightBars].
  Returns: Mutated Track, including a one-bar publication pulse and immutable-by-convention last published anchors.

hasSwing(state)
  Expose whether a swing was published by this independent degree.
  Parameters:
    state (Track): State of the degree.
  Returns: True once a confirmed swing exists.

direction(state)
  Structural direction from last published price pair.
  Parameters:
    state (Track): State of the degree.
  Returns: 1 bullish, -1 bearish, 0 when no published swing.

Track
  Independent, chart-timeframe confirmed-pivot tracker for ONE structural degree.
  Fields:
    lastKind (series int): Last unpaired pivot: 1 high / -1 low / 0 none.
    lastPrice (series float): Price of last unpaired pivot.
    lastBar (series int): Original bar index of that pivot (not when it was recognized).
    lastTime (series int): Original time of that pivot.
    swingId (series int): Number of published, confirmed swings for this degree.
    fromPrice (series float): Published earlier pivot price.
    toPrice (series float): Published later pivot price.
    fromBar (series int): Published earlier pivot bar.
    toBar (series int): Published later pivot bar.
    fromTime (series int): Published earlier pivot time.
    toTime (series int): Published later pivot time.
    confirmationBar (series int): Actual bar that confirmed the later pivot.
    confirmationTime (series int): Closing time of the confirmation bar.
    magnitude (series float): ATR units of the published price move (descriptive, NOT a probability).
    eventOnThisBar (series bool): True ONLY on the bar when a new swing has been confirmed.
    ambiguousPairs (series int): Number of dual-extreme confirmations skipped.
    failedFilters (series int): Number of opposite-pivot pairs rejected by minimum filters.
    updatedPending (series int): Number of improvements to an unpaired same-kind pivot.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.