Search Your Queries Here

Showing posts with label txt. Show all posts

Firstcharting Realtime Datafeed Plugin for Amibroker – Free Trial

0 comments
Firstcharting launches Realtime Data Plugin for Amibroker in trial mode. Now with this data plugin you can access NSE(Cash,Futures), MCX Futures, MCX-SX Futures, NCDEX Futures, International Forex Cross Currencies realtime charts in Amibroker with Zero Data Delay.
Steps to Integrate the Firstcharting Datafeed in your Amibroker Software
2. Save the file in the amibroker plugin folder i,e c:program filesamibrokerplugin folder
3. Download Microsoft Visual C++ 2008 RedistributablePackage (x86) and install it in your machine.
4. Now Open Amibroker -> File Menu ->New->Database . And fill the instruction as shown below.
5. Choose Firstcharting-Data Plugin from the datasource list and make sure that Base Time Interval is
1minute
  
Realtime Datafeed Plugin for Amibroker – Free Trial


  
6.Now click on Configure button and click on connect
7.And click on the required exchange symbols which downloads the Symbol list from the firstcharting server 

Realtime Datafeed Plugin for Amibroker – Free Trial


8.Now Click Close on the Configuration Dialog. Now you will see a green Connected/Normal Button indicating that you had established connectivity with firstcharting server as shown below

Realtime Datafeed Plugin for Amibroker – Free Trial



8.Now goto the charts and select the required symbols and start your favorite charts in realtime tick by tick with zero delay.
Features
1)Zero Data Delay
2)Auto Backfill Supported
3)Light Weight Plugin
4)Easy Installation Onetime Setup
Current Limitations
Tested OK with 32 bit XP ,Windows 7, Windows 8, Vista machines. Testing not yet done with 64bit machines
Current Trial Version Doesnt Supports proxy. So if you are behind a proxy probably you could not able to connect



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 »