업데이트됨
ORPanels

Library "ORPanels"
Panel/table renderers for the Opening Range indicator family, factored out of the
host to relieve its compiled-token budget (CE10117). The host owns all state and
inputs; it marshals them into the config/state UDTs below and calls the exported
renderers. This library is pure presentation — it reads no host globals (Pine
forbids that), creates/mutates the table passed to it, and returns nothing.
Scope (2026-07): the DEBUG table only. The status table stays in the host (it is the client's
primary panel and Phase 6 modifies it). `writeRow` is duplicated here on purpose — the host
keeps its own copy for the still-in-host status table.
Usage (host):
import Mr_NSFT/ORPanels/1 as orp
var orp.DebugConfig dbgCfg = orp.DebugConfig.new(...) // from inputs, once
var orp.DbgLayout dbgL = makeDbgLayout() // host builds it (feeds table.new rows)
var table dbgTable = makeDebugTable(dbgL.total) // host owns table.new
if i_showDebugTable and not na(dbgTable) and barstate.isconfirmed
orp.renderDebug(dbgTable, dbgL, dbgCfg, buildDebugState()) // buildDebugState() -> DebugState
makeDbgLayout(c)
Build the debug-table layout (row total + per-section presence flags and offsets)
from the config. Row offsets are a running accumulator in physical row order.
The host holds the result in a `var` and feeds its `total` to `table.new`'s rows.
Parameters:
c (DebugConfig): The debug config.
Returns: A `DbgLayout`.
renderDebug(t, lay, c, s)
Render the debug table (verbatim behavior of the host's former `renderDebugTable`).
The host gates the call (`i_showDebugTable and not na(t) and barstate.isconfirmed`);
the internal guard is kept as defense.
Parameters:
t (table): The debug table (host-owned; created via `table.new`).
lay (DbgLayout): The debug layout (host-built `DbgLayout`).
c (DebugConfig): The debug config (input-derived).
s (DebugState): The per-bar debug state.
DbgLayout
Debug-table layout: total row count + per-section presence flags and row offsets.
Fields:
total (series int)
txt (series string)
rowCont (series int)
secBreak (series bool)
rowBreak (series int)
secConf (series bool)
rowConf (series int)
secMom (series bool)
rowMom (series int)
secAccept (series bool)
rowAccept (series int)
secRetest (series bool)
rowRetest (series int)
secPassive (series bool)
rowPassive (series int)
rowInflHdr (series int)
secInfl (series bool)
rowInfl (series int)
rowVelHdr (series int)
secVel (series bool)
rowVel (series int)
DebugConfig
Debug-table config: the input-derived, session-constant values the renderer needs
Fields:
txtColor (series color)
bgColor (series color)
txtSize (series string)
showDebug (series bool)
showCont (series bool)
showInfl (series bool)
showVel (series bool)
maxInit (series int)
contMax (series int)
inflMax (series int)
velMax (series int)
dbgBreakBull (series bool)
dbgBreakBear (series bool)
dbgConfBull (series bool)
dbgConfBear (series bool)
dbgMomBull (series bool)
dbgMomBear (series bool)
dbgAcceptBull (series bool)
dbgAcceptBear (series bool)
dbgRetestBull (series bool)
dbgRetestBear (series bool)
dbgAboveBull (series bool)
dbgAboveBear (series bool)
dbgInflBull (series bool)
dbgInflBear (series bool)
dbgVelBull (series bool)
dbgVelBear (series bool)
DebugState
Debug-table state: the per-bar engine values displayed. Mostly raw (the renderer does the
Fields:
noVolData (series bool)
setupInitAllowed (series bool)
orStart (series int)
vahPrice (series float)
valPrice (series float)
contStateBull (series string)
contStateBear (series string)
contBullSignals (series int)
contBearSignals (series int)
inflBullSignals (series int)
inflBearSignals (series int)
velBullSignals (series int)
velBearSignals (series int)
dbgBullBreakEvt (series string)
dbgBearBreakEvt (series string)
dbgBullBreakClose (series string)
dbgBearBreakClose (series string)
dbgBullConfEvt (series string)
dbgBearConfEvt (series string)
dbgBullConfClose (series string)
dbgBearConfClose (series string)
dbgBullConfBrkClose (series string)
dbgBearConfBrkClose (series string)
dbgBullMomEvt (series string)
dbgBearMomEvt (series string)
dbgBullMomC1 (series string)
dbgBearMomC1 (series string)
dbgBullMomC2 (series string)
dbgBearMomC2 (series string)
dbgBullMomC3 (series string)
dbgBearMomC3 (series string)
dbgBullAcceptCount (series string)
dbgBearAcceptCount (series string)
dbgBullAcceptEvt (series string)
dbgBearAcceptEvt (series string)
dbgBullAcceptTrack (series string)
dbgBearAcceptTrack (series string)
dbgBullRetestAtt (series string)
dbgBearRetestAtt (series string)
dbgBullRetestEvt (series string)
dbgBearRetestEvt (series string)
dbgBullRetestExtr (series string)
dbgBearRetestExtr (series string)
dbgBullRetestClose (series string)
dbgBearRetestClose (series string)
dbgBullPassiveEvt (series string)
dbgBearPassiveEvt (series string)
dbgBullInflEvt (series string)
dbgBearInflEvt (series string)
dbgBullInflLevel (series string)
dbgBearInflLevel (series string)
dbgBullInflBreak (series string)
dbgBearInflBreak (series string)
dbgBullInflClose (series string)
dbgBearInflClose (series string)
dbgBullInflBody (series string)
dbgBearInflBody (series string)
dbgVelBullEvt (series string)
dbgVelBearEvt (series string)
dbgVelState (series string)
dbgVelER (series string)
dbgVelEscapeER (series string)
dbgVelRange (series string)
dbgVelBody (series string)
dbgVelEscBull (series string)
dbgVelEscBear (series string)
dbgVelConfBull (series string)
dbgVelConfBear (series string)
Panel/table renderers for the Opening Range indicator family, factored out of the
host to relieve its compiled-token budget (CE10117). The host owns all state and
inputs; it marshals them into the config/state UDTs below and calls the exported
renderers. This library is pure presentation — it reads no host globals (Pine
forbids that), creates/mutates the table passed to it, and returns nothing.
Scope (2026-07): the DEBUG table only. The status table stays in the host (it is the client's
primary panel and Phase 6 modifies it). `writeRow` is duplicated here on purpose — the host
keeps its own copy for the still-in-host status table.
Usage (host):
import Mr_NSFT/ORPanels/1 as orp
var orp.DebugConfig dbgCfg = orp.DebugConfig.new(...) // from inputs, once
var orp.DbgLayout dbgL = makeDbgLayout() // host builds it (feeds table.new rows)
var table dbgTable = makeDebugTable(dbgL.total) // host owns table.new
if i_showDebugTable and not na(dbgTable) and barstate.isconfirmed
orp.renderDebug(dbgTable, dbgL, dbgCfg, buildDebugState()) // buildDebugState() -> DebugState
makeDbgLayout(c)
Build the debug-table layout (row total + per-section presence flags and offsets)
from the config. Row offsets are a running accumulator in physical row order.
The host holds the result in a `var` and feeds its `total` to `table.new`'s rows.
Parameters:
c (DebugConfig): The debug config.
Returns: A `DbgLayout`.
renderDebug(t, lay, c, s)
Render the debug table (verbatim behavior of the host's former `renderDebugTable`).
The host gates the call (`i_showDebugTable and not na(t) and barstate.isconfirmed`);
the internal guard is kept as defense.
Parameters:
t (table): The debug table (host-owned; created via `table.new`).
lay (DbgLayout): The debug layout (host-built `DbgLayout`).
c (DebugConfig): The debug config (input-derived).
s (DebugState): The per-bar debug state.
DbgLayout
Debug-table layout: total row count + per-section presence flags and row offsets.
Fields:
total (series int)
txt (series string)
rowCont (series int)
secBreak (series bool)
rowBreak (series int)
secConf (series bool)
rowConf (series int)
secMom (series bool)
rowMom (series int)
secAccept (series bool)
rowAccept (series int)
secRetest (series bool)
rowRetest (series int)
secPassive (series bool)
rowPassive (series int)
rowInflHdr (series int)
secInfl (series bool)
rowInfl (series int)
rowVelHdr (series int)
secVel (series bool)
rowVel (series int)
DebugConfig
Debug-table config: the input-derived, session-constant values the renderer needs
Fields:
txtColor (series color)
bgColor (series color)
txtSize (series string)
showDebug (series bool)
showCont (series bool)
showInfl (series bool)
showVel (series bool)
maxInit (series int)
contMax (series int)
inflMax (series int)
velMax (series int)
dbgBreakBull (series bool)
dbgBreakBear (series bool)
dbgConfBull (series bool)
dbgConfBear (series bool)
dbgMomBull (series bool)
dbgMomBear (series bool)
dbgAcceptBull (series bool)
dbgAcceptBear (series bool)
dbgRetestBull (series bool)
dbgRetestBear (series bool)
dbgAboveBull (series bool)
dbgAboveBear (series bool)
dbgInflBull (series bool)
dbgInflBear (series bool)
dbgVelBull (series bool)
dbgVelBear (series bool)
DebugState
Debug-table state: the per-bar engine values displayed. Mostly raw (the renderer does the
Fields:
noVolData (series bool)
setupInitAllowed (series bool)
orStart (series int)
vahPrice (series float)
valPrice (series float)
contStateBull (series string)
contStateBear (series string)
contBullSignals (series int)
contBearSignals (series int)
inflBullSignals (series int)
inflBearSignals (series int)
velBullSignals (series int)
velBearSignals (series int)
dbgBullBreakEvt (series string)
dbgBearBreakEvt (series string)
dbgBullBreakClose (series string)
dbgBearBreakClose (series string)
dbgBullConfEvt (series string)
dbgBearConfEvt (series string)
dbgBullConfClose (series string)
dbgBearConfClose (series string)
dbgBullConfBrkClose (series string)
dbgBearConfBrkClose (series string)
dbgBullMomEvt (series string)
dbgBearMomEvt (series string)
dbgBullMomC1 (series string)
dbgBearMomC1 (series string)
dbgBullMomC2 (series string)
dbgBearMomC2 (series string)
dbgBullMomC3 (series string)
dbgBearMomC3 (series string)
dbgBullAcceptCount (series string)
dbgBearAcceptCount (series string)
dbgBullAcceptEvt (series string)
dbgBearAcceptEvt (series string)
dbgBullAcceptTrack (series string)
dbgBearAcceptTrack (series string)
dbgBullRetestAtt (series string)
dbgBearRetestAtt (series string)
dbgBullRetestEvt (series string)
dbgBearRetestEvt (series string)
dbgBullRetestExtr (series string)
dbgBearRetestExtr (series string)
dbgBullRetestClose (series string)
dbgBearRetestClose (series string)
dbgBullPassiveEvt (series string)
dbgBearPassiveEvt (series string)
dbgBullInflEvt (series string)
dbgBearInflEvt (series string)
dbgBullInflLevel (series string)
dbgBearInflLevel (series string)
dbgBullInflBreak (series string)
dbgBearInflBreak (series string)
dbgBullInflClose (series string)
dbgBearInflClose (series string)
dbgBullInflBody (series string)
dbgBearInflBody (series string)
dbgVelBullEvt (series string)
dbgVelBearEvt (series string)
dbgVelState (series string)
dbgVelER (series string)
dbgVelEscapeER (series string)
dbgVelRange (series string)
dbgVelBody (series string)
dbgVelEscBull (series string)
dbgVelEscBear (series string)
dbgVelConfBull (series string)
dbgVelConfBear (series string)
릴리즈 노트
v2Added:
makeStsLayout(c)
Build the status-table layout (moved verbatim from the host's makeStsLayout in v2;
the input reads became config reads). Row offsets are a running accumulator in
physical row order; `na` marks an inactive section.
Parameters:
c (StsConfig): The status config.
Returns: A `StsLayout`.
renderStatus(t, lay, c, s)
Render the status table (moved verbatim from the host's renderStatusTable in v2 —
same rows, same strings; only the identifiers were renamed to config/state reads).
The host gates the call (`i_showStatusTable and not na(t) and barstate.islast`);
the inner guard is kept as defense, mirroring renderDebug.
Parameters:
t (table): The status table (host-owned; created via `table.new`).
lay (StsLayout): The status layout (`makeStsLayout`).
c (StsConfig): The status config (input-derived).
s (StsState): The render-bar state (host-marshalled).
StsLayout
Status-table layout (moved from the host in v2). Built by `makeStsLayout` from the config,
Fields:
total (series int)
hdrTxt (series string)
txt (series string)
rowFri (series int)
rowComp (series int)
rowCont (series int)
rowInfl (series int)
rowVel (series int)
rowScore (series int)
StsConfig
Status-table config: input-derived, built once by the host (`var`).
Fields:
txtColor (series color)
bgColor (series color)
hdrBgColor (series color)
txtSize (series string)
maxInitMins (series int)
blockFriday (series bool)
friHour (series int)
friMinute (series int)
showCont (series bool)
contMax (series int)
showInfl (series bool)
inflMax (series int)
compShow (series bool)
showVel (series bool)
velMax (series int)
velArmWindow (series int)
velConfCloses (series int)
showScore (series bool)
showComponents (series bool)
showSW (series bool)
showDetail (series bool)
wQuality (series float)
wPath (series float)
wComp (series float)
wPrev (series float)
wCurr (series float)
wRoom (series float)
tmEnabled (series bool)
footprintOff (series bool)
StsState
Status-table state, marshalled by the host on the render bar only.
Fields:
noVolData (series bool)
tfValid (series bool)
orHigh (series float)
orLow (series float)
vah (series float)
val (series float)
initAllowed (series bool)
friGate (series bool)
contBullN (series int)
contBearN (series int)
contBullState (series string)
contBearState (series string)
contBullEvt (series string)
contBearEvt (series string)
inflBullN (series int)
inflBearN (series int)
inflBullEvt (series string)
inflBearEvt (series string)
compReady (series bool)
cVah (series float)
cPoc (series float)
cVal (series float)
velBullN (series int)
velBearN (series int)
velArmed (series bool)
velGraceOn (series bool)
velConfirming (series bool)
velGrace (series int)
velConfCount (series int)
velDir (series int)
velBullEvt (series string)
velBearEvt (series string)
hasScore (series bool)
scComp (series float)
scCurr (series float)
scGrade (series string)
scPath (series float)
scPrev (series float)
scQuality (series float)
scRoom (series float)
scTotal (series float)
swStrong (series string)
swWeak (series string)
detailL (series string)
detailR (series string)
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.