Nová Pine script funkce: line.get_price()
Přibyla nová funkce, která vrací hodnotu čáry v určitém bodě.
Lze ji například použít pro identifikaci, kde se protíná cena s trendovou linií, nebo pro umístění labelů (značek).
Zde je příklad použití funkce pro umístění značky:
//@version=4 study("GetPrice", overlay = true) var line1 = line.new(bar_index[0], high[0], bar_index, low, extend = extend.right) line.set_xy1(line1, bar_index[25], high[25]) line.set_xy2(line1, bar_index[5], high[5]) var label1 = label.new(bar_index, high, text = "Possible intersection point", style = label.style_label_lower_right, size = size.large) label.set_xy(label1,bar_index, line.get_price(line1, bar_index))
Více informací k této funkce najdete zde.
https://www.tradingview.com/blog/en/line-get_price-new-function-in-pine-script-18894/