PINE LIBRARY
更新済

MarketReaction

248
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.
リリースノート
v2

Added:
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.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。