|
Gilari Decosta
2012-08-17 10:12:26
|
|
Sir,
I want ot modify following script ,downloaded from the forum of QS,such that I can APPEND the quote of today to my database.I have managed to do same but
I have to modify date of today manually.
Please give me code to get today's date in th code STRING B = "17/08/2012"
The partially modified version of code is as follow
string path = "F:\\QS-Object\\nse";
Symbol[] symbols = Symbols.GetSymbols();
String b = "01/08/2012"
for(int i=0;i < symbols.Length;i++)
{
Symbol sym = symbols[i];
HistoricalQuotes quotes = Quotes.GetHistoricalQuotes(sym.Name);
System.Text.StringBuilder builder = new System.Text.StringBuilder("");
for(int j=0;j < quotes.Close.Length;j++)
{
if (b = quotes.Date[j].ToString("ddmmyy")
string line = quotes.Date[j].ToString("ddmmyy") + ","+ quotes.Open[j] + "," + quotes.High[j] + "," + quotes.Low[j] + "," + quotes.Close[j] + "," + quotes.Volume[j];
builder.AppendLine(line);
}
System.IO.File.AppendText(path + "\\" + sym.Name + ".txt", builder.ToString());
Thanking You
Gilari
|
|