Hi You need to load more days in the scan.
The ema calculation uses a piece of the previous days calculation, so that the calculation is somewhat dependant on the number of days used to calculate the ema. See the DaysToLoad section in the help file for more info. You will also need to add a DaysRequired statement. For example: DaysToLoad = 500; DaysRequired = 300; Best regards, Gary ----- Original Message ----- From: orrincsjr To: [email protected] Sent: Wednesday, March 22, 2006 1:21 AM Subject: [quotes-plus] Problem with Scan using EMAs I am attempting to detect a crossover when the 20 day EMA goes above the 50 day EMA. Sometimes the results include a stock that fulfilled that requirement days and days ago. Obviously, that is not a valid result. The code I wrote is: // The 20 day moving average has crossed over the 50 day moving average output="20_Over_50macross.lst"; if EMovAvg(0,20,cl) > EMovAvg(0,50,cl) and // The 20 day MA is above the 50 day ma today EMovAvg(-1,20,cl) < EMovAvg(-1,50,cl) and // The 20 Day MA was below the 50 day ma yesterday Close(0) >= 25 and // At least a 25 dollar stock AvgVol(0,-29) >= 250000 then // The average volume is at least 250,000 shares println symbol,",",description; endif; SPONSORED LINKS Investment management software Real estate investment software Investment property software Real estate investment analysis software Investment software Investment analysis software ------------------------------------------------------------------------------ YAHOO! GROUPS LINKS a.. Visit your group "quotes-plus" on the web. b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ------------------------------------------------------------------------------ [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/quotes-plus/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
