• 프로덕트
  • 커뮤니티
  • 마켓
  • 브로커
  • 더보기
지금 시작
  • 커뮤니티
  • /지표 및 전략
  • /Starting

Starting

Start the Script on Last Nth Bar [Experimental]Hello Pine Scripters, Sometimes we need to run some processes in the scripts on last N bar but currently we don't know bar_index value of realtime bar or number of remaining bars before we reached it. So most of us use "start date" as input and run some processes after "start date". This experimental script finds last Nth bar approximately. As you can see in the script we (should) use GMT, otherwise as I see the result might not be accurate (we don't know timezone used on the chart) The idea is to find/use similar bar in the past (using timenow as reference) and then calculate aproximate the time of last Nth bar. the results may not be accurate all the time, also we can not know local holidays etc. At the moment the script works on 1minute or higher time frames (it won't work on less 1min timeframes) In the future if the Pine Team add something like "bar_index_realtime" then we will not need such things. by the way many thanks to Pine Team, they are doing great job. You can use this script in your scripts as you want, no need to ask permission. If you can improve it let me know ;) Enjoy!
Pine Script® 인디케이터
LonesomeTheBlue의
업데이트됨
1212

ICE Data services 제공 엄선 마켓 데이터.FactSet 제공 엄선 참조 데이터. Copyright © 2025 FactSet Research Systems Inc.© 2025 TradingView , Inc.

제품 그 이상
  • 수퍼차트
스크리너
  • 주식
  • ETF
  • 채권
  • 암호화폐
  • CEX 페어
  • DEX 페어
  • Pine
히트맵
  • 주식
  • ETF
  • 암호화폐
캘린더
  • 이코노믹
  • 어닝
  • 배당
더 많은 제품
  • 수익률 곡선
  • 옵션
  • 뉴스 플로우
  • Pine Script®
앱
  • 모바일
  • 데스크탑
커뮤니티
  • 소셜 네트웍
  • 사랑의 벽
  • 프렌드 리퍼하기
  • 하우스룰
  • 모더레이터
아이디어
  • 트레이딩
  • 교육
  • 에디터즈 픽
Pine Script
  • 지표 및 전략
  • 마법사
  • 프리랜서
툴 및 구독
  • 특징
  • 가격
  • 마켓 데이터
트레이딩
  • 오버뷰
  • 브로커
스페셜 오퍼
  • CME 그룹 선물
  • 유렉스 선물
  • 미국 주식 번들
회사 정보
  • 회사 소개
  • 선언문
  • 애쓸릿
  • 블로그
  • 커리어
  • 미디어 키트
굿즈
  • 트레이딩뷰 스토어
  • 트레이더용 타로 카드
  • C63 트레이드타임
정책 및 보안
  • 사용조건
  • 면책사항
  • 프라이버시정책
  • 쿠키 정책
  • 접근성 정책
  • 보안 팁
  • 버그 바운티 프로그램
  • 상태 페이지
비즈니스 솔루션
  • 위젯
  • 차팅 라이브러리
  • Lightweight Charts™
  • 고급 차트
  • 트레이딩 플랫폼
성장 기회
  • 광고
  • 브로커 통합
  • 파트너 프로그램
  • 교육 프로그램
커뮤니티
  • 소셜 네트웍
  • 사랑의 벽
  • 프렌드 리퍼하기
  • 하우스룰
  • 모더레이터
아이디어
  • 트레이딩
  • 교육
  • 에디터즈 픽
Pine Script
  • 지표 및 전략
  • 마법사
  • 프리랜서
비즈니스 솔루션
  • 위젯
  • 차팅 라이브러리
  • Lightweight Charts™
  • 고급 차트
  • 트레이딩 플랫폼
성장 기회
  • 광고
  • 브로커 통합
  • 파트너 프로그램
  • 교육 프로그램
Look FirstLook First