PINE LIBRARY
Updated Mirpapa_Lib_box

Library "Mirpapa_Lib_box"
AddFVG(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text)
AddFVG
description FVG 박스 데이터 추가
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대 ("60", "240", "D")
htfBarIndex (int): int HTF bar_index
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향 (true=상승, false=하락)
_text (string)
Returns: void
AddOB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text)
AddOB
description OB 박스 데이터 추가
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
htfBarIndex (int): int HTF bar_index
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
_text (string)
Returns: void
AddBB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text)
AddBB
description BB 박스 데이터 추가
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
htfBarIndex (int): int HTF bar_index
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
_text (string)
Returns: void
AddRB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text)
AddRB
description RB 박스 데이터 추가
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
htfBarIndex (int): int HTF bar_index
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
_text (string)
Returns: void
ProcessBoxes(boxes, boxType, colorBull, colorBear, closeCount, useLine, textAlignH, textAlignV, closeColor)
ProcessBoxes
description 박스 배열 처리 (생성→확장→터치→종료)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
boxType (string): string 박스 타입 ("FVG", "OB", "BB", "RB")
colorBull (color): color 상승 색상
colorBear (color): color 하락 색상
closeCount (int): int 터치 종료 횟수
useLine (bool): bool 중간라인 사용 여부
textAlignH (string): string 수평 정렬
textAlignV (string): string 수직 정렬
closeColor (color): color 종료 색상
Returns: void
GetActiveBoxCount(boxes)
GetActiveBoxCount
description 활성 박스 개수 반환
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
Returns: int 활성 박스 개수
ClearInactiveBoxes(boxes)
ClearInactiveBoxes
description 비활성 박스 제거 (메모리 절약)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
Returns: void
BoxData
BoxData
Fields:
_isActive (series bool): 박스 활성화 상태
_isBull (series bool): 방향 (true=상승, false=하락)
_boxTop (series float): 상단 가격
_boxBot (series float): 하단 가격
_basePoint (series float): 터치 감지 기준점
_stage (series int): 터치 횟수 카운터
_type (series string): 박스 타입 ("FVG", "OB", "BB", "RB")
_htfTimeframe (series string): HTF 시간대 ("60", "240", "D")
_htfBarIndex (series int): HTF 기준 bar_index
_text (series string): 사용자 추가 텍스트
_box (series box): 박스 객체 (ProcessBoxes에서 생성)
_line (series line): 라인 객체 (ProcessBoxes에서 생성)
AddFVG(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text)
AddFVG
description FVG 박스 데이터 추가
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대 ("60", "240", "D")
htfBarIndex (int): int HTF bar_index
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향 (true=상승, false=하락)
_text (string)
Returns: void
AddOB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text)
AddOB
description OB 박스 데이터 추가
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
htfBarIndex (int): int HTF bar_index
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
_text (string)
Returns: void
AddBB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text)
AddBB
description BB 박스 데이터 추가
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
htfBarIndex (int): int HTF bar_index
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
_text (string)
Returns: void
AddRB(boxes, htfTimeframe, htfBarIndex, top, bottom, isBull, _text)
AddRB
description RB 박스 데이터 추가
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
htfBarIndex (int): int HTF bar_index
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
_text (string)
Returns: void
ProcessBoxes(boxes, boxType, colorBull, colorBear, closeCount, useLine, textAlignH, textAlignV, closeColor)
ProcessBoxes
description 박스 배열 처리 (생성→확장→터치→종료)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
boxType (string): string 박스 타입 ("FVG", "OB", "BB", "RB")
colorBull (color): color 상승 색상
colorBear (color): color 하락 색상
closeCount (int): int 터치 종료 횟수
useLine (bool): bool 중간라인 사용 여부
textAlignH (string): string 수평 정렬
textAlignV (string): string 수직 정렬
closeColor (color): color 종료 색상
Returns: void
GetActiveBoxCount(boxes)
GetActiveBoxCount
description 활성 박스 개수 반환
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
Returns: int 활성 박스 개수
ClearInactiveBoxes(boxes)
ClearInactiveBoxes
description 비활성 박스 제거 (메모리 절약)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
Returns: void
BoxData
BoxData
Fields:
_isActive (series bool): 박스 활성화 상태
_isBull (series bool): 방향 (true=상승, false=하락)
_boxTop (series float): 상단 가격
_boxBot (series float): 하단 가격
_basePoint (series float): 터치 감지 기준점
_stage (series int): 터치 횟수 카운터
_type (series string): 박스 타입 ("FVG", "OB", "BB", "RB")
_htfTimeframe (series string): HTF 시간대 ("60", "240", "D")
_htfBarIndex (series int): HTF 기준 bar_index
_text (series string): 사용자 추가 텍스트
_box (series box): 박스 객체 (ProcessBoxes에서 생성)
_line (series line): 라인 객체 (ProcessBoxes에서 생성)
Release Notes
v2Release Notes
v3Release Notes
v4Release Notes
v5업데이트됨
AddFVG(boxes, htfTimeframe, timestamp, top, bottom, isBull, userText)
AddFVG
description FVG 박스 데이터 추가 (시간 기반)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대 ("60", "240", "D")
timestamp (int): int 박스 시작 시간 (timestamp)
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향 (true=상승, false=하락)
userText (string): string 추가 텍스트 (선택)
Returns: void
AddOB(boxes, htfTimeframe, timestamp, top, bottom, isBull, userText)
AddOB
description OB 박스 데이터 추가 (시간 기반)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
timestamp (int): int 박스 시작 시간 (timestamp)
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
userText (string): string 추가 텍스트 (선택)
Returns: void
AddBB(boxes, htfTimeframe, timestamp, top, bottom, isBull, userText)
AddBB
description BB 박스 데이터 추가 (시간 기반)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
timestamp (int): int 박스 시작 시간 (timestamp)
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
userText (string): string 추가 텍스트 (선택)
Returns: void
AddRB(boxes, htfTimeframe, timestamp, top, bottom, isBull, userText)
AddRB
description RB 박스 데이터 추가 (시간 기반)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
htfTimeframe (string): string HTF 시간대
timestamp (int): int 박스 시작 시간 (timestamp)
top (float): float 상단 가격
bottom (float): float 하단 가격
isBull (bool): bool 방향
userText (string): string 추가 텍스트 (선택)
Returns: void
BoxData
BoxData
Fields:
_isActive (series bool): 박스 활성화 상태
_isBull (series bool): 방향 (true=상승, false=하락)
_boxTop (series float): 상단 가격
_boxBot (series float): 하단 가격
_basePoint (series float): 터치 감지 기준점
_stage (series int): 터치 횟수 카운터
_type (series string): 박스 타입 ("FVG", "OB", "BB", "RB")
_htfTimeframe (series string): HTF 시간대 ("60", "240", "D")
_timestamp (series int): 박스 시작 시간 (timestamp)
_text (series string): 사용자 추가 텍스트
_box (series box): 박스 객체 (ProcessBoxes에서 생성)
_line (series line): 라인 객체 (ProcessBoxes에서 생성)
Release Notes
v6업데이트됨
ProcessBoxes(boxes, boxType, colorBull, colorBear, closeCount, useLine, textAlignH, textAlignV, textColor, closeColor)
ProcessBoxes
description 박스 배열 처리 (생성→확장→터치→종료)
Parameters:
boxes (array<BoxData>): array<BoxData> 박스 배열
boxType (string): string 박스 타입 ("FVG", "OB", "BB", "RB")
colorBull (color): color 상승 색상
colorBear (color): color 하락 색상
closeCount (int): int 터치 종료 횟수
useLine (bool): bool 중간라인 사용 여부
textAlignH (string): string 수평 정렬
textAlignV (string): string 수직 정렬
textColor (color): color 텍스트 색상
closeColor (color): color 종료 색상
Returns: void
Release Notes
v7업데이트됨
BoxData
BoxData
Fields:
_isActive (series bool): 박스 활성화 상태
_isBull (series bool): 방향 (true=상승, false=하락)
_boxTop (series float): 상단 가격
_boxBot (series float): 하단 가격
_basePoint (series float): 터치 감지 기준점
_stage (series int): 터치 횟수 카운터
_type (series string): 박스 타입 ("FVG", "OB", "BB", "RB")
_htfTimeframe (series string): HTF 시간대 ("60", "240", "D")
_timestamp (series int): 박스 시작 시간 (timestamp)
_text (series string): 사용자 추가 텍스트
_box (series box): 박스 객체 (ProcessBoxes에서 생성)
_line (series line): 라인 객체 (ProcessBoxes에서 생성)
_waitingForBreak (series bool): 돌파 대기 플래그 (true=돌파대기, false=복귀대기)
Release Notes
v8Release Notes
v9업데이트됨
BoxData
BoxData
Fields:
_isActive (series bool): 박스 활성화 상태
_isBull (series bool): 방향 (true=상승, false=하락)
_boxTop (series float): 상단 가격
_boxBot (series float): 하단 가격
_basePoint (series float): 터치 감지 기준점
_stage (series int): 터치 횟수 카운터
_type (series string): 박스 타입 ("FVG", "OB", "BB", "RB")
_htfTimeframe (series string): HTF 시간대 ("60", "240", "D")
_timestamp (series int): 박스 시작 시간 (timestamp)
_text (series string): 사용자 추가 텍스트
_box (series box): 박스 객체 (ProcessBoxes에서 생성)
_line (series line): 라인 객체 (ProcessBoxes에서 생성)
_waitingForBreak (series bool): 돌파 대기 플래그 (true=돌파대기, false=복귀대기)
_closedTimestamp (series int): 종료 시점 timestamp (종료 위치 고정용)
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.