xmd79

Engulfing Candles Detector

Jan 11th, 2022
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. //@version=5
  2. // from Eng-EU4_20-35pip copy
  3. indicator(title="Engulfing Candles Detector", shorttitle="Eng4-pip-JZK", overlay = true)
  4.  
  5.  
  6. minBoS = input.int(20, minval=1, title="Min Pip")
  7. minBoSi = minBoS/10000
  8. maxBoS = input.int(35, minval=1, title="Max Pip")
  9. maxBoSi = maxBoS/10000
  10. candle2_BodySize = close - open
  11.  
  12. //BuEnn chybi (open >= low[1]) and (close - open <= (2*(high[1] - close[1])))
  13. //BuEnn = (candle2_BodySize >= minBoSi and candle2_BodySize <= maxBoSi) and (open[1] > close[1] and close > open and close >= open[1] and ((close - open) > (high[1] - close[1])) )
  14. //plotshape(BuEnn, style = shape.triangledown, title = 'BuEn>test', location = location.belowbar, color = color.olive, size = size.small)
  15.  
  16.  
  17. // bull > 1x + open >= close[1]
  18. BuEn1 = (candle2_BodySize >= minBoSi and candle2_BodySize <= maxBoSi) and (open[1] > close[1] and close > open and (open >= low[1]) and close >= open[1] and ((close - open) > (high[1] - close[1])) and (close - open <= (2*(high[1] - close[1]))) )
  19. plotshape(BuEn1, style = shape.triangleup, title = '1x<BuEn<2x', location = location.belowbar, color = color.fuchsia, size = size.tiny)
  20.  
  21.  
  22.  
  23. // bull >2x
  24. BuEn2 = (candle2_BodySize >= minBoSi and candle2_BodySize <= maxBoSi) and (open[1] > close[1] and close > open and (open >= low[1]) and close >= open[1] and (close - open > (2*(high[1] - close[1]))) and (close - open <= (3*(high[1] - close[1]))) )
  25. plotshape(BuEn2, style = shape.triangleup, title = '2x<BuEn<3x', location = location.belowbar, color = color.lime, size = size.tiny)
  26.  
  27.  
  28. // bull >3x + doji
  29. BuEn3 = (candle2_BodySize >= minBoSi and candle2_BodySize <= maxBoSi) and (open[1] > close[1] and close > open and (open >= low[1]) and close >= open[1] and (close - open > (3*(high[1] - close[1]))) )
  30. plotshape(BuEn3, style = shape.triangleup, title = '3x<BuEn+doji', location = location.belowbar, color = color.orange, size = size.tiny)
  31.  
  32.  
  33. // bull whole inside >1x
  34. BuEnW1 = (candle2_BodySize >= minBoSi and candle2_BodySize <= maxBoSi) and (open[1] > close[1] and close > open and (open <= low[1]) and close >= high[1] and (close - open > ((high[1] - low[1]))) )
  35. plotshape(BuEnW1, style = shape.square, title = 'Whole BuEn', location = location.belowbar, color = color.blue, size = size.small)
  36.  
  37.  
  38.  
  39.  
Advertisement
Add Comment
Please, Sign In to add comment