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

» McDonald’s අපේ නෙමෙයි අපේ බෝස්ගේ – අබාන්ස් කියයි
by ChooBoy Today at 10:19 am

» AI Assistance for Stock Market Research and Analysis
by ChatGPT Today at 7:12 am

» Comparative Analysis of the Insurance Sector
by God Father Tue Mar 26, 2024 11:46 pm

» Sri Lanka: Why Pay Exorbitant Taxes?
by ChatGPT Tue Mar 26, 2024 10:52 pm

» LANKA CREDIT AND BUSINESS FINANCE PLC (LCBF.N0000)
by K.R Tue Mar 26, 2024 3:15 pm

» CENTRAL INDUSTRIES PLC (CIND.N0000)
by D.G.Dayaratne Tue Mar 26, 2024 9:11 am

» SIYAPATHA FINANACE PLC (SLFL.N0000)
by ChatGPT Tue Mar 26, 2024 7:58 am

» FINANCE AND LEASING SECTOR
by ChatGPT Mon Mar 25, 2024 6:45 am

» LOLC FINANCE PLC (LOFC.N0000)
by ChatGPT Mon Mar 25, 2024 6:36 am

» CIC HOLDINGS PLC (CIC.N0000)
by ChatGPT Mon Mar 25, 2024 6:18 am

» UNION ASSURANCE PLC (UAL.N0000)
by ChatGPT Mon Mar 25, 2024 6:15 am

» First Capital Holdings PLC: Current Financial performance and future outlook
by God Father Sun Mar 24, 2024 10:58 pm

» LankaBizz: Sri Lanka's First ever Artificially Intelligent (AI) Business and Research Assistant
by God Father Sun Mar 24, 2024 7:27 am

» HOTEL AND TRAVEL SECTOR
by ErangaDS Wed Mar 20, 2024 7:22 am

» CIC Holdings Good Times Ahead
by ashan silva Mon Mar 18, 2024 11:00 am

» EPF Fund keep eye on low P/E Shares
by K.R Mon Mar 18, 2024 8:45 am

» SINS - the Tailwind effects of a crisis hit Economy
by Hawk Eye Mon Mar 18, 2024 8:37 am

» Ceylon cold stores
by Hawk Eye Mon Mar 18, 2024 8:25 am

» Asha securities Provide buy signal for CIC
by ddrperera Fri Mar 15, 2024 1:10 am

» CSE ready for another Downtrend?
by D.G.Dayaratne Thu Mar 14, 2024 11:24 am

» LankaLAW Forum : Sri Lanka’s #1 Discussion Platform for Legal Questions and Answers
by blindhog Thu Mar 14, 2024 9:14 am

» Sri Lanka poised to benefit from demand surge for ‘non-China origin’ graphite
by samaritan Wed Mar 13, 2024 1:31 pm

» LOLC hotels
by Maharaja Tue Mar 12, 2024 2:34 pm

» AEL target price ?
by suku502 Mon Mar 11, 2024 11:26 am

» WAPO 200% UP
by LAMDA Sun Mar 10, 2024 10:33 pm

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 3 of 4]

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

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


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


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

71CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Sun Sep 04, 2011 7:40 pm

krishaja


Stock Trader

@twi malasooriy
pl.. tell me where to add these codes?

72CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Sun Sep 04, 2011 7:51 pm

smallville

smallville
Associate Director - Equity Analytics
Associate Director - Equity Analytics

twimalasuriya wrote:
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



Greek to me Wink pardon my ignorance since I hate programming.. he hee.. but great job.. Send u a mail.. pls do the needful.. thanks..

73CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Mon Sep 05, 2011 10:47 am

twimalasuriya

twimalasuriya
Senior Equity Analytic
Senior Equity Analytic

krishaja wrote:@twi malasooriy
pl.. tell me where to add these codes?


krishaja , you have two options

1. run these scripts on your server as a scheduled job
2. get a copy of the email i'm generating each day at https://groups.google.com/forum/?hl=en#!forum/csereports

if you want to go for option 1, you might need some php programming knowledge. if you have, and just want some help , then PM me.

if you are happy with option 2, goto https://groups.google.com/forum/?hl=en#!forum/csereports and become a member.

(If you are privacy conscious [understandably], then i suggest you create a new gmail address just for this and add it to the mail group. then just add a filter the the new email address to forward the email to your regular email )

please do not hesitate to PM me if you have any questions.

74CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Sep 06, 2011 8:58 am

ha_na


Manager - Equity Analytics
Manager - Equity Analytics

I need 9 February 2011 and 9 may 2011 EOD data for all companies. I have error on those two days. Can someone help me?
Thanks

75CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Sep 06, 2011 9:29 am

twimalasuriya

twimalasuriya
Senior Equity Analytic
Senior Equity Analytic

ha_na wrote:I need 9 February 2011 and 9 may 2011 EOD data for all companies. I have error on those two days. Can someone help me?
Thanks

I just copied two files you wanted to the location below

(Symbol Date (YYMMDD) Open High Low Close Vol )

http://wimalasuriya.com/cse/eod/20110209.txt
http://wimalasuriya.com/cse/eod/20110509.txt

These are from a local database I update each day from data taken from cse.lk

I run a sql like below to get the file

Code:


SELECT  share,DATE_FORMAT(date,'%Y%m%d') , open,high,low,close,sharevolume
INTO OUTFILE '/tmp/20110509.txt'
  FIELDS TERMINATED BY '\t'
  LINES TERMINATED BY '\n'
  from ohlc  where date = '2011-5-9' ;



Last edited by twimalasuriya on Tue Sep 06, 2011 9:36 am; edited 1 time in total (Reason for editing : added file format)

76CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Sep 06, 2011 10:49 am

ha_na


Manager - Equity Analytics
Manager - Equity Analytics

thanks my dear.
I want excel format as I want to convert it to Metastock. Is it possible?
Thanks.

twimalasuriya wrote:
ha_na wrote:I need 9 February 2011 and 9 may 2011 EOD data for all companies. I have error on those two days. Can someone help me?
Thanks

I just copied two files you wanted to the location below

(Symbol Date (YYMMDD) Open High Low Close Vol )

http://wimalasuriya.com/cse/eod/20110209.txt
http://wimalasuriya.com/cse/eod/20110509.txt

These are from a local database I update each day from data taken from cse.lk

I run a sql like below to get the file

Code:


SELECT  share,DATE_FORMAT(date,'%Y%m%d') , open,high,low,close,sharevolume
INTO OUTFILE '/tmp/20110509.txt'
  FIELDS TERMINATED BY '\t'
  LINES TERMINATED BY '\n'
  from ohlc  where date = '2011-5-9' ;

77CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Tue Sep 06, 2011 12:13 pm

twimalasuriya

twimalasuriya
Senior Equity Analytic
Senior Equity Analytic

ha_na wrote:thanks my dear.
I want excel format as I want to convert it to Metastock. Is it possible?
Thanks.


pm me a email address, i will send you

78CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Mon Sep 26, 2011 4:57 pm

seyon


Assistant Vice President - Equity Analytics
Assistant Vice President - Equity Analytics

Thanks

79CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Sun Oct 16, 2011 7:56 pm

amilaela

amilaela
Senior Manager - Equity Analytics
Senior Manager - Equity Analytics

okk

https://www.facebook.com/profile.php?id=100001851586843

80CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Sat Nov 26, 2011 1:11 am

aero


Manager - Equity Analytics
Manager - Equity Analytics

can someone pls share latest ASPI & MPI EOD data for Amibroker?

81CSE EOD Data ! - Page 3 Empty Re: CSE EOD Data ! Sat Nov 26, 2011 1:56 am

bakapandithaya

bakapandithaya
Vice President - Equity Analytics
Vice President - Equity Analytics

SanjivFund wrote:thanks..
+rep
Can we give + rep again?

Sponsored content



Back to top  Message [Page 3 of 4]

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

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