ที่อัปเดต:
CryptonianFibForecast

Library "CryptonianFibForecast"
[Cryptonian] Fibonacci Forecast v1. Immutable-by-convention confirmed A-B-C geometry, projected D, and conservative confirmed-bar resolution. No drawings, inputs, market data requests or trade signals.
createABCD(a, b, c, abSwingId, bcSwingId, abEndBar, bcStartBar, scenarioId, publishedBar, publishedTime, minBC, maxBC, currentClose, currentHigh, currentLow)
Build an eligible A-B-C projection from consecutive CONFIRMED swings; caller must use a confirmed host bar. Reject patterns already consumed or invalid when first knowable.
Parameters:
a (float): Earlier A anchor.
b (float): Shared B anchor.
c (float): Confirmed C anchor.
abSwingId (int): Historical A-B swing identity.
bcSwingId (int): Historical B-C swing identity.
abEndBar (int): Original pivot B bar from A-B.
bcStartBar (int): Original pivot B bar from B-C.
scenarioId (int): Host-provided next candidate identifier.
publishedBar (int): Current confirmation bar_index, never historical C bar.
publishedTime (int): Current bar close timestamp.
minBC (float): Minimum qualifying BC / AB proportion.
maxBC (float): Maximum qualifying BC / AB proportion.
currentClose (float): Confirmed close when C first becomes known.
currentHigh (float): High of publication candle, for pre-consumption check.
currentLow (float): Low of publication candle, for pre-consumption check.
Returns: Candidate with valid=false if sequence is ineligible or already over before its publication.
advanceABCD(scenario, confirmedHigh, confirmedLow, confirmedClose, confirmedBar)
Resolve only on CONFIRMED, later host bars. A same-bar target touch and closing invalidation is AMBIGUOUS, never a fabricated win.
Parameters:
scenario (ABCD): Previously published scenario.
confirmedHigh (float): High of current completed bar.
confirmedLow (float): Low of current completed bar.
confirmedClose (float): Close of current completed bar.
confirmedBar (int): Current completed bar_index.
Returns: Same UDT reference with only lifecycle and resolutionBar updated; geometry remains unchanged.
retireABCD(scenario, confirmedBar)
Permanently retire an unresolved old geometrical candidate when a newly confirmed structural event supersedes it.
Parameters:
scenario (ABCD): Existing geometrical scenario.
confirmedBar (int): Current confirmed bar_index.
Returns: Scenario with only terminal status updated; original anchors/targets stay fixed.
ABCD
Immutable-by-convention geometrical scenario based on TWO consecutive confirmed swings.
Fields:
valid (series bool): True only after a qualified ABC sequence is confirmed and its D target is still in the future.
id (series int): Sequential identity assigned by host upon publication.
abSwingId (series int): Identity of the confirmed A-to-B swing.
bcSwingId (series int): Identity of the confirmed B-to-C swing.
a (series float): A pivot price.
b (series float): B pivot price.
c (series float): C pivot price.
bcRatio (series float): Magnitude of BC divided by AB.
target1 (series float): Exactly 1.000 * AB projected from C.
target1272 (series float): 1.272 * AB projected from C (secondary informational objective).
direction (series int): 1 bullish CD projection; -1 bearish CD projection.
publishedBar (series int): First bar on which a completed BC pivot makes this projection knowable.
publishedTime (series int): Closing timestamp of publication bar.
resolutionBar (series int): Bar of subsequent outcome, not retroactively placed at pivot C.
status (series ABCDStatus): Projection-only lifecycle; never an entry or exit order.
[Cryptonian] Fibonacci Forecast v1. Immutable-by-convention confirmed A-B-C geometry, projected D, and conservative confirmed-bar resolution. No drawings, inputs, market data requests or trade signals.
createABCD(a, b, c, abSwingId, bcSwingId, abEndBar, bcStartBar, scenarioId, publishedBar, publishedTime, minBC, maxBC, currentClose, currentHigh, currentLow)
Build an eligible A-B-C projection from consecutive CONFIRMED swings; caller must use a confirmed host bar. Reject patterns already consumed or invalid when first knowable.
Parameters:
a (float): Earlier A anchor.
b (float): Shared B anchor.
c (float): Confirmed C anchor.
abSwingId (int): Historical A-B swing identity.
bcSwingId (int): Historical B-C swing identity.
abEndBar (int): Original pivot B bar from A-B.
bcStartBar (int): Original pivot B bar from B-C.
scenarioId (int): Host-provided next candidate identifier.
publishedBar (int): Current confirmation bar_index, never historical C bar.
publishedTime (int): Current bar close timestamp.
minBC (float): Minimum qualifying BC / AB proportion.
maxBC (float): Maximum qualifying BC / AB proportion.
currentClose (float): Confirmed close when C first becomes known.
currentHigh (float): High of publication candle, for pre-consumption check.
currentLow (float): Low of publication candle, for pre-consumption check.
Returns: Candidate with valid=false if sequence is ineligible or already over before its publication.
advanceABCD(scenario, confirmedHigh, confirmedLow, confirmedClose, confirmedBar)
Resolve only on CONFIRMED, later host bars. A same-bar target touch and closing invalidation is AMBIGUOUS, never a fabricated win.
Parameters:
scenario (ABCD): Previously published scenario.
confirmedHigh (float): High of current completed bar.
confirmedLow (float): Low of current completed bar.
confirmedClose (float): Close of current completed bar.
confirmedBar (int): Current completed bar_index.
Returns: Same UDT reference with only lifecycle and resolutionBar updated; geometry remains unchanged.
retireABCD(scenario, confirmedBar)
Permanently retire an unresolved old geometrical candidate when a newly confirmed structural event supersedes it.
Parameters:
scenario (ABCD): Existing geometrical scenario.
confirmedBar (int): Current confirmed bar_index.
Returns: Scenario with only terminal status updated; original anchors/targets stay fixed.
ABCD
Immutable-by-convention geometrical scenario based on TWO consecutive confirmed swings.
Fields:
valid (series bool): True only after a qualified ABC sequence is confirmed and its D target is still in the future.
id (series int): Sequential identity assigned by host upon publication.
abSwingId (series int): Identity of the confirmed A-to-B swing.
bcSwingId (series int): Identity of the confirmed B-to-C swing.
a (series float): A pivot price.
b (series float): B pivot price.
c (series float): C pivot price.
bcRatio (series float): Magnitude of BC divided by AB.
target1 (series float): Exactly 1.000 * AB projected from C.
target1272 (series float): 1.272 * AB projected from C (secondary informational objective).
direction (series int): 1 bullish CD projection; -1 bearish CD projection.
publishedBar (series int): First bar on which a completed BC pivot makes this projection knowable.
publishedTime (series int): Closing timestamp of publication bar.
resolutionBar (series int): Bar of subsequent outcome, not retroactively placed at pivot C.
status (series ABCDStatus): Projection-only lifecycle; never an entry or exit order.
Release Note
v2Added:
createTimeWindow(patternId, aBar, bBar, cBar, confirmedBar, ratio, toleranceBars)
Freeze a FUTURE time window associated with a confirmed ABCD projection.
Parameters:
patternId (int): Positive confirmed ABCD scenario identity.
aBar (int): Original A pivot bar.
bBar (int): Original B pivot bar.
cBar (int): Original C pivot bar.
confirmedBar (int): Publication confirmation bar, NOT the C pivot bar.
ratio (float): Positive Fibonacci bar-duration ratio.
toleranceBars (int): Window half-width measured in bars.
Returns: A valid future window or an invalid instance if its forecast interval has already begun.
advanceTimeWindow(window, confirmedBar)
Deterministic confirmed-bar-only time window update, no price inference.
Parameters:
window (TimeWindow): Existing immutable-by-convention window.
confirmedBar (int): Current closed bar index.
Returns: Window with updated status while original timing geometry stays fixed.
retireTimeWindow(window, confirmedBar)
Permanently retire an unresolved time window when its pattern ends.
Parameters:
window (TimeWindow): Existing window, not copied/retroactively rewritten.
confirmedBar (int): Bar at which parent pattern stopped being active.
Returns: Historical time-window geometry remains fixed; only its state changes.
TimeWindow
Immutable-by-convention ABCD-linked time hypothesis.
Fields:
valid (series bool): True only if full time window lies in the future when published.
patternId (series int): Source ABCD scenario identity.
ratio (series float): AB-duration Fibonacci multiplier.
centerBar (series int): Original C pivot plus rounded AB duration * ratio.
startBar (series int): First forecast bar. Must be AFTER publication bar.
endBar (series int): Last forecast bar.
publishedBar (series int): Confirmation bar at which forecast became knowable.
openedBar (series int): First bar that entered the window.
resolvedBar (series int): Bar when the window elapsed or was retired.
state (series TimeState): Informational state, NEVER a price reversal or trade signal.
Release Note
v3Added:
makeABCDWatch(pattern, watchId, confirmedBar, confirmedTime)
Publish an informational ABCD forecast from an ALREADY published and still active ABCD pattern. No signal is generated.
Parameters:
pattern (ABCD): Existing ABCD projection, confirmed by host.
watchId (int): New global watch identity, assigned by host.
confirmedBar (int): Host's current confirmed bar index.
confirmedTime (int): Close timestamp of the confirmed host bar.
Returns: Snapshot with all original geometry frozen.
makeRetracementWatch(watchId, clusterId, localId, majorId, direction, low, high, objective, invalidation, confirmedClose, confirmedBar, confirmedTime)
Publish an informational confluence-retracement watch only when its objective and invalidation lie on opposite sides of the zone.
Parameters:
watchId (int): New unique host identity.
clusterId (int): Original frozen confluence cluster identity.
localId (int): Original local swing identity.
majorId (int): Original major swing identity.
direction (int): 1 upward expected reaction, -1 downward.
low (float): Original lower price boundary of zone.
high (float): Original upper price boundary of zone.
objective (float): Structural prior extreme, for informational tracking only.
invalidation (float): Structural boundary that would disqualify the watch.
confirmedClose (float): Close at the publication bar.
confirmedBar (int): Confirmed publication bar index.
confirmedTime (int): Confirmed close timestamp.
Returns: Valid watch or invalid record if geometry was already broken/unusable.
syncABCDWatch(watch, parent, confirmedBar)
Track terminal status of the source ABCD projection without rewriting published forecast levels.
Parameters:
watch (Watch): Existing ABCD-linked watch.
parent (ABCD): Original source ABCD.
confirmedBar (int): Current completed bar.
Returns: Same watch reference, only state and resolution time can change.
syncRetracementWatch(watch, sourceAlive, hasTested, confirmedHigh, confirmedLow, confirmedClose, confirmedBar)
Confirmed-bar-only lifecycle of a confluence watch. May remain in TESTING over multiple bars. No intrabar output is recorded.
Parameters:
watch (Watch): Published confluence watch.
sourceAlive (bool): True only when the EXACT original confluence ID remains active.
hasTested (bool): True only after the source cluster has a confirmed first test.
confirmedHigh (float): Current closed-bar high.
confirmedLow (float): Current closed-bar low.
confirmedClose (float): Current closed-bar close.
confirmedBar (int): Current closed-bar index.
Returns: Updated watch; source identity and published levels never change.
isActiveWatch(watch)
True when a published watch is currently eligible for display as an active forecast.
Parameters:
watch (Watch)
Watch
Frozen publication details for one independent hypothesis.
Fields:
valid (series bool)
id (series int): Unique host-assigned scenario identity (never recycled).
kind (series WatchKind)
state (series WatchState)
sourceId (series int): Original ABCD or confluence identity.
sourceLocalId (series int): Original local structural swing (when relevant).
sourceMajorId (series int): Original major structural swing (when relevant).
direction (series int): 1 for upward hypothesized movement; -1 downward.
zoneLow (series float): Original target/monitoring zone lower bound.
zoneHigh (series float): Original target/monitoring zone upper bound.
objective (series float): Original price objective.
invalidation (series float): Original hypothesis invalidation (not a trade stop).
publishedBar (series int): Completed bar on which forecast first existed.
publishedTime (series int)
resolvedBar (series int): Completed bar ending this scenario, never backdated.
testedBar (series int)
Release Note
v4Added:
evidenceABCD(pattern, validFutureWindows, publicationATR)
Evidence checks for ABCD: accepted geometry, any strictly future time window,
and confirmed AB leg at least one publication ATR. Heuristic ONLY.
Parameters:
pattern (ABCD)
validFutureWindows (int)
publicationATR (float)
Returns: Count from zero to three, never interpreted as historical success likelihood.
evidenceRetracement(watch, matchingGap, configuredTolerance, publicationATR)
Evidence checks for a cross-degree retracement: coherent qualified geometry,
unusually tight ratio cluster, and distance from zone to objective >= one ATR.
Local and major pivot degrees are NOT assumed statistically independent.
Parameters:
watch (Watch)
matchingGap (float)
configuredTolerance (float)
publicationATR (float)
captureAudit(watch, publicationEvidence, explanation)
Snapshot frozen published watch values; no aliasing to the mutable Watch UDT.
Parameters:
watch (Watch)
publicationEvidence (int)
explanation (string)
resolveAudit(event, resolvedWatch)
Record the terminal event once. Immutable publication fields are untouched.
Parameters:
event (ForecastAudit)
resolvedWatch (Watch)
Returns: Same record, updated ONLY for confirmed resolution state/time and optional test bar.
auditStatus(status)
Human-readable terminal name for an audit history row.
Parameters:
status (series WatchState)
ForecastAudit
An independent audit snapshot. Original publication values must never be revised.
Fields:
valid (series bool): A correctly published watch was snapshotted.
watchId (series int): Host watch identity; cannot be recycled within one loaded calculation.
kind (series WatchKind): Source family, ABCD or retracement.
state (series WatchState): Latest confirmed watch state (initially WATCHING).
sourceId (series int): Original source identity.
direction (series int): Frozen publication direction.
publishedBar (series int): Original confirmation bar of publication.
publishedTime (series int): Publication close timestamp.
resolvedBar (series int): Confirmed terminal bar; na while unresolved.
testedBar (series int): First confirmed zone test, where applicable.
zoneLow (series float): Frozen lower zone bound.
zoneHigh (series float): Frozen upper zone bound.
objective (series float): Frozen target.
invalidation (series float): Frozen thesis invalidation.
evidence (series int): Number of objective eligibility checks passed (1..3, NOT probability).
evidenceNote (series string): Publication-time methodology explanation.
terminal (series bool): True only after recorded terminal event.
Release Note
v5Added:
confirmAudit(event, watch)
Latch a later completed-bar confirmation into the independent audit record. Idempotent.
Parameters:
event (ForecastAudit)
watch (Watch)
Returns: Audit snapshot with confirmedBar updated exactly once; publication geometry unchanged.
Updated:
makeABCDWatch(pattern, watchId, confirmedBar, confirmedTime, confirmationFraction)
Publish an informational ABCD forecast from an ALREADY published and still active ABCD pattern. No signal is generated.
Parameters:
pattern (ABCD): Existing ABCD projection, confirmed by host.
watchId (int): New global watch identity, assigned by host.
confirmedBar (int): Host's current confirmed bar index.
confirmedTime (int): Close timestamp of the confirmed host bar.
confirmationFraction (float): Proportion of AB frozen as an early WATCH-only confirmation threshold.
Returns: Snapshot with all original geometry frozen.
syncABCDWatch(watch, parent, confirmedClose, confirmedBar)
Track terminal status of the source ABCD projection without rewriting published forecast levels.
Parameters:
watch (Watch): Existing ABCD-linked watch.
parent (ABCD): Original source ABCD.
confirmedClose (float): Current closed-bar close; never provisional ticks.
confirmedBar (int): Current completed bar.
Returns: Same watch reference, only state and resolution time can change.
Watch
Frozen publication details for one independent hypothesis.
Fields:
valid (series bool)
id (series int): Unique host-assigned scenario identity (never recycled).
kind (series WatchKind)
state (series WatchState)
sourceId (series int): Original ABCD or confluence identity.
sourceLocalId (series int): Original local structural swing (when relevant).
sourceMajorId (series int): Original major structural swing (when relevant).
direction (series int): 1 for upward hypothesized movement; -1 downward.
zoneLow (series float): Original target/monitoring zone lower bound.
zoneHigh (series float): Original target/monitoring zone upper bound.
objective (series float): Original price objective.
invalidation (series float): Original hypothesis invalidation (not a trade stop).
publishedBar (series int): Completed bar on which forecast first existed.
publishedTime (series int)
resolvedBar (series int): Completed bar ending this scenario, never backdated.
testedBar (series int)
confirmationLevel (series float)
confirmedBar (series int)
ForecastAudit
An independent audit snapshot. Original publication values must never be revised.
Fields:
valid (series bool): A correctly published watch was snapshotted.
watchId (series int): Host watch identity; cannot be recycled within one loaded calculation.
kind (series WatchKind): Source family, ABCD or retracement.
state (series WatchState): Latest confirmed watch state (initially WATCHING).
sourceId (series int): Original source identity.
direction (series int): Frozen publication direction.
publishedBar (series int): Original confirmation bar of publication.
publishedTime (series int): Publication close timestamp.
resolvedBar (series int): Confirmed terminal bar; na while unresolved.
testedBar (series int): First confirmed zone test, where applicable.
confirmedBar (series int)
confirmationLevel (series float)
zoneLow (series float): Frozen lower zone bound.
zoneHigh (series float): Frozen upper zone bound.
objective (series float): Frozen target.
invalidation (series float): Frozen thesis invalidation.
evidence (series int): Number of objective eligibility checks passed (1..3, NOT probability).
evidenceNote (series string): Publication-time methodology explanation.
terminal (series bool): True only after recorded terminal event.
I Am LOVE But You Can Call Me AYEHAN
ayehan.com
discord.gg/nX3DGCyCJV
ayehan.com
discord.gg/nX3DGCyCJV
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
I Am LOVE But You Can Call Me AYEHAN
ayehan.com
discord.gg/nX3DGCyCJV
ayehan.com
discord.gg/nX3DGCyCJV
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน