AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.04.2008, 13:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,487 / 846 (79) +++++++
Регистрация: 28.10.2006
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, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dax-lessons: Generate XML Documentation Files for a project - DAX 2009 Blog bot DAX Blogs 0 08.08.2008 19:06
dax-lessons: Create Outlook Appointment or Meeting Request using X++ Blog bot DAX Blogs 0 30.04.2008 23:07
dax-lessons: Problem when creating a dynamic form with ActiveX control & Solution :) Blog bot DAX Blogs 0 30.04.2008 16:05
dax-lessons: How to write a message to the Event Log Blog bot DAX Blogs 2 04.04.2008 10:18
dax-lessons: Active directory in Axapta Blog bot DAX Blogs 0 27.08.2007 23:00

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:52.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.