Dashboard Signals - Dhavs
Dashboard Signals - Dhavs
Dashboard Signals - Dhavs
text_size = input.session('Small',"Dashboard
Size" ,options=["Tiny","Small","Normal","Large"] ,group='Style Settings')
//----
//////////////////
tUS = input.symbol("CURRENCYCOM:US30","TickerUS")
[tsUS,tsUSC1] = request.security(tUS,'D',[close,close[1]])
tsUSTF1 = request.security(tUS,TF1,close[1])
tsUSTF2 = request.security(tUS,TF2,close[1])
//tsUSTF3 = request.security(tUS,TF3,close[1])
tsUSChng = (tsUS-tsUSC1)
tsUSp = (tsUS-tsUSC1)*100/tsUSC1
tsUS1 = (tsUS-tsUSTF1)*100/tsUSTF1
tsUS2 = (tsUS-tsUSTF2)*100/tsUSTF2
//tsUS3 = (tsUS-tsUSC1)*100/tsUSTF3
// Vix
indvixin = input.symbol("NSE:INDIAVIX","Ticker Vix" )
[indvix,indvixC] = request.security(indvixin,'D',[close,close[1]])
indvixTF1 = request.security(indvixin,TF1,close[1])
indvixTF2 = request.security(indvixin,TF2,close[1])
//indvixTF3 = request.security(indvixin,TF3,close[1])
indvixChng = (indvix-indvixC)
indvixp = (indvix - indvixC)*100/indvixC
indvix1 = (indvix - indvixTF1)*100/indvixTF1
indvix2 = (indvix - indvixTF2)*100/indvixTF2
//indvix3 = (indvix - indvixTF3)*100/indvixTF3
//
t1 = input.symbol("NSE:HDFCBANK","Ticker1")
t2 = input.symbol("NSE:ICICIBANK" , "Ticker2")
t3 = input.symbol("NSE:KOTAKBANK", "Ticker3")
t4 = input.symbol("NSE:SBIN", "Ticker4")
t5 = input.symbol("NSE:AXISBANK" , "Ticker5")
[ts1,ts1C] = request.security(t1,'D',[close,close[1]])
ts1TF1 = request.security(t1,TF1,close[1])
ts1TF2 = request.security(t1,TF2,close[1])
//ts1TF3 = request.security(t1,TF3,close[1])
ts1Chng = (ts1-ts1C)
ts1p = (ts1-ts1C)*100/ts1C
ts1p1 = (ts1 - ts1TF1)*100/ts1TF1
ts1p2 = (ts1 - ts1TF2)*100/ts1TF2
//ts1p3 = (ts1 - ts1TF3)*100/ts1TF3
//------------------
[ts2,ts2C] = request.security(t2,'D',[close,close[1]])
ts2TF1 = request.security(t2,TF1,close[1])
ts2TF2 = request.security(t2,TF2,close[1])
//ts2TF3 = request.security(t2,TF3,close[1])
ts2Chng = (ts2-ts2C)
ts2p = (ts2-ts2C)*100/ts2C
ts2p1 = (ts2 - ts2TF1)*100/ts2TF1
ts2p2 = (ts2 - ts2TF2)*100/ts2TF2
//ts2p3 = (ts2 - ts2TF3)*100/ts2TF3
//---------------
[ts3,ts3C] = request.security(t3,'D',[close,close[1]])
ts3TF1 = request.security(t3,TF1,close[1])
ts3TF2 = request.security(t3,TF2,close[1])
//ts3TF3 = request.security(t3,TF3,close[1])
ts3Chng = (ts3-ts3C)
ts3p = (ts3-ts3C)*100/ts3C
ts3p1 = (ts3 - ts3TF1)*100/ts3TF1
ts3p2 = (ts3 - ts3TF2)*100/ts3TF2
//ts3p3 = (ts3 - ts3TF3)*100/ts3TF3
//----------------
[ts4,ts4C] = request.security(t4,'D',[close,close[1]])
ts4TF1 = request.security(t4,TF1,close[1])
ts4TF2 = request.security(t4,TF2,close[1])
//ts4TF3 = request.security(t4,TF3,close[1])
ts4Chng = (ts4-ts4C)
ts4p = (ts4-ts4C)*100/ts4C
ts4p1 = (ts4 - ts4TF1)*100/ts4TF1
ts4p2 = (ts4 - ts4TF2)*100/ts4TF2
//ts4p3 = (ts4 - ts4TF3)*100/ts4TF3
[ts5,ts5C] = request.security(t5,'D',[close,close[1]])
ts5TF1 = request.security(t5,TF1,close[1])
ts5TF2 = request.security(t5,TF2,close[1])
//ts5TF3 = request.security(t5,TF3,close[1])
ts5Chng = (ts5-ts5C)
ts5p = (ts5-ts5C)*100/ts5C
ts5p1 = (ts5 - ts5TF1)*100/ts5TF1
ts5p2 = (ts5 - ts5TF2)*100/ts5TF2
//ts5p3 = (ts5 - ts5TF3)*100/ts5TF3
var t = table.new(table_position,8,math.abs(max-min)+2,
frame_color=txt_col,
frame_width=1,
border_color=txt_col,
border_width=1)
if (barstate.islast)
table.cell(t,1,0,'Symbol',text_color=txt_col,text_size=table_text_size)
table.cell(t,2,0,'LTP',text_color=txt_col,text_size=table_text_size)
table.cell(t,3,0,'Chng',text_color=txt_col,text_size=table_text_size)
table.cell(t,4,0,'%Chng',text_color=txt_col,text_size=table_text_size)
table.cell(t,5,0, TF1 ,text_color=txt_col,text_size=table_text_size)
table.cell(t,6,0, TF2 ,text_color=txt_col,text_size=table_text_size)
//table.cell(t,7,0, TF3 ,text_color=txt_col,text_size=table_text_size)
// Dow
table.cell(t,1,1,'Dow',text_color=color.white,text_size=table_text_size,bgcolor=col
or.black)
table.cell(t,2,1,
str.tostring(tsUS) ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(cdow,cell_transp))
table.cell(t,3,1,
str.tostring(tsUSChng),text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(cdow,cell_transp))
table.cell(t,4,1, str.tostring(tsUSp, '#.##')
+'%',text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(cdow,cell_transp))
table.cell(t,5,1, str.tostring(tsUS1, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(cdow1,cell_transp))
table.cell(t,6,1, str.tostring(tsUS2, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(cdow2,cell_transp))
//table.cell(t,7,1, str.tostring(tsUS3, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(cdow3,cell_transp))
// Vix
table.cell(t,1,2, str.replace_all(indvixin, 'NSE:',
''),text_color=color.white,text_size=table_text_size,bgcolor=color.black)
table.cell(t,2,2,
str.tostring(indvix) ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(indvixp >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,3,2,
str.tostring(indvixChng),text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(indvixp >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,4,2, str.tostring(indvixp, '#.##')
+'%',text_color=txt_col,text_size=table_text_size, bgcolor=color.new(indvixp >= 0 ?
cell_up : cell_dn ,cell_transp) )
table.cell(t,5,2, str.tostring(indvix1, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(indvix1 >=
0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,6,2, str.tostring(indvix2, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(indvix2 >=
0 ? cell_up : cell_dn ,cell_transp))
//table.cell(t,7,2, str.tostring(indvix3, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(indvix3 >=
0 ? cell_up : cell_dn ,cell_transp))
// 1
table.cell(t,1,3, str.replace_all(t1, 'NSE:',
''),text_color=color.white,text_size=table_text_size,bgcolor=color.black)
table.cell(t,2,3,
str.tostring(ts1) ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts1p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,3,3,
str.tostring(ts1Chng),text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts1p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,4,3, str.tostring(ts1p, '#.##')
+'%',text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts1p >= 0 ?
cell_up : cell_dn ,cell_transp) )
table.cell(t,5,3, str.tostring(ts1p1, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts1p1 >= 0 ?
cell_up : cell_dn ,cell_transp))
table.cell(t,6,3, str.tostring(ts1p2, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts1p2 >= 0 ?
cell_up : cell_dn ,cell_transp))
//table.cell(t,7,3, str.tostring(ts1p3, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts1p3 >= 0 ?
cell_up : cell_dn ,cell_transp))
// 2
table.cell(t,1,4, str.replace_all(t2, 'NSE:',
''),text_color=color.white,text_size=table_text_size,bgcolor=color.black)
table.cell(t,2,4,
str.tostring(ts2) ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts2p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,3,4,
str.tostring(ts2Chng),text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts2p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,4,4, str.tostring(ts2p, '#.##')
+'%',text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts2p >= 0 ?
cell_up : cell_dn ,cell_transp) )
table.cell(t,5,4, str.tostring(ts2p1, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts2p1 >= 0 ?
cell_up : cell_dn ,cell_transp))
table.cell(t,6,4, str.tostring(ts2p2, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts2p2 >= 0 ?
cell_up : cell_dn ,cell_transp))
//table.cell(t,7,4, str.tostring(ts2p3, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts2p3 >= 0 ?
cell_up : cell_dn ,cell_transp))
// 3
table.cell(t,1,5, str.replace_all(t3, 'NSE:',
''),text_color=color.white,text_size=table_text_size,bgcolor=color.black)
table.cell(t,2,5,
str.tostring(ts3) ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts3p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,3,5,
str.tostring(ts3Chng),text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts3p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,4,5, str.tostring(ts3p, '#.##')
+'%',text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts3p >= 0 ?
cell_up : cell_dn ,cell_transp) )
table.cell(t,5,5, str.tostring(ts3p1, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts3p1 >= 0 ?
cell_up : cell_dn ,cell_transp))
table.cell(t,6,5, str.tostring(ts3p2, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts3p2 >= 0 ?
cell_up : cell_dn ,cell_transp))
//table.cell(t,7,5, str.tostring(ts3p3, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts3p3 >= 0 ?
cell_up : cell_dn ,cell_transp))
// 4
table.cell(t,1,6, str.replace_all(t4, 'NSE:',
''),text_color=color.white,text_size=table_text_size,bgcolor=color.black)
table.cell(t,2,6,
str.tostring(ts4) ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts4p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,3,6,
str.tostring(ts4Chng),text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts4p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,4,6, str.tostring(ts4p, '#.##')
+'%',text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts4p >= 0 ?
cell_up : cell_dn ,cell_transp) )
table.cell(t,5,6, str.tostring(ts4p1, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts4p1 >= 0 ?
cell_up : cell_dn ,cell_transp))
table.cell(t,6,6, str.tostring(ts4p2, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts4p2 >= 0 ?
cell_up : cell_dn ,cell_transp))
//table.cell(t,7,6, str.tostring(ts4p3, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts4p3 >= 0 ?
cell_up : cell_dn ,cell_transp))
// 5
table.cell(t,1,7, str.replace_all(t5, 'NSE:',
''),text_color=color.white,text_size=table_text_size,bgcolor=color.black)
table.cell(t,2,7,
str.tostring(ts5) ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts5p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,3,7,
str.tostring(ts5Chng),text_color=txt_col,text_size=table_text_size,
bgcolor=color.new(ts5p >= 0 ? cell_up : cell_dn ,cell_transp))
table.cell(t,4,7, str.tostring(ts5p, '#.##')
+'%',text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts5p >= 0 ?
cell_up : cell_dn ,cell_transp) )
table.cell(t,5,7, str.tostring(ts5p1, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts5p1 >= 0 ?
cell_up : cell_dn ,cell_transp))
table.cell(t,6,7, str.tostring(ts5p2, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts5p2 >= 0 ?
cell_up : cell_dn ,cell_transp))
//table.cell(t,7,7, str.tostring(ts5p3, '#.##')
+'%' ,text_color=txt_col,text_size=table_text_size, bgcolor=color.new(ts5p3 >= 0 ?
cell_up : cell_dn ,cell_transp))
//study("Supertrend", overlay=true)
ShowSuperTrend = input(true, "──── Show SuperTrend Indicator ─────")
highlighting = input.bool(title="Show HIghlights", defval=false)
len = input.int( defval=10)
mult = input.int( defval=2)
[superTrend, dir] = ta.supertrend(mult, len)
colResistance = dir == 1 and dir == dir[1] ? color.new(color.red, 0) :
color.new(color.red, 100)
colSupport = dir == -1 and dir == dir[1] ? color.new(color.green, 0) :
color.new(color.green, 100)
//VWAP
//RSI
rsiPeriod = input.int(title="RSI Period", defval=14, minval=2, maxval=365 ,
group='RSI' )
RSI = ta.rsi(close, rsiPeriod)
rsitxt = RSI > 50 ? 'UP' : 'Down'
//
mfiPeriod = input.int(title="MFI Period", defval=10, minval=2, maxval=365)
MFI = ta.mfi(hlc3,mfiPeriod)
MFItxt = MFI > 50 ? 'UP' : 'Down'
//ADX-DMI
f_col_adx(diplus,diminus,adx) =>
var ADXColor = color.white
var ADXText = ''
var DI1Color = color.white
var DI1Text = ''
var DI2Color = color.white
var DI2Text = ''
[ADXColor,ADXText,DI1Color,DI1Text,DI2Color,DI2Text]
[ADXColor,ADXText,DI1Color,DI1Text,DI2Color,DI2Text] =
f_col_adx(diplus,diminus,adx)
if (barstate.islast)
table.cell(tb1,1,0,'Indicator',text_color=txt_col,text_size=table_text_size)
table.cell(tb1,2,0,'Value',text_color=txt_col,text_size=table_text_size)
table.cell(tb1,3,0,'Trend' ,text_color=txt_col,text_size=table_text_size)
table.cell(tb1,4,0, TF1 ,text_color=txt_col,text_size=table_text_size)
table.cell(tb1,5,0, TF2 ,text_color=txt_col,text_size=table_text_size)
//
table.cell(tb1,1,1,'Vwap',text_color=color.white,text_size=table_text_size,bgcolor=
color.black)
table.cell(tb1,2,1,str.tostring(VWAP,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close >
VWAP ? cell_up : cell_dn ,cell_transp))
vwaptxt = close >VWAP ? 'UP' : 'Down'
table.cell(tb1,3,1, vwaptxt ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new( close > VWAP ? cell_up : cell_dn ,cell_transp))
table.cell(tb1,4,1,str.tostring(Svwap1,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close >
Svwap1 ? cell_up : cell_dn ,cell_transp))
table.cell(tb1,5,1,str.tostring(Svwap2,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close >
Svwap2 ? cell_up : cell_dn ,cell_transp))
//VWMA
table.cell(tb1,1,2,'EMA
'+str.tostring(LenEma),text_color=color.white,text_size=table_text_size,bgcolor=col
or.black)
table.cell(tb1,2,2,str.tostring(EMA,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close > EMA ?
cell_up : cell_dn ,cell_transp))
vwmatxt = close > EMA ? 'UP' : 'Down'
table.cell(tb1,3,2, vwmatxt ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new( close > EMA ? cell_up : cell_dn ,cell_transp))
table.cell(tb1,4,2,str.tostring(Sma1,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close >
Sma1 ? cell_up : cell_dn ,cell_transp))
table.cell(tb1,5,2,str.tostring(Sma2,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close >
Sma2 ? cell_up : cell_dn ,cell_transp))
//SuperTrend
table.cell(tb1,1,3,'ST',text_color=color.white,text_size=table_text_size,bgcolor=co
lor.black)
table.cell(tb1,2,3,str.tostring(superTrend,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close >
superTrend ? cell_up : cell_dn ,cell_transp))
STtxt = close > superTrend ? 'UP' : 'Down'
table.cell(tb1,3,3, STtxt ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new( close > superTrend ? cell_up : cell_dn ,cell_transp))
table.cell(tb1,4,3,str.tostring(Sst1,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close >
Sst1 ? cell_up : cell_dn ,cell_transp))
table.cell(tb1,5,3,str.tostring(Sst2,
'#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( close >
Sst2 ? cell_up : cell_dn ,cell_transp))
//RSI
table.cell(tb1,1,4,'RSI',text_color=color.white,text_size=table_text_size,bgcolor=c
olor.black)
table.cell(tb1,2,4,str.tostring(RSI,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( RSI > 50 ?
cell_up : cell_dn ,cell_transp))
table.cell(tb1,3,4, rsitxt ,text_color=txt_col,text_size=table_text_size,
bgcolor=color.new( RSI > 50 ? cell_up : cell_dn ,cell_transp))
table.cell(tb1,4,4,str.tostring(Srsi1,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( Srsi1 >
50 ? cell_up : cell_dn ,cell_transp))
table.cell(tb1,5,4,str.tostring(Srsi2,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor=color.new( Srsi2 >
50 ? cell_up : cell_dn ,cell_transp))
//ADX
table.cell(tb1,1,5,'ADX',text_color=color.white,text_size=table_text_size,bgcolor=c
olor.black)
table.cell(tb1,2,5,str.tostring(adx,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= ADXColor)
table.cell(tb1,3,5, ADXText ,text_color=txt_col,text_size=table_text_size,
bgcolor=ADXColor)
table.cell(tb1,4,5,str.tostring(Sadx1,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= ADXColor1)
table.cell(tb1,5,5,str.tostring(Sadx2,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= ADXColor2)
//DI+
table.cell(tb1,1,6,'DI
+',text_color=color.white,text_size=table_text_size,bgcolor=color.black)
table.cell(tb1,2,6,str.tostring(diplus,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= DI1Color)
table.cell(tb1,3,6, DI1Text ,text_color=txt_col,text_size=table_text_size,
bgcolor=DI1Color)
table.cell(tb1,4,6,str.tostring(Sdip1,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= DI1Color1)
table.cell(tb1,5,6,str.tostring(Sdip2,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= DI1Color2)
//DI-
table.cell(tb1,1,7,'DI
-',text_color=color.white,text_size=table_text_size,bgcolor=color.black)
table.cell(tb1,2,7,str.tostring(diminus,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= DI2Color)
table.cell(tb1,3,7, DI2Text ,text_color=txt_col,text_size=table_text_size,
bgcolor=DI2Color)
table.cell(tb1,4,7,str.tostring(Sdim1,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= DI2Color1)
table.cell(tb1,5,7,str.tostring(Sdim2,
'#.#'),text_color=txt_col,text_size=table_text_size, bgcolor= DI2Color2)