Top Bottom
Top Bottom
0 at
https://mozilla.org/MPL/2.0/
// © TeamTaurus
//@version=4
study("TeamTaurus Master",shorttitle="ॐ" ,overlay = true, max_bars_back = 5000)
mode =input(title = "HTF Method", defval = 'User Defined', options=['Auto', 'User
Defined'], tooltip = "Choose Of the method to Select the Timeframe")
HTFm = input('D', title = "Time Frame (if HTF Method=User Defined)",
type=input.resolution, tooltip = "Manual Timeframe Selection")
showlast = input(title = "Show Only Last Period", defval = true, group = "Settings
ॐ", tooltip = "Shows only Today levels bar by bar")
showlabels = input(title = "Show Labels", defval = true, group = "Settings ॐ",
tooltip = "Shows labels on plotted pivots")
lstyle = input(title = "CAM Style", options = ['Solid', 'Circles', 'Cross'], defval
='Solid', group = "Style", tooltip = "Change Line Style for Camarilla")
lstyle2 = input(title = "CPR Style", options = ['Solid', 'Circles', 'Cross'],
defval ='Solid', group = "Style", tooltip = "Change Line Style for CPR")
flstyle = input(title = "Fib Style", options = ['Solid', 'Circles', 'Cross'],
defval ='Solid', group = "Style", tooltip = "Change Line Style for Fibonacci
Pivots")
rescol = input(defval = color.new(#ff7700, 0), title = "Resistance Color", group =
"Style")
supcol = input(defval = color.new(#000000, 0), title = "Support Color", group =
"Style")
Tcol = input(defval = color.new(color.red, 0), title = "Target Color", group =
"Style")
cturnon = input(title = "Turn On Camarilla", defval = true, group = "Settings ॐ",
tooltip = "Turn Camarilla ON")
cprturnon = input(title = "Turn On CPR", defval = false, group = "Settings ॐ",
tooltip = "Turn CPR on")
JP = input(title = "Just Pivot", defval = false, group = "Settings ॐ", tooltip =
"Show Only Pivot of the day")
fibon = input(title = "Turn On Fib Pivot", defval= false, group = "Settings ॐ",
tooltip = "Turn Fib Pivots On")
sal = input(title="Show Additional Levels?", defval = false, group = "Settings ॐ",
tooltip = "Show additional levels of Fib Pivots")
PDHL = input(title = "Show Previous Hi-Lo", defval=false, group = "Settings ॐ",
tooltip = "Show Previous Days Hi and Low")
rsicol = input(false, title="Show RSI colors?", group = "Settings ॐ", tooltip =
"Show RSI Levels On Bars")
vwaplot = input (false, title="VWAP Strategy", group = "Settings ॐ", tooltip =
"Turn on Vwap")
emaplot = input (false, title="Show EMA on chart", group = "Settings ॐ", tooltip =
"Turns On 3 Ema's On Chart, Levels can be Edited")
choice = input(title="Choice", defval="EMA", options=["EMA", "SMA"], group =
"Settings ॐ", tooltip = "Select Either EMA or SMA from dropdown menu")
MAa = input (9,title ="Fast", minval = 1,type = input.integer, maxval = 500, group
= "Settings ॐ")
MAb = input (27,title ="Medium", type = input.integer, minval = 1, maxval = 500,
group = "Settings ॐ")
MAc = input (111,title ="Slow", type = input.integer, minval = 1, maxval = 500,
group = "Settings ॐ")
lw = input (1, title = "Ema Width", minval = 1, maxval = 3, group = "Settings ॐ")
vsr = input(false, title="Show Volume Based S&R", group = "Settings ॐ", tooltip =
"Shows Volume Based Support and Resistance on Stocks and Futures")
prd = input(defval = 30, title="Pivot Point Period", minval = 5, maxval = 100,
group ="Swing Length")
swing = input(defval = false, title="Swing High Low", group = "Settings ॐ",
tooltip ="Turn On Swing Hi/Lo")
// Line Style
linestyle = lstyle == 'Solid' ? plot.style_line :
lstyle == 'Circles' ? plot.style_circles :
lstyle == 'Cross' ? plot.style_cross : na
linestyleL = plot.style_circles
///////Calculation Camarilla
H4 = chtf + rng * 1.1/2
H3 = chtf + rng * 1.1/4
H2 = chtf + rng * 1.1/6
H1 = chtf + rng * 1.1/12
L1 = chtf - rng * 1.1/12
L2 = chtf - rng * 1.1/6
L3 = chtf - rng * 1.1/4
L4 = chtf - rng * 1.1/2
L5 = L4 - 1.168 * (L3 - L4) //L5 = chtf - (H5 - chtf)
H5 = H4 + 1.168 * (H4 - H3) //H5 = (hhtf / lhtf) * chtf
H6 = (hhtf/lhtf) * chtf //H6 = H5 + 1.168 * (H5 - H4)
L6 = chtf - (H6 - chtf) //L6 = chtf - (H6 - chtf)
SLbull = (H4 + H3) / 2
SLbear = (L4 + L3) / 2
mid = (H3 + L3) / 2
////////Color Settings
plot(islast and cturnon ? H6 : na, title = "H6", color = Tcol, linewidth = 1, style
= linestyle )
plot(islast and cturnon ? H5 : na, title = "H5", color = Tcol, linewidth = 1, style
= linestyle )
plot(islast and cturnon ? H4 : na, title = "H4", color = rescol, linewidth = 1,
style = linestyle )
plot(islast and cturnon ? H3 : na, title = "H3", color = supcol, linewidth = 1,
style = linestyle )
plot(islast and cturnon ? L3 : na, title = "L3", color = supcol, linewidth = 1,
style = linestyle )
plot(islast and cturnon ? L4 : na, title = "L4", color = rescol, linewidth = 1,
style = linestyle )
plot(islast and cturnon ? L5 : na, title = "L5", color = Tcol, linewidth = 1, style
= linestyle )
plot(islast and cturnon ? L6 : na, title = "L6", color = Tcol, linewidth = 1, style
= linestyle )
Round_it(valu)=>
a = 0
num = syminfo.mintick
s = valu
if na(s)
s := syminfo.mintick
if num < 1
for i = 1 to 20
num := num * 10
if num > 1
break
a := a +1
for x = 1 to a
s := s * 10
s := round(s)
for x = 1 to a
s := s / 10
s := s < syminfo.mintick ? syminfo.mintick : s
s
// Labels
if showlabels and cturnon
var label s3label = na, var label s4label = na, var label s5label = na, var
label s6label = na
var label r3label = na, var label r4label = na, var label r5label = na, var
label r6label = na
//////Central Pivot
Pivot = (hhtf + lhtf + chtf)/3
BC = (hhtf + lhtf)/2
TC = (Pivot - BC) + Pivot
//LineStyle CPR
linestylee = lstyle2 == 'Solid' ? plot.style_line :
lstyle2 == 'Circles' ? plot.style_circles :
lstyle2 == 'Cross' ? plot.style_cross : na
label.delete(jplabel)
jplabel := label.new(x = time + mndr * 20, y = Pivot, text = "Pivot " +
tostring(Round_it(Pivot)), textcolor=color.black, style=label.style_none, xloc =
xloc.bar_time, yloc=yloc.price)
chtf
///////Day High Low//////
plot(islast and PDHL ? hhtf : na, title = "Day High", color = color.black,
linewidth = 2, style = linestylee )
plot(islast and PDHL ? lhtf : na, title = "Day Low", color = color.black, linewidth
= 2, style = linestylee )
if showlabels and PDHL
var label pdhlabel = na
var label pdllabel = na
label.delete(pdhlabel)
label.delete(pdllabel)
pdhlabel := label.new(x = time + mndr * 20, y = hhtf, text = "PDH " +
tostring(Round_it(hhtf)),color=color.new(color.black,100), textcolor=color.black,
style=label.style_label_left, xloc = xloc.bar_time, yloc=yloc.price)
pdllabel := label.new(x = time + mndr * 20, y = lhtf, text = "PDL "+
tostring(Round_it(lhtf)), color=color.new(color.black,100), textcolor=color.black,
style=label.style_label_left, xloc = xloc.bar_time, yloc=yloc.price)
//////Fibo Pivot
// fib Line Style
flinestyle = flstyle == 'Solid' ? plot.style_line :
flstyle == 'Cross' ? plot.style_cross :
flstyle == 'Circles' ? plot.style_circles : na
frc = #146690
fsc = #00bcd4
plot(fibon and sal and islast ? R7 : na, title = "R7", color = frc, linewidth = 1,
style = flinestyle )
plot(fibon and sal and islast ? R6 : na, title = "R6", color = frc, linewidth = 1,
style = flinestyle )
plot(fibon and sal and islast ? R5 : na, title = "R5", color = frc, linewidth = 1,
style = flinestyle )
plot(fibon and islast ? R4 : na, title = "R4", color = frc, linewidth = 1, style =
flinestyle )
plot(fibon and islast ? R3 : na, title = "R3", color = frc, linewidth = 1, style =
flinestyle )
plot(fibon and islast ? R2 : na, title = "R2", color = frc, linewidth = 1, style =
flinestyle )
plot(fibon and islast ? R1 : na, title = "R1", color = frc, linewidth = 1, style =
flinestyle )
plot(fibon and islast ? pivot : na, title = "pivot", color = color.silver,
linewidth = 1, style = flinestyle )
plot(fibon and islast ? S1 : na, title = "S1", color = fsc, linewidth = 1, style =
flinestyle )
plot(fibon and islast ? S2 : na, title = "S2", color = fsc, linewidth = 1, style =
flinestyle )
plot(fibon and islast ? S3 : na, title = "S3", color = fsc, linewidth = 1, style =
flinestyle )
plot(fibon and islast ? S4 : na, title = "S4", color = fsc, linewidth = 1, style =
flinestyle )
plot(fibon and sal and islast ? S5 : na, title = "S5", color = fsc, linewidth = 1,
style = flinestyle )
plot(fibon and sal and islast ? S6 : na, title = "S6", color = fsc, linewidth = 1,
style = flinestyle )
plot(fibon and sal and islast ? S7 : na, title = "S7", color = fsc, linewidth = 1,
style = flinestyle )
//Bearish Engulfing
BrEng = close < open[1] ? low < low[1] ? high > high[1] ? open >= open[1] ? #FF7000
: na: na: na: na
barcolor(PAB ? BrEng : na, title="Bearish Engulf")
//Bullish Engulfing
BuEng = low < low[1] ? high > high[1] ? open <= open[1] ? close > open[1] ? #00FF00
: na: na: na: na
barcolor(PAB ? BuEng : na, title="Bullish Engulf")
//////EMA
plot(emaplot and choice == "EMA" ? ema(close, MAa) : emaplot and choice == "SMA" ?
sma(close, MAa) : na,title = "Fast MA", color = color.green, linewidth = lw)
plot(emaplot and choice == "EMA" ? ema(close, MAb) : emaplot and choice == "SMA" ?
sma(close, MAb) : na,title = "Mid MA", color = color.black, linewidth = lw)
plot(emaplot and choice == "EMA" ? ema(close, MAc) : emaplot and choice == "SMA" ?
sma(close, MAc) : na,title = "Slow MA", color = color.red, linewidth = lw)
////////////////RSI
srcRSI = close, lenRSI = input(14, minval=1, title="RSI Length", group = "RSI
Settings")
up = rma(max(change(srcRSI), 0), lenRSI)
down = rma(-min(change(srcRSI), 0), lenRSI)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
//coloring method below
srcRSI1 = close, lenRSI1 = input(60, minval=1, title="Over Bought", group = "RSI
Settings")
srcRSI2 = close, lenRSI2 = input(40, minval=1, title="Over Sold", group = "RSI
Settings")
isup() => rsi > lenRSI1
isdown() => rsi < lenRSI2
barcolor(rsicol and isup() ? color.green : rsicol and isdown() ? color.red : na )
//plot(UpperTreshold, color=black)
p1=plot(vsr and leveluphi ? leveluphi : na,
title="LevelHi",style=vstylee,color=color.blue)
p2=plot(vsr and leveluplo ? leveluplo :
na,title="Levello",style=vstylee,color=color.blue)
fill(p1,p2,color=color.new(color.black,50),title="Fill")
////////////////////////
Ecandle = input(false, "Indecisive-Candle", group="Settings ॐ", tooltip="Shows
Candle")
cand = high-low
bodyr = open-close
candle = (bodyr*100/cand)
// ATR Trailing SL {
nATRPeriod = input(5)
nATRMultip = input(3.5)
xATR = atr(nATRPeriod)
nLoss = nATRMultip * xATR
xATRTrailingStop = 0.0
xATRTrailingStop :=iff(close > nz(xATRTrailingStop[1], 0) and close[1] >
nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), close - nLoss),
iff(close < nz(xATRTrailingStop[1], 0) and close[1] <
nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), close + nLoss),
iff(close > nz(xATRTrailingStop[1], 0), close - nLoss, close
+ nLoss)))
col=close < xATRTrailingStop[1] ? color.silver : color.black
plot(ATRTsl ? xATRTrailingStop[1]: na, color=col, title="ATR Trailing Stop") //}
//Table {
var table info = table.new(position.top_center , 1, 1)
var table logo = table.new(position.bottom_right, 1, 1)
if barstate.islast
table.cell(logo, 0, 0, "ॐ" , text_size = size.normal,
text_color = color.orange)
table.cell(info, 0, 0, "t.me/TeamTaurus", text_size = size.normal , text_color
= color.black)
//}