SaveText.Ru

Индюк
  1. // Created by Роман версия 2
  2. // Candle хай и лоу labels
  3. study(title = "Candles H&L label", overlay = true)
  4.  
  5. //N= input(10, minval=2, title="Количество свечей")  //определяется кол-во свечей для контроля
  6.  
  7. ////////////////////////////////////////////////////////////////////////
  8. // сравненительный анализ максимумов и минимумов соседних свечей
  9.  
  10. data2=(high[1]==high and high[1]!=max(open[1],close[1]) and high!=max(open,close))  // задает параметр сравнения ближайших максимальных значений
  11. plotshape(data2, color=red, style=shape.triangledown)
  12.  
  13. data7=(high[2]==high and high[2]!=max(open[2],close[2]) and high!=max(open,close))  // задает параметр сравнения ближайших максимальных значений
  14. plotshape(data7, color=red, style=shape.cross)
  15.  
  16. data4=(low[1]==low and low[1]!=min(open[1],close[1]) and low!=min(open,close))    //  задает параметр сравенения ближайших минимальных значений
  17. plotshape(data4, location=location.belowbar, color=green, style=shape.triangleup)
  18.  
  19. data9=(low[2]==low and low[2]!=min(open[2],close[2]) and low!=min(open,close))    //  задает параметр сравенения ближайших минимальных значений
  20. plotshape(data9, location=location.belowbar, color=green, style=shape.cross)
  21.  
  22. //data6=(close[1] > open[1] and open > close and open <= close[1] and open[1] <= close and open - close < close[1] - open[1] )
  23. //plotshape(data6, title= "Be H",  color=red, style=shape.arrowdown, text="Медвежий Харами")
  24.  
  25. //data7=(open[1] > close[1] and close > open and close <= open[1] and close[1] <= open and close - open < open[1] - close[1] )
  26. //plotshape(data7,  title= "Bu H", location=location.belowbar, color=lime, style=shape.arrowup, text="BullishnHarami")
  27.  
  28. ////////////////////////////////////////////////////////////////////////////////////////
  29. // sma
  30.  
  31. plot(sma(low, 7)) // рисует SMA нижнюю
  32. plot(sma(high, 7)) // рисует SMA верхнюю
  33.  
  34.  
  35. ///////////////////////////////////////////////////////
  36. // точки пивот
  37.  
  38. // leftBars = input(20, minval=2, title="Свечи слева")
  39. // rightBars=input(20, minval=2, title="Свечи справа")
  40. // ph = pivothigh(leftBars, rightBars)
  41. //plot(ph, style=cross, linewidth=2, color= red, offset=-rightBars)
  42.  
  43.  
  44. ////////////////////////////////////////////////////////
  45. // ema
  46.  
  47. len = input(10, minval=1, title="Length")
  48. src = input(close, title="Source")
  49. lng = input(15, minval=3, title="количество баров" )
  50. out = ema(src, len)
  51. //plot(out, title="EMA", color=red)
  52. last8h = highest(close, 8)
  53. lastl8 = lowest(close, 8)
  54.  
  55. //plot(last8h, color=red, linewidth=1)
  56. //plot(lastl8, color=green, linewidth=1)
  57.  
  58.  
  59. bearish = cross(close,out) == 1 and close[1] > close and close[16] > close
  60. bullish = cross(close,out) == 1 and close[1] < close and close[16] < close
  61.  
  62. // plotshape(bearish, color=red, style=shape.arrowdown, text="Sell", location=location.abovebar)
  63. // plotshape(bullish, color=green, style=shape.arrowup, text="Buy", location=location.belowbar)
  64.  
  65.  
  66. //////////////////////////////////////////////////////////////////////////////////////////////////////////
  67. //  
  68.  
  69. // Медвежий разворот
  70. data11=(open[3]<=close[3] and open[2]<close[2] and open[1]<close[1] and close[3]==open[2] and close[2]==open[1] and close[1]==open and close<low[2] )  // задает параметр медвежьего разворота
  71. plotshape(data11, color=red, style=shape.arrowdown, text="BEAR SELL", location=location.abovebar)
  72.  
  73. // Бычий разворот
  74. data21=(open[3]>=close[3] and open[2]>close[2] and open[1]>close[1] and close[3]==open[2] and close[2]==open[1] and close[1]==open and close>high[2] )  // задает параметр бычьего разворота
  75. plotshape(data21, color=green, style=shape.arrowup, text="BULL BUY", location=location.belowbar)
  76.  
  77. /////////////////////////////////////////////////////////////////////////////////////////////////////////////
  78.  
  79.  
  80.  

Share with your friends:

Print