OPEN-SOURCE SCRIPT
Telah dikemas kini 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.
Nota Keluaran
Change the default color of the line so it is visible on both dark and light themed TradingView.Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.