PureBytes Links
Trading Reference Links
|
Thanks Ed,
Mike
----- Original Message -----
Sent: Thursday, March 03, 2005 3:50
AM
Subject: Re: [amibroker] Help with Trend
Continuation Factor from S&C Bonus Issue
hi,
I don't think you need loops for this, see
below,
rgds, Ed
per = 35;
tt = Sum(IIf(C > Ref(C,-1),C - Ref(C,-1),0),per); uu = Sum(IIf(C
< Ref(C,-1),C - Ref(C,-1),0),per);
Plot(tt,"Sum up days over 35 day
period",colorWhite,1);
Plot(uu,"Sum down days over 35 day period",colorGreen,1);
----- Original Message -----
Sent: Thursday, March 03, 2005 11:13
AM
Subject: [amibroker] Help with Trend
Continuation Factor from S&C Bonus Issue
I'd like to code the TCF presented in this issue and
need to sum the gains on positive days for the last 35 days, and the
same for the negative days out of the last 35 days.
I tried the
following code for the positive days, but system indicates I have
created endless do loop......... can someone offer a suggestion.
Thank you so much..... Mike
for( i = 0; i < 35; i++) {
TP = IIf ( i=0, 0,
IIf(Ref(C,-i)>Ref(C,-(i+1)),
Ref(C,-i)-Ref (C,-(i+1)),0));
}
Plot
(TP,"TP",colorWhite,styleHistogram);
Check
AmiBroker web page at: http://www.amibroker.com/
Check
group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Check AmiBroker web page at: http://www.amibroker.com/
Check
group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor |
ADVERTISEMENT
| |
|
Yahoo! Groups Links
|
|