Guest User

Untitled

a guest
Jun 9th, 2018
123
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Daryl Guppy Super EMA's
  2. study(title="CM Super Guppy", shorttitle="CM SuperGuppy", overlay=true)
  3. src = close,
  4. len1 = input(3, minval=1, title="Fast EMA 1")
  5. len2 = input(6, minval=1, title="Fast EMA 2")
  6. len3 = input(9, minval=1, title="Fast EMA 3")
  7. len4 = input(12, minval=1, title="Fast EMA 4")
  8. len5 = input(15, minval=1, title="Fast EMA 5")
  9. len6 = input(18, minval=1, title="Fast EMA 6")
  10. len7 = input(21, minval=1, title="Fast EMA 7")
  11. //Slow EMA
  12. len8 = input(24, minval=1, title="Slow EMA 8")
  13. len9 = input(27, minval=1, title="Slow EMA 9")
  14. len10 = input(30, minval=1, title="Slow EMA 10")
  15. len11 = input(33, minval=1, title="Slow EMA 11")
  16. len12 = input(36, minval=1, title="Slow EMA 12")
  17. len13 = input(39, minval=1, title="Slow EMA 13")
  18. len14 = input(42, minval=1, title="Slow EMA 14")
  19. len15 = input(45, minval=1, title="Slow EMA 15")
  20. len16 = input(48, minval=1, title="Slow EMA 16")
  21. len17 = input(51, minval=1, title="Slow EMA 17")
  22. len18 = input(54, minval=1, title="Slow EMA 18")
  23. len19 = input(57, minval=1, title="Slow EMA 19")
  24. len20 = input(60, minval=1, title="Slow EMA 20")
  25. len21 = input(63, minval=1, title="Slow EMA 21")
  26. len22 = input(66, minval=1, title="Slow EMA 22")
  27. len23 = input(200, minval=1, title="EMA 200")
  28.  
  29.  
  30.  
  31. //Fast EMA
  32. ema1 = ema(src, len1)
  33. ema2 = ema(src, len2)
  34. ema3 = ema(src, len3)
  35. ema4 = ema(src, len4)
  36. ema5 = ema(src, len5)
  37. ema6 = ema(src, len6)
  38. ema7 = ema(src, len7)
  39.  
  40. //Slow EMA
  41. ema8 = ema(src, len8)
  42. ema9 = ema(src, len9)
  43. ema10 = ema(src, len10)
  44. ema11 = ema(src, len11)
  45. ema12 = ema(src, len12)
  46. ema13 = ema(src, len13)
  47. ema14 = ema(src, len14)
  48. ema15 = ema(src, len15)
  49. ema16 = ema(src, len16)
  50. ema17 = ema(src, len17)
  51. ema18 = ema(src, len18)
  52. ema19 = ema(src, len19)
  53. ema20 = ema(src, len20)
  54. ema21 = ema(src, len21)
  55. ema22 = ema(src, len22)
  56.  
  57. //EMA 200
  58. ema23 = ema(src, len23)
  59.  
  60. //Fast EMA Color Rules
  61. colfastL = (ema1 > ema2 and ema2 > ema3 and ema3 > ema4 and ema4 > ema5 and ema5 > ema6 and ema6 > ema7)
  62. colfastS = (ema1 < ema2 and ema2 < ema3 and ema3 < ema4 and ema4 < ema5 and ema5 < ema6 and ema6 < ema7)
  63. //Slow EMA Color Rules
  64. colslowL = ema8 > ema9 and ema9 > ema10 and ema10 > ema11 and ema11 > ema12 and ema12 > ema13 and ema13 > ema14 and ema14 > ema15 and ema15 > ema16 and ema16 > ema17 and ema17 > ema18 and ema18 > ema19 and ema19 > ema20 and ema20 > ema21 and ema21 > ema22
  65. colslowS = ema8 < ema9 and ema9 < ema10 and ema10 < ema11 and ema11 < ema12 and ema12 < ema13 and ema13 < ema14 and ema14 < ema15 and ema15 < ema16 and ema16 < ema17 and ema17 < ema18 and ema18 < ema19 and ema19 < ema20 and ema20 < ema21 and ema21 < ema22
  66. //Fast EMA Final Color Rules
  67. colFinal = colfastL and colslowL? aqua : colfastS and colslowS? orange : gray
  68. //Slow EMA Final Color Rules
  69. colFinal2 = colslowL ? lime : colslowS ? red : gray
  70. //Fast EMA Plots
  71. p1=plot(ema1, title="Fast EMA 1", style=line, linewidth=2, color=colFinal)
  72. plot(ema2, title="Fast EMA 2", style=line, linewidth=1, color=colFinal)
  73. plot(ema3, title="Fast EMA 3", style=line, linewidth=1, color=colFinal)
  74. plot(ema4, title="Fast EMA 4", style=line, linewidth=1, color=colFinal)
  75. plot(ema5, title="Fast EMA 5", style=line, linewidth=1, color=colFinal)
  76. plot(ema6, title="Fast EMA 6", style=line, linewidth=1, color=colFinal)
  77. p2=plot(ema7, title="Fast EMA 7", style=line, linewidth=2, color=colFinal)
  78.  
  79. //Slow EMA Plots
  80. p3=plot(ema8, title="Slow EMA 8", style=line, linewidth=1, color=colFinal2)
  81. plot(ema9, title="Slow EMA 9", style=line, linewidth=1, color=colFinal2)
  82. plot(ema10, title="Slow EMA 10", style=line, linewidth=1, color=colFinal2)
  83. plot(ema11, title="Slow EMA 11", style=line, linewidth=1, color=colFinal2)
  84. plot(ema12, title="Slow EMA 12", style=line, linewidth=1, color=colFinal2)
  85. plot(ema13, title="Slow EMA 13", style=line, linewidth=1, color=colFinal2)
  86. plot(ema14, title="Slow EMA 14", style=line, linewidth=1, color=colFinal2)
  87. plot(ema15, title="Slow EMA 15", style=line, linewidth=1, color=colFinal2)
  88. plot(ema16, title="Slow EMA 16", style=line, linewidth=1, color=colFinal2)
  89. plot(ema17, title="Slow EMA 17", style=line, linewidth=1, color=colFinal2)
  90. plot(ema18, title="Slow EMA 18", style=line, linewidth=1, color=colFinal2)
  91. plot(ema19, title="Slow EMA 19", style=line, linewidth=1, color=colFinal2)
  92. plot(ema20, title="Slow EMA 20", style=line, linewidth=1, color=colFinal2)
  93. plot(ema21, title="Slow EMA 21", style=line, linewidth=1, color=colFinal2)
  94. plot(ema22, title="Slow EMA 22", style=line, linewidth=2, color=colFinal2)
  95. p4=plot(ema23, title="EMA 200", style=line, linewidth=2)
RAW Paste Data