0% found this document useful (0 votes)
3 views

OHLC V2

This document is a Pine Script code for an OHLC (Open, High, Low, Close) indicator in TradingView. It includes user inputs for customization, functions to retrieve OHLC values from Heikin Ashi candles, and logic to display these values on the chart. The script allows for visual representation of OHLC levels with adjustable parameters for line width and indentation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

OHLC V2

This document is a Pine Script code for an OHLC (Open, High, Low, Close) indicator in TradingView. It includes user inputs for customization, functions to retrieve OHLC values from Heikin Ashi candles, and logic to display these values on the chart. The script allows for visual representation of OHLC levels with adjustable parameters for line width and indentation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//@version=5

indicator("OHLC V2",overlay=true,max_bars_back = 500,max_labels_count =


500,max_lines_count = 500)
Indent=input.int(title="Indent", defval=0, minval=0, inline='1', group="OHLC")
DWidth = input.int(title="W", defval=1, minval=1, inline='1',hfghgfh group="OHLC")
DLB = input.int(title="LB", dejhgjhgfval=1, minval=1,mnbmnb inline='1',
group="OHLC")
DOffset = input.int(title="OS", defval=1, minval=0, inline='1', group="OHLC")
DTF=input.timeframe('D',"",['', 'D', '2D','3D','W','2W','3W',
'M','2M','3M','4M','6M','9M','12M'], inline='1', group="OHLC")
nbvnbv

D = input.bool(true,"D", inline='2', group="OHLC")


DOHLC = input.bool(true,"OHLC", inline='2', group="OHLC")

Fun_OHLC(oset)=>
_Ox =open[oset]
_Hx =high[oset]
_Lx =low[oset]
_Cx =close[oset]
[_Ox, _Hx, _Lx, _Cx]

[hDO,hDH,hDL,hDC] = request.security(ticker.heikinashi(syminfo.tickerid), DTF,


Fun_OHLC(DOffset), lookahead=barmerge.lookahead_on)

new_bar_start(res) =>
ta.change(time(res)) != 0

Fun_LiLa(li_x, li_txt, li_col, res, show_count, _txt2, _width,_OffSpace) =>


var line _line = na, var label _label = na
var ary_line = array.new_line(show_count), var ary_label =
array.new_label(show_count)
if new_bar_start(res)
line.set_x2(_line, bar_index)
line.set_extend(_line, extend.none)
_line := line.new(bar_index, li_x, bar_index, li_x, color=li_col,
extend=extend.none, width=_width)
_label := label.new(bar_index, li_x,
text=str.tostring(_txt2)+li_txt+str.tostring(li_x, format.mintick),
textcolor=li_col, style= label.style_none, size=size.small, yloc=yloc.price)
array.push(ary_line, _line)
array.push(ary_label, _label)
line.delete(array.shift(ary_line))
label.delete(array.shift(ary_label))
if not na(_line) and line.get_x2(_line) != bar_index
line.set_x2(_line, bar_index)
label.set_x(_label, bar_index+_OffSpace) // Right Side
//label.set_yloc(_label, yloc.price) // Left Side
Fun_LiLa_Levels(_O,_H,_L,_C, res, show_count,SOc, _tf,_wi,Ofs)=>
if SOc
Fun_LiLa(_O, 'Op: ', #05900590, res, show_count, _tf,_wi,Ofs)
Fun_LiLa(_H, 'Hi: ', #FF0000, res, show_count, _tf,_wi,Ofs)
Fun_LiLa(_L, 'Lo: ', #000080, res, show_count, _tf,_wi,Ofs)
Fun_LiLa(_C, 'Cl: ', #808080, res, show_count, _tf,_wi,Ofs)

if D
Fun_LiLa_Levels(hDO,hDH,hDL,hDC,DTF,DLB,DOHLC,DTF,DWidth,Indent)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy