FINANCIAL CHRONICLE™
Dear Reader,

Registration with the Sri Lanka FINANCIAL CHRONICLE™️ would enable you to enjoy an array of other services such as Member Rankings, User Groups, Own Posts & Profile, Exclusive Research, Live Chat Box etc..

All information contained in this forum is subject to Disclaimer Notice published.


Thank You
FINANCIAL CHRONICLE™️
www.srilankachronicle.com


Join the forum, it's quick and easy

FINANCIAL CHRONICLE™
Dear Reader,

Registration with the Sri Lanka FINANCIAL CHRONICLE™️ would enable you to enjoy an array of other services such as Member Rankings, User Groups, Own Posts & Profile, Exclusive Research, Live Chat Box etc..

All information contained in this forum is subject to Disclaimer Notice published.


Thank You
FINANCIAL CHRONICLE™️
www.srilankachronicle.com
FINANCIAL CHRONICLE™
Would you like to react to this message? Create an account in a few clicks or log in to continue.
FINANCIAL CHRONICLE™

Encyclopedia of Latest news, reviews, discussions and analysis of stock market and investment opportunities in Sri Lanka

Click Link to get instant AI answers to all business queries.
Click Link to find latest Economic Outlook of Sri Lanka
Click Link to view latest Research and Analysis of the key Sectors and Industries of Sri Lanka
Worried about Paying Taxes? Click Link to find answers to all your Tax related matters
Do you have a legal issues? Find instant answers to all Sri Lanka Legal queries. Click Link
Latest images

Latest topics

» LOLC FINANCE PLC (LOFC.N0000)
by Equity Win Today at 2:17 pm

» SRI LANKA TELECOM PLC (SLTL.N0000)
by sureshot Today at 7:42 am

» Construction Sector Boom with Purchasing manager's indices
by rukshan1234 Yesterday at 11:24 pm

» Asha Securities and Asia Securities Target AEL (Access Enginnering PLC )
by Anushka Perz Wed Apr 17, 2024 10:30 pm

» Sri Lanka: China EXIM Bank Debt Moratorium to End in April 2024
by DeepFreakingValue Tue Apr 16, 2024 11:22 pm

» Uncertainty over impending elections could risk Lanka’s economic recovery: ADB
by God Father Tue Apr 16, 2024 2:47 pm

» Sri Lanka's Debt Restructuring Hits Roadblock with Bondholders
by God Father Tue Apr 16, 2024 2:42 pm

» BROWN'S INVESTMENTS SHOULD CONSIDER BUYING BITCOIN
by ADVENTUS Mon Apr 15, 2024 12:48 pm

» Bank run leading the way in 2024
by bkasun Sun Apr 14, 2024 3:21 pm

» ACCESS ENGINEERING PLC (AEL) Will pass IPO Price of Rs 25 ?????
by blindhog Thu Apr 11, 2024 10:44 am

» ASPI: Undoing GR/Covid19!
by DeepFreakingValue Thu Apr 11, 2024 10:25 am

» Learn CSE Rules and Regulations with the help of AI Assistant
by ChatGPT Tue Apr 09, 2024 7:47 am

» Top AI tools in Sri Lanka
by ChatGPT Tue Apr 09, 2024 7:21 am

» HDFC- Best ever profit reported in 2023
by ApolloCSE Mon Apr 08, 2024 12:43 pm

» WAPO 200% UP
by LAMDA Sun Apr 07, 2024 10:41 pm

» KEGALLE PLANTATIONS PLC (KGAL.N0000)
by DeepFreakingValue Fri Apr 05, 2024 2:04 pm

» ARPICO INSURANCE PLC - Reports LKR 625mn loss for the FY2023
by DeepFreakingValue Fri Apr 05, 2024 12:58 pm

» EXTERMINATORS PLC (EXT.N0000)
by ErangaDS Fri Apr 05, 2024 10:59 am

» ALLIANCE FINANCE COMPANY PLC (ALLI.N0000)
by SL-INVESTOR Fri Apr 05, 2024 8:29 am

» PEOPLE'S INSURANCE PLC (PINS.N0000)
by Anushka Perz Thu Apr 04, 2024 9:50 pm

» PINS (People's Insurance) will be another UAL
by sakuni Thu Apr 04, 2024 8:22 pm

» A New Record Price for One Tonne of Cocoa on the International Market
by ResearchMan Thu Apr 04, 2024 2:03 pm

» Access Engineering awarded two more contract packages at Colombo Port
by samansilva Thu Apr 04, 2024 12:05 pm

» FMCG Sector LMF, MEL and DIST
by buwr Thu Apr 04, 2024 9:35 am

» CEYLON GUARDIAN INVESTMENT TRUST PLC (GUAR)
by soileconomy Thu Apr 04, 2024 3:00 am

LISTED COMPANIES

Submit Post
ශ්‍රී ලංකා මූල්‍ය වංශකථාව - සිංහල
Submit Post


CONATCT US


Send your suggestions and comments

* - required fields

Read FINANCIAL CHRONICLE™ Disclaimer



EXPERT CHRONICLE™

ECONOMIC CHRONICLE

GROSS DOMESTIC PRODUCT (GDP)



CHRONICLE™ YouTube

Disclaimer
FINANCIAL CHRONICLE™ Disclaimer

The information contained in this FINANCIAL CHRONICLE™ have been submitted by third parties directly without any verification by us. The information available in this forum is not researched or purported to be complete description of the subject matter referred to herein. We do not under any circumstances whatsoever guarantee the accuracy and completeness information contained herein. FINANCIAL CHRONICLE™ its blogs, forums, domains, subdomains and/or its affiliates and/or its web masters, administrators or moderators shall not in any way be responsible or liable for loss or damage which any person or party may sustain or incur by relying on the contents of this report and acting directly or indirectly in any manner whatsoever. Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility, FINANCIAL CHRONICLE™ blogs, forums, domains, subdomains and/or its affiliates and/or its web masters, administrators or moderators shall not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information. The information on this website is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.

Further the writers and users shall not induce or attempt to induce another person to trade in securities using this platform (a) by making or publishing any statement or by making any forecast that he knows to be misleading, false or deceptive; (b) by any dishonest concealment of material facts; (c) by the reckless making or publishing, dishonestly or otherwise of any statement or forecast that is misleading, false or deceptive; or (d) by recording or storing in, or by means of, any mechanical, electronic or other device, information that he knows to be false or misleading in a material particular. Any action writers and users take in respect of (a),(b),(c) and (d) above shall be their own responsibility, FINANCIAL CHRONICLE™ its blogs, forums, domains, subdomains and/or its affiliates and/or its web masters, administrators or moderators shall not be liable for any, direct or indirect, consequential or incidental violation of securities laws of any country, damages or loss arising out of the use of this information.


AI Live Chat

You are not connected. Please login or register

CSE EOD Data !

+15
ha_na
krishaja
Genting
twimalasuriya
ssuni
xhora
gayanr600
factFINDER
webhoundx
MoneyLover
smallville
JennyFunny
lokuayya
milanka
CubedSol
19 posters

Go to page : Previous  1, 2, 3, 4  Next

Go down  Message [Page 2 of 4]

41CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Jul 28, 2011 10:05 pm

JennyFunny


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

i can find the ticker names..but it only shows MCI,RSI..;(

42CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Jul 28, 2011 10:13 pm

JennyFunny


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

I can get all other indicators except price graph..

43CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Jul 28, 2011 10:44 pm

webhoundx


Stock Analytic
Stock Analytic

SanjivFund wrote:I can get all other indicators except price graph..

Guess Sanjiv is talking about something like this? Plus my symbols are strange as well. There is a symbol with the name as 7/4/2011!

CSE EOD Data ! - Page 3 Parall10

I'm also having the same issue and thought it;s just me. What I did was deleted my database and copied cubedsol's MyNewData folder to Amibroker folder...
But I must be doing something wrong. Trying to figure out whats going on Question

44CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Jul 28, 2011 11:15 pm

CubedSol


Manager - Equity Analytics
Manager - Equity Analytics

@SANJIV : In my LAST pm , I asked you to do something and without doing that I WONT be able to HELP YOU .
(Screenshots)/

@webhoundx : Yes this DATABASE DOES Contain several ticker entries that are NOT relevant...May be they are NO MORE Listed and YES the entry mentioned ABOVE is an error . But I am doing my trading based on this database and thats it .

You may use this data at your own risk... And the way I see is that you actually DONT need to rely on the data file I upload , Because I have clearly mentioned how to do it yourselves .

Another thing MOST of the answers/Solutions you need can be found on the upper posts/comments , Or else just PM another member who faced the same issue and get some help , Cus I might not have come across all these issues . Exclamation

Also pls refer the AMI Guide by @smallville BEFORE you raise anymore questions .

http://forum.srilankaequity.com/t6823-amibroker-53-guide-for-newbies

PS : If all fails drop me a PM

Thanks 'n' Best Regards,
CubedSol



Last edited by CubedSol on Thu Jul 28, 2011 11:27 pm; edited 1 time in total (Reason for editing : Update the post link to AmiGuide .)

45CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Jul 28, 2011 11:32 pm

webhoundx


Stock Analytic
Stock Analytic

@CubedSol : If by any means my previous post suggested I'm trying to highlight errors in the database, please pardon me.
The reason I uploaded that screenshot and raised a question was due to my pure ignorance on the subject and because I thought I must be doing something wrong to cause those errors.
I really appreciate you spending your own time to upload the database and sharing it with other members. Please pardon me again if I offended you in any way.
Will try what you have suggested about the errors I'm getting...

Thanks
webhoundx

46CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Sat Jul 30, 2011 1:55 pm

CubedSol

CubedSol
Manager - Equity Analytics
Manager - Equity Analytics

NO Worries !!

Updated files containing data until 29/02/2011 are located below .

Database Backup :
RAR : 2.81MB
http://www.4shared.com/file/Mgr2p-rz/MyNewData__Updated_29_07_2011_.html
ZIP : 3.10MB
http://www.4shared.com/file/LeqWcDag/MyNewData__Updated_29_07_2011_.html

CSE DL.xlsm : 320KB
http://www.4shared.com/file/n_xtQ_DW/CSE_DL.html

CSE DL Edited CSV.csv : 106MB
Evil or Very Mad



Last edited by CubedSol on Sat Jul 30, 2011 2:32 pm; edited 2 times in total (Reason for editing : DL Links updated)

47CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Wed Aug 03, 2011 2:11 pm

gayanr600

gayanr600
Equity Analytic
Equity Analytic

webhoundx wrote:
SanjivFund wrote:I can get all other indicators except price graph..

Guess Sanjiv is talking about something like this? Plus my symbols are strange as well. There is a symbol with the name as 7/4/2011!

CSE EOD Data ! - Page 3 Parall10

I'm also having the same issue and thought it;s just me. What I did was deleted my database and copied cubedsol's MyNewData folder to Amibroker folder...
But I must be doing something wrong. Trying to figure out whats going on Question


I had the same problem. So I deleted all error msg displaying area by right click & close.
Then I drew charts by drag and drop from the chart column.
Now it is ok.

48CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Wed Aug 03, 2011 5:36 pm

CubedSol

CubedSol
Manager - Equity Analytics
Manager - Equity Analytics

Updated files containing data until 03/08/2011 are located below .

Database Backup :

RAR : 2.8MB
http://www.4shared.com/file/wlNnyPsl/MyNewData__Updated_03_08_2011_.html

ZIP : 3.2MB
http://www.4shared.com/file/tEh3Eb9m/MyNewData__Updated_03_08_2011_.html

PS - ASPI & MPI updated until 02/08/2011



Last edited by CubedSol on Wed Aug 03, 2011 5:44 pm; edited 1 time in total (Reason for editing : Links changed.)

49CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Wed Aug 03, 2011 6:13 pm

JennyFunny


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

thanks cubes..

50CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Wed Aug 03, 2011 11:04 pm

smallville

smallville
Associate Director - Equity Analytics
Associate Director - Equity Analytics

webhoundx wrote:
SanjivFund wrote:I can get all other indicators except price graph..

Guess Sanjiv is talking about something like this? Plus my symbols are strange as well. There is a symbol with the name as 7/4/2011!

CSE EOD Data ! - Page 3 Parall10

I'm also having the same issue and thought it;s just me. What I did was deleted my database and copied cubedsol's MyNewData folder to Amibroker folder...
But I must be doing something wrong. Trying to figure out whats going on Question

Your image is not clear to me to have a look at the error even..
MAy be u can remove all symbols from the database and reinsert using cubed's database.. Charts can be obtain by double clicking the chart type or drag and drop..

51CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Aug 04, 2011 8:48 am

JennyFunny


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

Guys i managed to sought the problem out..the errors we due to incorrect date format.
This is 4th August 2011,should be inserted as 20110804 (yyyymmdd)

52CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Aug 04, 2011 1:44 pm

gayanr600

gayanr600
Equity Analytic
Equity Analytic

CubedSol wrote:Updated files containing data until 03/08/2011 are located below .

Database Backup :

RAR : 2.8MB
http://www.4shared.com/file/wlNnyPsl/MyNewData__Updated_03_08_2011_.html

ZIP : 3.2MB
http://www.4shared.com/file/tEh3Eb9m/MyNewData__Updated_03_08_2011_.html

PS - ASPI & MPI updated until 02/08/2011

It is much grateful, if you can add the "CSE DL.xlsm" file too.

53CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Aug 04, 2011 11:52 pm

CubedSol

CubedSol
Manager - Equity Analytics
Manager - Equity Analytics

Dear Gayan ,

No worries I've uploaded the file and you may download the same from the below link .

http://www.4shared.com/file/n_xtQ_DW/CSE_DL.html

PS - IMHO , After going through all the above posts from all our fellow members it seems that the reason for all these errors is because EVERYONE is is using their own DB structure... (Eg - DATE format) . So I thout that it'd be better for everyone IF I upload a MIRROR COPY of my DB daily , So that yall can SIMPLY replace your exsisting DB folder with .

54CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Fri Aug 05, 2011 12:08 am

CubedSol

CubedSol
Manager - Equity Analytics
Manager - Equity Analytics

Razz thanks for the -REPS given to me.... Razz

55CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Fri Aug 05, 2011 12:54 am

xhora

xhora
Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

CubedSol wrote:Razz thanks for the -REPS given to me.... Razz

hey keep uploading mate
+ Rep from me

56CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Fri Aug 05, 2011 8:29 am

smallville

smallville
Associate Director - Equity Analytics
Associate Director - Equity Analytics

SanjivFund wrote:Guys i managed to sought the problem out..the errors we due to incorrect date format.
This is 4th August 2011,should be inserted as 20110804 (yyyymmdd)

I've been telling this for many times.. why nobody check it first? Twisted Evil Date format plays a huge role in plotting correct chart movements in Amibroker.. U mess it up u get all ur charts wrong..

Its very easy for me to download the daily file from CSE site and keep uploading it with this 1 minute workout of arranging the fields in Symbol-Date-Open-Hi-low-close-vol and deleting the unnecessary fields.. Its a manual workout daily..Or at least I make sure I download the file and keep it even if I dont update it daily..

Its a great pleasure if someone with programming knowledge with PHP/JS/etc.. can write a script (VB or whatever) to grab the csv file from CSE site and mail it to our mailboxes..

57CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Fri Aug 05, 2011 8:42 am

gayanr600

gayanr600
Equity Analytic
Equity Analytic

Thanx man,
You r doing a great job.
This is my +rep from me.

58CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Fri Aug 05, 2011 9:32 am

JennyFunny


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

ha ha cubes..great uploads thanks for taking the time
+rep from me

59CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Fri Aug 05, 2011 9:33 am

JennyFunny


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

@smallville great idea..can anyone do it?

60CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Sat Aug 06, 2011 11:34 am

CubedSol

CubedSol
Manager - Equity Analytics
Manager - Equity Analytics

Updated files containing data until 05/08/2011 are located below .

Database Backup :

RAR : 2.8MB
http://www.4shared.com/file/U_FuFRaT/MyNewData__Updated_05_08_2011_.html

ZIP : 3.2MB
http://www.4shared.com/file/7VRwBobC/MyNewData__Updated_05_08_2011_.html

CSE DL.xlsm
http://www.4shared.com/file/n_xtQ_DW/CSE_DL.html

PS - ASPI & MPI updated until 05/08/2011

61CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Sat Aug 06, 2011 7:54 pm

ssuni

ssuni
Manager - Equity Analytics
Manager - Equity Analytics

CubedSol wrote:

CSE DL.xlsm
http://www.4shared.com/file/n_xtQ_DW/CSE_DL.html

PS - ASPI & MPI updated until 05/08/2011
thanks cube

62CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Mon Aug 08, 2011 11:16 pm

CubedSol

CubedSol
Manager - Equity Analytics
Manager - Equity Analytics

Updated files containing data until 08/08/2011 are located below .

Database Backup :

RAR : 2.8MB
http://www.4shared.com/file/145vE99m/MyNewData__Updated_08_08_2011_.html

ZIP : 3.2MB
http://www.4shared.com/file/d6lN-rYu/MyNewData__Updated_08_08_2011_.html

CSE DL.xlsm
http://www.4shared.com/file/n_xtQ_DW/CSE_DL.html

PS - ASPI & MPI updated until 05/08/2011

63CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Aug 09, 2011 9:13 am

webhoundx


Stock Analytic
Stock Analytic

Thanks for the upload CubedSol

smallville wrote:
Its a great pleasure if someone with programming knowledge with PHP/JS/etc.. can write a script (VB or whatever) to grab the csv file from CSE site and mail it to our mailboxes..

Currently working on this. I have a made a google spreadsheet that will auto update between 3pm-4pm every weekday with CSE site's CSV data. I was planning to test the process this week and let you guys know... Emailing part I'm currently working on. (A bit hard to find time with work and all Sad )

64CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Aug 09, 2011 9:20 am

JennyFunny


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

thanks..
+rep

65CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Aug 09, 2011 8:22 pm

twimalasuriya

twimalasuriya
Senior Equity Analytic
Senior Equity Analytic

webhoundx wrote:Thanks for the upload CubedSol

smallville wrote:
Its a great pleasure if someone with programming knowledge with PHP/JS/etc.. can write a script (VB or whatever) to grab the csv file from CSE site and mail it to our mailboxes..

Currently working on this. I have a made a google spreadsheet that will auto update between 3pm-4pm every weekday with CSE site's CSV data. I was planning to test the process this week and let you guys know... Emailing part I'm currently working on. (A bit hard to find time with work and all Sad )

Guys.

I have already developed a similar script that run as a cron job ( a scheduler running on linux ) each day (excluding holidays) , download the EOD, data, convert to excel , and then mail it to csereports@googlegroups.com, so the members of the google group get a copy.

I have another script that hourly runs at 10am till 3pm that gives same data, for the owner of http://samueldaniel7.blogspot.com/

If anyone wants I can easily develop a script to send EOD data in metastock format itself.

If anyone is interested I can share my scripts too. Its written in php.

66CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Aug 09, 2011 8:37 pm

twimalasuriya

twimalasuriya
Senior Equity Analytic
Senior Equity Analytic

[quote="smallville"]
SanjivFund wrote:
Its a great pleasure if someone with programming knowledge with PHP/JS/etc.. can write a script (VB or whatever) to grab the csv file from CSE site and mail it to our mailboxes..

@smallville - if you send me a mail to twimalasuriya at gmail dot com, I can add you to the maling list of http://groups.google.com/group/csereports where I already send such a auto generated EOD excel file.

67CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Aug 09, 2011 9:29 pm

webhoundx


Stock Analytic
Stock Analytic

twimalasuriya wrote:
Guys.

I have already developed a similar script that run as a cron job ( a scheduler running on linux ) each day (excluding holidays) , download the EOD, data, convert to excel , and then mail it to csereports@googlegroups.com, so the members of the google group get a copy.

I have another script that hourly runs at 10am till 3pm that gives same data, for the owner of http://samueldaniel7.blogspot.com/

If anyone wants I can easily develop a script to send EOD data in metastock format itself.

If anyone is interested I can share my scripts too. Its written in php.

I was searching for a script but couldn't find anything developed for CSE. That's why I came up with a system of my own.
Anyways great news. Really appreciate you willing to share the sources as well Smile
Now if only we can come up with a system to auto import the data to Ami as well... cheers

68CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Aug 09, 2011 10:04 pm

twimalasuriya

twimalasuriya
Senior Equity Analytic
Senior Equity Analytic

webhoundx wrote:
I was searching for a script but couldn't find anything developed for CSE. That's why I came up with a system of my own.
Anyways great news. Really appreciate you willing to share the sources as well Smile
Now if only we can come up with a system to auto import the data to Ami as well... cheers


I have below files on my host server (3ix), and I run downloadSummary.php as a cron job at 3pm (SL time) to mail this file to me.

By the way, I'm not a php developer but used php for this because its the best suited for the job.

downloadSummary.php

Code:


<?php

require_once ("support_functions.php");

$url = 'http://www.cse.lk/listedcompanies/overview.htm?d-16544-e=2&6578706f7274=1';
$dir = '/home/wimalasu/';
$file_name = 'summary_'.date("Y-m-d").'.tsv' ;
$excel_file_name = 'summary_'.date("Y-m-d").'.xls' ;

if (isholiday() == 0) {

// download tsv
downloadFile($url , $dir , $file_name);


// convert to excel

convertToExcel($dir.$file_name ,$dir.$excel_file_name );

// send it by email.

sendemail($file = $dir.$excel_file_name , 'thiwankaw@gmail.com' , 'cse_summary' , 'application/excel');


}else{

echo 'today is a cse holiday';

}



?>


support_functions.php

Code:


<?php


function sendemail($file,$to,$subject,$contenttype){

// Require Pear Mail Packages
require_once ("/home/wimalasu/php/Mail.php");
require_once ("/home/wimalasu/php/Mail/mime.php");
$recipients  = $to;
// Additional headers
$headers["From"] = 'thiwankaw@gmail.com';
$headers["To"]    = $to;
$headers["Subject"] = $subject;
$crlf = "\n";

$mime = new Mail_mime($crlf);
$mime->addAttachment($file, $contenttype);

$message = $mime->get();
$headers = $mime->headers($headers);
$params["host"]    = 'ssl://smtp.gmail.com';
$params["auth"]    = TRUE; // note: there are *no delimiters*
$params["port"] = 465 ;

// note: there are *no delimiters* for DIGEST-MD5 either.
// If you want to use PLAIN,
// you have to use delimiters like this: 'PLAIN'
// $params["auth"]    = DIGEST-MD5;
$params["username"]    = 'thiwankaw@gmail.com';
$params["password"]    = 'mypassword here because i have to send authenticated email';
//$params["localhost"]= '127.0.0.1';
// Debug so that we see what's happenning for the moment.
$params["debug"]    = "True";
// create the mail object using the Mail::factory method
$mail_message =& Mail::factory('smtp', $params);
$mail_message->send ($recipients, $headers, $message);
}


// this downloads a file to local folder
function downloadFile($url , $dir , $file_name){

    if($file_name == NULL){ $file_name = basename($url);}
    $url_stuff = parse_url($url);
    $port = isset($url_stuff['port']) ? $url_stuff['port'] : 80;

    $fp = fsockopen($url_stuff['host'], $port);
    if(!$fp){ return false;}

    $query  = 'GET ' . $url_stuff['path'] .'?' . $url_stuff['query'] . " HTTP/1.0\n";

    $query .= 'Host: ' . $url_stuff['host'];
    $query .= "\n\n";

    fwrite($fp, $query);

    while ($tmp = fread($fp, 8192))  {
        $buffer .= $tmp;
    }

    preg_match('/Content-Length: ([0-9]+)/', $buffer, $parts);
    $file_binary = substr($buffer, - $parts[1]);
    if($file_name == NULL){
        $temp = explode(".",$url);
        $file_name = $temp[count($temp)-1];
    }
    $file_open = fopen($dir . "/" . $file_name,'w');
    if(!$file_open){ return false;}
    fwrite($file_open,$file_binary);
    fclose($file_open);

}

// check if a given day is a holiday for cse
function isholiday(){

$day_index = date("w");
// it's the weekend
if($day_index == 0 || $day_index == 6) {
  return 1;
}


$handle = @fopen("/home/wimalasu/holidays", "r");
$isholiday = 0;
$today = date("Y-m-d");
if ($handle) {
    while (($buffer = fgets($handle, 4096)) !== false) {

      if ( strcmp($today,trim($buffer)) == 0 ){
          $isholiday = 1;
      }
    }
    if (!feof($handle)) {
        echo "Error: unexpected fgets() fail\n";
    }
    fclose($handle);
}
  return $isholiday;
}


function convertToExcel($inputFileName,$outputFileName) {

require_once 'phpexcel/Classes/PHPExcel.php';


$inputFileType = 'CSV';

/**  Create a new Reader of the type defined in $inputFileType  **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
/**  Set the delimiter to a TAB character  **/
$objReader->setDelimiter("\t");
/**  Load the file to a PHPExcel Object  **/
$objPHPExcel = $objReader->load($inputFileName);

/** Freeze pane so that the heading line won't scroll **/
$objPHPExcel->getActiveSheet()->freezePane('A2');



$writer = new PHPExcel_Writer_Excel5($objPHPExcel);
$writer->save($outputFileName);


}




?>



holidays (a list of holidays, so we dont download EOD file for these days)
Code:


2011-01-19
2011-02-04
2011-02-16
2011-02-17
2011-03-02
2011-04-13
2011-04-14
2011-04-15
2011-05-02
2011-05-17
2011-05-18
2011-06-15
2011-07-14
2011-08-31
2011-10-11
2011-10-26
2011-11-10
2011-12-10
2011-12-26




69CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Wed Aug 10, 2011 9:28 am

JennyFunny


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

Great stuff seriously..thanks for the information..

70CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Thu Sep 01, 2011 5:00 pm

Genting


Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

can someone pls share latest EOD data for Amibroker

Sponsored content



Back to top  Message [Page 2 of 4]

Go to page : Previous  1, 2, 3, 4  Next

Permissions in this forum:
You cannot reply to topics in this forum