Mirpapa_Lib_Line

CreateLine(_breachMode, _isBull, _leftTime, _rightTime, _price, _lineColor, _lineWidth, _lineStyle, _text)
CreateLine
description 라인 생성 (값 전달 방식 - 모든 좌표 직접 지정).\
호출자가 모든 좌표와 시간을 계산하여 전달.\
breachMode: "price"(고가/저가 돌파) 또는 "close"(종가 돌파).\
Parameters:
_breachMode (string): 돌파 처리 방식: "price" 또는 "close"
_isBull (bool): 상승(true) 또는 하락(false)
_leftTime (int): 라인 시작 시간
_rightTime (int): 라인 종료 시간
_price (float): 라인 가격
_lineColor (color): 라인 색상
_lineWidth (int): 라인 두께
_lineStyle (string): 라인 스타일 (line.style_solid, line.style_dashed 등)
_text (string): 라인 텍스트
Returns: [bool, LineData] 성공 여부와 라인 데이터
ProcessLineDatas(_openLines, _closedLines, _closeCount, _colorClose, _currentBarIndex, _currentLow, _currentHigh, _currentTime)
ProcessLineDatas
description 라인 확장 및 돌파 처리.\
열린 라인들을 현재 bar까지 확장하고, 돌파 조건 체크.\
_closeCount: 돌파 횟수 (이 횟수만큼 돌파 시 라인 종료).\
breachMode에 따라 돌파 체크 방식 다름 (price/close).\
종료된 라인은 _closedLines로 이동하고 _colorClose 색상 적용.\
barstate.islast와 barstate.isconfirmed에서 호출 권장.
Parameters:
_openLines (array<LineData>): 열린 라인 배열
_closedLines (array<LineData>): 닫힌 라인 배열
_closeCount (int): 돌파 카운트 (이 횟수만큼 돌파 시 종료)
_colorClose (color): 종료된 라인 색상
_currentBarIndex (int): 현재 bar_index
_currentLow (float): 현재 low
_currentHigh (float): 현재 high
_currentTime (int): 현재 time
Returns: bool 항상 true
BreachMode
BreachMode
Fields:
PRICE (series string)
CLOSE (series string)
LineData
LineData
Fields:
_breachMode (series string): 돌파 처리 방식
_isBull (series bool): 상승(true) 또는 하락(false) 방향
_line (series line): 라인 객체
_price (series float): 라인 가격
_text (series string): 라인 텍스트
_breached (series bool): 돌파 여부
_breakCount (series int): 돌파 카운트
Biblioteca Pine
Fiel al espíritu de TradingView, el autor ha publicado este código de Pine como biblioteca de código abierto, para que otros programadores Pine de nuestra comunidad puedan reutilizarlo. ¡Enhorabuena al autor! Puede usar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero la reutilización de este código en publicaciones está sujeta a nuestras Normas internas.
Exención de responsabilidad
Biblioteca Pine
Fiel al espíritu de TradingView, el autor ha publicado este código de Pine como biblioteca de código abierto, para que otros programadores Pine de nuestra comunidad puedan reutilizarlo. ¡Enhorabuena al autor! Puede usar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero la reutilización de este código en publicaciones está sujeta a nuestras Normas internas.