braulio_holtz

Untitled

May 9th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.15 KB | None | 0 0
  1. //@version=3
  2. // autor marciobisognin
  3. // script adaptado de 3 indicadores/script
  4. // 3% é Ouro Versão X-médias móveis + pivot point + candles de reversão de tendência e força
  5. study(title="3%Ouro.v1", overlay = true)
  6. TLineEMA1 = input(21, minval=1, title="21ema/1min")
  7. TLineEMA2 = input(42, minval=1, title="42ema/1min")
  8. TLineEMA3 = input(17, minval=1, title="17ema/5min")
  9. TLineEMA4 = input(34, minval=1, title="34ema/5min")
  10. TLineEMA5 = input(27, minval=1, title="27ema/15min")
  11. TLineEMA6 = input(55, minval=1, title="55ema/15min")
  12. TLineEMA7 = input(17, minval=1, title="17ema/60min>D")
  13. TLineEMA8 = input(72, minval=1, title="72ema/60min>D")
  14. TLineEMA9 = input(50, minval=1, title="50ema")
  15. TLineEMA10 = input(100, minval=1, title="100ema")
  16. TLineEMA11 = input(200, minval=1, title="200ema")
  17. TLine1 = ema(close, TLineEMA1)
  18. TLine2 = ema(close, TLineEMA2)
  19. TLine3 = ema(close, TLineEMA3)
  20. TLine4 = ema(close, TLineEMA4)
  21. TLine5 = ema(close, TLineEMA5)
  22. TLine6 = ema(close, TLineEMA6)
  23. TLine7 = ema(close, TLineEMA7)
  24. TLine8 = ema(close, TLineEMA8)
  25. TLine9 = ema(close, TLineEMA9)
  26. TLine10 = ema(close, TLineEMA10)
  27. TLine11 = ema(close, TLineEMA11)
  28. plot(TLine1, color=purple, title="21ema/1min", linewidth=5)
  29. plot(TLine2, color=orange, title="42ema/1min", linewidth=5)
  30. plot(TLine3, color=purple, title="17ema/5min", linewidth=5)
  31. plot(TLine4, color=orange, title="34ema/5min", linewidth=5)
  32. plot(TLine5, color=purple, title="27ema/15min", linewidth=5)
  33. plot(TLine6, color=orange, title="55ema/15min", linewidth=5)
  34. plot(TLine7, color=purple, title="17ema/60min>D", linewidth=5)
  35. plot(TLine8, color=orange, title="72ema/60min>D", linewidth=5)
  36. plot(TLine9, color=fuchsia, title="50ema", linewidth=5)
  37. plot(TLine10, color=fuchsia, title="100ema", linewidth=5)
  38. plot(TLine11, color=fuchsia, title="200ema", linewidth=5)
  39.  
  40. 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
  41.  
  42. d_open = security(tickerid, 'D', open)
  43. d_high = security(tickerid, 'D', high)
  44. d_low = security(tickerid, 'D', low)
  45. d_close = security(tickerid, 'D', close)
  46.  
  47. d_pivot = security(tickerid, 'D', hlc3)
  48.  
  49. d_resistance1 = (d_pivot * 2) - d_low
  50. d_support1 = (d_pivot * 2) - d_high
  51.  
  52. d_resistance2 = (d_pivot - d_support1) + d_resistance1
  53. d_support2 = d_pivot - (d_resistance1 - d_support1)
  54.  
  55. d_resistance3 = (d_pivot - d_support2) + d_resistance2
  56. d_support3 = d_pivot - (d_resistance2 - d_support2)
  57.  
  58. plot(title='P', series=d_pivot, color=change(d_pivot)!=0?na:black, offset=d_shift)
  59. plot(title='R1', series=d_resistance1, color=change(d_resistance1)!=0?na:black, offset=d_shift)
  60. plot(title='S1', series=d_support1, color=change(d_support1)!=0?na:black, offset=d_shift)
  61. plot(title='R2', series=d_resistance2, color=change(d_resistance2)!=0?na:black, offset=d_shift)
  62. plot(title='S2', series=d_support2, color=change(d_support2)!=0?na:black, offset=d_shift)
  63. plot(title='R3', series=d_resistance3, color=change(d_resistance3)!=0?na:black, offset=d_shift)
  64. plot(title='S3', series=d_support3, color=change(d_support3)!=0?na:black, offset=d_shift)
  65.  
  66. DojiSize = input(0.05, minval=0.01, title="Doji size")
  67. data=(abs(open - close) <= (high - low) * DojiSize)
  68. plotchar(data, title="Doji", text='Doji', color=blue)
  69.  
  70. data2=(close[2] > open[2] and min(open[1], close[1]) > close[2] and open < min(open[1], close[1]) and close < open )
  71. plotshape(data2, title= "Estrela da Noite", color=red, style=shape.arrowdown, text="EN")
  72.  
  73. data3=(close[2] < open[2] and max(open[1], close[1]) < close[2] and open > max(open[1], close[1]) and close > open )
  74. plotshape(data3, title= "Estrela da Manhã", location=location.belowbar, color=lime, style=shape.arrowup, text="EM")
  75.  
  76. 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))
  77. plotshape(data4, title= "Estrela Cadente", color=red, style=shape.arrowdown, text="EC")
  78.  
  79. data5=(((high - low)>3*(open -close)) and ((close - low)/(.001 + high - low) > 0.6) and ((open - low)/(.001 + high - low) > 0.6))
  80. plotshape(data5, title= "Martelo", location=location.belowbar, color=white, style=shape.diamond, text="M")
  81.  
  82. data5b=(((high - low)>3*(open -close)) and ((high - close)/(.001 + high - low) > 0.6) and ((high - open)/(.001 + high - low) > 0.6))
  83. plotshape(data5b, title= "Martelo Invertido", location=location.belowbar, color=white, style=shape.diamond, text="MI")
  84.  
  85. data6=(close[1] > open[1] and open > close and open <= close[1] and open[1] <= close and open - close < close[1] - open[1] )
  86. plotshape(data6, title= "Harami de Baixa", color=red, style=shape.arrowdown, text="HB")
  87.  
  88. data7=(open[1] > close[1] and close > open and close <= open[1] and close[1] <= open and close - open < open[1] - close[1] )
  89. plotshape(data7, title= "Harami de Alta", location=location.belowbar, color=lime, style=shape.arrowup, text="HA")
  90.  
  91. data8=(close[1] > open[1] and open > close and open >= close[1] and open[1] >= close and open - close > close[1] - open[1] )
  92. plotshape(data8, title= "Engolfo de Baixa", color=red, style=shape.arrowdown, text="EB")
  93.  
  94. data9=(open[1] > close[1] and close > open and close >= open[1] and close[1] >= open and close - open > open[1] - close[1] )
  95. plotshape(data9, title= "Engolfo de Alta", location=location.belowbar, color=lime, style=shape.arrowup, text="EA")
  96.  
  97. upper = highest(10)[1]
  98. data10=(close[1] < open[1] and open < low[1] and close > close[1] + ((open[1] - close[1])/2) and close < open[1])
  99. plotshape(data10, title= "Piercing Line", location=location.belowbar, color=lime, style=shape.arrowup, text="PL")
  100. // 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.
  101. //Abre no dia seguinte em um ponto baixo novo, fecha-se então acima do ponto médio do corpo do primeiro dia.
  102. //Abre no dia seguinte em um ponto baixo novo, fecha-se então acima do ponto médio do corpo do primeiro dia.
  103. //http://www.investmax.com.br/iM/content.asp?catid=263&contenttype=Aprendizado <— explicação
  104.  
  105. lower = lowest(10)[1]
  106. data11=(low == open and open < lower and open < close and close > ((high[1] - low[1]) / 2) + low[1])
  107. plotshape(data11, title= "Cinturão de Alta", location=location.belowbar, color=lime, style=shape.arrowup, text="CA")
  108.  
  109. data12=(open[1]>close[1] and open>=open[1] and close>open)
  110. plotshape(data12, title= "Alta Kicker", location=location.belowbar, color=lime, style=shape.arrowup, text="AK")
  111.  
  112. data13=(open[1]<close[1] and open<=open[1] and close<=open)
  113. plotshape(data13, title= "Baixa Kicker", color=red, style=shape.arrowdown, text="BK")
  114.  
  115. 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)
  116. plotshape(data14, title= "Homem Enforcado", color=red, style=shape.arrowdown, text="HE")
  117.  
  118. 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))
  119. plotshape(data15, title= "Nuvem Negra", color=red, style=shape.arrowdown, text="NN")
Advertisement
Add Comment
Please, Sign In to add comment