AlertaScript / 문서
실행 모델
아직 완성되지 않은 봉 이해.
동작 원리
과거 OHLCV는 완성되었지만 현재 봉은 변합니다. var는 초기 상태를 봉 사이에 보관합니다.
실전 적용
확정 봉이 필요하면 barstate.isconfirmed를 쓰세요. 종목이나 입력 변경 시 재계산될 수 있으므로 메모리는 영구 저장이 아닙니다.
코드 예제
AlertaScript
indicator("Confirmed close", overlay=true)value = barstate.isconfirmed ? close : naplot(value, "Confirmed close", style=plot.style_circles)