Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © gshedge63
- //@version=4
- study(title="The Ganesh", overlay=true)
- High = max(high,high[1])
- Low = min(low,low[1])
- //buy = (close>open) and ((high-close)<=(0.33*(high-low))) and ((open-low)<=0.05*(high-low))
- Hammer = (close>open) and ((high-close)<=(0.25*(high-low))) and ((high-low)>=0.0014*(close)) and (open-low)>=0.45*(high-low)
- 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)
- //sell = (open>close) and ((close-low)<=(0.33*(high-low))) and ((high-open)<=0.05*(high-low))
- Ihammer = (open>close) and ((close-low)<=(0.25*(high-low))) and ((high-low)>=0.0014*(close)) and (high-open)>=0.45*(high-low)
- 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)
- plotshape(Hammer==true or Hammer2==true, location=location.belowbar, text="BUY", textcolor=color.white, style=shape.arrowup, size=size.huge, color=color.green)
- plotshape(Ihammer==true or Ihammer2==true , location=location.abovebar, text="SELL", textcolor=color.white, style=shape.arrowdown, size=size.huge, color=color.red)
- //plotshape(buy==true , location=location.belowbar, text="BUY", textcolor=color.white, style=shape.arrowup, size=size.huge, color=color.green)
- //plotshape(sell==true , location=location.abovebar, text="SELL", textcolor=color.white, style=shape.arrowdown, size=size.huge, color=color.red)
- //plot(shortest, color = white)
- //plot(short, color = green)
- //plot(sl , color = white)
- //plot(longer,color = yellow)
- //plot(longest, color = red)
Advertisement
Add Comment
Please, Sign In to add comment