Hammer, Hanging man, Shooting star, Inverted hammer Indicators

This script creates Hammer , Hanging man , Shooting star , Inverted hammer chart indicators.
RED + CROSS = Sell
Favori Komutlardan Çıkart Favori Komutlara Ekle
study("Hammer and Hanging man", overlay=true)

high_h = high[1]
low_h = low[1]
open_h = open[1]
close_h = close[1]

shadow_h = high_h - low_h
body_h = abs(open_h - close_h)
bodyMid_h = 0.5 * (open_h + close_h) - low_h

shadow = high - low
body = abs(open - close)
bodyMid = 0.5 * (open + close) - low
bodyRed = open > close and body > (0.3 * shadow)
bodyGreen = close > open and body > (0.3 * shadow)

bodyTop =  bodyMid_h > (0.7 * shadow_h)
bodyBottom =  bodyMid_h < (0.3 * shadow_h)
hammerShape = body_h < (0.5 * shadow_h)

hangingMan = bodyRed and hammerShape and bodyTop ? high_h : na
hammer = bodyGreen and hammerShape and bodyTop ? high_h : na

shootingStar = bodyRed and hammerShape and bodyBottom ? low_h : na
invertedHammer = bodyGreen and hammerShape and bodyBottom ? low_h : na

plot( hangingMan  , title="Hanging man", style=cross, linewidth=10,color=red, transp=95, offset = -1)
plot( hammer  , title="Hammer", style=circles, linewidth=10,color=green, transp=95, offset = -1)

plot( shootingStar  , title="Shooting star", style=cross, linewidth=10,color=red, transp=95, offset = -1)
plot( invertedHammer  , title="Inverted hammer", style=circles, linewidth=10,color=green, transp=95, offset = -1)


i experience the smaller TF=the better signals esp. on 5,3,1 min.TF . Thanks and compliment for such piorneering script that you had been trying since 2014! It is interesting to watch +experiment at which Candle which of the 4 Behaviour of your script will be triggered ! . Really Great Job u well done .
Cevap Gönder
Hi guys
I didn't touched this code for several years :(
Sorry ..

Dov Caspi
Cevap Gönder
@DovCaspi First of all, great script. Clean and very useful. I was wondering if you were able to setup alert when the indicator triggers hammer, hanging man, etc?
Cevap Gönder
Does it still lag?
I have read some old comments from 2014-15.
I hope this code is updated and it doesn't lag anymore as it did some years ago.
Please tell me if it lags one candle or one bar.
+2 Cevap Gönder
clean simple usefull. tnx
Cevap Gönder
How to use this script. Can it be used on this platform or any other platform
+1 Cevap Gönder
@DovCaspi isnt there a mistake here : shadow_h = high_h - low_h ?

I think shadow should be define in two ways : upper shadow = high_h - max(open_h,close_h) and lower shadow = min(open_h,close_h)-low_h

I tweak the indicator and I see much better hammers ;)
+9 Cevap Gönder
I must have got it wrong because when I write down your script

upper shadow = high_h - max(open_h,close_h)
lower shadow = min(open_h,close_h)-low_h
body_h = abs(open_h - close_h)
bodyMid_h = 0.5 * (open_h + close_h) - low_h

instead of

shadow_h = high_h - low_h
body_h = abs(open_h - close_h)
bodyMid_h = 0.5 * (open_h + close_h) - low_h

Pine says
Script could not be translated from: |B|upper shadow = high_h
+4 Cevap Gönder
It lags because it uses confirmation. if bearish signal, indicator checkout that next candle is red. if bullish signal ( eg hammer ) indicators checks for next candle = green ;)
+4 Cevap Gönder
yolo12 PaulMir
@PaulMir, So its only useful for actually learning what the candles look like, something you can do on on a website.
All in all a completely useless indicator.
+1 Cevap Gönder
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Nasıl Çalışır Grafik Özellikleri Ücretlendirme Tanıdık yönlendirme Kurallarımız Destek Merkezi Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Grafik Çözümleri Hafif Grafik Kitaplığı Blog ve Haberler Twitter
Profil Profil Ayarları Hesap ve Ödemeler Tanıdık yönlendirme Destek Kayıtlarım Destek Merkezi Yayınlanmış Fikirler Takip Edenler Takip ediliyor Özel Mesajlar Sohbet Çıkış