Subject: Re: My new Program
lizgdal,

1. For each stock, calculate the ratio of the current price to the highest price over the previous 251 market days.


I hate to be so dense but this whole calculation is not about a bunch of stocks. I am trying to do a calculation based on a single stock (SPY) on a single date. I can calculate PriceToHighPriceRatio for SPY on a given date and I can decide whether to give B a value of 0 or 1 but that gives me one B value. There is nothing for me to sum up unless I take the previous date and calculate a second B value based on that date and the high price on the previous 251 days. Then do that again for all 251 previous days thus ending up with 251 B values to sum up. Is that what Robbie is doing?

Larry