xmd79

Angels Calls 3.0- By Cloves

Sep 22nd, 2021
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.68 KB | None | 0 0
  1. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
  2. // © ClovesRodrigues
  3.  
  4. //@version=4
  5. study("Angels Calls 3.0- By Cloves", shorttitle="Angels Calls 3.0 - By Cloves", scale=scale.right, overlay=true)
  6. //precision=0
  7.  
  8. data = close < open
  9.  
  10. [middle, upper, lower] = bb(close, 21, 2)
  11. plot(middle, color=#1d79f2)
  12. plot(upper, color=color.red, linewidth=2)
  13. plot(lower, color=color.green, linewidth=2)
  14.  
  15. r = rsi(close, 21)
  16. c = cci(close, 20)
  17. e5 = ema(close, 5)
  18. e10 = ema(low,10)
  19. e20 = ema(close, 20)
  20. e50 = ema(close, 40)
  21. e200 = ema(close, 200)
  22.  
  23.  
  24. eUp = crossover(e5, e10)
  25. eLONG = crossover(e5, e50)
  26. eGOOD = crossover(e20, e50)
  27. eTOP = crossover(e50, e200)
  28. eSell = crossunder(e5, e50)
  29. eSHORTLow = crossunder(e5, e20)
  30. eSHORT = crossunder(e20, e50)
  31. eSellStrong = crossunder(e20, e200)
  32.  
  33.  
  34. barcolor((ema(close, 2)) > (ema(close, 4)) ? color.green : color.red)
  35.  
  36. // Detect crosses.
  37. xUp = crossunder( r, 65)
  38. xUltra = crossunder( r, 75)
  39. xDn = crossover(r, 35)
  40.  
  41. cUp = crossunder(c, 120)
  42. c200 = crossunder(c, 200)
  43. cUltra = crossunder(c, 300)
  44. cDn = crossover(c, -100)
  45. cBUY = crossover(c, -200)
  46.  
  47. color1 = color.from_gradient(close, e50, e5, color.new(color.red, 15), color.new(color.green, 15))
  48. color2 = color.from_gradient(close, e200, e5, color.new(color.red, 15), color.new(color.blue, 15))
  49.  
  50. plot(ema(close, 20), color=color1, linewidth=4, style=plot.style_line)
  51. plot(ema(close, 200), color=color2, linewidth=4, style=plot.style_line)
  52.  
  53.  
  54. var Table = table.new(position = position.top_right, columns = 5, rows = 5, bgcolor = color.new(color.green, 50), border_width = 2)
  55.  
  56.  
  57. table.cell(table_id = Table, column = 0, row = 2, text = "PRICE : ", bgcolor = color.green)
  58. table.cell(table_id = Table, column = 1, row = 2, text = tostring(close), bgcolor = color.yellow)
  59. if r>60
  60. table.cell(table_id = Table, column = 0, row = 2, text = " PRICE : ", bgcolor = color.green)
  61. table.cell(table_id = Table, column = 1, row = 2, text = tostring(close), bgcolor = color.yellow)
  62. else if r>70
  63. table.cell(table_id = Table, column = 0, row = 2, text = "Suport : ", bgcolor = color.green)
  64. table.cell(table_id = Table, column = 1, row = 2, text = tostring(close*0.9215), bgcolor = color.yellow)
  65. else if r<40
  66. table.cell(table_id = Table, column = 0, row = 2, text = "PRICE : ", bgcolor = color.green)
  67. table.cell(table_id = Table, column = 1, row = 2, text = tostring(close), bgcolor = color.yellow)
  68. else
  69. table.cell(table_id = Table, column = 0, row = 2, text = " PRICE : ", bgcolor = color.green)
  70. table.cell(table_id = Table, column = 1, row = 2, text = tostring(close), bgcolor = color.yellow)
  71.  
  72. if xDn
  73. table.cell(table_id = Table, column = 0, row = 2, text = "RESISTENCE : ", bgcolor = color.green)
  74. table.cell(table_id = Table, column = 1, row = 2, text = tostring(close/0.9618), bgcolor = color.yellow)
  75.  
  76.  
  77.  
  78. if xDn and close>open
  79. x = label.new(bar_index, na)
  80. label.set_text(x, "RSI / Buy Alert")
  81. label.set_color(x, color.green)
  82. label.set_yloc(x, yloc.belowbar)
  83. label.set_style(x, label.style_label_up)
  84. //label.set_size(x, size.large )
  85. else if cBUY and low<=lower and close>low
  86. t = label.new(bar_index, na)
  87. //label.set_text(t, "CCI -200")
  88. label.set_color(t, color.green)
  89. label.set_yloc(t, yloc.belowbar)
  90. label.set_style(t, label.style_triangleup)
  91. label.set_size(t, size.small )
  92. else if cDn and low<=lower
  93. j = label.new(bar_index, na)
  94. //label.set_text(j, tostring(low))
  95. label.set_color(j, color.green)
  96. label.set_yloc(j, yloc.belowbar)
  97. label.set_style(j, label.style_triangleup)
  98. label.set_size(j, size.small )
  99.  
  100.  
  101. if xUp
  102. l = label.new(bar_index, na)
  103. label.set_text(l, "Sell Alert")
  104. label.set_color(l, color.red)
  105. label.set_yloc(l, yloc.abovebar)
  106. label.set_style(l, label.style_label_lower_left)
  107. label.set_size(l, size.small)
  108. else if cUp //and high>upper
  109. l = label.new(bar_index, na)
  110. //label.set_text(l, tostring(high))
  111. label.set_color(l, color.red)
  112. label.set_yloc(l, yloc.abovebar)
  113. label.set_style(l, label.style_triangledown)
  114. label.set_size(l, size.small )
  115. else if c200 //and high>upper
  116. l = label.new(bar_index, na)
  117. //label.set_text(l, "Sell Alert")
  118. label.set_color(l, color.red)
  119. label.set_yloc(l, yloc.abovebar)
  120. label.set_style(l, label.style_triangledown)
  121. label.set_size(l, size.small)
  122.  
  123.  
  124.  
  125.  
  126. if xUltra //and high>upper
  127. l = label.new(bar_index, na)
  128. label.set_text(l, "RSI > 75")
  129. label.set_color(l, color.red)
  130. label.set_yloc(l, yloc.abovebar)
  131. label.set_style(l, label.style_label_down)
  132. label.set_size(l, size.normal )
  133. table.cell(table_id = Table, column = 0, row = 0, text = "SELL ALERT" )
  134. table.cell_set_bgcolor(table_id = Table, column = 0, row = 0, bgcolor = color.red)
  135.  
  136.  
  137. if eSellStrong and close<open
  138. l = label.new(bar_index, na)
  139. label.set_text(l, "SHORT")
  140. label.set_color(l, color.red)
  141. label.set_yloc(l, yloc.abovebar)
  142. label.set_style(l, label.style_label_down)
  143. table.cell(table_id = Table, column = 1, row = 0, text = "SHORT Alert M200")
  144. table.cell_set_bgcolor(table_id = Table, column = 1, row = 0, bgcolor = color.red)
  145. else if eSHORT and open>lower and close<middle
  146. l = label.new(bar_index, na)
  147. label.set_text(l, "Wait to buy")
  148. label.set_color(l, color.white)
  149. label.set_yloc(l, yloc.abovebar)
  150. label.set_style(l, label.style_label_down )
  151. //label.set_size(l, size.tiny )
  152. //label.set_size(l, size.small)
  153. table.cell(table_id = Table, column = 0, row = 0, text = "SHORT POSITION = " )
  154. table.cell_set_bgcolor(table_id = Table, column = 0, row = 0, bgcolor = color.red)
  155. else if eSHORTLow and close<open and close<e50 and close<middle
  156. l = label.new(bar_index, na)
  157. label.set_text(l, "Low SHORT")
  158. label.set_color(l, color.red)
  159. label.set_yloc(l, yloc.abovebar)
  160. label.set_style(l, label.style_label_down)
  161. label.set_size(l, size.small)
  162. table.cell(table_id = Table, column = 0, row = 0, text = "WAIT POSITION...")
  163. table.cell_set_bgcolor(table_id = Table, column = 0, row = 0, bgcolor = color.white)
  164. else if eUp
  165. l = label.new(bar_index, na)
  166. label.set_text(l, "W A I T")
  167. label.set_color(l, color.white)
  168. label.set_yloc(l, yloc.abovebar)
  169. label.set_style(l, label.style_label_lower_left)
  170. label.set_size(l, size.tiny )
  171. //table.cell(table_id = Table, column = 1, row = 2, text = "WAIT..." )
  172. //table.cell_set_bgcolor(table_id = Table, column = 1, row = 2, bgcolor = color.white)
  173.  
  174.  
  175. if eGOOD and close>e50 and close>open and close>middle
  176. x = label.new(bar_index, na)
  177. label.set_text(x, "LONG")
  178. label.set_color(x, color.green)
  179. label.set_yloc(x, yloc.belowbar)
  180. label.set_style(x, label.style_label_up)
  181. label.set_size(x, size.small)
  182. table.cell(table_id = Table, column = 0, row = 0, text = "LONG POSITION ")
  183. table.cell_set_bgcolor(table_id = Table, column = 0, row = 0, bgcolor = color.green)
  184.  
  185.  
  186.  
  187. if eGOOD and (e50 >e200) and open>middle and close>open
  188. l = label.new(bar_index, na)
  189. label.set_text(l, "Wait\nto sell")
  190. label.set_color(l, color.green)
  191. label.set_yloc(l, yloc.abovebar)
  192. label.set_style(l, label.style_label_down)
  193. label.set_size(l, size.small )
  194. table.cell(table_id = Table, column = 1, row = 0, text = "WAIT to sell..." )
  195. table.cell_set_bgcolor(table_id = Table, column = 1, row = 0, bgcolor = color.green)
  196. else if cUltra //and close>open
  197. l = label.new(bar_index, na)
  198. label.set_text(l, "CCI>200")
  199. label.set_color(l, color.red)
  200. label.set_yloc(l, yloc.abovebar)
  201. label.set_style(l, label.style_label_down)
  202. label.set_size(l, size.small)
  203. table.cell(table_id = Table, column = 1, row = 0, text = "SELL Alert !" )
  204. table.cell_set_bgcolor(table_id = Table, column = 1, row = 0, bgcolor = color.red)
  205. else if xUltra //and close>upper
  206. l = label.new(bar_index, na)
  207. label.set_text(l, "SELL ALERT")
  208. label.set_color(l, color.red)
  209. label.set_yloc(l, yloc.abovebar)
  210. label.set_style(l, label.style_label_down)
  211. label.set_size(l, size.normal )
  212. table.cell(table_id = Table, column = 1, row = 0, text = "SELL ALERT" )
  213. table.cell_set_bgcolor(table_id = Table, column = 1, row = 0, bgcolor = color.red)
  214.  
  215. if eSell
  216. //l = label.new(bar_index, na)
  217. //label.set_text(l, "Wait")
  218. //label.set_color(l, color.white)
  219. //label.set_yloc(l, yloc.abovebar)
  220. //label.set_style(l, label.style_label_down)
  221. table.cell(table_id = Table, column = 1, row = 0, text = "WAIT" )
  222. table.cell_set_bgcolor(table_id = Table, column = 1, row = 0, bgcolor = color.white)
  223. //label.set_size(l, size.small)
  224.  
  225.  
Advertisement
Add Comment
Please, Sign In to add comment