OPEN-SOURCE SCRIPT
Pip distance by Jim Belardi

//version=5
indicator("Pip-Distanz zum Hoch/Tief (EURUSD)", overlay=true)
// Pip-Faktor fix for EURUSD (5 Nachkommastellen, 1 Pip = 0.0001)
pip_factor = 10000.0
// live candle
current_price = close
candle_high = high
candle_low = low
// calculate distance in pips
dist_high_pips = (candle_high - current_price) * pip_factor
dist_low_pips = (current_price - candle_low) * pip_factor
// create table (once)
var table pipTable = table.new(position.bottom_right, 2, 2, border_width=1, frame_color=color.gray)
// updating table
if barstate.islast
table.cell(pipTable, 0, 0, "Distanz zum Hoch", text_color=color.red, text_size=size.large)
table.cell(pipTable, 1, 0, str.tostring(dist_high_pips, format.mintick) + " Pips", text_color=color.red, text_size=size.large)
table.cell(pipTable, 0, 1, "Distanz zum Tief", text_color=color.green, text_size=size.large)
table.cell(pipTable, 1, 1, str.tostring(dist_low_pips, format.mintick) + " Pips", text_color=color.green, text_size=size.large)
indicator("Pip-Distanz zum Hoch/Tief (EURUSD)", overlay=true)
// Pip-Faktor fix for EURUSD (5 Nachkommastellen, 1 Pip = 0.0001)
pip_factor = 10000.0
// live candle
current_price = close
candle_high = high
candle_low = low
// calculate distance in pips
dist_high_pips = (candle_high - current_price) * pip_factor
dist_low_pips = (current_price - candle_low) * pip_factor
// create table (once)
var table pipTable = table.new(position.bottom_right, 2, 2, border_width=1, frame_color=color.gray)
// updating table
if barstate.islast
table.cell(pipTable, 0, 0, "Distanz zum Hoch", text_color=color.red, text_size=size.large)
table.cell(pipTable, 1, 0, str.tostring(dist_high_pips, format.mintick) + " Pips", text_color=color.red, text_size=size.large)
table.cell(pipTable, 0, 1, "Distanz zum Tief", text_color=color.green, text_size=size.large)
table.cell(pipTable, 1, 1, str.tostring(dist_low_pips, format.mintick) + " Pips", text_color=color.green, text_size=size.large)
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。