Can anyone please help me arrange this code so that it shows the opposite of a hammer/hanging man... which I guess would be a shooting star or inverted hammer? My goal is to create an indicator that will show me when a candle has formed that has a small body and upper tail, with no or hardly any lower tail. Basically exactly what the hammer show me indicator does - except the opposite. Any help would be much appreciated. -Chance.
{ Candlestick ShowMe }
inputs: Length( 14 ), Factor( 2 ) ;
variables: oHammer( 0 ), oHangingMan( 0 ) ;
Value1 = C_Hammer_HangingMan( Length, Factor, oHammer, oHangingMan ) ;
if oHammer = 1 then
begin
Plot1( High, "Hammer" ) ;
Alert( "Hammer" ) ;
end
else if oHangingMan = 1 then
begin
Plot2( Low, "HangMan" ) ;
Alert( "HangingMan" ) ;
end ;
help with inverted hammer indicator?
Moderator: moderators
-
- rank: <50 posts
- Posts: 23
- Joined: Sat Jun 17, 2006 3:52 am
- Reputation: 0
- Gender:
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
Chancee,
Likely you haven't gotten responses bcse your requirements aren't as defined as you might first assume. I suggest you create an EL function (with a different name but using same C_ naming conventions) using the following code as a template
edit the logic in the condition
if Body < BodyAvg { BODY SMALL } and
Body > 0{ ...BUT NOT ZERO... } and
BodyLo > MedianPrice{ ...AND IN UPPER HALF OF RANGE }and
BodyLo - Low > Factor * Body { LOWER SHADOW MUCH LARGER THAN BODY } and
High - BodyHi < Body { UPPER SHADOW SMALLER THAN BODY }
to do what you want it to do
(ie the <'s change to > and/or BodyHi's change to BodyLo, etc )
then use the 'hanging man' showme as a template to create a new show me and call your new function in it...
hth
Likely you haven't gotten responses bcse your requirements aren't as defined as you might first assume. I suggest you create an EL function (with a different name but using same C_ naming conventions) using the following code as a template
Code: Select all
inputs:
Length( numericsimple ),
Factor( numericsimple ),
oHammer( numericref ),
oHangingMan( numericref ) ;
variables:
BodyHi( 0 ),
BodyLo( 0 ),
Body( 0 ),
PriceAvg( 0 ),
BodyAvg( 0 ) ;
BodyHi = MaxList( Close, Open ) ;
BodyLo = MinList( Close, Open ) ;
Body = BodyHi - BodyLo ;
PriceAvg = XAverage( Close, Length ) ;
BodyAvg = XAverage( Body, Length ) ;
oHammer = 0 ;
oHangingMan = 0 ;
if Body < BodyAvg
{ BODY SMALL }
and Body > 0
{ ...BUT NOT ZERO... }
and BodyLo > MedianPrice
{ ...AND IN UPPER HALF OF RANGE }
and BodyLo - Low > Factor * Body
{ LOWER SHADOW MUCH LARGER THAN BODY }
and High - BodyHi < Body
{ UPPER SHADOW SMALLER THAN BODY }
then
if Close < PriceAvg then
{ TREND IS down }
oHammer = 1
else if Close > PriceAvg then
{ TREND IS up }
oHangingMan = 1 ;
C_Hammer_HangingMan = 1 ;
edit the logic in the condition
if Body < BodyAvg { BODY SMALL } and
Body > 0{ ...BUT NOT ZERO... } and
BodyLo > MedianPrice{ ...AND IN UPPER HALF OF RANGE }and
BodyLo - Low > Factor * Body { LOWER SHADOW MUCH LARGER THAN BODY } and
High - BodyHi < Body { UPPER SHADOW SMALLER THAN BODY }
to do what you want it to do
(ie the <'s change to > and/or BodyHi's change to BodyLo, etc )
then use the 'hanging man' showme as a template to create a new show me and call your new function in it...
hth
-
- rank: <50 posts
- Posts: 23
- Joined: Sat Jun 17, 2006 3:52 am
- Reputation: 0
- Gender:
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.