PINE LIBRARY
업데이트됨 CryptonianEWRuntime

Library "CryptonianEWRuntime"
Cryptonian Elliott Wave Runtime /1. Owns adaptive MTF profile selection, compact context/bridge request expressions, lower-timeframe confirmation processing, MTF trade gates, bottom-up bootstrap assembly, Context EW forecast assembly, HTF trade-bridge request expressions, nested-pivot request expressions, production gates and final engine-state packing. Methodology is preserved from Elliott Wave Engine 11.8b2; this library is an architecture migration, not a rules rewrite.
autoContextTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
autoConfirmationTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
autoBridgeTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
profileState(enabled, autoProfile, manualContextTimeframe, manualExecutionTimeframe, manualConfirmationTimeframe, chartTimeframe, chartSeconds)
Builds the timeframe/profile portion of Model.MtfState.
It deliberately does not perform any data request.
Parameters:
enabled (bool)
autoProfile (bool)
manualContextTimeframe (string)
manualExecutionTimeframe (string)
manualConfirmationTimeframe (string)
chartTimeframe (string)
chartSeconds (int)
bridgeTimeframe(autoProfile, manualConfirmationTimeframe, chartSeconds)
Returns the active lower bridge timeframe used by the existing
bottom-up Elliott bootstrap. This remains separate because Model /1 MtfState
intentionally stores only Context / Execution / Confirmation.
Parameters:
autoProfile (bool)
manualConfirmationTimeframe (string)
chartSeconds (int)
bridgeTimeframeValid(bridgeTf, chartSeconds)
Parameters:
bridgeTf (string)
chartSeconds (int)
contextPack(mtfPivotStrength, atrLength, mtfMinimumSwingAtr, allowDiagonals, allowTruncation, truncationMinimumPct, contextPivotStrength, contextMinimumSwingAtr, candidateStarts, minimumNewCandidateScore, extensionThreshold, diagonalTolerance, invalidationMode)
Exact 11.8b2 higher-timeframe context packet.
mtfConfirmedSnapshot() retains the old trade-context methodology while
contextConfirmedSnapshot() retains the separate Context-EW forecast geometry.
Parameters:
mtfPivotStrength (int)
atrLength (simple int)
mtfMinimumSwingAtr (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
contextPivotStrength (int)
contextMinimumSwingAtr (float)
candidateStarts (int)
minimumNewCandidateScore (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
mtfContextState(pack)
Converts ContextPack's MTF branch into the shared DegreeState contract.
Parameters:
pack (ContextPack)
contextForecastDegreeState(pack)
Converts ContextPack's full Context-EW branch into DegreeState.
Parameters:
pack (ContextPack)
bridgeDegreeState(pivotStrength, atrLength, minimumSwingAtr, candidateStarts, minimumNewScore, allowDiagonals, allowTruncation, truncationMinimumPct, extensionThreshold, diagonalTolerance, invalidationMode)
Exact lower-bridge structural expression, object form.
Parameters:
pivotStrength (int)
atrLength (simple int)
minimumSwingAtr (float)
candidateStarts (int)
minimumNewScore (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
ltfMomentumSignal(fastLength, slowLength)
Exact lower-timeframe momentum expression used by 11.8b2.
Parameters:
fastLength (simple int)
slowLength (simple int)
nestedPivotEvent(strength, atrLength)
Exact Part 9.2 lower-degree confirmed pivot event expression.
Parameters:
strength (int)
atrLength (simple int)
htfTradeBridgeState(enabled, degreeEngineOn, secondaryEnabled, subSecondaryEnabled, primaryPivotStrength, secondaryPivotStrength, subSecondaryPivotStrength, atrLength, primaryMinimumSwingAtr, secondaryMinimumSwingAtr, subSecondaryMinimumSwingAtr, candidateStarts, minimumNewScore, allowDiagonals, allowTruncation, truncationMinimumPct, extensionThreshold, diagonalTolerance, invalidationMode, minimumModelScore, stopBufferAtr)
Native HTF trade bridge request expression. Candidate discovery,
first-seen geometry freezing and W2/W3/W4/W5 classification remain in Trade /13.
Parameters:
enabled (bool)
degreeEngineOn (bool)
secondaryEnabled (bool)
subSecondaryEnabled (bool)
primaryPivotStrength (int)
secondaryPivotStrength (int)
subSecondaryPivotStrength (int)
atrLength (simple int)
primaryMinimumSwingAtr (float)
secondaryMinimumSwingAtr (float)
subSecondaryMinimumSwingAtr (float)
candidateStarts (int)
minimumNewScore (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
minimumModelScore (float)
stopBufferAtr (float)
updateMtfState(previous, enabled, autoProfile, manualContextTimeframe, manualExecutionTimeframe, manualConfirmationTimeframe, chartTimeframe, chartSeconds, gateMode, requireExecutionTimeframe, ltfConfirmationMaximumAge, realtimeBar, context, ltfSignalValues, ltfSignalTimes, primaryDirection, correctionDirection)
Updates one persistent Model.MtfState object from the current profile,
requested context packet and request.security_lower_tf() signal/time arrays.
Pass a persistent initialized object from the host, then assign the returned object
back to it on every bar. The function intentionally ignores the realtime chart
bar's final LTF intrabar, exactly as 11.8b2 did.
Parameters:
previous (MtfState type from AYEHAN/CryptonianEWModel/1)
enabled (bool)
autoProfile (bool)
manualContextTimeframe (string)
manualExecutionTimeframe (string)
manualConfirmationTimeframe (string)
chartTimeframe (string)
chartSeconds (int)
gateMode (string)
requireExecutionTimeframe (bool)
ltfConfirmationMaximumAge (int)
realtimeBar (bool)
context (ContextPack)
ltfSignalValues (array<int>)
ltfSignalTimes (array<int>)
primaryDirection (int)
correctionDirection (int)
runtimeEvents(current, previous, primaryDirection, correctionDirection)
Small event helper that replaces host history expressions with object
history applied correctly by the caller: pass current and previous Runtime states.
Parameters:
current (MtfState type from AYEHAN/CryptonianEWModel/1)
previous (MtfState type from AYEHAN/CryptonianEWModel/1)
primaryDirection (int)
correctionDirection (int)
bootstrapState(chartPrimaryMissing, bridge, context, chartClose, chartAtr)
Parameters:
chartPrimaryMissing (bool)
bridge (DegreeState type from AYEHAN/CryptonianEWModel/1)
context (DegreeState type from AYEHAN/CryptonianEWModel/1)
chartClose (float)
chartAtr (float)
contextForecastState(enabled, contextTimeframeValid, context, armScore)
Parameters:
enabled (bool)
contextTimeframeValid (bool)
context (ContextPack)
armScore (float)
processNested(eventTypes, eventPrices, eventTimes, eventAtrs, barTimes, pivotPrices, pivotTimes, pendingType, pendingPrice, pendingTime, pendingAtr, lastEventTime, coverageStartTime, coverageEndTime, minimumSwingAtr, enabled)
Parameters:
eventTypes (array<int>)
eventPrices (array<float>)
eventTimes (array<int>)
eventAtrs (array<float>)
barTimes (array<int>)
pivotPrices (array<float>)
pivotTimes (array<int>)
pendingType (int)
pendingPrice (float)
pendingTime (int)
pendingAtr (float)
lastEventTime (int)
coverageStartTime (int)
coverageEndTime (int)
minimumSwingAtr (float)
enabled (bool)
nestedLeg(pivotPrices, pivotTimes, coverageStartTime, coverageEndTime, engineOn, timeframeValid, t0, y0, t1, y1, direction, motive, diagonal, confirmed)
Parameters:
pivotPrices (array<float>)
pivotTimes (array<int>)
coverageStartTime (int)
coverageEndTime (int)
engineOn (bool)
timeframeValid (bool)
t0 (int)
y0 (float)
t1 (int)
y1 (float)
direction (int)
motive (bool)
diagonal (bool)
confirmed (bool)
structuralProductionGate(productionMode, confirmOnClose, barConfirmed)
Parameters:
productionMode (bool)
confirmOnClose (bool)
barConfirmed (bool)
tradeActivationProductionGate(productionMode, confirmOnClose, barConfirmed)
Parameters:
productionMode (bool)
confirmOnClose (bool)
barConfirmed (bool)
packEngineState(primary, secondary, subSecondary, correction, bootstrap, parent, degreeResolution, forecast, contextForecast, mtf, htfTrade, events)
Parameters:
primary (DegreeState type from AYEHAN/CryptonianEWModel/1)
secondary (DegreeState type from AYEHAN/CryptonianEWModel/1)
subSecondary (DegreeState type from AYEHAN/CryptonianEWModel/1)
correction (CorrectionState type from AYEHAN/CryptonianEWModel/1)
bootstrap (BootstrapState type from AYEHAN/CryptonianEWModel/1)
parent (ParentHypothesis type from AYEHAN/CryptonianEWModel/1)
degreeResolution (DegreeResolutionState type from AYEHAN/CryptonianEWModel/1)
forecast (ForecastState type from AYEHAN/CryptonianEWModel/1)
contextForecast (ContextForecastState type from AYEHAN/CryptonianEWModel/1)
mtf (MtfState type from AYEHAN/CryptonianEWModel/1)
htfTrade (TradeBridgePack type from AYEHAN/CryptonianEWModel/1)
events (EventState type from AYEHAN/CryptonianEWModel/1)
ContextPack
One request-safe higher-timeframe packet containing both legacy MTF
Fields:
mtfDirection (series int)
mtfStage (series int)
mtfQuality (series float)
mtfInvalidation (series float)
mtfDiagonal (series bool)
forecastDirection (series int)
forecastStage (series int)
forecastScore (series float)
forecastInvalidation (series float)
forecastDiagonal (series bool)
p0 (series float)
p1 (series float)
p2 (series float)
p3 (series float)
p4 (series float)
p5 (series float)
confirmedClose (series float)
RuntimeEvents
Small host-facing diagnostic packet for runtime transitions.
Fields:
contextChanged (series bool)
motiveGateReady (series bool)
correctionGateReady (series bool)
Cryptonian Elliott Wave Runtime /1. Owns adaptive MTF profile selection, compact context/bridge request expressions, lower-timeframe confirmation processing, MTF trade gates, bottom-up bootstrap assembly, Context EW forecast assembly, HTF trade-bridge request expressions, nested-pivot request expressions, production gates and final engine-state packing. Methodology is preserved from Elliott Wave Engine 11.8b2; this library is an architecture migration, not a rules rewrite.
autoContextTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
autoConfirmationTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
autoBridgeTimeframe(chartSeconds)
Parameters:
chartSeconds (int)
profileState(enabled, autoProfile, manualContextTimeframe, manualExecutionTimeframe, manualConfirmationTimeframe, chartTimeframe, chartSeconds)
Builds the timeframe/profile portion of Model.MtfState.
It deliberately does not perform any data request.
Parameters:
enabled (bool)
autoProfile (bool)
manualContextTimeframe (string)
manualExecutionTimeframe (string)
manualConfirmationTimeframe (string)
chartTimeframe (string)
chartSeconds (int)
bridgeTimeframe(autoProfile, manualConfirmationTimeframe, chartSeconds)
Returns the active lower bridge timeframe used by the existing
bottom-up Elliott bootstrap. This remains separate because Model /1 MtfState
intentionally stores only Context / Execution / Confirmation.
Parameters:
autoProfile (bool)
manualConfirmationTimeframe (string)
chartSeconds (int)
bridgeTimeframeValid(bridgeTf, chartSeconds)
Parameters:
bridgeTf (string)
chartSeconds (int)
contextPack(mtfPivotStrength, atrLength, mtfMinimumSwingAtr, allowDiagonals, allowTruncation, truncationMinimumPct, contextPivotStrength, contextMinimumSwingAtr, candidateStarts, minimumNewCandidateScore, extensionThreshold, diagonalTolerance, invalidationMode)
Exact 11.8b2 higher-timeframe context packet.
mtfConfirmedSnapshot() retains the old trade-context methodology while
contextConfirmedSnapshot() retains the separate Context-EW forecast geometry.
Parameters:
mtfPivotStrength (int)
atrLength (simple int)
mtfMinimumSwingAtr (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
contextPivotStrength (int)
contextMinimumSwingAtr (float)
candidateStarts (int)
minimumNewCandidateScore (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
mtfContextState(pack)
Converts ContextPack's MTF branch into the shared DegreeState contract.
Parameters:
pack (ContextPack)
contextForecastDegreeState(pack)
Converts ContextPack's full Context-EW branch into DegreeState.
Parameters:
pack (ContextPack)
bridgeDegreeState(pivotStrength, atrLength, minimumSwingAtr, candidateStarts, minimumNewScore, allowDiagonals, allowTruncation, truncationMinimumPct, extensionThreshold, diagonalTolerance, invalidationMode)
Exact lower-bridge structural expression, object form.
Parameters:
pivotStrength (int)
atrLength (simple int)
minimumSwingAtr (float)
candidateStarts (int)
minimumNewScore (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
ltfMomentumSignal(fastLength, slowLength)
Exact lower-timeframe momentum expression used by 11.8b2.
Parameters:
fastLength (simple int)
slowLength (simple int)
nestedPivotEvent(strength, atrLength)
Exact Part 9.2 lower-degree confirmed pivot event expression.
Parameters:
strength (int)
atrLength (simple int)
htfTradeBridgeState(enabled, degreeEngineOn, secondaryEnabled, subSecondaryEnabled, primaryPivotStrength, secondaryPivotStrength, subSecondaryPivotStrength, atrLength, primaryMinimumSwingAtr, secondaryMinimumSwingAtr, subSecondaryMinimumSwingAtr, candidateStarts, minimumNewScore, allowDiagonals, allowTruncation, truncationMinimumPct, extensionThreshold, diagonalTolerance, invalidationMode, minimumModelScore, stopBufferAtr)
Native HTF trade bridge request expression. Candidate discovery,
first-seen geometry freezing and W2/W3/W4/W5 classification remain in Trade /13.
Parameters:
enabled (bool)
degreeEngineOn (bool)
secondaryEnabled (bool)
subSecondaryEnabled (bool)
primaryPivotStrength (int)
secondaryPivotStrength (int)
subSecondaryPivotStrength (int)
atrLength (simple int)
primaryMinimumSwingAtr (float)
secondaryMinimumSwingAtr (float)
subSecondaryMinimumSwingAtr (float)
candidateStarts (int)
minimumNewScore (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
minimumModelScore (float)
stopBufferAtr (float)
updateMtfState(previous, enabled, autoProfile, manualContextTimeframe, manualExecutionTimeframe, manualConfirmationTimeframe, chartTimeframe, chartSeconds, gateMode, requireExecutionTimeframe, ltfConfirmationMaximumAge, realtimeBar, context, ltfSignalValues, ltfSignalTimes, primaryDirection, correctionDirection)
Updates one persistent Model.MtfState object from the current profile,
requested context packet and request.security_lower_tf() signal/time arrays.
Pass a persistent initialized object from the host, then assign the returned object
back to it on every bar. The function intentionally ignores the realtime chart
bar's final LTF intrabar, exactly as 11.8b2 did.
Parameters:
previous (MtfState type from AYEHAN/CryptonianEWModel/1)
enabled (bool)
autoProfile (bool)
manualContextTimeframe (string)
manualExecutionTimeframe (string)
manualConfirmationTimeframe (string)
chartTimeframe (string)
chartSeconds (int)
gateMode (string)
requireExecutionTimeframe (bool)
ltfConfirmationMaximumAge (int)
realtimeBar (bool)
context (ContextPack)
ltfSignalValues (array<int>)
ltfSignalTimes (array<int>)
primaryDirection (int)
correctionDirection (int)
runtimeEvents(current, previous, primaryDirection, correctionDirection)
Small event helper that replaces host history expressions with object
history applied correctly by the caller: pass current and previous Runtime states.
Parameters:
current (MtfState type from AYEHAN/CryptonianEWModel/1)
previous (MtfState type from AYEHAN/CryptonianEWModel/1)
primaryDirection (int)
correctionDirection (int)
bootstrapState(chartPrimaryMissing, bridge, context, chartClose, chartAtr)
Parameters:
chartPrimaryMissing (bool)
bridge (DegreeState type from AYEHAN/CryptonianEWModel/1)
context (DegreeState type from AYEHAN/CryptonianEWModel/1)
chartClose (float)
chartAtr (float)
contextForecastState(enabled, contextTimeframeValid, context, armScore)
Parameters:
enabled (bool)
contextTimeframeValid (bool)
context (ContextPack)
armScore (float)
processNested(eventTypes, eventPrices, eventTimes, eventAtrs, barTimes, pivotPrices, pivotTimes, pendingType, pendingPrice, pendingTime, pendingAtr, lastEventTime, coverageStartTime, coverageEndTime, minimumSwingAtr, enabled)
Parameters:
eventTypes (array<int>)
eventPrices (array<float>)
eventTimes (array<int>)
eventAtrs (array<float>)
barTimes (array<int>)
pivotPrices (array<float>)
pivotTimes (array<int>)
pendingType (int)
pendingPrice (float)
pendingTime (int)
pendingAtr (float)
lastEventTime (int)
coverageStartTime (int)
coverageEndTime (int)
minimumSwingAtr (float)
enabled (bool)
nestedLeg(pivotPrices, pivotTimes, coverageStartTime, coverageEndTime, engineOn, timeframeValid, t0, y0, t1, y1, direction, motive, diagonal, confirmed)
Parameters:
pivotPrices (array<float>)
pivotTimes (array<int>)
coverageStartTime (int)
coverageEndTime (int)
engineOn (bool)
timeframeValid (bool)
t0 (int)
y0 (float)
t1 (int)
y1 (float)
direction (int)
motive (bool)
diagonal (bool)
confirmed (bool)
structuralProductionGate(productionMode, confirmOnClose, barConfirmed)
Parameters:
productionMode (bool)
confirmOnClose (bool)
barConfirmed (bool)
tradeActivationProductionGate(productionMode, confirmOnClose, barConfirmed)
Parameters:
productionMode (bool)
confirmOnClose (bool)
barConfirmed (bool)
packEngineState(primary, secondary, subSecondary, correction, bootstrap, parent, degreeResolution, forecast, contextForecast, mtf, htfTrade, events)
Parameters:
primary (DegreeState type from AYEHAN/CryptonianEWModel/1)
secondary (DegreeState type from AYEHAN/CryptonianEWModel/1)
subSecondary (DegreeState type from AYEHAN/CryptonianEWModel/1)
correction (CorrectionState type from AYEHAN/CryptonianEWModel/1)
bootstrap (BootstrapState type from AYEHAN/CryptonianEWModel/1)
parent (ParentHypothesis type from AYEHAN/CryptonianEWModel/1)
degreeResolution (DegreeResolutionState type from AYEHAN/CryptonianEWModel/1)
forecast (ForecastState type from AYEHAN/CryptonianEWModel/1)
contextForecast (ContextForecastState type from AYEHAN/CryptonianEWModel/1)
mtf (MtfState type from AYEHAN/CryptonianEWModel/1)
htfTrade (TradeBridgePack type from AYEHAN/CryptonianEWModel/1)
events (EventState type from AYEHAN/CryptonianEWModel/1)
ContextPack
One request-safe higher-timeframe packet containing both legacy MTF
Fields:
mtfDirection (series int)
mtfStage (series int)
mtfQuality (series float)
mtfInvalidation (series float)
mtfDiagonal (series bool)
forecastDirection (series int)
forecastStage (series int)
forecastScore (series float)
forecastInvalidation (series float)
forecastDiagonal (series bool)
p0 (series float)
p1 (series float)
p2 (series float)
p3 (series float)
p4 (series float)
p5 (series float)
confirmedClose (series float)
RuntimeEvents
Small host-facing diagnostic packet for runtime transitions.
Fields:
contextChanged (series bool)
motiveGateReady (series bool)
correctionGateReady (series bool)
릴리즈 노트
v2Updated:
htfTradeBridgeState(enabled, degreeEngineOn, secondaryEnabled, subSecondaryEnabled, primaryPivotStrength, secondaryPivotStrength, subSecondaryPivotStrength, atrLength, primaryMinimumSwingAtr, secondaryMinimumSwingAtr, subSecondaryMinimumSwingAtr, candidateStarts, minimumNewScore, allowDiagonals, allowTruncation, truncationMinimumPct, extensionThreshold, diagonalTolerance, invalidationMode, minimumModelScore, stopBufferAtr)
Native HTF trade bridge request expression. Candidate discovery,
first-seen geometry freezing and W2/W3/W4/W5 classification remain in Trade /14.
Parameters:
enabled (bool)
degreeEngineOn (bool)
secondaryEnabled (bool)
subSecondaryEnabled (bool)
primaryPivotStrength (int)
secondaryPivotStrength (int)
subSecondaryPivotStrength (int)
atrLength (simple int)
primaryMinimumSwingAtr (float)
secondaryMinimumSwingAtr (float)
subSecondaryMinimumSwingAtr (float)
candidateStarts (int)
minimumNewScore (float)
allowDiagonals (bool)
allowTruncation (bool)
truncationMinimumPct (float)
extensionThreshold (float)
diagonalTolerance (float)
invalidationMode (string)
minimumModelScore (float)
stopBufferAtr (float)
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
I Am LOVE But You Can Call Me AYEHAN
discord.gg/nX3DGCyCJV
discord.gg/nX3DGCyCJV
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
I Am LOVE But You Can Call Me AYEHAN
discord.gg/nX3DGCyCJV
discord.gg/nX3DGCyCJV
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.