Facebook
From jolt, 2 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 172
  1. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
  2. // © JoltEffect
  3.  
  4. // XLM Network me : GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A
  5. // XLM memo : 103760958
  6. // XLM Binance SmartChain me : 0x703a8daa5e53d2229cd94bf5df46b9ba83e3ce28
  7.  
  8. //@version=4
  9. //Now includes 1min for Suki
  10. //Now includes combinded Alarm indicator 3m/5m/15m/1hr
  11. //Now includes combined indicator plotted to chart
  12.  
  13. study(title="Jolt MTF Superduper Stochastic", shorttitle="Jolt MTF Superduper Srsi")
  14.  
  15. //Plotter Inputs
  16.  
  17. p1 = hline(95, title='Overbuy',  color=#FF0000, linestyle=hline.style_dotted, linewidth=2)
  18. p2 = hline(5, title='Oversell', color=#00FF00, linestyle=hline.style_dotted, linewidth=2)
  19.  
  20. //RSI inputs
  21. rsiSource = input(title="RSI Source", type=input.source, defval=close)
  22. lengthRSI = input(14, "RSI Lenght", minval=1)
  23.  
  24.  
  25. //Stochastic RSI Inputs
  26. lengthStoch = input(14, "Stochastic Length", minval=1)
  27. smoothK = input(3, minval=1, title="Stoch K")
  28. smoothD = input(3, minval=1, title="Stoch D")
  29.  
  30. //Alarm threshholds
  31. shortThreshold = input(285, "Short Risk Threshold 240-285", minval = 240, maxval=285)
  32. longThreshold = input(15, "Long Risk Threshold 15-60", minval=15, maxval=60)
  33.  
  34.  
  35.  
  36. rsi1 = rsi(rsiSource, lengthRSI)
  37.  
  38.  
  39.  
  40. f_secureSecurity(_symbol, _res, _src) => security(_symbol, _res, _src[1], lookahead = barmerge.lookahead_on)
  41.  
  42. f_resInMinutes() =>
  43.     _resInMinutes = timeframe.multiplier * (
  44.       timeframe.isseconds ? 1. / 60             :
  45.       timeframe.isminutes ? 1.                  :
  46.       timeframe.isdaily   ? 60. * 24            :
  47.       timeframe.isweekly  ? 60. * 24 * 7        :
  48.       timeframe.ismonthly ? 60. * 24 * 30.4375  : na)
  49.  
  50. f_tfResInMinutes(_res) =>
  51.  
  52.     security(syminfo.tickerid, _res, f_resInMinutes())
  53.  
  54. currentTfInMinutes = f_resInMinutes()
  55. k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
  56.  
  57. //Timeframes
  58. outK0 = f_secureSecurity(syminfo.tickerid, tostring(1), k)
  59. outK1 = f_secureSecurity(syminfo.tickerid, tostring(3), k)
  60. outK2 = f_secureSecurity(syminfo.tickerid, tostring(5), k)
  61. outK3 = f_secureSecurity(syminfo.tickerid, tostring(15), k)
  62. outK4 = f_secureSecurity(syminfo.tickerid, tostring(30), k)
  63. outK5 = f_secureSecurity(syminfo.tickerid, tostring(60), k)
  64. outK6 = f_secureSecurity(syminfo.tickerid, tostring(240), k)
  65. outK7 = f_secureSecurity(syminfo.tickerid, tostring(1440), k)
  66. outTotal = outK1 + outK2 + outK3
  67. megaOutTotal = outK5 + outK6 + outK7
  68.  
  69. // Ploter
  70. plot(currentTfInMinutes<1?   outK0 : currentTfInMinutes==1?   k : na, title="Stoch K 1 Minutes",      style=plot.style_line, linewidth=2, color=color.maroon,     transp=0)
  71. plot(currentTfInMinutes<3?   outK1 : currentTfInMinutes==3?   k : na, title="Stoch K 3 Minutes",      style=plot.style_line, linewidth=2, color=color.purple,     transp=0)
  72. plot(currentTfInMinutes<5?   outK2 : currentTfInMinutes==5?   k : na, title="Stoch K 5 Minutes",      style=plot.style_line, linewidth=2, color=color.aqua,       transp=0)
  73. plot(currentTfInMinutes<15?  outK3 : currentTfInMinutes==15?  k : na, title="Stoch K 15 Minutes",     style=plot.style_line, linewidth=2, color=color.lime,       transp=0)
  74. plot(currentTfInMinutes<30?  outK4 : currentTfInMinutes==30?  k : na, title="Stoch K 30 Minutes",     style=plot.style_line, linewidth=2, color=color.yellow,     transp=0)
  75. plot(currentTfInMinutes<60?  outK5 : currentTfInMinutes==60?  k : na, title="Stoch K 60 Minutes",     style=plot.style_line, linewidth=2, color=color.orange,     transp=0)
  76. plot(currentTfInMinutes<240? outK6 : currentTfInMinutes==240? k : na, title="Stoch K 240 Minutes",    style=plot.style_line, linewidth=2, color=color.red,        transp=0)
  77. plot(currentTfInMinutes<1440? outK7 : currentTfInMinutes==1440? k : na, title="Stoch K 1440 Minutes",    style=plot.style_line, linewidth=2, color=color.white,        transp=0)
  78. plot(series = outTotal, title="Lower timeframe Alarm", color=color.olive)
  79. plot(series = megaOutTotal, title="Higher timeframe Alarm", color=color.blue)
  80.  
  81. // Plot the tresholds
  82. fill(p1, p2, color=color.black, transp=100, title='Background')
  83.  
  84. buyLong = outTotal <= longThreshold
  85. buyShort = outTotal >= shortThreshold
  86. buyMegaLong = megaOutTotal <= longThreshold
  87. buyMegaShort = megaOutTotal >= shortThreshold
  88.  
  89. plot(buyLong ? outTotal : na, title = 'Buy Long', color = color.green, style = plot.style_circles, linewidth = 10, transp = 15)
  90. plot(buyShort ? outTotal : na, title = 'Buy Short', color = color.red, style = plot.style_circles, linewidth = 10, transp = 15)
  91. plot(buyMegaLong ? megaOutTotal : na, title = 'Buy Mega Long', color = color.green, style = plot.style_cross, linewidth = 6, transp = 15)
  92. plot(buyMegaShort ? megaOutTotal : na, title = 'Buy Mega Long', color = color.red, style = plot.style_cross, linewidth = 10, transp = 15)
  93.  
  94. //if (megaOutTotal <= lowThreshold and outTotal <=lowThreshold)
  95.        
  96.    
  97. //if (megaOutTotal >= upThreshold and outTotal >=upThreshold)
  98.        
  99.  
  100.  
  101. // end

Replies to jolt updated rss

Title Name Language When
Re: jolt updated Putrid Capybara text 2 Years ago.