PureBytes Links
Trading Reference Links
|
G'day all,
I've been using the Ichimoku indicator (from Files section on yahoogroup
site) and doing some backtesting. But, the following line was brought to
my attention : DL = Ref(C, 25); Doesn't this reference the future??? I
would say yes. However, upon further investigation I found the following
comments and code in AmiBroker Tips Issue 3/2001:
********
OK. This sounds a little bit complicated, but in fact the whole
algorithm is not difficult at all. An ichimoku chart consists of:
1. the standard line calculated as one half of the sum of highest
high and lowest low price over past 26 days
2. the turning line calculated as one half of the sum of highest high
and lowest low price over past 9 days
3. the delayed line which is close price shifted 25 days prior to today
4. the first preceding span line which is calculated as the average
of standard line and turning line and then shifted 25 days ahead
of today
5. the second preceding span line which is calculated as the average
of highest high and lowest low prices over past 52 days and then
shifted 26 days ahead of today
Implementing above rules in AFL gives the following formula:
|SL = ( HHV( H, 26 ) + LLV( L, 26) )/2;
TL = ( HHV( H, 9 ) + LLV( L, 9 ) )/2;
DL = Ref( C, 25 );
Span1 = Ref( ( SL + TL )/2, -25 );
Span2 = Ref( (HHV( H, 52) + LLV(L, 52))/2, -25);
|
||****************
And further in the code it is used as a test condition thusly:
C<Ref(DL,-26)
So, what it correct?? Is it ok to reference the future as DL has
above as long as DL is not used as a value on it's own??
To say that I am slightly confused would be an understatement! :-)
Thanks,
Andrew.
P.S. This ties in to my previous post about plotting periods ahead
and behind...
|
|
|
|
||
------------------------ Yahoo! Groups Sponsor --------------------~-->
Put more honey in your pocket. (money matters made easy).
http://us.click.yahoo.com/r7D80C/dlQLAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|