PureBytes Links
Trading Reference Links
|
Brian,
What is a "touch" ?
Is it a cross, a real touch or an approximate touch ?
The real touch is quite rare, C should be exactly equal to the LINE
value.
The accumulated crosses are
Cum(Cross(C,LINE) + Cross(LINE,C))
A true "touch" would require C==LINE and this is quite rare to occur.
Anyway, the accumulated touches would be Cum(C==LINE).
Another, more realistic idea of touch is the C "near" the LINE.
You could define "near" [less than 1% or less than 0.1% etc] and then
add these generalized touches.
PERC=0.01;
near=C<(1+PERC)*LINE AND C>(1-PERC)*LINE;
touches=Cum(near);
Dimitris
--- In amibroker@xxxxxxxxxxxxxxx, "Brian" <cadvantag@xxxx> wrote:
>
> Can it be possible to code for the # of times that price touches a
> trendline (support or resistance)- either a afl code trendline or a
> manually drawn trendline?
>
> Thanks in Advance!
> Brian
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|