0% found this document useful (0 votes)
9 views10 pages

Chedecklist

The document is a script for a trading indicator called 'Lit Check' that includes a checklist for trading confirmations and visual elements for different trading sessions (Asian, London, New York). It allows users to customize the number of confirmations, their positions, colors, and sizes, as well as to display lines and backgrounds for specified time sessions. The script is designed for use in trading platforms that support Pine Script, enabling traders to visually track their trading criteria and session ranges.

Uploaded by

oziel.robi
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)
9 views10 pages

Chedecklist

The document is a script for a trading indicator called 'Lit Check' that includes a checklist for trading confirmations and visual elements for different trading sessions (Asian, London, New York). It allows users to customize the number of confirmations, their positions, colors, and sizes, as well as to display lines and backgrounds for specified time sessions. The script is designed for use in trading platforms that support Pine Script, enabling traders to visually track their trading criteria and session ranges.

Uploaded by

oziel.robi
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/ 10

indicator("Lit Check",shorttitle = " THE BLACK ELITE", overlay = true)

//pick number of confirmations


numberOfconfirmations = input.int(9, options = [1,2,3,4,5,6,7,8,9])

//Position and size the confirmation table


txtPos = input.string(title="Ubicación de la CheckLit", defval =
position.top_right, options =
[position.top_right,position.top_left,position.middle_right,position.middle_left,po
sition.bottom_right,position.bottom_left] ,group="Configuración de CheckLit")
Column_width = input.int(defval=23, title="Ancho", minval=3, maxval=60)
// Text_Col = input.color(defval = color.black, title = "Cell text color")
txtSize = input.string(defval = size.normal, title = "Tamaño", options =
[size.tiny, size.small, size.normal, size.large])

//define confirmations
cr1= input.string(title="", defval="IDENTIFICA LA
LIQ",inline="confirmChckbx",group="")
statusCR1 = input.bool(false,"",inline="confirmChckbx",group="")
cr2 = input.string(title=" ", defval="EN QUE PARTE DEL CICLO
ESTOY?",inline="confirmChckbx",group=" ")
statusCR2= input.bool(false,"" ,inline="confirmChckbx",group=" ")
cr3 = input.string(title=" ", defval="INCENTIVOS?",inline="confirmChckbx",group="
")
statusCR3= input.bool(false,"",inline="confirmChckbx",group=" ")
cr4 = input.string(title=" ", defval="TIEMPO
CORRECTO?",inline="confirmChckbx",group=" ")
statusCR4= input.bool(false,"",inline="confirmChckbx",group=" ")
cr5 = input.string(title=" ", defval="LIQUIDES CLARA PARA BARRER CON MI
ENTRADA?",inline="confirmChckbx",group=" ")
statusCR5= input.bool(false,"",inline="confirmChckbx",group=" ")
cr6 = input.string(title=" ", defval="BUSCA LA ENTRADA
OPTIMA",inline="confirmChckbx",group=" ")
statusCR6= input.bool(false,"",inline="confirmChckbx",group=" ")
cr7 = input.string(title=" ", defval="BUEN RR?",inline="confirmChckbx",group="
")
statusCR7= input.bool(false,"",inline="confirmChckbx",group=" ")
cr8 = input.string(title=" ", defval="R BOS O OTRO
APPROACH?",inline="confirmChckbx",group=" ")
statusCR8= input.bool(false,"",inline="confirmChckbx",group=" ")
cr9 = input.string(title=" ", defval="TOMARIAS ESTA ENTRADA 2
VECES?",inline="confirmChckbx",group=" ")
statusCR9= input.bool(false,"",inline="confirmChckbx",group=" ")

//Draw table
var table table = table.new(txtPos, 3, 11, border_width = 3, frame_width = 3)

//Define default colors


hbgColor = input.color(defval = color.black, title = "Color del titulo")
CColor = input.color(defval = color.rgb(180, 3, 3), title = "color de desmarque")
hTxtColor = input.color(defval = color.white, title = "Color del texto")

//Create Header
table.cell(table, 1, 0, "Checklist lit", width =
Column_width,text_color=hTxtColor,bgcolor=hbgColor,text_size=txtSize)

//loop through the number of desired confirmations and create the cells
//als incorporate ternary if else to determine the color based on value of Chkbox
next to confirmation
for i=0 to numberOfconfirmations-1 by 1

table.cell(table, 1, i+1, i==0 ? cr1 : i==1 ? cr2 : i==2 ? cr3 :i==3 ? cr4:i==4
? cr5:i==5 ? cr6:i==6 ? cr7:i==7 ? cr8:i==8 ? cr9 :cr9, width =
5,text_color=hTxtColor,bgcolor=(statusCR1==false and i==0) ? CColor :
(statusCR2==false and i==1) ? CColor : (statusCR3==false and i==2) ? CColor :
(statusCR4==false and i==3) ? CColor : (statusCR5==false and i==4) ? CColor :
(statusCR6==false and i==5) ? CColor : (statusCR7==false and i==6) ? CColor :
(statusCR8==false and i==7) ? CColor :(statusCR9==false and i==8) ? CColor :
color.green,text_size=txtSize)

//@version=5

var GRP1 = "ASIAN RANGE"

showLines = input(title='Show Lines', defval=true, group=GRP1)


showBackground = input(title='Show Background', defval=true, group=GRP1)
showMiddleLine = input(title='Show Middle Line', defval=true, group=GRP1)
extendLines = input(title='Extend Line', defval=true, group=GRP1)
rangeTime = input.session(title='Session Time', defval='1700-0100', group=GRP1)
extendTime = input.session(title='Extend Until', defval='0100-0500', group=GRP1)
linesWidth = input.int(1, 'Box And Lines Width', minval=1, maxval=4, group=GRP1)
boxLineColor = input(color.new(#9c27b0, 50), 'Box Line Color', group=GRP1)
middleLineColor = input(color.new(#9c27b0, 50), 'Middle Line Color', group=GRP1)
backgroundColor = input(color.new(#9c27b0, 90), 'Box Background Color', group=GRP1)

var GRP5 = "LONDON"

showLines4 = input(title='Show Lines', defval=true, group=GRP5)


showBackground4 = input(title='Show Background', defval=true, group=GRP5)
rangeTime4 = input.session(title='Session Time', defval='0300-0400', group=GRP5)
linesWidth4 = input.int(1, 'Box And Lines Width', minval=1, maxval=4, group=GRP5)
boxLineColor4 = input(color.new(#00bcd4, 95), 'Box Line Color', group=GRP5)
backgroundColor4 = input(color.new(#00bcd4, 90), 'Box Background Color',
group=GRP5)

var GRP6 = "NEWYORK"

showLines5 = input(title='Show Lines', defval=true, group=GRP6)


showBackground5 = input(title='Show Background', defval=true, group=GRP6)
rangeTime5 = input.session(title='Session Time', defval='0800-0900', group=GRP6)
linesWidth5 = input.int(1, 'Box And Lines Width', minval=1, maxval=4, group=GRP6)
boxLineColor5 = input(color.new(#4caf50, 95), 'Box Line Color', group=GRP6)
backgroundColor5 = input(color.new(#4caf50, 90), 'Box Background Color',
group=GRP6)

////////////////////////////////////////////
inSession = not na(time(timeframe.period, rangeTime))
inExtend = not na(time(timeframe.period, extendTime))

startTime = 0
startTime := inSession and not inSession[1] ? time : startTime[1]

//Box lines
var line lowHLine = na
var line topHLine = na
var line leftVLine = na
var line rightVLine = na
var line middleHLine = na
var box bgBox = na

var low_val = 0.0


var high_val = 0.0
if inSession and not inSession[1]
low_val := low
high_val := high
high_val

// Plot lines
if inSession and timeframe.isintraday
if inSession[1]
line.delete(lowHLine)
line.delete(topHLine)
line.delete(leftVLine)
line.delete(rightVLine)
line.delete(middleHLine)
box.delete(bgBox)

if low < low_val


low_val := low
low_val
if high > high_val
high_val := high
high_val

//Create Box
//x1, y1, x2, y2
if showBackground
bgBox := box.new(startTime, high_val, time, low_val, xloc=xloc.bar_time,
bgcolor=backgroundColor, border_width=0)

if showLines
lowHLine := line.new(startTime, low_val, time, low_val, xloc=xloc.bar_time,
color=boxLineColor, style=line.style_solid, width=linesWidth)
topHLine := line.new(startTime, high_val, time, high_val,
xloc=xloc.bar_time, color=boxLineColor, style=line.style_solid, width=linesWidth)
leftVLine := line.new(startTime, high_val, startTime, low_val,
xloc=xloc.bar_time, color=boxLineColor, style=line.style_solid, width=linesWidth)
rightVLine := line.new(time, high_val, time, low_val, xloc=xloc.bar_time,
color=boxLineColor, style=line.style_solid, width=linesWidth)

//Create Middle line


if showMiddleLine
middleHLine := line.new(startTime, (high_val + low_val) / 2, time,
(high_val + low_val) / 2, xloc=xloc.bar_time, color=middleLineColor,
style=line.style_solid, width=linesWidth)

else
if inExtend and extendLines and not inSession and timeframe.isintraday
time1 = line.get_x1(lowHLine)
time2 = line.get_x2(lowHLine)
price = line.get_y1(lowHLine)
line.delete(lowHLine)
lowHLine := line.new(time1, price, time, price, xloc=xloc.bar_time,
color=boxLineColor, style=line.style_solid, width=linesWidth)

time1 := line.get_x1(topHLine)
time2 := line.get_x2(topHLine)
price := line.get_y1(topHLine)
line.delete(topHLine)
topHLine := line.new(time1, price, time, price, xloc=xloc.bar_time,
color=boxLineColor, style=line.style_solid, width=linesWidth)

time1 := line.get_x1(middleHLine)
time2 := line.get_x2(middleHLine)
price := line.get_y1(middleHLine)
line.delete(middleHLine)
middleHLine := line.new(time1, price, time, price, xloc=xloc.bar_time,
color=middleLineColor, style=line.style_solid, width=linesWidth)
middleHLine

////////////////////////////////////////////

inSession4 = not na(time(timeframe.period, rangeTime4))

startTime4 = 0
startTime4 := inSession4 and not inSession4[1] ? time : startTime4[1]

//Box lines
var line lowHLine4 = na
var line topHLine4 = na
var line leftVLine4 = na
var line rightVLine4 = na
var line middleHLine4 = na
var box bgBox4 = na

var low_val4 = 0.0


var high_val4 = 0.0
if inSession4 and not inSession4[1]
low_val4 := low
high_val4 := high
high_val4

// Plot lines
if inSession4 and timeframe.isintraday
if inSession4[1]
line.delete(lowHLine4)
line.delete(topHLine4)
line.delete(leftVLine4)
line.delete(rightVLine4)
line.delete(middleHLine4)
box.delete(bgBox4)
if low < low_val4
low_val4 := low
low_val4
if high > high_val4
high_val4 := high
high_val4

//Create Box
//x1, y1, x2, y2
if showBackground4
bgBox4 := box.new(startTime4, high_val4, time, low_val4,
xloc=xloc.bar_time, bgcolor=backgroundColor4, border_width=0)

if showLines4
lowHLine4 := line.new(startTime4, low_val4, time, low_val4,
xloc=xloc.bar_time, color=boxLineColor4, style=line.style_solid, width=linesWidth4)
topHLine4 := line.new(startTime4, high_val4, time, high_val4,
xloc=xloc.bar_time, color=boxLineColor4, style=line.style_solid, width=linesWidth4)
leftVLine4 := line.new(startTime4, high_val4, startTime4, low_val4,
xloc=xloc.bar_time, color=boxLineColor4, style=line.style_solid, width=linesWidth4)
rightVLine4 := line.new(time, high_val4, time, low_val4,
xloc=xloc.bar_time, color=boxLineColor4, style=line.style_solid, width=linesWidth4)

////////////////////////////////////////////

inSession5 = not na(time(timeframe.period, rangeTime5))

startTime5 = 0
startTime5 := inSession5 and not inSession5[1] ? time : startTime5[1]

//Box lines
var line lowHLine5 = na
var line topHLine5 = na
var line leftVLine5 = na
var line rightVLine5 = na
var line middleHLine5 = na
var box bgBox5 = na

var low_val5 = 0.0


var high_val5 = 0.0
if inSession5 and not inSession5[1]
low_val5 := low
high_val5 := high
high_val5

// Plot lines
if inSession5 and timeframe.isintraday
if inSession5[1]
line.delete(lowHLine5)
line.delete(topHLine5)
line.delete(leftVLine5)
line.delete(rightVLine5)
line.delete(middleHLine5)
box.delete(bgBox5)

if low < low_val5


low_val5 := low
low_val5
if high > high_val5
high_val5 := high
high_val5

//Create Box
//x1, y1, x2, y2
if showBackground5
bgBox5 := box.new(startTime5, high_val5, time, low_val5,
xloc=xloc.bar_time, bgcolor=backgroundColor5, border_width=0)

if showLines5
lowHLine5 := line.new(startTime5, low_val5, time, low_val5,
xloc=xloc.bar_time, color=boxLineColor5, style=line.style_solid, width=linesWidth5)
topHLine5 := line.new(startTime5, high_val5, time, high_val5,
xloc=xloc.bar_time, color=boxLineColor5, style=line.style_solid, width=linesWidth5)
leftVLine5 := line.new(startTime5, high_val5, startTime5, low_val5,
xloc=xloc.bar_time, color=boxLineColor5, style=line.style_solid, width=linesWidth5)
rightVLine5 := line.new(time, high_val5, time, low_val5,
xloc=xloc.bar_time, color=boxLineColor5, style=line.style_solid, width=linesWidth5)

///////////////////////////////////////////////

//INPUTS

ffRange = input.session(title='Time: ', defval='0200-0201', inline='a', group='FF')


ffcolor =
input.color(color.new(color.black,20),title="Color:",inline="s_1",group="FF")
ffStyle = input.string(title="-", defval=line.style_solid,
options=[line.style_dotted, line.style_dashed,
line.style_solid],inline="s_1",group="FF")

mmm1Range = input.session(title='Time: ', defval='0430-0431', inline='a',


group='MMM1')
mmm1color =
input.color(color.new(color.black,20),title="Color:",inline="s_1",group="MMM1")
mmm1Style = input.string(title="-", defval=line.style_solid,
options=[line.style_dotted, line.style_dashed,
line.style_solid],inline="s_1",group="MMM1")

mmm2Range = input.session(title='Time: ', defval='0630-0631', inline='a',


group='MMM2')
mmm2color =
input.color(color.new(color.black,20),title="Color:",inline="s_1",group="MMM2")
mmm2Style = input.string(title="-", defval=line.style_solid,
options=[line.style_dotted, line.style_dashed,
line.style_solid],inline="s_1",group="MMM2")

mmm3Range = input.session(title='Time: ', defval='0630-0631', inline='a',


group='MMM3')
mmm3color =
input.color(color.new(color.black,20),title="Color:",inline="s_1",group="MMM3")
mmm3Style = input.string(title="-", defval=line.style_solid,
options=[line.style_dotted, line.style_dashed,
line.style_solid],inline="s_1",group="MMM3")

mmm4Range = input.session(title='Time: ', defval='0630-0631', inline='a',


group='MMM4')
mmm4color =
input.color(color.new(color.black,20),title="Color:",inline="s_1",group="MMM4")
mmm4Style = input.string(title="-", defval=line.style_solid,
options=[line.style_dotted, line.style_dashed,
line.style_solid],inline="s_1",group="MMM4")

lcRange = input.session(title='Time: ', defval='1100-1101', inline='a', group='LC')


lccolor =
input.color(color.new(color.black,20),title="Color:",inline="s_1",group="LC")
lcStyle = input.string(title="-", defval=line.style_solid,
options=[line.style_dotted, line.style_dashed,
line.style_solid],inline="s_1",group="LC")

//Plot lines
in_session_ff = time(timeframe.period, ffRange)
sessionffActive = in_session_ff and timeframe.multiplier <= 240
var line ff = na
if sessionffActive and sessionffActive[1] == false
ff := line.new(bar_index,high+0.001,bar_index,low-0.001,color=ffcolor,
style=ffStyle)

in_session_mmm1 = time(timeframe.period, mmm1Range)


sessionmmm1Active = in_session_mmm1 and timeframe.multiplier <= 240
var line mmm1 = na
if sessionmmm1Active and sessionmmm1Active[1] == false
mmm1 := line.new(bar_index,high+0.001,bar_index,low-0.001,color=mmm1color,
style=mmm1Style)

in_session_mmm2 = time(timeframe.period, mmm2Range)


sessionmmm2Active = in_session_mmm2 and timeframe.multiplier <= 240
var line mmm2 = na
if sessionmmm2Active and sessionmmm2Active[1] == false
mmm2 := line.new(bar_index,high+0.001,bar_index,low-0.001,color=mmm2color,
style=mmm2Style)

in_session_mmm3 = time(timeframe.period, mmm3Range)


sessionmmm3Active = in_session_mmm3 and timeframe.multiplier <= 240
var line mmm3 = na
if sessionmmm3Active and sessionmmm3Active[1] == false
mmm3 := line.new(bar_index,high+0.001,bar_index,low-0.001,color=mmm3color,
style=mmm3Style)

in_session_mmm4 = time(timeframe.period, mmm4Range)


sessionmmm4Active = in_session_mmm4 and timeframe.multiplier <= 240
var line mmm4 = na
if sessionmmm4Active and sessionmmm4Active[1] == false
mmm4 := line.new(bar_index,high+0.001,bar_index,low-0.001,color=mmm4color,
style=mmm4Style)

in_session_lc = time(timeframe.period, lcRange)


sessionlcActive = in_session_lc and timeframe.multiplier <= 240
var line lc = na
if sessionlcActive and sessionlcActive[1] == false
lc := line.new(bar_index,high+0.001,bar_index,low-0.001,color=lccolor,
style=lcStyle)

//////////////////////////////////////////////////////////////////////
// Inputs

var GRP10 = "Daily Open"


daily = input.string(title='View', defval='Daily Open', group=GRP10)
_offset = input.int(0, title='Offset', minval=0, maxval=2)
o_color = input.color(color.new(#000000, 0), "Open Color", inline="1", group =
GRP10)

// FUNCTIONS
t = time

isNewbar = not na(t) and (na(t[1]) or t > t[1])

tfInMinutes(simple string tf = "") =>


float chartTf =
timeframe.multiplier * (
timeframe.isseconds ? 1. / 60 :
timeframe.isminutes ? 1. :
timeframe.isdaily ? 60. * 24 :
timeframe.isweekly ? 60. * 24 * 7 :
timeframe.ismonthly ? 60. * 24 * 30.4375 : na)
float result = tf == "" ? chartTf : request.security(syminfo.tickerid, tf,
chartTf)

inTimeframe(_t) => tfInMinutes(_t) > tfInMinutes(timeframe.period)

// Range
reso(exp, res) => request.security(syminfo.tickerid, res, exp,
lookahead=barmerge.lookahead_on)

getData(_t, _var) =>


o = reso(open[_offset], _t)
show = _var != "Off" and inTimeframe(_t)
_time = time(_t)
newbar = na(_time[1]) or _time > _time[1]
oc = _var == 'Daily Open'
[o, newbar, oc]

// ---------- Daily ----------


[d_o, d_newbar, d_oc] = getData("D", daily)

if d_newbar
if d_oc
line.new(x1=time, y1=d_o, x2=time_close("D"), y2=d_o, xloc=xloc.bar_time,
style=line.style_dotted, color=o_color)
//-------------------- WATERMARK--------------------

////////////////////////////////////////////////////

//text inputs
title = input.string("THE ELITE", "Tittle", group = "text")
subtitle = input.string("LIQUIDYTY | TIMING | PRECISION | ", "Subtitle", group =
"text")
//symbol info
symInfoCheck = input.bool(title="Show Symbol Info", defval=true, group = "watermark
position")
symInfo = syminfo.ticker + " | " + timeframe.period + (timeframe.isminutes ? "M" :
na)
date = str.format("{0}/{1}/{2}", dayofmonth(time_close), month(time_close),
year(time_close))
//text positioning
textVPosition = input.string("top", "Vertical Position", options = ["top",
"middle", "bottom"], group = "watermark position")
textHPosition = input.string("center", "Horizontal Position", options = ["left",
"center", "right"], group = "watermark position")
//symbol info positioning
symVPosition = input.string("bottom", "Vertical Position", options = ["top",
"middle", "bottom"], group = "symbol position")
symHPosition = input.string("center", "Horizontal Position", options = ["left",
"center", "right"], group = "symbol position")
//cell size
cellWidthPercent = input.float(0, "Cell Width (%)", minval = 0, maxval = 100,
tooltip = "The width of the cell as a % of the indicator's visual space. Optional.
By default, auto-adjusts the width based on the text inside the cell. Value 0 has
the same effect.", group = "cell size")
cellHeightPercent = input.float(0, "Cell Height (%)", minval = 0, maxval = 100,
tooltip = "The height of the cell as a % of the indicator's visual space. Optional.
By default, auto-adjusts the height based on the text inside of the cell. Value 0
has the same effect.", group = "cell size")
//title settings
c_title = input(color.new(color.black, 0), "Title Color", group = "title settings")
s_title = input.string("large", "Title Size", options = ["tiny", "small", "normal",
"large", "huge", "auto"], group = "title settings")
a_title = input.string("center","Title Alignment", options = ["center","left",
"right"], group = "title settings")
//subtitle settings
c_subtitle = input(color.new(color.black, 30), "Subtitle Color", group = "subtitle
settings")
s_subtitle = input.string("small", "Subtitle Size", options = ["tiny", "small",
"normal", "large", "huge", "auto"], group = "subtitle settings")
a_subtitle = input.string("center","Subtitle Alignment", options =
["center","left", "right"], group = "subtitle settings")

//symbol settings
c_symInfo = input(color.new(color.black, 30), "Subtitle Color", group = "symbol
settings")
s_symInfo = input.string("normal", "Subtitle Size", options = ["tiny", "small",
"normal", "large", "huge", "auto"], group = "symbol settings")
a_symInfo = input.string("center","Subtitle Alignment", options = ["center","left",
"right"], group = "symbol settings")
c_bg = input(color.new(color.blue, 100), "Background", group = "background")

//text watermark creation


var table textWatermark = table.new(textVPosition + "_" + textHPosition, 1, 3)
table.cell(textWatermark, 0, 0, title, width = cellWidthPercent, height =
cellHeightPercent, text_color = c_title, text_halign = a_title, text_size =
s_title, bgcolor = c_bg)
table.cell(textWatermark, 0, 1, subtitle, width = cellWidthPercent, height =
cellHeightPercent, text_color = c_subtitle, text_halign = a_subtitle, text_size=
s_subtitle, bgcolor = c_bg)
//symbol info watermark creation
var table symWatermark = table.new(symVPosition + "_" + symHPosition, 5, 5)
if symInfoCheck
table.cell(symWatermark, 0, 1, symInfo, width = cellWidthPercent, height =
cellHeightPercent, text_color = c_symInfo, text_halign = a_symInfo, text_size =
s_symInfo, bgcolor = c_bg)
table.cell(symWatermark, 0, 0, date, width = cellWidthPercent, height =
cellHeightPercent, text_color = c_symInfo, text_halign = a_symInfo, text_size =
s_symInfo, bgcolor = c_bg)

You might also like