• プロダクト
  • コミュニティ
  • マーケット
  • ブローカー
  • 詳細
始めましょう
  • インジケーターとストラテジー
  • /Ytdreturns

Ytdreturns

YTD % / Visible Range % TableAUTHOR: Brandon Gum DATE: 2026-01-03 // PURPOSE: // Calculates price-range metrics based on the *currently visible* // portion of the chart. Intended for table-based UI display where // values must be stable and evaluated only on the last bar. // // Originally based on Jeff Sun's ADR price data table. // // METRICS RETURNED: // - Visible High // - Visible Low // - Visible % Range = (Visible High - Visible Low) / Visible Low // - Visible ATRs = (Visible High - Visible Low) / ATR // // IMPLEMENTATION NOTES: // - Logic executes ONLY on barstate.islast to avoid state corruption. // - Visible range is recomputed atomically using a backward loop // bounded by chart.left_visible_bar_time. // - Avoids var-based accumulation and bar-by-bar resets, which are // unreliable when visible window changes. // - ATR is evaluated at the current bar (not averaged over range). // // ASSUMPTIONS / LIMITATIONS: // - Uses chart-visible time boundaries supplied by TradingView. // - Loop upper bound must be sufficiently large to cover max // expected visible bars. // - Intended for display purposes, not signal generation. // // SIDE EFFECTS: // - None. No plots, no drawings, no state persistence.
Pine Script® インジケーター
gumbtgの投稿

市場データ提供: ICE Data Services.参照データ提供元: FactSet. Copyright © 2026 FactSet Research Systems Inc.Copyright © 2026, American Bankers Association. CUSIPデータベース提供元: FactSet Research Systems Inc. All rights reserved. SEC提出書類およびその他ドキュメント提供元: Quartr.© 2026 TradingView, Inc.

主要プロダクト
  • スーパーチャート
スクリーナー
  • 株式
  • ETF
  • 債券
  • 暗号コイン
  • CEXペア
  • DEXペア
  • Pine
ヒートマップ
  • 株式
  • ETF
  • 暗号資産
カレンダー
  • 経済
  • 決算
  • 配当
その他プロダクト
  • イールドカーブ
  • オプション
  • ニュースフロー
  • Pine Script®
アプリ
  • モバイル
  • デスクトップ
コミュニティ
  • ソーシャルネットワーク
  • ラブウォール
  • お友達紹介
  • ハウスルール
  • モデレーター
アイデア
  • トレーディング
  • 教育
  • エディターズピック
Pine Script
  • インジケーターとストラテジー
  • 魔術師
  • フリーランサー
ツールとサブスクリプション
  • 機能
  • 価格
  • マーケットデータ
  • プランを贈る
トレーディング
  • 概要
  • ブローカー
スペシャルオファー
  • CMEグループ先物
  • Eurex先物
  • 米国株バンドルデータ
会社情報
  • 私たちについて
  • スペースミッション
  • ブログ
  • キャリア
  • メディアキット
商品
  • TradingViewストア
  • タロットカード
  • C63 TradeTime
ポリシーとセキュリティ
  • 利用規約
  • 免責事項
  • プライバシーポリシー
  • Cookieポリシー
  • アクセシビリティ宣言
  • セキュリティのヒント
  • バグバウンティ・プログラム
  • ステータスページ
ビジネスソリューション
  • ウィジェット
  • チャートライブラリ
  • Lightweight Charts™
  • 高機能チャート
  • トレーディングプラットフォーム
成長機会
  • 広告
  • ブローカーシステムの統合
  • パートナープログラム
  • 教育プログラム
コミュニティ
  • ソーシャルネットワーク
  • ラブウォール
  • お友達紹介
  • ハウスルール
  • モデレーター
アイデア
  • トレーディング
  • 教育
  • エディターズピック
Pine Script
  • インジケーターとストラテジー
  • 魔術師
  • フリーランサー
ビジネスソリューション
  • ウィジェット
  • チャートライブラリ
  • Lightweight Charts™
  • 高機能チャート
  • トレーディングプラットフォーム
成長機会
  • 広告
  • ブローカーシステムの統合
  • パートナープログラム
  • 教育プログラム
Look FirstLook First