xmd79

The Ganesh

Dec 31st, 2022
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
  2. // © gshedge63
  3.  
  4. //@version=4
  5. study(title="The Ganesh", overlay=true)
  6.  
  7. High = max(high,high[1])
  8. Low = min(low,low[1])
  9. //buy = (close>open) and ((high-close)<=(0.33*(high-low))) and ((open-low)<=0.05*(high-low))
  10. Hammer = (close>open) and ((high-close)<=(0.25*(high-low))) and ((high-low)>=0.0014*(close)) and (open-low)>=0.45*(high-low)
  11. Hammer2 = (close>open[1]) and (open[1]>close[1]) and ((High-close)<=(0.25*(High-Low))) and ((High-Low)>=0.0015*(low)) and (open[1]-Low)>=0.45*(High-Low)
  12. //sell = (open>close) and ((close-low)<=(0.33*(high-low))) and ((high-open)<=0.05*(high-low))
  13. Ihammer = (open>close) and ((close-low)<=(0.25*(high-low))) and ((high-low)>=0.0014*(close)) and (high-open)>=0.45*(high-low)
  14. Ihammer2 = (close<open[1]) and (close[1]>open[1]) and ((close-Low)<=(0.25*(High-Low))) and ((High-Low)>=0.0015*(low)) and (High-open[1])>=0.45*(High-Low)
  15. plotshape(Hammer==true or Hammer2==true, location=location.belowbar, text="BUY", textcolor=color.white, style=shape.arrowup, size=size.huge, color=color.green)
  16. plotshape(Ihammer==true or Ihammer2==true , location=location.abovebar, text="SELL", textcolor=color.white, style=shape.arrowdown, size=size.huge, color=color.red)
  17. //plotshape(buy==true , location=location.belowbar, text="BUY", textcolor=color.white, style=shape.arrowup, size=size.huge, color=color.green)
  18. //plotshape(sell==true , location=location.abovebar, text="SELL", textcolor=color.white, style=shape.arrowdown, size=size.huge, color=color.red)
  19.  
  20. //plot(shortest, color = white)
  21. //plot(short, color = green)
  22. //plot(sl , color = white)
  23. //plot(longer,color = yellow)
  24. //plot(longest, color = red)
  25.  
Advertisement
Add Comment
Please, Sign In to add comment