Finance::FITF::Writer - Fast Intraday Transaction Format Writer
use Finance::FITF; my $fh; my $writer = Finance::FITF::Writer->new( fh => $fh, header => { name => 'XTAF.TX', date => '20101119', time_zone => 'Asia/Taipei', bar_seconds => 10, }, ); # add session: from 08:45 to 13:45 $writer->add_session( 525 * 60, 825 * 60 ); # $writer->push_price( $timestamp, $price, $volume); # ... $writer->end;
Finance::FITF::Writer is a helper class to create FITF-formatted files.
Add a session to the file. $start and $end are seconds relative to midnight of the trading day defined by the header.
$start
$end
Add a trade transaction record.
You should not call this unless you are writing a bar-only file.
Call end when you are done.
end
Chia-liang Kao <clkao@clkao.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Finance::FITF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::FITF
CPAN shell
perl -MCPAN -e shell install Finance::FITF
For more information on module installation, please visit the detailed CPAN module installation guide.