![]() |
#1 |
Участник
|
dax-lessons: Stock Market Anlaysis(DOW JONES) using X++
Источник: http://DAX-Lessons.spaces.live.com/B...FCD1!147.entry
============== As a commodities trader, I've never lost my fascination for the markets. This job will download historical trading data from Yahoo Finance for any valid specified date range and issue symbol, including indexes such as the Dow Industrials Average (that's "^DJI" with Yahoo). URL Used : http://finance.yahoo.com/q/hp?s=IBM&...&g=d&z=66&y=66 * s - ticker symbol( MSFT - Microsoft, IBM etc) * a - start month * b - start day * c - start year * d - end month * e - end day * f - end year * g - resolution (e.g. 'd' is daily, 'w' is weekly, 'm' is monthly) * y is the offset (cursor) from the start date * z is the number of results to return starting at the cursor (66 maximum, apparently) Here is the Job: X++: static void StockMarket_Analysis(Args _args) { System.Net.WebClient web = new System.Net.WebClient(); TextBuffer txtBuffer = new TextBuffer(); str result; container recordContainer, fieldContainer; str stockContent; int i; FileName nameOfTheFile; str tmpContent; str urlQuery = @"http://ichart.finance.yahoo.com/table.csv?s=MSFT&a=00&b=2&c=2007&d=04&e=8&f=2008&g=d&ignore=.csv"; CCHTMLString htmlString; CCHTMLString formHTML(Container hmtlContainer, int tmp = 0) { CCHTMLString html; int h; str start_td_th; str end_td_th; str value; ; if (tmp == 1) { start_td_th = @""; end_td_th = @''; } else { start_td_th = @""; end_td_th = @''; } html += ''; for (h = 1; h
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|