Showing posts with label export. Show all posts

Hakija – NSE EOD Downloader for Amibroker and Metastock

0 comments


Hakija, is an opensource(free with source code available) NSE End of Day Data Downloader written in Python. No other installations like .NET framework, Java anything else is required.

It downloads daily EOD (End Of Day) data as well as historical data
(past EOD data) for the NSE EQ series and also the main indices
(‘NSENIFTY’,'NIFTYJUNIOR’,'BANKNIFTY’,'NSEMIDCAP’,
‘NSEIT’,'NSE100′,’NSE500′,’MIDCAP50′ and ‘VIX’).


Hakija – NSE EOD Downloader for Amibroker and Metastock







If you choose to download only the bhavcopy data or just a few of the
indices, the other can be downloaded later without any need to
redownload the previous data.
The data is directly downloaded from the NSE servers and can be directly imported into MetaStock or AmiBroker as ASCII format.

The data is downloaded in the same directory as the program itself.

It can be downloaded for free from



Download Hakija – Mirror1

Download Hakija – Mirror2

Download – Hakija Source Code


Read More »

Shubha Downloader

0 comments





This is licensed under GNU GPL V3. It’s free for life product. Current beta is on windows. We will launch it on Linux and Mac soon.


Formats


EOD data for Amibroker, Fcharts, Ninja Trader, Advancedget, Metastock






  1. std csv

  2. Fcharts

  3. Amibroker

  4. Ninja Trader

  5. Advanceget

  6. Metastock





Data


  1. NSE market cap report

  2. NSE Equity Derivatives Participant wise Open Interest
    report

  3. NSE Equity Derivatives Participant wise Trading Volumes
    report

  4. NSE bulk deals report

  5. NSE block deals report

  6. NSE Market Activity Report

  7. NSE combined report

  8. NSE Equity Derivatives FII derivatives statistics
    report

  9. NSE board meeting & corporate annoucements

  10. NSE Gainer & Loser of day

  11. NSE Price Hit new all time High or LOW

  12. NSE Price band hit High/Low

  13. NSE corporate actions

  14. BSE bulk data report

  15. BSE block deal data report



Data


  1. NSE cash market bhavcopy with open int.

  2. NSE INDEX and VIX

  3. NSE Equity Futures

  4. NSE Equity Options

  5. NSE ETF bhavocpy

  6. NSE SME bhavcopy

  7. NSE Forex Options

  8. NSE Forex Futures

  9. MCX Commodity bhavcopy

  10. National Spot Exchange bhavcopy

  11. MCX SX Commodity Index eod

  12. MCX SX Commodity Index spot eod

  13. NCDEX Futures

  14. BSE Equity Index

  15. BSE Cash market bhavcopy with open int.

  16. Yahoo Fundamental



Extra features


  1. Smart downloader with auto update from last download
    date.

  2. Application Auto update

  3. NSE Trading holidays support

  4. Google calender support

  5. Weekend support in built



We will enable ms format file and
Yahoo, Google IEOD, EOD soon.


Please file bugs here

















Read More »

Export intraday and EOD data to TXT files from Amibroker to TEXT

0 comments







First Process



Export intraday and EOD data to TXT files

One file for each stock

In the first line insert the directory you want to save them to, make sure the

directory exists

Select your charts to export with the “Apply to” filter in AA window

Select the timeframe period you want to save as using the AA “Settings”

Press Scan button



AFL :







/*


Export intraday and EOD data to TXT files


*/




fh = fopen( "c:\\SaveData\\"+Name()+".txt", "w");


if( fh )


{


   fputs( "Ticker,Date,Time,Open,High,Low,Close,Volume \n", fh );


   y = Year();


   m = Month();


   d = Day();


   r = Hour();


   e = Minute();


   n = Second();


   index = BarCount - 420;


   if(index > 0)


   {


    for( i = index; i < BarCount; i++ )


    {


      fputs( Name() + "," , fh );


      ds = StrFormat("%02.0f-%02.0f-%02.0f,",


                     y[ i ], m[ i ], d[ i ] );


      fputs( ds, fh );


      


      ts = StrFormat("%02.0f:%02.0f:%02.0f,",


                     r[ i ],e[ i ],n[ i ] );


      fputs( ts, fh );




      qs = StrFormat("%.4f,%.4f,%.4f,%.4f,%.0f\n",


                     O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );


      fputs( qs, fh );


    }


   }


   else {


    for( i = 0; i < BarCount; i++ )


    {


      fputs( Name() + "," , fh );


      ds = StrFormat("%02.0f-%02.0f-%02.0f,",


                     y[ i ], m[ i ], d[ i ] );


      fputs( ds, fh );


      


      ts = StrFormat("%02.0f:%02.0f:%02.0f,",


                     r[ i ],e[ i ],n[ i ] );


      fputs( ts, fh );




      qs = StrFormat("%.4f,%.4f,%.4f,%.4f,%.0f\n",


                     O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );


      fputs( qs, fh );


    }


   }


   fclose( fh );


}




Buy = 0;













Second Process



fmkdir( "C:\\SaveData" );

Buy = ( (DateNum() >= 1121220) AND (DateNum() <= 1121231) ); // data exported from 20/12/2012 to 31/12/2012



//if we want to export data for a single Day, we modify the Second line like this

//Buy = ( (DateNum() == 1070129));



for( i = 0; i < BarCount; i++ )

if( Buy[i] )

{

//fh = fopen( "C:\\SaveData\\intraday.csv", "a");//if we want to export all data in a single file//

fh = fopen( "C:\\SaveData\\"+Name()+".csv", "a");// if we want to export data in an individual file//

if( fh )

{

y = Year();

m = Month();

d = Day();

r = Hour();

e = Minute();

s= Second();



for( i = 0; i < BarCount; i++ )

if( Buy[i] )



{

fputs( Name() + "," , fh );

ds = StrFormat("%02.0f/%02.0f/%02.0f%02,",

y[ i ], m[ i ], d[ i ] );

fputs( ds, fh );



ts = StrFormat("%02.0f:%02.0f,%02.0f",

r[ i ],e[ i ]),s[i];

fputs( ts, fh );



qs = StrFormat("%.2f,%.2f,%.2f,%.2f,%.0f,%.2f\n",

O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] ),OI[i];

fputs( qs, fh );

}

fclose( fh );

}

}



/*Export Data from Amibroker to ASCII files



Here there is a formula available to export data from Amibroker to ASCII
files. With the formula we can export data for a specified period from
Amibroker database.



How to export:



Scan with the formula in Automatic Analyser (AA) in Amibroker.

The formula will create a folder in C drive named 'Savedata' and will collecte the data in separate text files for each symbol.



Periodicity:



WE can export the data for different periodicity 1min, 5min, 10min or
daily etc. as we required. To configure that go to AA > settings >
General > Periodicity and set periodicity. Thus we can get data for
5min, 10min, 1 Hour, daily etc.



Select Date Range:



To set the date range, we have to edit the formula.

Open AA > pick (the formula file) > edit.

In the second line we can see:



Buy = ( (DateNum() >= 1061225) AND (DateNum() <= 1070110) );



First DateNum is the start date and second DateNum is end date.

The current settings will export data from 20061225(=10612205, so 2006 =106) to 20070110.

Just like that, we can select another date range. Instead of 2006,
should give 106 and for 2007, give 107 etc. Month and date are same.
Save the formula and scan it.

It will export and save the data in C:\Savedata folder.

If you want to export for an another date range, that will also be added
to the corresponding files just after the current data.*/ 



Read More »