DovCaspi

Hammer, Hanging man, Shooting star, Inverted hammer Indicators

This script creates Hammer, Hanging man, Shooting star, Inverted hammer chart indicators.
RED + CROSS = Sell
GREEN + DOT = Buy
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
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)