From Help online: DaysToLoad (number of days) The DaysToLoad function is used with the EMovAvg (exponential moving average) function and the MACD (Moving Average Convergence Divergence) function. DaysToLoad lets you specify how many days of data will be used in calculating the exponential moving average. For the MACD, it lets you specify how many days of data are used in the underlying EMAs (an MACD, is the difference between two EMAs.)
By default, Quotes Plus uses data from the minimum number of days necessary to satisfy an EMA request. For example, if you specified today's 20-day EMAof the closing cost _EMovAvg(0,20,cl) _ Quotes Plus uses 20 days worth of data in the calculation. DaysToLoad lets you set a larger number of days to be used. This statement is needed because the EMA and MACD indicators are cumulative in nature; their value depends on the number of days used to calculate it. For example, using 20 days of price history to calculate a 20-day EMA will give a different result than using 200 days of price history to calculate the 20-day EMA.
This will result in an EMA value that does not match the value displayed in the Display Charts program. If you want your scans to reflect what is on the screen, use a DaysToLoad value of 200 or more. Example: DaysToLoad=500
if EMovAvg(0,30,cl)>40 then println symbol endif
Quotes Plus calculates the EMA for the this scan over 500 days.
QTREPS(qtr) QTREPS(quarter#)
Returns the earnings per share, in dollars, for the specified quarter. Data on the 12 most recent quarters are kept in the database.
QTREPS(0) specified the most recent quarter; QTREPS(-1) is the quarter before the most recent; QTREPS(-11) is the oldest quarter available.
Example
Output = "mylist" if QTREPS(0) > 3.0 then println symbol endif |