Scriptde Ouro
Scriptde Ouro
8,2x ¹ 7,3x
matematica
9,1x ¹ 2,1x
geografia
4,1x
História
1,4x
Informática
5
Administração Pública
4,1x
abra sua conta no Trading View ,em seguida vá até adicionar novo script e coloque
isto:
(sem as aspas)
"// @ sincoraalison
//@version=5
indicator("Scalp",overlay=true,max_bars_back=1000,max_lines_count=500,max_labels_co
unt=500)
length = input.float(200,'Window Size',maxval=500,minval=0)
b = input.float(3.,'Bandwidth')
mult = input.float(5.)
//src = input.source(src,'SourceHigh')
//
src = (high+low)/2
//~~~}
p1 = plot(ta.ema(close,200), 'EMA 200', color.blue, 1 , plot.style_line , false)
p2 = plot(ta.hma(close,55), 'HMA 55',color.white, 1 , plot.style_line , false)
//--
hma = ta.hma(close,53)
sma = ta.sma(close,20)
plot(sma,'Sma20',color.gray,1,plot.style_line,true)
//---
//emas = ta.ema(close,169)
//plot(emas,"Ema small",color.gray,3)
//emab = ta.ema(close,274)
//plot(emab,"Ema big",color.gray,3)
//---
var k = 2
var upper = array.new_line(0)
var lower = array.new_line(0)
var k2 = 2
var upper2 = array.new_line(0)
var lower2 = array.new_line(0)
//---
lset(l,x1,y1,x2,y2,col)=>
line.set_xy1(l,x1,y1)
line.set_xy2(l,x2,y2)
line.set_color(l,col)
line.set_width(l,2)
//--
//lset(l,x1,y1,x2,y2,col)=>
// line.set_xy1(l,x1,y1)
// line.set_xy2(l,x2,y2)
// line.set_color(l,col)
// line.set_width(l,2)
//--
if barstate.isfirst
for i = 0 to length/k-1
array.push(upper,line.new(na,na,na,na))
array.push(lower,line.new(na,na,na,na))
//----
line up = na
line dn = na
//----
cross_up = 0.
cross_dn = 0.
//----
if barstate.islast
y = array.new_float(0)
sum_e = 0.
for i = 0 to length-1
sum = 0.
sumw = 0.
for j = 0 to length-1
w = math.exp(-(math.pow(i-j,2)/(b*b*2)))
sum += src[j]*w
sumw += w
y2 = sum/sumw
sum_e += math.abs(src[i] - y2)
array.push(y,y2)
mae = sum_e/length*mult
for i = 1 to length-1
y2 = array.get(y,i)
y1 = array.get(y,i-1)
up := array.get(upper,i/k)
dn := array.get(lower,i/k)
//
//ss= if ta.crossover(hma,cross_dn)
//close
//sl= if ta.crossunder(hma,cross_up)
//close
//
//plotshape(close,'STOPSHORT',shape.xcross,location.absolute,color.white)
//plotshape(close,"STOPLONG",shape.xcross,location.absolute,color.white)
// Detects the J-Hook pattern
jHook = low < ta.lowest(low, 20) and close > high[1] and close > open and close <
close[1] and close > (high[1] + close[1])/2 and close > (open + close[1])/2 and
close > (open + high[1])/2
//"Scoop Patern")
// Define inputs
lengths = input(50, title="Length")
multiplier = input(2, title="Multiplier")
///
//ema20 = ta.ema(close,20)
//vn = ta.lowest(close,6)
//cp = ta.highest(close,6)
//ofertadn = (close < upperj) and (low < low[5]) and (close < ma)
//demandadn = (low < vn) and (ema20 > close) and (close < ma)
//ofertacp = (close < lowerj) and (high > high[5]) and (close > ma)
//demandaup = (high > cp) and (ema20 < close) and (close > ma)
//plotshape(ofertacp,'OFERTAUP',shape.circle,location.abovebar,color.green,0,size=
size.tiny)
//plotshape(ofertadn,'OFERTADN',shape.circle,location.belowbar,color.red,0,size=
size.tiny)
//plotshape(demandaup,'DMDUP',shape.circle,location.abovebar,color.green,0,size=
size.tiny)
//plotshape(demandadn,'DMDDN',shape.circle,location.belowbar,color.red,0,size=
size.tiny)
// Diamond Top
//diamondTop = (high[1] > high[2] and high[1] > high) and (low[1] < low[2] and
low[1] < low) and (high[2] > high[3] and high[2] > high[4]) and (low[3] < low[2]
and low[4] < low[2])
//plotshape(diamondTop, title="Diamond Top", style=shape.labeldown,
location=location.abovebar, color=color.red, text="DIAMONDDN", size=size.tiny)
// Diamond Bottom
//diamondBottom = (high[1] > high[2] and high[1] > high) and (low[1] < low[2] and
low[1] < low) and (low[2] < low[3] and low[2] < low[4]) and (high[3] > high[2] and
high[4] > high[2])
//plotshape(diamondBottom, title="Diamond Bottom", style=shape.labelup,
location=location.belowbar, color=color.green, text="DIAMONDUP", size=size.tiny)
entry = src / close
vol = volume / entry
obv = 0.0
obv := na(obv[1]) ? vol : (src > close[1] ? obv[1] + vol : (src < close[1] ? obv[1]
- src : obv[1]))
obv2=if p > 1
open
multiplier3 = (obv1 + ma)/2
multiplier2 = (obv2 + ma)/2
ix = ma + multiplier3 * ta.stdev(src,lengths3)
ex = ma - multiplier2 * ta.stdev(src,lengths3)
// open
//
x= if (close > ex) and (low < ma) and (src > ma)
open
//---
u= if (close < ix) and (high > ma) and (src < ma)
open
//--
//--
plotshape(x, style=shape.triangleup, location=location.belowbar, color=color.gray,
size=size.tiny,text ="VOLb",textcolor = color.gray)
plotshape(u, style=shape.triangledown, location=location.abovebar,
color=color.gray, size=size.tiny,text ="VOLs",textcolor = color.gray)
buy=if vol > volume and ((close > upper1) and (low < ma) and (src > ma))
close
//--
sel=if vol < volume and ((close < lower3) and (high > ma) and (src > ma))
close
//--
plotshape(buy,"Compra",style= shape.triangleup,location = location.belowbar, color=
color.green,text= 'Compre',textcolor = color.green,size = size.small)
plotshape(sel,"Venda",style= shape.triangledown,location = location.abovebar,
color= color.red,text= "Vende",textcolor = color.red,size= size.small)
//--
alertcondition(buy,"compra","compra")
alertcondition(sel,"venda","venda")
//--
m7 =if buy and fv
open
//--
m8 =if sel and vf
open
//--
hn = nb < lowest
nh = bn > highest
//plot(src,'src',color.yellow,5)
plotshape(hn,"Compra",style= shape.circle,location = location.belowbar, color=
color.green,text= '↑',textcolor = color.green)
plotshape(nh,"Venda",style= shape.circle,location = location.abovebar, color=
color.red,text= "↓",textcolor = color.red)
alertcondition(hn,"subiu","compra")
alertcondition(nh,"desceu","venda")
//--
cl =if (low < lowest) and (ma < src)
open
bl =if (high > highest) and (ma > src)
open
R = (cl + bl)/2
vs=if R < ix
open
cs=if R > ex
open
//---
m=if x and cl
open
//--
m1=if u and bl
open
//--
gv = (close > er) and (low < src) and (src > ma)
vg = (close < re) and (high > src) and (src < ma)
gh = (close > uy) and (low < src) and (src > ma)
hg = (close < yu) and (high > src) and (src < ma)
yt =if gh and rt
open
//--
ty =if hg and tr
open
///---