OPEN-SOURCE SCRIPT

Pip distance by Jim Belardi

39
//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)

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.