Hello everyone:),

I've a question not related to the contest but i hope anyone to help me..
I'm working on a software that makes analysis to forex-signals,and after 
analysis i got two curves and  a dictionary that contains the intersection 
points between these curves and whether these poinst is sell or buy points  ,
the data inside the dictionary like this:

"7/24/2002 12:00:00 AM"     " Buy"
"8/24/2002 12:00:00 AM"     " Sell"
"9/15/2002 12:00:00 AM"     " Buy"
"10/1/2002 12:00:00 AM"     " Buy"
"12/1/2002 12:00:00 AM"     " Buy"

i need to parse this dictionary to get the start and the end date of each 
period (i.e. as the above example i need to get:

 Buy Period from "7/24/2002 12:00:00 AM" to "8/24/2002 12:00:00 AM" ;
sell period from "8/24/2002 12:00:00 AM" to "9/15/2002 12:00:00 AM" ;
buy period from "9/15/2002 12:00:00 AM" to "12/1/2002 12:00:00 AM" 

My code:

float[] SSMA = new float[(index_price.Count)];
float[] LSMA = new float[(index_price.Count)];
 Dictionary<string, string> Periods = new Dictionary<string, string>();
object item=null;


                for (int y = 0; y < LSMA.Length; y++)
                {
                    for (int x = (nl - 1); x < SSMA.Length; x++)
                    {
                        if (SSMA[x] < LSMA[y])
                        {

                            while (SSMA[x] < LSMA[y])
                            {
                                item = LSMA_date.ElementAt(x).Key;
                            }
                            Periods.Add(item.ToString(), "Sell");
                        }
                        else if (SSMA[x] > LSMA[y])
                        {
                            while (SSMA[x] > LSMA[y])
                            {
                                item = LSMA_date.ElementAt(x).Key;
                            }
                            Periods.Add(item.ToString(), "Buy");
                        }

                    }
                }
put i got emty dictionary("period"),so how to solve this problem !!!!!

Regards,
 Hagar Ibrahim Aly





      

-- 
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to