OPEN-SOURCE SCRIPT
更新済 Index Line on Chart With Top/Bottom Margins (MarketSurge)

Adds an index line to the chart, along with configurable top/bottom margins. MarketSurge has the line in the top third/quarter of the chart area.
This script is unfortunately quite slow/laggy when zooming/scrolling. Unfortunately that is unavoidable, because to scale the visible portion of the index line it needs to access `left_visible_bar_time` and `right_visible_bar_time`. There are two issues with that. First, if a script access those variables, then it is reloaded on every zoom/scroll. So every time the chart is zoomed/scrolled, this script is reloaded and has to recalculate and draw everything from scratch. Second, TradingView has a couple of seconds delay built in before it will initiate the reload, presumably to allow the zoom/scroll to settle, and to avoid reloading on every zoom/scroll intermediate step. But that makes this script even less responsive, of course.
Tip: when using this indicator, you may also want to change the main chart's top margin to push the main plot down a bit (that setting does not affect the position of this indicator). See the "Margins" section in the Chart Setting's "Canvas" tab.
This script is unfortunately quite slow/laggy when zooming/scrolling. Unfortunately that is unavoidable, because to scale the visible portion of the index line it needs to access `left_visible_bar_time` and `right_visible_bar_time`. There are two issues with that. First, if a script access those variables, then it is reloaded on every zoom/scroll. So every time the chart is zoomed/scrolled, this script is reloaded and has to recalculate and draw everything from scratch. Second, TradingView has a couple of seconds delay built in before it will initiate the reload, presumably to allow the zoom/scroll to settle, and to avoid reloading on every zoom/scroll intermediate step. But that makes this script even less responsive, of course.
Tip: when using this indicator, you may also want to change the main chart's top margin to push the main plot down a bit (that setting does not affect the position of this indicator). See the "Margins" section in the Chart Setting's "Canvas" tab.
リリースノート
Change the default color of the line so it is visible on both dark and light themed TradingView.オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。