Chedecklist
Chedecklist
//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)
//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
////////////////////////////////////////////
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
// 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)
//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)
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
////////////////////////////////////////////
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
// 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)
////////////////////////////////////////////
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
// 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)
//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
//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)
//////////////////////////////////////////////////////////////////////
// Inputs
// FUNCTIONS
t = time
// Range
reso(exp, res) => request.security(syminfo.tickerid, res, exp,
lookahead=barmerge.lookahead_on)
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")