PINE LIBRARY
업데이트됨 MarketReaction

Library "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.
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.
릴리즈 노트
v2Added:
sessionVwapModule(session, timeZone, dev1, dev2, dev3)
Calculates session VWAP with 3 upper/lower deviation bands.
Parameters:
session (string): Session time string.
timeZone (simple string): Session timezone.
dev1 (simple float): Deviation multiplier 1.
dev2 (simple float): Deviation multiplier 2.
dev3 (simple float): Deviation multiplier 3.
Returns: VWAPResult.
VWAPResult
VWAP result.
Fields:
vwap (series float): Session VWAP.
upper1 (series float): VWAP upper deviation 1.
lower1 (series float): VWAP lower deviation 1.
upper2 (series float): VWAP upper deviation 2.
lower2 (series float): VWAP lower deviation 2.
upper3 (series float): VWAP upper deviation 3.
lower3 (series float): VWAP lower deviation 3.
inSession (series bool): True when current bar is inside the session.
firstBar (series bool): True on first session bar.
Updated:
sessionModule(session, timeZone, sessionText, sessionColor, sessionDuration, showSession, showLabels, showLines, showMiddleLine, showBg, bgTransp)
Draws session high/low/middle, label, and background.
Parameters:
session (string): Session time string.
timeZone (simple string): Session timezone.
sessionText (simple string): Session label text.
sessionColor (color): Session color.
sessionDuration (int): Session duration in milliseconds.
showSession (bool): Show this session.
showLabels (bool): Show session label.
showLines (bool): Show high/low lines.
showMiddleLine (bool): Show middle line.
showBg (bool): Show background fill.
bgTransp (int): Background transparency.
Returns: SessionResult.
SessionResult
Session result.
Fields:
high (series float): Session high.
low (series float): Session low.
mid (series float): Session middle.
inSession (series bool): True when current bar is inside the session.
firstBar (series bool): True on first session bar.
Removed:
getSessionConfig(source)
Returns session config by source name.
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.
psyRangeModule(session, timeZone, showLabels, showPrev, sessionColor)
Calculates PSY high/low, previous PSY levels, labels, and VWAP.
rangeSignal(highLevel, lowLevel, price)
Returns enter/exit signals for a range.
tablePosition(pos)
Converts table position string to Pine position.
SessionConfig
Session configuration.
IBResult
Initial Balance result.
PSYResult
PSY range result.
RangeSignal
Range signal result.
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.