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

Re: [amibroker] newbie scan question



PureBytes Links

Trading Reference Links

Tibor,
Try the following code.  
Copy and paste the code into automatic analysis.  Be very careful
about word wrap.  If you get errors in attempting to run the code,
word wrap is probably the problem.
***************Start of
Code**********************************************************
// Newbie
Question

//  Count the number of days the stock
gained over $2.00 in last period
//  Set the period for one year
period =
256;//User
adjustable
//  Set the condition 
Over2 =
IIf(C
-
Ref(C,-1)
>=2,1,0);//
Places a "flag" on date condition met
//  Count those flags for the
period
CountOver2 =
Sum(Over2,period);//
Adds the flag days

//  Price momentum over the last
user-set "shortperiod" number of days
Shortperiod =
3;//User
adjustable
//  Now the momentum
Momentum =
C -
Ref(C,-Shortperiod);

//  Flag the days where volume
has increased each day for the past three days
VolumeFlag =
IIf(V
>
Ref(V,-1)
AND
Ref(V,-1) > Ref(V,-2) AND Ref(V,-2) > Ref(V,-3),1,0);

Filter = VolumeFlag AND CountOver2 > 0;// Only display stock where volume increasing and had some days with count over 0

//  Now display the stocks in Automatic Analysis
AddColumn(C,"Close",1.2);// What is the closing price of a stock
AddColumn(CountOver2,"#Days > $2.00",1.0);
AddColumn(Momentum,"Momentum",1.2);

/* In Automatic Analysis, select "All Stocks" or define your "use Filter" and select that.
Select "n last quotations" and place a 1 in the n= box.
Run the "Explore".
To find the stocks with the most # of Days >= $2.00, double click to sort that column.  The little blue arrow should be pointing down at this point.
*/
**************End of Code**************************************

If you have any questions, let me know.
Enjoy the Amibroker experience!
Frank


At 05:57 PM 4/30/02 +0000, you wrote:
>HELLO  GROUP
>AND TOMASZ JANECZKO
>
>
>SORRY FOR THE CONSTANT SCAN QUESTIONS BUT I GUESS YOU NEVER LEARN IF 
>YOU DONT ASK QUESTIONS  ANY WAY THIS ONE SEEMS LIKE A TOUGH ONE
>
>FIND STOCKS THE PAST YEAR OR TWO THAT HAVE GAINS OF TWO DOLLARS OR 
>MORE EACH DAY AND RANK THE STOCK ACCORDING TO THE MOST $2  GAINS EACH 
>DAY   THEN  SCAN WHICH OF THOSE STOCKS HAVE THE MOST PRICE  MOMENTUM  
>THE PAST FEW DAYS  WITH INCREASING VOLUME 
>
>THIS IS SUCH GREAT SOFTWARE  I JUST WISH I COULD MASTER THE AFL 
>LANGUAGE AND PROGRAMING BUT AS ALL WORTHWHILE THINGS IN LIFE THIS 
>WILL TAKE TIME
>
>THERE IS A WEBSITE CALLED ELITE TRADER DOT COM  WHERE SOFTWARE USERS 
>GIVE INPUT ON CERTAIN TRADING SOFTWARE UNFORTUNATELY THIS SOFTWARE 
>ISNT ON THE LIST WE NEED TO PUT IT THERE AND GIVE TOMASZ MORE BUSINESS
>
>THANKS IN ADVANCE
>TIBOR
>
>
>
>------------------------ Yahoo! Groups Sponsor ---------------------~-->
>Buy Stock for $4
>and no minimums.
>FREE Money 2002.
>http://us.click.yahoo.com/k6cvND/n97DAA/ySSFAA/GHeqlB/TM
>---------------------------------------------------------------------~->
>
> 
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
>