SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus -- Ignore unavailable to you. Want to Upgrade?


To: sean sanders who wrote (9806)7/17/1999 12:31:00 AM
From: Bob Jagow  Read Replies (2) | Respond to of 11149
 
I don't have one at hand, Sean.
The TF+ definition is
---------------
Hammer. This one-day formation consists of a
small body with little or no upper shadow, and a
lower shadow that is twice the length of the body.
The lowest value of the body is a three-day low.
In a downtrend, the formation signals a rally. The
length must be less than the parameter &1.
---
Their code to implement this is
---
(&1>(C-O)U0)*(((C#O)-L)>((C-O)U0*2))*(H<(C%O)+
0.03)*(L<LY1N3)
---
which I've split up and commented in psuedocode as
---
if (&1>(C-O)U0) // abs(C-O) < input
and (((C#O)-L)>((C-O)U0*2)) // (min of C,O)-L)> abs(C-O)
and (H<(C%O)+ 0.03) // H < ((max of C,O) +0.03)
and (L<LY1N3) // L < min(bar-1,bar-4,lo)
then
---
where you will have to code the min of and max of with if statements. One way would be
---
top := bottom; // test later for doji
if open(bar) > close(bar) then
top := open(bar); bottom := close(bar);
else if open(bar) < close(bar) then
top := close(bar); bottom := open(bar);
endif;
...
---
Sounds like a reason for switching to TF+ :-)

Bob