[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Help


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: Re: [amibroker] Help
  • From: Nigel Rowe <rho@xxxxxxxxxxx>
  • Date: Thu, 25 Dec 2003 20:30:05 -0800
  • In-reply-to: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAHiNWvlX4zUKaLpAfyBdF9sKAAAAQAAAA/WEGm3VCb0OhBSoOFL5LyQEAAAAA@sbcglobal.net>

PureBytes Links

Trading Reference Links

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Assuming by up day you mean Close>Open,

periods = 21;  // substitute as required
NumUp = Sum(Close>Open, periods);
PercUp = NumUp/periods * 100;

If you mean an up day is todays close > yesterdays close, change the 2nd line 
to

NumUp = Sum(Close>ref(Close,-1), periods);

Your welcome,
	Nigel

On Fri, 26 Dec 2003 15:18, larypowell wrote:
> I would like an indicator that measures the % of UP days over the last X
> days.  I have been looking at existing AFL codes looking for help, I am not
> even sure how to write it, any ideas would be appreciated.
>
> Thanks,
>
> Larry M. Powell
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/67k1BbmcM2pfckkRAqWuAKDqFXT0BFByw5u0Y0ffdSirxDRGYACeL7CY
92J7MZqmekk2vTo64bdz/Mw=
=5J02
-----END PGP SIGNATURE-----


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/