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

Re: [amibroker] Performance



PureBytes Links

Trading Reference Links

Hi Dick, try this snippet. Insted of C (ie. the close price) you
can also set the "basis" below to a moving average (f.e. EMA)..:

/*
PERF3.AFL
Displays performance in % of 
the last 1, 5, and 30 days (or bars)
Written by anty3de on Oct 14, 2002
Usage: load into AA and press EXPLORE
*/

basis = C; // ema(C, 9);

perf1 = basis / Ref(basis, -1) * 100 - 100;
perf5 = basis / Ref(basis, -5) * 100 - 100;
perf30 = basis / Ref(basis, -30) * 100 - 100;

AddColumn(perf1, "perf1%", 1.2);
AddColumn(perf5, "perf5%", 1.2);
AddColumn(perf30, "perf30%", 1.2);

Filter = 1; // dummy




----- Original Message ----- 
From: "drlblast" <hoierman@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, October 14, 2002 6:18 PM
Subject: [amibroker] Performance


I'm wondering if anyone out there has developed a performance type 
Scan or Exploration that will go through the database (mine is of 
6600 stocks) and calculate their % movement up or down on a 1 day - 
5day and 30 day basis. Results would appear in colums " 1-day, 5-day, 
and 30-day. If so would appreciate the code for such a program. 
Thanks.

R.E.(Dick) Hoierman