Advertisement
xmd79

KTS 1.2

Nov 3rd, 2024
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.46 KB | None | 0 0
  1. //@version=5
  2. indicator('KTS 1.2', overlay=true)
  3.  
  4. //checkboxes
  5. daily = input(false, 'Daily support and resistance')
  6. hourly = input(false, 'Hourly support and resistance')
  7. rsar = input(false, 'General support and resistance')
  8. renko = input(false, 'Renko Bar Overlay')
  9. renkot = input('D', 'Renko Overlay Timeframe')
  10. //renkoverlay=input(false, "Renko Signal")
  11. //renkots=input("D", "Renko Signal Timeframe")
  12. altsentiment = input(false, 'Altcoin Sentiment')
  13. witchb = input(false, 'Support Cloud')
  14. witchc = input(false, 'Resistance Cloud')
  15. goldencross = input(false, 'Golden Cross Signal')
  16. fma = input(false, 'FastMA')
  17. gc1 = input(50, 'FastMA Periods')
  18. slma = input(false, 'SlowMA')
  19. gc2 = input(200, 'SlowMA')
  20. dbs = input(false, 'Overtrend Cloud')
  21. ichi = input(false, 'Ichimokou Cloud')
  22. ichi2 = input(false, 'Secondary Ichimokou Cloud')
  23. rsioverlay = false //input(false, "RSI Signal")
  24. weakh = input(false, 'Weak Hands Signal')
  25. predlev = input(false, 'Prediction Levels')
  26. semiashi = input(false, 'Half Heiken Ashi Candles')
  27. wmoverlay = input(false, 'Whale Movement Overlay')
  28. wmpinger = input(false, 'Whale Movement Hint Overlay')
  29. bolband = input(false, 'Bollinger Bands')
  30. keltch = input(false, 'Keltner Channel')
  31. countSignal = input(false, '13-9 Signal')
  32. //math
  33.  
  34. //common constants
  35. GreaterValue(a, b) =>
  36. a > b ? a : b
  37. LesserValue(a, b) =>
  38. a < b ? a : b
  39. IsInRange(value, a, b) =>
  40. value >= LesserValue(a, b) and value <= GreaterValue(a, b)
  41. TrueLow(barsBack) =>
  42. LesserValue(low[barsBack], close[barsBack + 1])
  43. TrueHigh(barsBack) =>
  44. GreaterValue(high[barsBack], close[barsBack + 1])
  45. BuyPressure = close - TrueLow(0)
  46. SellPressure = TrueHigh(0) - close
  47.  
  48.  
  49.  
  50. //bollinger bands
  51. bblength = 18
  52. bbmult = 2
  53. bbbasis = ta.ema(close, bblength)
  54. dev = bbmult * ta.stdev(close, bblength)
  55. upper = bbbasis + dev
  56. lower = bbbasis - dev
  57.  
  58. //keltner channel
  59. ma = ta.ema(close, 14)
  60. rangema = ta.ema(ta.tr, 14)
  61. kcupper = ma + rangema * 2
  62. kclower = ma - rangema * 2
  63. c = color.red
  64.  
  65. //whale movement
  66. fff = true
  67.  
  68. //overtrend cloud
  69. otpd = 20
  70.  
  71. //SARs
  72. x = 24
  73. y = 21
  74. ctf = 'D'
  75. cth = '60'
  76.  
  77. //Renkos
  78. atrLen = 10
  79. renko_close = request.security(ticker.renko(syminfo.tickerid, 'ATR', atrLen), renkot, close)
  80. renko_open = request.security(ticker.renko(syminfo.tickerid, 'ATR', atrLen), renkot, open)
  81.  
  82. //Altcoin Sentiment
  83. dogesauce = request.security('BITTREX:DOGEBTC', 'D', close)
  84.  
  85. //witchcraft
  86. Factor10 = 10
  87. Factor = 1
  88. Pd = 8
  89.  
  90. //overtrend
  91. otbase = request.security(syminfo.tickerid, 'D', ta.sma(close * 2, otpd))
  92. otlbase = request.security(syminfo.tickerid, 'D', ta.sma(close * 2, math.round(otpd * 1.618)))
  93.  
  94. otlma = otlbase * 0.382
  95. othma = otbase * 0.618
  96.  
  97. otc = otlma + (otlma + othma) / 2
  98. otf = otlma + (otlma - othma) / 2
  99. otm = (otlma + othma) / 2
  100. //ichimokou
  101. conversionPeriods = 34
  102. basePeriods = 68
  103. laggingSpan2Periods = 136
  104. displacement = 68
  105.  
  106. //DailySAR
  107. //dsar=security(tickerid,ctf,lowest(close,x))+security(tickerid,ctf,highest(close,x))-security(tickerid,ctf,lowest(close,x))*abs((security(tickerid,ctf,close)>security(tickerid,ctf,ema(close,y))?0:1)-0.618)
  108. dsar = ta.lowest(request.security(syminfo.tickerid, ctf, close), x) + (ta.highest(request.security(syminfo.tickerid, ctf, close), x) - ta.lowest(request.security(syminfo.tickerid, ctf, close), x)) * math.abs((request.security(syminfo.tickerid, ctf, close) > ta.ema(request.security(syminfo.tickerid, ctf, close), y) ? 0 : 1) - 0.618)
  109.  
  110. //HourlySAR
  111. hsar = ta.lowest(request.security(syminfo.tickerid, cth, close), x) + (ta.highest(request.security(syminfo.tickerid, cth, close), x) - ta.lowest(request.security(syminfo.tickerid, cth, close), x)) * math.abs((request.security(syminfo.tickerid, cth, close) > ta.ema(request.security(syminfo.tickerid, cth, close), y) ? 0 : 1) - 0.618)
  112.  
  113. //RSAR
  114. hmid = ta.lowest(x) + (ta.highest(x) - ta.lowest(x)) * 0.382
  115. hmid3 = ta.lowest(x) + (ta.highest(x) - ta.lowest(x)) * 0.618
  116.  
  117.  
  118. //Alt Sentiment
  119. cp = ta.sma(dogesauce, 2)
  120. lp = ta.sma(dogesauce, 50)
  121. dx = ta.sma(ta.change(cp - lp), 13)
  122.  
  123. //witchcraft
  124.  
  125. lowline(tp) =>
  126. ll = ta.lowest(low, Pd * tp)
  127. myl = ta.sma(hlc3, Pd * tp) * 0.5 + ll * 0.5
  128. low1 = myl - Factor * tp * ta.atr(3)
  129. low1f = low1
  130. low1f := hlc3 > low1f[1] ? math.max(low1, low1f[1]) : low1
  131. low1f
  132.  
  133. highline(tp) =>
  134. he = ta.highest(high, Pd * tp)
  135. myh = ta.sma(hlc3, Pd * tp) * 0.5 + he * 0.5
  136. h1 = myh + Factor * tp * ta.atr(3)
  137. h1f = h1
  138. h1f := hlc3 < h1f[1] ? math.min(h1, h1f[1]) : h1
  139. h1f
  140.  
  141. tran = 100
  142. h1 = highline(1)
  143. h2 = highline(2)
  144. h3 = highline(4)
  145. low1 = lowline(1)
  146. low2 = lowline(2)
  147. low3 = lowline(4)
  148.  
  149. //MAs
  150. slowma = ta.sma(close, gc2)
  151. fastma = ta.sma(close, gc1)
  152.  
  153. //ichimokou
  154.  
  155. donchian(len) =>
  156. math.avg(ta.lowest(len), ta.highest(len))
  157. conversionLine = donchian(conversionPeriods)
  158. baseLine = donchian(basePeriods)
  159. leadLine1 = math.avg(conversionLine, baseLine)
  160. leadLine2 = donchian(laggingSpan2Periods)
  161.  
  162. //RSI announce
  163. r = ta.rsi(close, 14)
  164. rsi30 = ta.sma(r, 30)
  165. rsi20 = ta.sma(r, 20)
  166.  
  167. //weak
  168. //INPUTS
  169. per = 24 //input(24, type=integer, minval=15, maxval=60)
  170. preunit = 'atr' //input('atr', title="prediction in atr or percent", options=['atr', 'percent'])
  171. preamount = 1 //input(1, title="added amount of prediction", type=float, minval=0, maxval=6)
  172.  
  173. //CHANNEL
  174. hb = ta.highest(high, per) //High Border
  175. lb = ta.lowest(low, per) //Low Border
  176. dist = hb - lb //range of the channel
  177. med = (hb + lb) / 2 //median of the channel
  178.  
  179. hf = hb - dist * 0.236 //Highest Fib
  180. chf = hb - dist * 0.382 //Center High Fib
  181. clf = hb - dist * 0.618 //Center Low Fib
  182. lf = hb - dist * 0.764 //Lowest Fib
  183.  
  184. //PULL BACK LEVELS
  185. //initialise mutatables
  186. leh = hb
  187. lel = lb
  188. hbtrue = true
  189.  
  190. evpup = high > hb[1] //push up event
  191. evhbstart = hb[3] == hb[2] and hb[2] == hb[1] and evpup //horizontal then up, part of evhb calculation
  192. evpdown = low < lb[1] //push down event
  193. evlbstart = lb[3] == lb[2] and lb[2] == lb[1] and evpdown //horizontal then down, part of evlb calculation
  194.  
  195. //two levels will be merged in the plot
  196. evhb = evhbstart or high[1] == hb //event with high border
  197. leh := evhb ? hf : leh[1] //level high mutatable set to highest fib on event or kept on value
  198. evlb = evlbstart or low[1] == lb //event with low border
  199. lel := evlb ? lf : lel[1] //level low mutatable set to lowest fib on event or kept on value
  200. hbtrue := evhb ? true : evlb ? false : hbtrue[1] //last event mutatable
  201.  
  202. //ENTRY MARKERS
  203. tol = ta.atr(per) * 0.2 //tolerance for placing triangles and prediction candles at borders
  204. //initialise mutatables
  205. hftrue = true
  206. lftrue = true
  207. cftrue = true
  208. evupin = ta.crossover(close, hf) //market enters up trend
  209. evupout = ta.crossunder(close, hf) //market leaves up trend
  210. hftrue := evupin ? true : evupout ? false : hftrue[1] //mutatable true if in up trend
  211. evdownin = ta.crossunder(close, lf) //market enters down trend
  212. evdownout = ta.crossover(close, lf) //market leaves down trend
  213. lftrue := evdownin ? true : evdownout ? false : lftrue[1] //mutatable true if in down trend
  214. cftrue := not hftrue and not lftrue ? true : false //mutatable true if instrument is ranging
  215.  
  216. //IDENTIFY LAST BAR
  217. last = barstate.islast
  218. last := barstate.isrealtime and timeframe.isintraday ? not barstate.isconfirmed : barstate.islast
  219. //barstate.islast works also when all bars are confirmed and are history. However in real time and intradaycharts bars never lose this state.
  220. //In that situation 'not barstate.isconfirmed' (like not ishistory) is the better alternative. if you use intraday charts after closing time of
  221. //the markets "barstate.isrealtime and isintraday" will be false and the script will use barstate.islast.
  222.  
  223. //SITUATION
  224. hbdtrue = last and hftrue //up trend
  225. lbdtrue = last and lftrue //down trend
  226. chfdtrue = last and cftrue and hbtrue //high ranging
  227. clfdtrue = last and cftrue and not hbtrue //low ranging
  228.  
  229. //expected levels
  230. schigh = hb
  231. schigh := hbdtrue ? hb : lbdtrue ? lf : chfdtrue ? hf : clfdtrue ? chf : na //situation candle high
  232. sclow = lb
  233. sclow := hbdtrue ? hf : lbdtrue ? lb : chfdtrue ? clf : clfdtrue ? lf : na //situation candle low
  234.  
  235. //prediction levels
  236. atr_1 = ta.atr(per)
  237. pred = preunit == 'atr' ? preamount * atr_1 : preunit == 'percent' ? preamount * close / 100 : 0
  238. prcahigh = med
  239. prcahigh := hbdtrue and (evpup or evpup[1]) ? hb + pred : na //prediction level higher than high border
  240. prcalow = med
  241. prcalow := lbdtrue and (evpdown or evpdown[1]) ? lb - pred : na //prediction level lower than low border
  242.  
  243. //HULL MOVING AVERAGE
  244. hma = ta.wma(2 * ta.wma(close, per / 2) - ta.wma(close, per), math.round(math.sqrt(per)))
  245.  
  246. //Semi Ashi
  247. grnma = ta.sma(close, 2)
  248. redma = ta.sma(open, 2)
  249.  
  250. //WM
  251. bbr = (close - (ta.sma(close, 20) - 2 * ta.stdev(close, 20))) / (ta.sma(close, 20) + 2 * ta.stdev(close, 20) - (ta.sma(close, 20) - 2 * ta.stdev(close, 20)))
  252. //bollinger band position
  253.  
  254. acc = 100 - ta.rsi((ta.sma(close, 20) + 2 * ta.stdev(close, 20) - (ta.sma(close, 20) - 2 * ta.stdev(close, 20))) / ta.sma(close, 20), 14)
  255. //expected volatility
  256.  
  257. change_1 = ta.change(volume)
  258. rma_1 = ta.rma(math.max(change_1, 0), 14)
  259. change_2 = ta.change(volume)
  260. rma_2 = ta.rma(math.max(change_2, 0), 14)
  261. change_3 = ta.change(volume)
  262. rma_3 = ta.rma(-math.min(change_3, 0), 14)
  263. mfg = ta.rma(-math.min(ta.change(volume), 0), 14) == 0 ? 100 : rma_1 == 0 ? 0 : 100 - 100 / (1 + rma_2 / rma_3)
  264. //rsi of volume
  265. bigmove = bbr > 1
  266. gc = mfg > 50 and mfg[1] > 50
  267.  
  268. xx = ta.roc(acc, 1)
  269. b = xx > 0
  270. b2 = xx < 0
  271. valid = gc and not bigmove or not fff
  272. sbull = close > ta.ema(close, 5)
  273.  
  274. buysignal = valid and not sbull and b
  275. sellsignal = valid and sbull and b2
  276.  
  277. // Setups
  278. camoBuy = close < close[1] and close > open and low < TrueLow(1)
  279. camoSell = close > close[1] and close < open and high > TrueHigh(1)
  280. clopBuy = open < LesserValue(close[1], open[1]) and high > GreaterValue(close[1], open[1])
  281. clopSell = open > GreaterValue(close[1], open[1]) and low < LesserValue(close[1], open[1])
  282. clopwinBuy = IsInRange(close, close[1], open[1]) and IsInRange(open, close[1], open[1]) and close > close[1]
  283. clopwinSell = IsInRange(close, close[1], open[1]) and IsInRange(open, close[1], open[1]) and close < close[1]
  284. openBuy = open < low[1] and close > low[1]
  285. openSell = open > high[1] and close < high[1]
  286. trapBuy = IsInRange(open, low[1], high[1]) and high > high[1]
  287. trapSell = IsInRange(open, low[1], high[1]) and low < low[1]
  288. diffUp = close < close[1] and close[1] < close[2] and BuyPressure > BuyPressure[1] and SellPressure < SellPressure[1]
  289. diffDown = close > close[1] and close[1] > close[2] and BuyPressure < BuyPressure[1] and SellPressure > SellPressure[1]
  290. reverseDiffUp = close > close[1] and close[1] > close[2] and BuyPressure > BuyPressure[1] and SellPressure < SellPressure[1]
  291. reverseDiffDown = close < close[1] and close[1] < close[2] and BuyPressure < BuyPressure[1] and SellPressure > SellPressure[1]
  292. antiDiffUp = close < close[1] and close[1] > close[2] and close[2] < close[3]
  293. antiDiffDown = close > close[1] and close[1] < close[2] and close[2] > close[3]
  294. anyBullSetup = camoBuy or clopBuy or clopwinBuy or openBuy or trapBuy or diffUp or reverseDiffUp or antiDiffUp
  295. anyBearSetup = camoSell or clopSell or clopwinSell or openSell or trapSell or diffDown or reverseDiffDown or antiDiffDown
  296.  
  297.  
  298. // Sequential
  299. bullCount = 0
  300. bullCountCondition = close > close[4]
  301. bullCount := bullCountCondition ? nz(bullCount[1]) == 0 ? 1 : bullCount[1] == 1 ? 2 : bullCount[1] == 2 ? 3 : bullCount[1] == 3 ? 4 : bullCount[1] == 4 ? 5 : bullCount[1] == 5 ? 6 : bullCount[1] == 6 ? 7 : bullCount[1] == 7 ? 8 : bullCount[1] == 8 ? 9 : 0 : 0
  302. bearCount = 0
  303. bearCountCondition = close < close[4]
  304. bearCount := bearCountCondition ? nz(bearCount[1]) == 0 ? 1 : bearCount[1] == 1 ? 2 : bearCount[1] == 2 ? 3 : bearCount[1] == 3 ? 4 : bearCount[1] == 4 ? 5 : bearCount[1] == 5 ? 6 : bearCount[1] == 6 ? 7 : bearCount[1] == 7 ? 8 : bearCount[1] == 8 ? 9 : 0 : 0
  305.  
  306.  
  307. // Signal
  308. bullConditionCount = close > close[1] and bullCount > 1 and bullCount < 9 or bearCount == 9
  309. bearConditionCount = close < close[1] and bearCount > 1 and bearCount < 9 or bullCount == 9
  310.  
  311.  
  312. /////////
  313. //PLOTS//
  314. /////////
  315. pink = #ff3b83
  316.  
  317. //ReversalSAR
  318. reversal = plot(rsar ? hmid : na, 'Reversal Line', color=color.new(color.red, 0), linewidth=2, offset=1)
  319. sar = plot(rsar ? hmid3 : na, 'SAR Line', linewidth=2, color=color.new(color.green, 0), offset=1)
  320. fill(sar, reversal, color=color.new(color.gray, 80))
  321.  
  322. //Daily SAR
  323. plot(daily ? dsar : na, 'Daily SAR Line', linewidth=4, color=close > dsar ? color.green : pink)
  324.  
  325. //Hourly SAR
  326. plot(hourly ? hsar : na, 'Hourly SAR Line', close > hsar ? color.green : pink, 4, plot.style_circles)
  327.  
  328. //Renko overlay
  329. plot1 = plot(renko ? renko_close : na, style=plot.style_linebr, linewidth=4, color=color.new(color.black, 0))
  330. plot2 = plot(renko ? renko_open : na, style=plot.style_linebr, linewidth=4, color=color.new(color.black, 0))
  331. fill(plot1, plot2, color=renko_close < renko_open ? pink : color.green, transp=50)
  332.  
  333. //Alt Sentiment
  334. plotshape(ta.crossover(dx, 0) and altsentiment, 'Alt Sentiment Switch Bullish', location=location.belowbar, color=color.new(color.green, 0), style=shape.triangleup, text='A\nL\nT')
  335. plotshape(ta.crossunder(dx, 0) and altsentiment, 'Alt Sentiment Switch Bearish', location=location.abovebar, color=color.new(pink, 0), style=shape.triangledown, text='A\nL\nT')
  336.  
  337. //witchcraft//
  338.  
  339. cx = plot(witchb ? low1 : na, color=color.green, offset=1, title='sell 1 red', linewidth=0, transp=tran)
  340. cy = plot(witchb ? low2 : na, color=color.green, offset=1, title='sell 2 green', linewidth=0, transp=tran)
  341. cz = plot(witchb ? low3 : na, color=color.green, offset=1, title='sell 3 blue', linewidth=0, transp=tran)
  342. ax = plot(witchc ? h1 : na, color=pink, offset=1, title='buy 1 red', linewidth=0, transp=tran)
  343. ay = plot(witchc ? h2 : na, color=pink, offset=1, title='buy 2 green', linewidth=0, transp=tran)
  344. az = plot(witchc ? h3 : na, color=pink, offset=1, title='buy 3 blue', linewidth=0, transp=tran)
  345. fill(ax, ay, color=color.new(pink, 80))
  346. fill(ay, az, color=color.new(pink, 70))
  347. fill(cx, cy, color=color.new(color.green, 90))
  348. fill(cy, cz, color=color.new(color.green, 80))
  349.  
  350. //overtrend
  351.  
  352. otlo = plot(dbs ? otlma : na, color=color.new(color.black, 0), linewidth=0)
  353. othi = plot(dbs ? othma : na, color=color.new(color.black, 0), linewidth=0)
  354. otceil = plot(dbs ? otc : na, color=color.new(color.black, 0), linewidth=0)
  355. otfloor = plot(dbs ? otf : na, color=color.new(color.black, 0), linewidth=0)
  356. otmid = plot(dbs ? otm : na, color=color.new(color.white, 0), linewidth=4)
  357.  
  358. fill(othi, otceil, color=color.new(color.red, 85))
  359. fill(otfloor, otlo, color=color.new(color.green, 85))
  360.  
  361. //MAs
  362. ugold = ta.crossover(fastma, slowma)
  363. dgold = ta.crossover(slowma, fastma)
  364. plot(fma ? fastma : na, color=color.new(color.green, 0), linewidth=4)
  365. plot(slma ? slowma : na, color=color.new(pink, 0), linewidth=4)
  366. plotshape(dgold and goldencross, style=shape.triangledown, location=location.belowbar, color=color.new(pink, 0), text='G\nC')
  367. plotshape(ugold and goldencross, style=shape.triangleup, location=location.abovebar, color=color.new(color.green, 0), text='G\nC')
  368.  
  369. //ichi
  370. c1 = plot(ichi2 ? conversionLine : na, color=color.new(#0496ff, 0), title='Conversion Line', linewidth=2)
  371. c2 = plot(ichi2 ? baseLine : na, color=color.new(#991515, 0), title='Base Line', linewidth=2)
  372.  
  373. p1 = plot(ichi ? leadLine1 : na, offset=displacement, color=color.new(color.black, 0), title='Lead 1', linewidth=4)
  374. p2 = plot(ichi ? leadLine2 : na, offset=displacement, color=color.new(pink, 0), title='Lead 2', linewidth=4)
  375. fill(p1, p2, color=leadLine1 > leadLine2 ? color.green : pink, transp=60)
  376. fill(c1, c2, color=conversionLine > baseLine ? #003333 : color.maroon, transp=70)
  377.  
  378. //rsi
  379. crossover_1 = ta.crossover(rsi30, rsi20)
  380. plotshape(rsioverlay ? crossover_1 : na, style=shape.triangledown, color=color.new(pink, 0), location=location.belowbar, text='R\nS\nI')
  381. crossunder_1 = ta.crossunder(rsi30, rsi20)
  382. plotshape(rsioverlay ? crossunder_1 : na, style=shape.triangleup, color=color.new(color.green, 0), location=location.abovebar, text='R\nS\nI')
  383.  
  384. //weak hands
  385.  
  386. //plot entry markers
  387. plotshape(weakh ? evupin ? hb + tol : na : na, style=shape.triangleup, location=location.absolute, color=color.new(color.blue, 0), size=size.tiny)
  388. plotshape(weakh ? evupout ? hb + tol : na : na, style=shape.xcross, location=location.absolute, color=color.new(color.gray, 0), size=size.tiny)
  389. plotshape(weakh ? evdownin ? lb - tol : na : na, style=shape.triangledown, location=location.absolute, color=color.new(pink, 0), size=size.tiny)
  390. plotshape(weakh ? evdownout ? lb - tol : na : na, style=shape.xcross, location=location.absolute, color=color.new(color.gray, 0), size=size.tiny)
  391.  
  392.  
  393. //plot future circle markers
  394. plotshape(predlev ? hbdtrue ? hb : na : na, style=shape.circle, location=location.absolute, color=color.new(color.blue, 0), offset=1, size=size.tiny)
  395. plotshape(predlev ? lbdtrue ? lb : na : na, style=shape.circle, location=location.absolute, color=color.new(pink, 0), offset=1, size=size.tiny)
  396. plotshape(predlev ? chfdtrue ? chf : na : na, style=shape.circle, location=location.absolute, color=color.new(color.green, 0), offset=1, size=size.tiny)
  397. plotshape(predlev ? clfdtrue ? clf : na : na, style=shape.circle, location=location.absolute, color=color.new(color.maroon, 0), offset=1, size=size.tiny)
  398.  
  399.  
  400. //plot prediction levels
  401. plot(last and predlev and (evpup or evpup[1]) and preamount > 0 ? prcahigh : na, style=plot.style_cross, title=' predict', linewidth=5, color=color.new(color.blue, 0), offset=3)
  402. plot(last and predlev and (evpdown or evpdown[1]) and preamount > 0 ? prcalow : na, style=plot.style_cross, title=' predict', linewidth=5, color=color.new(pink, 0), offset=3)
  403.  
  404. //plot predictionmarkers
  405. plotshape(hbdtrue and predlev and (evpup or evpup[1]) ? hb + tol : na, style=shape.diamond, location=location.absolute, color=color.new(color.blue, 0), size=size.tiny, offset=3)
  406. plotshape(lbdtrue and predlev and (evpdown or evpdown[1]) ? lb - tol : na, style=shape.diamond, location=location.absolute, color=color.new(pink, 0), size=size.tiny, offset=3)
  407.  
  408. //semi ashi
  409. barcolor(semiashi ? grnma > redma ? color.green : pink : na)
  410.  
  411. //whale
  412.  
  413. plotshape(wmpinger and buysignal, 'Up Arrow', style=shape.arrowup, location=location.abovebar, color=color.new(color.green, 0))
  414. plotshape(wmpinger and sellsignal, 'Down Arrow', style=shape.arrowdown, location=location.abovebar, color=color.new(color.red, 0))
  415. barcolor(wmoverlay ? gc ? acc < 50 ? acc < 20 ? gc ? color.blue : color.black : gc ? color.yellow : color.black : gc ? bbr > 1 ? color.black : color.red : color.black : na : na)
  416. //plot(gc?acc:0, color=acc<50?acc<20?gc?blue:black:gc?yellow:black:gc?bbr>1?black:red:black,linewidth=4,style=columns)
  417.  
  418. //boll
  419. plot(bolband ? bbbasis : na, offset=1, color=close > bbbasis ? color.green : pink)
  420. bolbot = plot(bolband ? upper : na, offset=1, color=high > upper ? color.red : color.blue)
  421. boltop = plot(bolband ? lower : na, offset=1, color=low < lower ? color.red : color.blue)
  422. fill(bolbot, boltop, transp=90)
  423.  
  424. //KC
  425. u = plot(keltch ? kcupper : na, color=color.new(c, 0), title='Upper Keltner Channel Band')
  426. plot(keltch ? ma : na, color=color.new(c, 0), title='Keltner Channel Basis')
  427. l = plot(keltch ? kclower : na, color=color.new(c, 0), title='Lower Keltner Channel Band')
  428. fill(u, l, color=color.new(c, 90))
  429.  
  430.  
  431. // Signal
  432. plotshape(bullConditionCount and anyBullSetup and countSignal, style=shape.arrowup, color=color.new(color.green, 0), location=location.belowbar, text='T\nD')
  433. plotshape(bearConditionCount and anyBearSetup and countSignal, style=shape.arrowdown, color=color.new(pink, 0), location=location.abovebar, text='T\nD')
  434.  
  435.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement