Advertisement
Guest User

Day Pro Improved

a guest
Apr 23rd, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.99 KB | None | 0 0
  1. //@version=1
  2. study(title="dayPROsetup_crossX", shorttitle="dayPROsetup_crossX", overlay=true)
  3.  
  4. //len1 = input(7, minval=1, title="MA7")
  5. //len2 = input(20, minval=1, title="MA20")
  6. len3 = input(30, minval=1, title="MA30")
  7. len4 = input(50, minval=1, title="MA50")
  8. len5 = input(99, minval=1, title="MA99")
  9. //len6 = input(149, minval=1, title="MA149")
  10. len7 = input(200, minval=1, title="MA200")
  11. len8 = input(350, minval=1, title="MA350")
  12. len9 = input(314, minval=1, title="MA314")
  13. len10 = input(1050, minval=1, title="week150")
  14. len11 = input(1400, minval=1, title="week200")
  15. //len12 = input(600, minval=1, title="random")
  16.  
  17. //src1 = input(close, title="MA7")
  18. //src2 = input(close, title="MA20")
  19. src3 = input(close, title="MA30")
  20. src4 = input(close, title="MA50")
  21. src5 = input(close, title="MA99")
  22. //src6 = input(close, title="MA149")
  23. src7 = input(close, title="MA200")
  24. src8 = input(close, title="MA350")
  25. src9 = input(close, title="MA314")
  26. src10 = input(close, title="week150")
  27. src11 = input(close, title="week200")
  28. //src12 = input(close, title="random")
  29.  
  30. //out1 = sma(src1, len1)
  31. //out2 = sma(src2, len2)
  32. out3 = sma(src3, len3)
  33. out4 = sma(src4, len4)
  34. out5 = sma(src5, len5)
  35. //out6 = sma(src6, len6)
  36. out7 = sma(src7, len7)
  37. out8 = sma(src8, len8)
  38. out9 = sma(src9, len9)
  39. out10 = sma(src10, len10)
  40. out11 = sma(src11, len11)
  41. //out12 = sma(src12, len12)
  42.  
  43. //plot(out1, title="MA7", color=close >= out1 ? #F7E7CE : #F7E7CE, transp=0)
  44. //plot(out2, title="MA20", color=close >= out2 ? #00FF7F : #FF4500, transp=0)
  45. plot(out3, title="MA30", color=close >= out3 ? #FFFFF0 : #FFFFF0, transp=0)
  46. plot(out4, title="MA50", linewidth = 3, color=close >= out4 ? #FFD700 : #FFD700, transp=0)
  47. plot(out5, title="MA99", color=close >= out5 ? #3F00FF : #3F00FF, transp=0)
  48. //plot(out6, title="MA149", color=close >= out6 ? #FF4500 : #FF4500, transp=0)
  49. plot(out7, title="MA200", linewidth = 2,style=circles, color=close >= out7 ? lime : red, transp=0)
  50. plot(out8, title="MA350", linewidth = 1, color=close >= out8 ? #6F4E37 : #6F4E37, transp=0)
  51. plot(out9, title="MA314", linewidth = 2,style=circles, color=aqua, transp=0)
  52. plot(out10, title="week150", linewidth = 3, color=close >= out10 ? white : white, transp=0)
  53. plot(out11, title="week200", linewidth = 3, color=close >= out11 ? purple : purple, transp=0 )
  54. //plot(out12, title="random", color=close >= out12 ? #00FF7F : #FF4500, transp=0)
  55.  
  56. //................................
  57. //@version=3
  58. // Copyright (c) 2018-present, Alex Orekhov (everget)
  59. // Zero Lag Exponential Moving Average script may be freely distributed under the MIT license.
  60. //study("Zero Lag Exponential Moving Average", shorttitle="ZLEMA", overlay=true)
  61.  
  62. length = input(title="Length", type=integer, defval=15)
  63. highlightMovements = input(title="Highlight Movements ?", type=bool, defval=true)
  64. src = input(title="Source", type=source, defval=close)
  65.  
  66. lag = floor((length - 1) / 2)
  67.  
  68. zlema = ema(src + (src - src[lag]), length)
  69.  
  70. zlemaColor = highlightMovements ? (zlema > zlema[1] ? lime : red) : #6d1e7f
  71. plot(zlema, title="ZLEMA", linewidth=3, color=zlemaColor, transp=0)
  72.  
  73. //..................................................................
  74.  
  75. //@version=2
  76. //synapticex.com
  77. //study("Fractal Support Resistance", shorttitle="FSR", overlay=true)
  78. tf = input(title="Resolution", type=resolution, defval = "current")
  79. vamp = input(title="VolumeMA", type=integer, defval=6)
  80. vam = sma(volume, vamp)
  81.  
  82. up = high[3]>high[4] and high[4]>high[5] and high[2]<high[3] and high[1]<high[2] and volume[3]>vam[3]
  83. down = low[3]<low[4] and low[4]<low[5] and low[2]>low[3] and low[1]>low[2] and volume[3]>vam[3]
  84. fractalup = up ? high[3] : fractalup[1]
  85. fractaldown = down ? low[3] : fractaldown[1]
  86.  
  87. fuptf = security(tickerid,tf == "current" ? period : tf, fractalup)
  88. fdowntf = security(tickerid,tf == "current" ? period : tf, fractaldown)
  89.  
  90. plot(fuptf, "FractalUp", color=lime, linewidth=1, style=cross, transp=0, offset =-3, join=false)
  91. plot(fdowntf, "FractalDown", color=red, linewidth=1, style=cross, transp=0, offset=-3, join=false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement