Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- // autor marciobisognin
- // script adaptado de 3 indicadores/script
- // 3% é Ouro Versão X-médias móveis + pivot point + candles de reversão de tendência e força
- study(title="3%Ouro.v1", overlay = true)
- TLineEMA1 = input(21, minval=1, title="21ema/1min")
- TLineEMA2 = input(42, minval=1, title="42ema/1min")
- TLineEMA3 = input(17, minval=1, title="17ema/5min")
- TLineEMA4 = input(34, minval=1, title="34ema/5min")
- TLineEMA5 = input(27, minval=1, title="27ema/15min")
- TLineEMA6 = input(55, minval=1, title="55ema/15min")
- TLineEMA7 = input(17, minval=1, title="17ema/60min>D")
- TLineEMA8 = input(72, minval=1, title="72ema/60min>D")
- TLineEMA9 = input(50, minval=1, title="50ema")
- TLineEMA10 = input(100, minval=1, title="100ema")
- TLineEMA11 = input(200, minval=1, title="200ema")
- TLine1 = ema(close, TLineEMA1)
- TLine2 = ema(close, TLineEMA2)
- TLine3 = ema(close, TLineEMA3)
- TLine4 = ema(close, TLineEMA4)
- TLine5 = ema(close, TLineEMA5)
- TLine6 = ema(close, TLineEMA6)
- TLine7 = ema(close, TLineEMA7)
- TLine8 = ema(close, TLineEMA8)
- TLine9 = ema(close, TLineEMA9)
- TLine10 = ema(close, TLineEMA10)
- TLine11 = ema(close, TLineEMA11)
- plot(TLine1, color=purple, title="21ema/1min", linewidth=5)
- plot(TLine2, color=orange, title="42ema/1min", linewidth=5)
- plot(TLine3, color=purple, title="17ema/5min", linewidth=5)
- plot(TLine4, color=orange, title="34ema/5min", linewidth=5)
- plot(TLine5, color=purple, title="27ema/15min", linewidth=5)
- plot(TLine6, color=orange, title="55ema/15min", linewidth=5)
- plot(TLine7, color=purple, title="17ema/60min>D", linewidth=5)
- plot(TLine8, color=orange, title="72ema/60min>D", linewidth=5)
- plot(TLine9, color=fuchsia, title="50ema", linewidth=5)
- plot(TLine10, color=fuchsia, title="100ema", linewidth=5)
- plot(TLine11, color=fuchsia, title="200ema", linewidth=5)
- d_shift = period == '1' ? 1440 : period == '3' ? 480 : period == '5' ? 288 : period == '15' ? 96 : period == '30' ? 48 : period == '45' ? 32 : period == '60' ? 24 : period == '120' ? 12 : period == '180' ? 8 : period == '240' ? 6 : period == '480' ? 3 : period == '720' ? 2 : 0
- d_open = security(tickerid, 'D', open)
- d_high = security(tickerid, 'D', high)
- d_low = security(tickerid, 'D', low)
- d_close = security(tickerid, 'D', close)
- d_pivot = security(tickerid, 'D', hlc3)
- d_resistance1 = (d_pivot * 2) - d_low
- d_support1 = (d_pivot * 2) - d_high
- d_resistance2 = (d_pivot - d_support1) + d_resistance1
- d_support2 = d_pivot - (d_resistance1 - d_support1)
- d_resistance3 = (d_pivot - d_support2) + d_resistance2
- d_support3 = d_pivot - (d_resistance2 - d_support2)
- plot(title='P', series=d_pivot, color=change(d_pivot)!=0?na:black, offset=d_shift)
- plot(title='R1', series=d_resistance1, color=change(d_resistance1)!=0?na:black, offset=d_shift)
- plot(title='S1', series=d_support1, color=change(d_support1)!=0?na:black, offset=d_shift)
- plot(title='R2', series=d_resistance2, color=change(d_resistance2)!=0?na:black, offset=d_shift)
- plot(title='S2', series=d_support2, color=change(d_support2)!=0?na:black, offset=d_shift)
- plot(title='R3', series=d_resistance3, color=change(d_resistance3)!=0?na:black, offset=d_shift)
- plot(title='S3', series=d_support3, color=change(d_support3)!=0?na:black, offset=d_shift)
- DojiSize = input(0.05, minval=0.01, title="Doji size")
- data=(abs(open - close) <= (high - low) * DojiSize)
- plotchar(data, title="Doji", text='Doji', color=blue)
- data2=(close[2] > open[2] and min(open[1], close[1]) > close[2] and open < min(open[1], close[1]) and close < open )
- plotshape(data2, title= "Estrela da Noite", color=red, style=shape.arrowdown, text="EN")
- data3=(close[2] < open[2] and max(open[1], close[1]) < close[2] and open > max(open[1], close[1]) and close > open )
- plotshape(data3, title= "Estrela da Manhã", location=location.belowbar, color=lime, style=shape.arrowup, text="EM")
- data4=(open[1] < close[1] and open > close[1] and high - max(open, close) >= abs(open - close) * 3 and min(close, open) - low <= abs(open - close))
- plotshape(data4, title= "Estrela Cadente", color=red, style=shape.arrowdown, text="EC")
- data5=(((high - low)>3*(open -close)) and ((close - low)/(.001 + high - low) > 0.6) and ((open - low)/(.001 + high - low) > 0.6))
- plotshape(data5, title= "Martelo", location=location.belowbar, color=white, style=shape.diamond, text="M")
- data5b=(((high - low)>3*(open -close)) and ((high - close)/(.001 + high - low) > 0.6) and ((high - open)/(.001 + high - low) > 0.6))
- plotshape(data5b, title= "Martelo Invertido", location=location.belowbar, color=white, style=shape.diamond, text="MI")
- data6=(close[1] > open[1] and open > close and open <= close[1] and open[1] <= close and open - close < close[1] - open[1] )
- plotshape(data6, title= "Harami de Baixa", color=red, style=shape.arrowdown, text="HB")
- data7=(open[1] > close[1] and close > open and close <= open[1] and close[1] <= open and close - open < open[1] - close[1] )
- plotshape(data7, title= "Harami de Alta", location=location.belowbar, color=lime, style=shape.arrowup, text="HA")
- data8=(close[1] > open[1] and open > close and open >= close[1] and open[1] >= close and open - close > close[1] - open[1] )
- plotshape(data8, title= "Engolfo de Baixa", color=red, style=shape.arrowdown, text="EB")
- data9=(open[1] > close[1] and close > open and close >= open[1] and close[1] >= open and close - open > open[1] - close[1] )
- plotshape(data9, title= "Engolfo de Alta", location=location.belowbar, color=lime, style=shape.arrowup, text="EA")
- upper = highest(10)[1]
- data10=(close[1] < open[1] and open < low[1] and close > close[1] + ((open[1] - close[1])/2) and close < open[1])
- plotshape(data10, title= "Piercing Line", location=location.belowbar, color=lime, style=shape.arrowup, text="PL")
- // O "piercing pattern", um padrão bullish (Alta) de uma reversão de dois dias. O primeiro dia, em um downtrend, é um dia preto longo.
- //Abre no dia seguinte em um ponto baixo novo, fecha-se então acima do ponto médio do corpo do primeiro dia.
- //Abre no dia seguinte em um ponto baixo novo, fecha-se então acima do ponto médio do corpo do primeiro dia.
- //http://www.investmax.com.br/iM/content.asp?catid=263&contenttype=Aprendizado <— explicação
- lower = lowest(10)[1]
- data11=(low == open and open < lower and open < close and close > ((high[1] - low[1]) / 2) + low[1])
- plotshape(data11, title= "Cinturão de Alta", location=location.belowbar, color=lime, style=shape.arrowup, text="CA")
- data12=(open[1]>close[1] and open>=open[1] and close>open)
- plotshape(data12, title= "Alta Kicker", location=location.belowbar, color=lime, style=shape.arrowup, text="AK")
- data13=(open[1]<close[1] and open<=open[1] and close<=open)
- plotshape(data13, title= "Baixa Kicker", color=red, style=shape.arrowdown, text="BK")
- data14=(((high-low>4*(open-close))and((close-low)/(.001+high-low)>=0.75)and((open-low)/(.001+high-low)>=0.75)) and high[1] < open and high[2] < open)
- plotshape(data14, title= "Homem Enforcado", color=red, style=shape.arrowdown, text="HE")
- data15=((close[1]>open[1])and(((close[1]+open[1])/2)>close)and(open>close)and(open>close[1])and(close>open[1])and((open-close)/(.001+(high-low))>0.6))
- plotshape(data15, title= "Nuvem Negra", color=red, style=shape.arrowdown, text="NN")
Advertisement
Add Comment
Please, Sign In to add comment