PINE LIBRARY
Aggiornato MirPapa_Lib_Box

Library "MirPapa_Lib_Box"
GetHTFrevised(_tf, _case)
โโGetHTFrevised
description Retrieve a specific bar value from a Higher Time Frame (HTF) series.
โโParameters:
โโโโ_tf (string): string The target HTF string (examples: "60", "1D").
โโโโ_case (string): string Case string determining which OHLC value to request.
return float Returns the requested HTF value or na if _case does not match.
GetHTFrevised(_tf)
โโParameters:
โโโโ_tf (string)
GetHTFoffsetToLTFoffset(_offset, _chartTf, _htfTf)
โโGetHTFoffsetToLTFoffset
description Adjust an HTF offset to an LTF offset by calculating the ratio of timeframes.
โโParameters:
โโโโ_offset (int): int The HTF bar offset (0 means current HTF bar).
โโโโ_chartTf (string): string The current chart's timeframe (e.g., "5", "15", "1D").
โโโโ_htfTf (string): string The High Time Frame string (e.g., "60", "1D").
return int The corresponding LTF bar index. Returns 0 if the result is negative.
GetHtfFromLabel(_label)
โโGetHtfFromLabel
description Convert a Korean HTF label into a Pine Script timeframe string.
โโParameters:
โโโโ_label (string): string The Korean label (e.g., "5๋ถ", "1์๊ฐ").
return string Returns the corresponding Pine Script timeframe (e.g., "5", "60").
IsChartTFcomparisonHTF(_chartTf, _htfTf)
โโIsChartTFcomparisonHTF
description Determine whether a given HTF is greater than or equal to the current chart timeframe.
โโParameters:
โโโโ_chartTf (string): string Current chart timeframe (e.g., "5", "15", "1D").
โโโโ_htfTf (string): string HTF timeframe (e.g., "60", "1D").
return bool True if HTF โฅ chartTF, false otherwise.
IsCondition(_boxType, _isBull, _pricePrev, _priceNow)
โโIsCondition
description FOB, FVG ์กฐ๊ฑด ์ฒดํฌ.\
_boxType: "fob"(Fair Order Block) ๋๋ "fvg"(Fair Value Gap).\
_isBull: true(์์น ํจํด), false(ํ๋ฝ ํจํด).\
์์น ์ ํ์ฌ ๊ฐ๊ฒฉ์ด ์ด์ ๊ฐ๊ฒฉ๋ณด๋ค ๋์ผ๋ฉด true, ํ๋ฝ ์ ์ด์ ๊ฐ๊ฒฉ์ด ํ์ฌ ๊ฐ๊ฒฉ๋ณด๋ค ๋์ผ๋ฉด true ๋ฐํ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ ("fob", "fvg")
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_pricePrev (float): ์ด์ ๊ฐ๊ฒฉ
โโโโ_priceNow (float): ํ์ฌ ๊ฐ๊ฒฉ
โโReturns: bool ์กฐ๊ฑด ๋ง์กฑ ์ฌ๋ถ
IsCondition(_boxType, _high2, _high1, _high0, _low2, _low1, _low0)
โโIsCondition
description Sweep ์กฐ๊ฑด ์ฒดํฌ (Swing High/Low ๋์ ๋ฐ์).\
_boxType: "sweep" ๋๋ "breachBoth".\
์กฐ๊ฑด: high2 < high1 > high0 (Swing High) AND low2 > low1 < low0 (Swing Low).\
์ค๊ฐ ์บ๋ค์ด ์์ชฝ๋ณด๋ค ๋๊ณ ๋ฎ์ ์ง์ ์ ๋์์ ํ์ฑํ ๋ true ๋ฐํ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ ("sweep", "breachBoth")
โโโโ_high2 (float)
โโโโ_high1 (float)
โโโโ_high0 (float)
โโโโ_low2 (float)
โโโโ_low1 (float)
โโโโ_low0 (float)
โโReturns: bool ์กฐ๊ฑด ๋ง์กฑ ์ฌ๋ถ
IsCondition(_boxType, _isBull, _open1, _close1, _high1, _low1, _open0, _close0, _low2, _low3, _high2, _high3)
โโIsCondition
description RB (Rejection Block) ์กฐ๊ฑด ์ฒดํฌ.\
_boxType: "rb" (Rejection Block).\
์์น RB: candle1=์๋ด, candle0=์๋ด, low3>low1 AND low2>low1, close1*1.001>open0, open1<close0.\
ํ๋ฝ RB: candle1=์๋ด, candle0=์๋ด, high3<high1 AND high2<high1, close1*0.999<open0, open1>close0.\
์ด์ ์บ๋ค์ ๊ฑฐ๋ถ ํ ํ์ฌ ์บ๋ค์ด ๋ฐ๋ ๋ฐฉํฅ์ผ๋ก ์ ํ๋ ๋ true ๋ฐํ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ ("rb")
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_open1 (float)
โโโโ_close1 (float)
โโโโ_high1 (float)
โโโโ_low1 (float)
โโโโ_open0 (float)
โโโโ_close0 (float)
โโโโ_low2 (float)
โโโโ_low3 (float)
โโโโ_high2 (float)
โโโโ_high3 (float)
โโReturns: bool ์กฐ๊ฑด ๋ง์กฑ ์ฌ๋ถ
IsCondition(_boxType, _isBull, _open2, _close1, _open1, _close0)
โโIsCondition
description SOB (Strong Order Block) ์กฐ๊ฑด ์ฒดํฌ.\
_boxType: "sob" (Strong Order Block).\
์์น SOB: ์๋ด2 => ์๋ด1 => ์๋ด0, open2 > close1 AND open1 < close0.\
ํ๋ฝ SOB: ์๋ด2 => ์๋ด1 => ์๋ด0, open2 < close1 AND open1 > close0.\
3๊ฐ ์บ๋ค ํจํด์ผ๋ก ๊ฐํ ์ฃผ๋ฌธ ๋ธ๋ก ํ์ฑ ์ true ๋ฐํ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ ("sob")
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_open2 (float): 2๊ฐ ์ด์ ์บ๋ค open
โโโโ_close1 (float): 1๊ฐ ์ด์ ์บ๋ค close
โโโโ_open1 (float): 1๊ฐ ์ด์ ์บ๋ค open
โโโโ_close0 (float): ํ์ฌ ์บ๋ค close
โโReturns: bool ์กฐ๊ฑด ๋ง์กฑ ์ฌ๋ถ
CreateBox(_boxType, _tf, _isBull, _useLine, _colorBG, _colorBD, _colorText, _cache)
โโCreateBox
description ๋ฐ์ค ์์ฑ (breachMode ์๋ ๊ฒฐ์ ).\
_boxType: "fob", "rb", "custom" โ directionalHighLow, ๋๋จธ์ง โ both.\
_tf: ์๊ฐ๋ (timeframe.period ๋๋ HTF).\
_isBull: true(์์น ๋ฐ์ค), false(ํ๋ฝ ๋ฐ์ค).\
_cache: HTF ์ฌ์ฉ ์ ํ์, CurrentTF๋ na.\
๋ฐํ: [์ฑ๊ณต ์ฌ๋ถ(bool), ๋ฐ์ค ๋ฐ์ดํฐ(BoxData)].
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์
โโโโ_tf (string): ์๊ฐ๋
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_cache (HTFCache): HTF ์บ์ ๋ฐ์ดํฐ
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
CreateBox(_boxType, _tf, _isBull, _useLine, _colorBG, _colorBD, _colorText, _cache, _customText)
โโCreateBox
description ๋ฐ์ค ์์ฑ (์ปค์คํ ํ ์คํธ ์ง์, breachMode ์๋ ๊ฒฐ์ ).\
_boxType: "fob", "rb", "custom" โ directionalHighLow, ๋๋จธ์ง โ both.\
_customText: ๋ฐ์ค์ ํ์ํ ํ ์คํธ (๋น์ด์์ผ๋ฉด "์๊ฐ๋ ๋ฐ์คํ์ " ํ์์ผ๋ก ์๋ ์์ฑ).\
_isBull: true(์์น ๋ฐ์ค), false(ํ๋ฝ ๋ฐ์ค).\
๋ฐํ: [์ฑ๊ณต ์ฌ๋ถ(bool), ๋ฐ์ค ๋ฐ์ดํฐ(BoxData)].
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์
โโโโ_tf (string): ์๊ฐ๋
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_cache (HTFCache): HTF ์บ์ ๋ฐ์ดํฐ
โโโโ_customText (string): ์ปค์คํ ํ ์คํธ
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
CreateBox(_boxType, _breachMode, _tf, _isBull, _useLine, _colorBG, _colorBD, _colorText, _cache, _customText)
โโCreateBox
description ๋ฐ์ค ์์ฑ (breachMode ๋ช ์์ ์ง์ ).\
_breachMode: "both"(์์ชฝ ๋ชจ๋ ๋ํ), "directionalHighLow"(๋ฐฉํฅ์ฑ high/low ๋ํ), "directionalClose"(๋ฐฉํฅ์ฑ close ๋ํ).\
_isBull: true(์์น ๋ฐ์ค), false(ํ๋ฝ ๋ฐ์ค).\
_customText: ๋ฐ์ค์ ํ์ํ ํ ์คํธ (๋น์ด์์ผ๋ฉด "์๊ฐ๋ ๋ฐ์คํ์ " ํ์์ผ๋ก ์๋ ์์ฑ).\
๋ฐํ: [์ฑ๊ณต ์ฌ๋ถ(bool), ๋ฐ์ค ๋ฐ์ดํฐ(BoxData)].
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ (fob, fvg, sweep, rb, custom ๋ฑ)
โโโโ_breachMode (string): ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์: "both" (์์ชฝ ๋ชจ๋), "directionalHighLow" (๋ฐฉํฅ์ฑ high/low), "directionalClose" (๋ฐฉํฅ์ฑ close)
โโโโ_tf (string): ์๊ฐ๋
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false) ๋ฐฉํฅ
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_cache (HTFCache): HTF ์บ์ ๋ฐ์ดํฐ (CurrentTF๋ na)
โโโโ_customText (string): ์ปค์คํ ํ ์คํธ (๋น์ด์์ผ๋ฉด ์๋ ์์ฑ)
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
CreateCustomBox(_boxType, _breachMode, _isBull, _top, _bottom, _left, _right, _useLine, _colorBG, _colorBD, _colorText, _text)
โโCreateCustomBox
description ์์ ํ ์ ์ฐํ ์ปค์คํ ๋ฐ์ค ์์ฑ.\
์ฌ์ฉ์๊ฐ ๋ฐ์ค ์์น(top, bottom, left, right), breach mode, ๋ชจ๋ ํ๋ผ๋ฏธํฐ๋ฅผ ์ง์ ์ง์ .\
์กฐ๊ฑด ์ฒดํฌ๋ ์ฌ์ฉ์ ์คํฌ๋ฆฝํธ์์ ์ํํ๊ณ , ์ด ํจ์๋ ๋ฐ์ค ์์ฑ๋ง ๋ด๋น.\
์๋ก์ด ๋ฐ์ค ํ์ ์ถ๊ฐ ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์ ์์ด ์ฌ์ฉ ๊ฐ๋ฅ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ (์ฌ์ฉ์ ์ ์ ๋ฌธ์์ด)
โโโโ_breachMode (string): ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์: "both", "directionalHighLow", "directionalClose", "sobClose"
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false) ๋ฐฉํฅ
โโโโ_top (float): ๋ฐ์ค ์๋จ ๊ฐ๊ฒฉ
โโโโ_bottom (float): ๋ฐ์ค ํ๋จ ๊ฐ๊ฒฉ
โโโโ_left (int): ๋ฐ์ค ์์ ์๊ฐ (xloc.bar_time ์ฌ์ฉ)
โโโโ_right (int): ๋ฐ์ค ์ข ๋ฃ ์๊ฐ (xloc.bar_time ์ฌ์ฉ)
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_text (string): ๋ฐ์ค์ ํ์ํ ํ ์คํธ
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
ProcessBoxDatas(_openBoxes, _closedBoxes, _useMidLine, _closeCount, _colorClose, _currentBarIndex, _currentLow, _currentHigh, _currentTime)
โโProcessBoxDatas
description ๋ฐ์ค ํ์ฅ ๋ฐ ๋ํ ์ฒ๋ฆฌ.\
์ด๋ฆฐ ๋ฐ์ค๋ค์ ํ์ฌ bar๊น์ง ํ์ฅํ๊ณ , ๋ํ ์กฐ๊ฑด ์ฒดํฌ.\
_closeCount: ๋ํ ํ์ (์ด ํ์๋งํผ ๋ํ ์ ๋ฐ์ค ์ข ๋ฃ).\
breachMode์ ๋ฐ๋ผ ๋ํ ์ฒดํฌ ๋ฐฉ์ ๋ค๋ฆ (both/directionalHighLow/directionalClose).\
์ข ๋ฃ๋ ๋ฐ์ค๋ _closedBoxes๋ก ์ด๋ํ๊ณ _colorClose ์์ ์ ์ฉ.\
barstate.islast์ barstate.isconfirmed์์ ํธ์ถ ๊ถ์ฅ.
โโParameters:
โโโโ_openBoxes (array<BoxData>): ์ด๋ฆฐ ๋ฐ์ค ๋ฐฐ์ด
โโโโ_closedBoxes (array<BoxData>): ๋ซํ ๋ฐ์ค ๋ฐฐ์ด
โโโโ_useMidLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_closeCount (int): ๋ํ ์นด์ดํธ (์ด ํ์๋งํผ ๋ํ ์ ์ข ๋ฃ)
โโโโ_colorClose (color): ์ข ๋ฃ๋ ๋ฐ์ค ์์
โโโโ_currentBarIndex (int): ํ์ฌ bar_index
โโโโ_currentLow (float): ํ์ฌ low
โโโโ_currentHigh (float): ํ์ฌ high
โโโโ_currentTime (int): ํ์ฌ time
โโReturns: bool ํญ์ true
UpdateHTFCache(_cache, _tf)
โโUpdateHTFCache
description HTF ๋ฐ์ดํฐ ์บ์ฑ (์ฑ๋ฅ ์ต์ ํ).\
HTF์ OHLC ๋ฐ์ดํฐ๋ฅผ ์บ์ฑํ์ฌ ๋งค ํฑ๋ง๋ค request.security ํธ์ถ ๋ฐฉ์ง.\
_cache: ๊ธฐ์กด ์บ์ (์์ผ๋ฉด na, ์ฒซ ํธ์ถ ์).\
_tf: ์บ์ฑํ ์๊ฐ๋ (์: "60", "1D").\
์ bar ๋๋ bar_index ๋ณ๊ฒฝ ์์๋ง ์ ๋ฐ์ดํธ, ๊ทธ ์ธ์๋ ๊ธฐ์กด ์บ์ ๋ฐํ.\
โโParameters:
โโโโ_cache (HTFCache): ๊ธฐ์กด ์บ์ ๋ฐ์ดํฐ (์์ผ๋ฉด na)
โโโโ_tf (string): ์๊ฐ๋
โโReturns: HTFCache ์ ๋ฐ์ดํธ๋ ์บ์ ๋ฐ์ดํฐ
GetTimeframeSettings(_currentTF, _midTF1m, _highTF1m, _midTF5m, _highTF5m, _midTF15m, _highTF15m, _midTF30m, _highTF30m, _midTF60m, _highTF60m, _midTF240m, _highTF240m, _midTF1D, _highTF1D, _midTF1W, _highTF1W, _midTF1M, _highTF1M)
โโGetTimeframeSettings
description ํ์ฌ ์ฐจํธ ์๊ฐ๋์ ๋ง๋ ์ค์/์์ ์๊ฐ๋ ์๋ ์ ํ.\
_currentTF: ํ์ฌ ์ฐจํธ ์๊ฐ๋ (timeframe.period).\
1๋ถ~1์ ์ฐจํธ๋ณ๋ก ์ ์ ํ ์ค์/์์ ์๊ฐ๋ ๋งคํ.\
์: 5๋ถ ์ฐจํธ โ ์ค์ 15๋ถ, ์์ 60๋ถ.\
๋ฐํ: [์ค์ ์๊ฐ๋(string), ์์ ์๊ฐ๋(string)].\
โโParameters:
โโโโ_currentTF (string): ํ์ฌ ์ฐจํธ ์๊ฐ๋
โโโโ_midTF1m (string)
โโโโ_highTF1m (string)
โโโโ_midTF5m (string)
โโโโ_highTF5m (string)
โโโโ_midTF15m (string)
โโโโ_highTF15m (string)
โโโโ_midTF30m (string)
โโโโ_highTF30m (string)
โโโโ_midTF60m (string)
โโโโ_highTF60m (string)
โโโโ_midTF240m (string)
โโโโ_highTF240m (string)
โโโโ_midTF1D (string)
โโโโ_highTF1D (string)
โโโโ_midTF1W (string)
โโโโ_highTF1W (string)
โโโโ_midTF1M (string)
โโโโ_highTF1M (string)
โโReturns: [string, string] [์ค์ ์๊ฐ๋, ์์ ์๊ฐ๋]
BoxData
โโBoxData
โโFields:
โโโโ_type (series string): ๋ฐ์ค ํ์ (fob, fvg, sweep, rb, custom ๋ฑ)
โโโโ_breachMode (series string): ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์
โโโโ_isBull (series bool): ์์น(true) ๋๋ ํ๋ฝ(false) ๋ฐฉํฅ
โโโโ_box (series box)
โโโโ_line (series line)
โโโโ_boxTop (series float)
โโโโ_boxBot (series float)
โโโโ_boxMid (series float)
โโโโ_topBreached (series bool)
โโโโ_bottomBreached (series bool)
โโโโ_breakCount (series int)
โโโโ_createdBar (series int)
HTFCache
โโFields:
โโโโ_timeframe (series string)
โโโโ_lastBarIndex (series int)
โโโโ_isNewBar (series bool)
โโโโ_barIndex (series int)
โโโโ_open (series float)
โโโโ_high (series float)
โโโโ_low (series float)
โโโโ_close (series float)
โโโโ_open1 (series float)
โโโโ_close1 (series float)
โโโโ_high1 (series float)
โโโโ_low1 (series float)
โโโโ_open2 (series float)
โโโโ_close2 (series float)
โโโโ_high2 (series float)
โโโโ_low2 (series float)
โโโโ_high3 (series float)
โโโโ_low3 (series float)
โโโโ_time1 (series int)
โโโโ_time2 (series int)
GetHTFrevised(_tf, _case)
โโGetHTFrevised
description Retrieve a specific bar value from a Higher Time Frame (HTF) series.
โโParameters:
โโโโ_tf (string): string The target HTF string (examples: "60", "1D").
โโโโ_case (string): string Case string determining which OHLC value to request.
return float Returns the requested HTF value or na if _case does not match.
GetHTFrevised(_tf)
โโParameters:
โโโโ_tf (string)
GetHTFoffsetToLTFoffset(_offset, _chartTf, _htfTf)
โโGetHTFoffsetToLTFoffset
description Adjust an HTF offset to an LTF offset by calculating the ratio of timeframes.
โโParameters:
โโโโ_offset (int): int The HTF bar offset (0 means current HTF bar).
โโโโ_chartTf (string): string The current chart's timeframe (e.g., "5", "15", "1D").
โโโโ_htfTf (string): string The High Time Frame string (e.g., "60", "1D").
return int The corresponding LTF bar index. Returns 0 if the result is negative.
GetHtfFromLabel(_label)
โโGetHtfFromLabel
description Convert a Korean HTF label into a Pine Script timeframe string.
โโParameters:
โโโโ_label (string): string The Korean label (e.g., "5๋ถ", "1์๊ฐ").
return string Returns the corresponding Pine Script timeframe (e.g., "5", "60").
IsChartTFcomparisonHTF(_chartTf, _htfTf)
โโIsChartTFcomparisonHTF
description Determine whether a given HTF is greater than or equal to the current chart timeframe.
โโParameters:
โโโโ_chartTf (string): string Current chart timeframe (e.g., "5", "15", "1D").
โโโโ_htfTf (string): string HTF timeframe (e.g., "60", "1D").
return bool True if HTF โฅ chartTF, false otherwise.
IsCondition(_boxType, _isBull, _pricePrev, _priceNow)
โโIsCondition
description FOB, FVG ์กฐ๊ฑด ์ฒดํฌ.\
_boxType: "fob"(Fair Order Block) ๋๋ "fvg"(Fair Value Gap).\
_isBull: true(์์น ํจํด), false(ํ๋ฝ ํจํด).\
์์น ์ ํ์ฌ ๊ฐ๊ฒฉ์ด ์ด์ ๊ฐ๊ฒฉ๋ณด๋ค ๋์ผ๋ฉด true, ํ๋ฝ ์ ์ด์ ๊ฐ๊ฒฉ์ด ํ์ฌ ๊ฐ๊ฒฉ๋ณด๋ค ๋์ผ๋ฉด true ๋ฐํ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ ("fob", "fvg")
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_pricePrev (float): ์ด์ ๊ฐ๊ฒฉ
โโโโ_priceNow (float): ํ์ฌ ๊ฐ๊ฒฉ
โโReturns: bool ์กฐ๊ฑด ๋ง์กฑ ์ฌ๋ถ
IsCondition(_boxType, _high2, _high1, _high0, _low2, _low1, _low0)
โโIsCondition
description Sweep ์กฐ๊ฑด ์ฒดํฌ (Swing High/Low ๋์ ๋ฐ์).\
_boxType: "sweep" ๋๋ "breachBoth".\
์กฐ๊ฑด: high2 < high1 > high0 (Swing High) AND low2 > low1 < low0 (Swing Low).\
์ค๊ฐ ์บ๋ค์ด ์์ชฝ๋ณด๋ค ๋๊ณ ๋ฎ์ ์ง์ ์ ๋์์ ํ์ฑํ ๋ true ๋ฐํ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ ("sweep", "breachBoth")
โโโโ_high2 (float)
โโโโ_high1 (float)
โโโโ_high0 (float)
โโโโ_low2 (float)
โโโโ_low1 (float)
โโโโ_low0 (float)
โโReturns: bool ์กฐ๊ฑด ๋ง์กฑ ์ฌ๋ถ
IsCondition(_boxType, _isBull, _open1, _close1, _high1, _low1, _open0, _close0, _low2, _low3, _high2, _high3)
โโIsCondition
description RB (Rejection Block) ์กฐ๊ฑด ์ฒดํฌ.\
_boxType: "rb" (Rejection Block).\
์์น RB: candle1=์๋ด, candle0=์๋ด, low3>low1 AND low2>low1, close1*1.001>open0, open1<close0.\
ํ๋ฝ RB: candle1=์๋ด, candle0=์๋ด, high3<high1 AND high2<high1, close1*0.999<open0, open1>close0.\
์ด์ ์บ๋ค์ ๊ฑฐ๋ถ ํ ํ์ฌ ์บ๋ค์ด ๋ฐ๋ ๋ฐฉํฅ์ผ๋ก ์ ํ๋ ๋ true ๋ฐํ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ ("rb")
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_open1 (float)
โโโโ_close1 (float)
โโโโ_high1 (float)
โโโโ_low1 (float)
โโโโ_open0 (float)
โโโโ_close0 (float)
โโโโ_low2 (float)
โโโโ_low3 (float)
โโโโ_high2 (float)
โโโโ_high3 (float)
โโReturns: bool ์กฐ๊ฑด ๋ง์กฑ ์ฌ๋ถ
IsCondition(_boxType, _isBull, _open2, _close1, _open1, _close0)
โโIsCondition
description SOB (Strong Order Block) ์กฐ๊ฑด ์ฒดํฌ.\
_boxType: "sob" (Strong Order Block).\
์์น SOB: ์๋ด2 => ์๋ด1 => ์๋ด0, open2 > close1 AND open1 < close0.\
ํ๋ฝ SOB: ์๋ด2 => ์๋ด1 => ์๋ด0, open2 < close1 AND open1 > close0.\
3๊ฐ ์บ๋ค ํจํด์ผ๋ก ๊ฐํ ์ฃผ๋ฌธ ๋ธ๋ก ํ์ฑ ์ true ๋ฐํ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ ("sob")
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_open2 (float): 2๊ฐ ์ด์ ์บ๋ค open
โโโโ_close1 (float): 1๊ฐ ์ด์ ์บ๋ค close
โโโโ_open1 (float): 1๊ฐ ์ด์ ์บ๋ค open
โโโโ_close0 (float): ํ์ฌ ์บ๋ค close
โโReturns: bool ์กฐ๊ฑด ๋ง์กฑ ์ฌ๋ถ
CreateBox(_boxType, _tf, _isBull, _useLine, _colorBG, _colorBD, _colorText, _cache)
โโCreateBox
description ๋ฐ์ค ์์ฑ (breachMode ์๋ ๊ฒฐ์ ).\
_boxType: "fob", "rb", "custom" โ directionalHighLow, ๋๋จธ์ง โ both.\
_tf: ์๊ฐ๋ (timeframe.period ๋๋ HTF).\
_isBull: true(์์น ๋ฐ์ค), false(ํ๋ฝ ๋ฐ์ค).\
_cache: HTF ์ฌ์ฉ ์ ํ์, CurrentTF๋ na.\
๋ฐํ: [์ฑ๊ณต ์ฌ๋ถ(bool), ๋ฐ์ค ๋ฐ์ดํฐ(BoxData)].
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์
โโโโ_tf (string): ์๊ฐ๋
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_cache (HTFCache): HTF ์บ์ ๋ฐ์ดํฐ
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
CreateBox(_boxType, _tf, _isBull, _useLine, _colorBG, _colorBD, _colorText, _cache, _customText)
โโCreateBox
description ๋ฐ์ค ์์ฑ (์ปค์คํ ํ ์คํธ ์ง์, breachMode ์๋ ๊ฒฐ์ ).\
_boxType: "fob", "rb", "custom" โ directionalHighLow, ๋๋จธ์ง โ both.\
_customText: ๋ฐ์ค์ ํ์ํ ํ ์คํธ (๋น์ด์์ผ๋ฉด "์๊ฐ๋ ๋ฐ์คํ์ " ํ์์ผ๋ก ์๋ ์์ฑ).\
_isBull: true(์์น ๋ฐ์ค), false(ํ๋ฝ ๋ฐ์ค).\
๋ฐํ: [์ฑ๊ณต ์ฌ๋ถ(bool), ๋ฐ์ค ๋ฐ์ดํฐ(BoxData)].
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์
โโโโ_tf (string): ์๊ฐ๋
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_cache (HTFCache): HTF ์บ์ ๋ฐ์ดํฐ
โโโโ_customText (string): ์ปค์คํ ํ ์คํธ
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
CreateBox(_boxType, _breachMode, _tf, _isBull, _useLine, _colorBG, _colorBD, _colorText, _cache, _customText)
โโCreateBox
description ๋ฐ์ค ์์ฑ (breachMode ๋ช ์์ ์ง์ ).\
_breachMode: "both"(์์ชฝ ๋ชจ๋ ๋ํ), "directionalHighLow"(๋ฐฉํฅ์ฑ high/low ๋ํ), "directionalClose"(๋ฐฉํฅ์ฑ close ๋ํ).\
_isBull: true(์์น ๋ฐ์ค), false(ํ๋ฝ ๋ฐ์ค).\
_customText: ๋ฐ์ค์ ํ์ํ ํ ์คํธ (๋น์ด์์ผ๋ฉด "์๊ฐ๋ ๋ฐ์คํ์ " ํ์์ผ๋ก ์๋ ์์ฑ).\
๋ฐํ: [์ฑ๊ณต ์ฌ๋ถ(bool), ๋ฐ์ค ๋ฐ์ดํฐ(BoxData)].
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ (fob, fvg, sweep, rb, custom ๋ฑ)
โโโโ_breachMode (string): ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์: "both" (์์ชฝ ๋ชจ๋), "directionalHighLow" (๋ฐฉํฅ์ฑ high/low), "directionalClose" (๋ฐฉํฅ์ฑ close)
โโโโ_tf (string): ์๊ฐ๋
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false) ๋ฐฉํฅ
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_cache (HTFCache): HTF ์บ์ ๋ฐ์ดํฐ (CurrentTF๋ na)
โโโโ_customText (string): ์ปค์คํ ํ ์คํธ (๋น์ด์์ผ๋ฉด ์๋ ์์ฑ)
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
CreateCustomBox(_boxType, _breachMode, _isBull, _top, _bottom, _left, _right, _useLine, _colorBG, _colorBD, _colorText, _text)
โโCreateCustomBox
description ์์ ํ ์ ์ฐํ ์ปค์คํ ๋ฐ์ค ์์ฑ.\
์ฌ์ฉ์๊ฐ ๋ฐ์ค ์์น(top, bottom, left, right), breach mode, ๋ชจ๋ ํ๋ผ๋ฏธํฐ๋ฅผ ์ง์ ์ง์ .\
์กฐ๊ฑด ์ฒดํฌ๋ ์ฌ์ฉ์ ์คํฌ๋ฆฝํธ์์ ์ํํ๊ณ , ์ด ํจ์๋ ๋ฐ์ค ์์ฑ๋ง ๋ด๋น.\
์๋ก์ด ๋ฐ์ค ํ์ ์ถ๊ฐ ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์ ์์ด ์ฌ์ฉ ๊ฐ๋ฅ.
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์ (์ฌ์ฉ์ ์ ์ ๋ฌธ์์ด)
โโโโ_breachMode (string): ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์: "both", "directionalHighLow", "directionalClose", "sobClose"
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false) ๋ฐฉํฅ
โโโโ_top (float): ๋ฐ์ค ์๋จ ๊ฐ๊ฒฉ
โโโโ_bottom (float): ๋ฐ์ค ํ๋จ ๊ฐ๊ฒฉ
โโโโ_left (int): ๋ฐ์ค ์์ ์๊ฐ (xloc.bar_time ์ฌ์ฉ)
โโโโ_right (int): ๋ฐ์ค ์ข ๋ฃ ์๊ฐ (xloc.bar_time ์ฌ์ฉ)
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_text (string): ๋ฐ์ค์ ํ์ํ ํ ์คํธ
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
ProcessBoxDatas(_openBoxes, _closedBoxes, _useMidLine, _closeCount, _colorClose, _currentBarIndex, _currentLow, _currentHigh, _currentTime)
โโProcessBoxDatas
description ๋ฐ์ค ํ์ฅ ๋ฐ ๋ํ ์ฒ๋ฆฌ.\
์ด๋ฆฐ ๋ฐ์ค๋ค์ ํ์ฌ bar๊น์ง ํ์ฅํ๊ณ , ๋ํ ์กฐ๊ฑด ์ฒดํฌ.\
_closeCount: ๋ํ ํ์ (์ด ํ์๋งํผ ๋ํ ์ ๋ฐ์ค ์ข ๋ฃ).\
breachMode์ ๋ฐ๋ผ ๋ํ ์ฒดํฌ ๋ฐฉ์ ๋ค๋ฆ (both/directionalHighLow/directionalClose).\
์ข ๋ฃ๋ ๋ฐ์ค๋ _closedBoxes๋ก ์ด๋ํ๊ณ _colorClose ์์ ์ ์ฉ.\
barstate.islast์ barstate.isconfirmed์์ ํธ์ถ ๊ถ์ฅ.
โโParameters:
โโโโ_openBoxes (array<BoxData>): ์ด๋ฆฐ ๋ฐ์ค ๋ฐฐ์ด
โโโโ_closedBoxes (array<BoxData>): ๋ซํ ๋ฐ์ค ๋ฐฐ์ด
โโโโ_useMidLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_closeCount (int): ๋ํ ์นด์ดํธ (์ด ํ์๋งํผ ๋ํ ์ ์ข ๋ฃ)
โโโโ_colorClose (color): ์ข ๋ฃ๋ ๋ฐ์ค ์์
โโโโ_currentBarIndex (int): ํ์ฌ bar_index
โโโโ_currentLow (float): ํ์ฌ low
โโโโ_currentHigh (float): ํ์ฌ high
โโโโ_currentTime (int): ํ์ฌ time
โโReturns: bool ํญ์ true
UpdateHTFCache(_cache, _tf)
โโUpdateHTFCache
description HTF ๋ฐ์ดํฐ ์บ์ฑ (์ฑ๋ฅ ์ต์ ํ).\
HTF์ OHLC ๋ฐ์ดํฐ๋ฅผ ์บ์ฑํ์ฌ ๋งค ํฑ๋ง๋ค request.security ํธ์ถ ๋ฐฉ์ง.\
_cache: ๊ธฐ์กด ์บ์ (์์ผ๋ฉด na, ์ฒซ ํธ์ถ ์).\
_tf: ์บ์ฑํ ์๊ฐ๋ (์: "60", "1D").\
์ bar ๋๋ bar_index ๋ณ๊ฒฝ ์์๋ง ์ ๋ฐ์ดํธ, ๊ทธ ์ธ์๋ ๊ธฐ์กด ์บ์ ๋ฐํ.\
โโParameters:
โโโโ_cache (HTFCache): ๊ธฐ์กด ์บ์ ๋ฐ์ดํฐ (์์ผ๋ฉด na)
โโโโ_tf (string): ์๊ฐ๋
โโReturns: HTFCache ์ ๋ฐ์ดํธ๋ ์บ์ ๋ฐ์ดํฐ
GetTimeframeSettings(_currentTF, _midTF1m, _highTF1m, _midTF5m, _highTF5m, _midTF15m, _highTF15m, _midTF30m, _highTF30m, _midTF60m, _highTF60m, _midTF240m, _highTF240m, _midTF1D, _highTF1D, _midTF1W, _highTF1W, _midTF1M, _highTF1M)
โโGetTimeframeSettings
description ํ์ฌ ์ฐจํธ ์๊ฐ๋์ ๋ง๋ ์ค์/์์ ์๊ฐ๋ ์๋ ์ ํ.\
_currentTF: ํ์ฌ ์ฐจํธ ์๊ฐ๋ (timeframe.period).\
1๋ถ~1์ ์ฐจํธ๋ณ๋ก ์ ์ ํ ์ค์/์์ ์๊ฐ๋ ๋งคํ.\
์: 5๋ถ ์ฐจํธ โ ์ค์ 15๋ถ, ์์ 60๋ถ.\
๋ฐํ: [์ค์ ์๊ฐ๋(string), ์์ ์๊ฐ๋(string)].\
โโParameters:
โโโโ_currentTF (string): ํ์ฌ ์ฐจํธ ์๊ฐ๋
โโโโ_midTF1m (string)
โโโโ_highTF1m (string)
โโโโ_midTF5m (string)
โโโโ_highTF5m (string)
โโโโ_midTF15m (string)
โโโโ_highTF15m (string)
โโโโ_midTF30m (string)
โโโโ_highTF30m (string)
โโโโ_midTF60m (string)
โโโโ_highTF60m (string)
โโโโ_midTF240m (string)
โโโโ_highTF240m (string)
โโโโ_midTF1D (string)
โโโโ_highTF1D (string)
โโโโ_midTF1W (string)
โโโโ_highTF1W (string)
โโโโ_midTF1M (string)
โโโโ_highTF1M (string)
โโReturns: [string, string] [์ค์ ์๊ฐ๋, ์์ ์๊ฐ๋]
BoxData
โโBoxData
โโFields:
โโโโ_type (series string): ๋ฐ์ค ํ์ (fob, fvg, sweep, rb, custom ๋ฑ)
โโโโ_breachMode (series string): ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์
โโโโ_isBull (series bool): ์์น(true) ๋๋ ํ๋ฝ(false) ๋ฐฉํฅ
โโโโ_box (series box)
โโโโ_line (series line)
โโโโ_boxTop (series float)
โโโโ_boxBot (series float)
โโโโ_boxMid (series float)
โโโโ_topBreached (series bool)
โโโโ_bottomBreached (series bool)
โโโโ_breakCount (series int)
โโโโ_createdBar (series int)
HTFCache
โโFields:
โโโโ_timeframe (series string)
โโโโ_lastBarIndex (series int)
โโโโ_isNewBar (series bool)
โโโโ_barIndex (series int)
โโโโ_open (series float)
โโโโ_high (series float)
โโโโ_low (series float)
โโโโ_close (series float)
โโโโ_open1 (series float)
โโโโ_close1 (series float)
โโโโ_high1 (series float)
โโโโ_low1 (series float)
โโโโ_open2 (series float)
โโโโ_close2 (series float)
โโโโ_high2 (series float)
โโโโ_low2 (series float)
โโโโ_high3 (series float)
โโโโ_low3 (series float)
โโโโ_time1 (series int)
โโโโ_time2 (series int)
Note di rilascio
v2Note di rilascio
v3๋ํด์ง
BoxType
โโBoxType
โโFields:
โโโโFOB (series string)
โโโโFVG (series string)
โโโโIFVG (series string)
โโโโSOB (series string)
โโโโRB (series string)
โโโโBB (series string)
โโโโMB (series string)
โโโโSWEEP (series string)
โโโโCUSTOM (series string)
BreachMode
โโBreachMode
โโFields:
โโโโBOTH_HIGH_LOW (series string)
โโโโBOTH_CLOSE (series string)
โโโโDIRECTIONAL_HIGH_LOW (series string)
โโโโDIRECTIONAL_CLOSE (series string)
โโโโNEAR_HIGH (series string)
โโโโNEAR_CLOSE (series string)
โโโโNEAR_LOW (series string)
โโโโFAR_HIGH (series string)
โโโโFAR_CLOSE (series string)
โโโโFAR_LOW (series string)
์ ๋ฐ์ดํธ๋จ
CreateBox(_boxType, _tf, _isBull, _useLine, _colorBG, _colorBD, _colorText, _cache)
โโCreateBox (์๋ ๊ณ์ฐ ๋ฐฉ์)
description ๋ฐ์ค ์์ฑ (tf/cache ๊ธฐ๋ฐ ์๋ ์ขํ ๊ณ์ฐ).\
๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ boxType์ ๋ฐ๋ผ ์ขํ๋ฅผ ์๋ ๊ณ์ฐ.\
breachMode๋ boxType ๊ธฐ๋ฐ ์๋ ๊ฒฐ์ .\
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์
โโโโ_tf (string): ์๊ฐ๋
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_cache (HTFCache type from goodia/Mirpapa_Lib_HTF/1): HTF ์บ์ ๋ฐ์ดํฐ
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
BoxData
โโBoxData
โโFields:
โโโโ_type (series string): ๋ฐ์ค ํ์
โโโโ_breachMode (series string): ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์
โโโโ_isBull (series bool): ์์น(true) ๋๋ ํ๋ฝ(false) ๋ฐฉํฅ
โโโโ_box (series box)
โโโโ_line (series line)
โโโโ_boxTop (series float)
โโโโ_boxBot (series float)
โโโโ_boxMid (series float)
โโโโ_topBreached (series bool)
โโโโ_bottomBreached (series bool)
โโโโ_breakCount (series int)
์์ด์ง
CreateCustomBox(_boxType, _breachMode, _isBull, _top, _bottom, _left, _right, _useLine, _colorBG, _colorBD, _colorText, _text)
โโCreateCustomBox
description ์์ ํ ์ ์ฐํ ์ปค์คํ ๋ฐ์ค ์์ฑ.\
์ฌ์ฉ์๊ฐ ๋ฐ์ค ์์น(top, bottom, left, right), breach mode, ๋ชจ๋ ํ๋ผ๋ฏธํฐ๋ฅผ ์ง์ ์ง์ .\
์กฐ๊ฑด ์ฒดํฌ๋ ์ฌ์ฉ์ ์คํฌ๋ฆฝํธ์์ ์ํํ๊ณ , ์ด ํจ์๋ ๋ฐ์ค ์์ฑ๋ง ๋ด๋น.\
์๋ก์ด ๋ฐ์ค ํ์ ์ถ๊ฐ ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์ ์์ด ์ฌ์ฉ ๊ฐ๋ฅ.
UpdateHTFCache(_cache, _tf)
โโUpdateHTFCache
description HTF ๋ฐ์ดํฐ ์บ์ฑ (์ฑ๋ฅ ์ต์ ํ).\
HTF์ OHLC ๋ฐ์ดํฐ๋ฅผ ์บ์ฑํ์ฌ ๋งค ํฑ๋ง๋ค request.security ํธ์ถ ๋ฐฉ์ง.\
_cache: ๊ธฐ์กด ์บ์ (์์ผ๋ฉด na, ์ฒซ ํธ์ถ ์).\
_tf: ์บ์ฑํ ์๊ฐ๋ (์: "60", "1D").\
์ bar ๋๋ bar_index ๋ณ๊ฒฝ ์์๋ง ์ ๋ฐ์ดํธ, ๊ทธ ์ธ์๋ ๊ธฐ์กด ์บ์ ๋ฐํ.\
GetTimeframeSettings(_currentTF, _midTF1m, _highTF1m, _midTF5m, _highTF5m, _midTF15m, _highTF15m, _midTF30m, _highTF30m, _midTF60m, _highTF60m, _midTF240m, _highTF240m, _midTF1D, _highTF1D, _midTF1W, _highTF1W, _midTF1M, _highTF1M)
โโGetTimeframeSettings
description ํ์ฌ ์ฐจํธ ์๊ฐ๋์ ๋ง๋ ์ค์/์์ ์๊ฐ๋ ์๋ ์ ํ.\
_currentTF: ํ์ฌ ์ฐจํธ ์๊ฐ๋ (timeframe.period).\
1๋ถ~1์ ์ฐจํธ๋ณ๋ก ์ ์ ํ ์ค์/์์ ์๊ฐ๋ ๋งคํ.\
์: 5๋ถ ์ฐจํธ โ ์ค์ 15๋ถ, ์์ 60๋ถ.\
๋ฐํ: [์ค์ ์๊ฐ๋(string), ์์ ์๊ฐ๋(string)].\
HTFCache
Note di rilascio
v4๋ํด์ง
BoxState
โโBoxState
โโFields:
โโโโPENDING (series string)
โโโโSTART (series string)
โโโโEND (series string)
โโโโEXTENSION (series string)
HTFCache
โโFields:
โโโโ_timeframe (series string)
โโโโ_lastBarIndex (series int)
โโโโ_isNewBar (series bool)
โโโโ_barIndex (series int)
โโโโ_open (series float)
โโโโ_high (series float)
โโโโ_low (series float)
โโโโ_close (series float)
โโโโ_open1 (series float)
โโโโ_close1 (series float)
โโโโ_high1 (series float)
โโโโ_low1 (series float)
โโโโ_open2 (series float)
โโโโ_close2 (series float)
โโโโ_high2 (series float)
โโโโ_low2 (series float)
โโโโ_high3 (series float)
โโโโ_low3 (series float)
โโโโ_time1 (series int)
โโโโ_time2 (series int)
์ ๋ฐ์ดํธ๋จ
CreateBox(_boxType, _boxState, _tf, _isBull, _useLine, _colorBG, _colorBD, _colorText, _cache)
โโCreateBox (์๋ ๊ณ์ฐ ๋ฐฉ์)
description ๋ฐ์ค ์์ฑ (tf/cache ๊ธฐ๋ฐ ์๋ ์ขํ ๊ณ์ฐ).\
๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ boxType์ ๋ฐ๋ผ ์ขํ๋ฅผ ์๋ ๊ณ์ฐ.\
โโParameters:
โโโโ_boxType (string): ๋ฐ์ค ํ์
โโโโ_boxState (string): ๋ฐ์ค ์ํ ("pending", "start", "extension")
โโโโ_tf (string): ์๊ฐ๋
โโโโ_isBull (bool): ์์น(true) ๋๋ ํ๋ฝ(false)
โโโโ_useLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_colorBG (color): ๋ฐ์ค ๋ฐฐ๊ฒฝ์
โโโโ_colorBD (color): ๋ฐ์ค ํ ๋๋ฆฌ์
โโโโ_colorText (color): ํ ์คํธ ์์
โโโโ_cache (HTFCache): HTF ์บ์ ๋ฐ์ดํฐ
โโReturns: [bool, BoxData] ์ฑ๊ณต ์ฌ๋ถ์ ๋ฐ์ค ๋ฐ์ดํฐ
ProcessBoxDatas(_openBoxes, _closedBoxes, _useMidLine, _closeCount, _baseColor, _pendingTransparency, _startTransparency, _endTransparency, _currentBarIndex, _currentLow, _currentHigh, _currentClose, _currentTime)
โโProcessBoxDatas
description ๋ฐ์ค ํ์ฅ ๋ฐ ์ํ๋ณ ๋ํ ์ฒ๋ฆฌ.\
์ด๋ฆฐ ๋ฐ์ค๋ค์ ํ์ฌ bar๊น์ง ํ์ฅํ๊ณ , ์ํ๋ณ ๋ํ ์กฐ๊ฑด ์ฒดํฌ.\
PENDING: ์์ ์กฐ๊ฑด ์ฒดํฌ โ START ์ ํ\
START: ์ข ๋ฃ ์กฐ๊ฑด ์ฒดํฌ โ END ์ ํ\
EXTENSION: ๋ฌดํ ํ์ฅ\
์ข ๋ฃ๋ ๋ฐ์ค๋ _closedBoxes๋ก ์ด๋ํ๊ณ _colorClose ์์ ์ ์ฉ.\
โโParameters:
โโโโ_openBoxes (array<BoxData>): ์ด๋ฆฐ ๋ฐ์ค ๋ฐฐ์ด
โโโโ_closedBoxes (array<BoxData>): ๋ซํ ๋ฐ์ค ๋ฐฐ์ด
โโโโ_useMidLine (bool): ์ค๊ฐ์ ํ์ ์ฌ๋ถ
โโโโ_closeCount (int): ๋ํ ์นด์ดํธ (์ด ํ์๋งํผ ๋ํ ์ ์ข ๋ฃ)
โโโโ_baseColor (color): ๊ธฐ๋ณธ ์์
โโโโ_pendingTransparency (int): ๋๊ธฐ ์ํ ๋ถํฌ๋ช ๋
โโโโ_startTransparency (int): ์์ ์ํ ๋ถํฌ๋ช ๋
โโโโ_endTransparency (int): ์ข ๋ฃ ์ํ ๋ถํฌ๋ช ๋
โโโโ_currentBarIndex (int): ํ์ฌ bar_index
โโโโ_currentLow (float): ํ์ฌ low
โโโโ_currentHigh (float): ํ์ฌ high
โโโโ_currentClose (float): ํ์ฌ close
โโโโ_currentTime (int): ํ์ฌ time
โโReturns: bool ํญ์ true
BoxData
โโBoxData
โโFields:
โโโโ_type (series string): ๋ฐ์ค ํ์
โโโโ_breachModeStart (series string): ์์ ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์
โโโโ_breachModeEnd (series string): ์ข ๋ฃ ๋ํ ์ฒ๋ฆฌ ๋ฐฉ์
โโโโ_boxState (series string): ๋ฐ์ค ์ํ
โโโโ_isBull (series bool): ์์น(true) ๋๋ ํ๋ฝ(false) ๋ฐฉํฅ
โโโโ_box (series box)
โโโโ_line (series line)
โโโโ_boxTop (series float)
โโโโ_boxBot (series float)
โโโโ_boxMid (series float)
โโโโ_topBreached (series bool)
โโโโ_bottomBreached (series bool)
โโโโ_breakCount (series int)
Note di rilascio
v5Libreria Pine
Nello spirito di TradingView, l'autore ha pubblicato questo codice Pine come libreria open source affinchรฉ altri programmatori della nostra community possano riutilizzarlo. Complimenti all'autore! ร possibile utilizzare questa libreria privatamente o in altre pubblicazioni open source, ma il riutilizzo di questo codice nelle pubblicazioni รจ soggetto al Regolamento.
Declinazione di responsabilitร
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Libreria Pine
Nello spirito di TradingView, l'autore ha pubblicato questo codice Pine come libreria open source affinchรฉ altri programmatori della nostra community possano riutilizzarlo. Complimenti all'autore! ร possibile utilizzare questa libreria privatamente o in altre pubblicazioni open source, ma il riutilizzo di questo codice nelle pubblicazioni รจ soggetto al Regolamento.
Declinazione di responsabilitร
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.