After whining all day about Edit Studies being broken, I figured I'd make restitution.
Wonder why downloaded Forex tickdata won't replay? Each line begins with a 'Q' instread of a 'T'. Go figure.
I wrote a perl script to fix it (see below).
-Install perl if you don't already have it.
-Save the following as a text file <scriptname>.
-Run it as >perl scriptname downloaded_data.epf
-Load your fixed tickdata (make sure chart time template is 24 hour, Dynamic 0:00-0:00)
You can get perl from:
Don't put spaces in your filenames unless you like wrapping them in quotes.
Script works as-is in both Windows and Lin/Unix (... depending on your *nix location of perl of course!)
enjoy,
-function THEO( Penitent );
#!/usr/bin/perl -w
my $a = $ARGV[0];
my $b;
my $line;
if ( $ARGV[0] =~ /(.*)\.[eE][pP][fF]/ ) {
$b = $1 . "_FIXED.epf";
print "Processing $a into $b\n";
} else {
die "Source file must come from eSignal and have an .epf extension.\n";
}
open (INFILE, "< $a");
open (OUTFILE, ">$b");
while (<INFILE>) {
$line = $_;
$line =~ s/Q,(.*)/T,$1/;
print OUTFILE "$line";
}
close(INFILE) || die "Can't close $a: $!";
close(OUTFILE) || die "Can't close $b: $!";
Wonder why downloaded Forex tickdata won't replay? Each line begins with a 'Q' instread of a 'T'. Go figure.
I wrote a perl script to fix it (see below).
-Install perl if you don't already have it.
-Save the following as a text file <scriptname>.
-Run it as >perl scriptname downloaded_data.epf
-Load your fixed tickdata (make sure chart time template is 24 hour, Dynamic 0:00-0:00)
You can get perl from:
Don't put spaces in your filenames unless you like wrapping them in quotes.
Script works as-is in both Windows and Lin/Unix (... depending on your *nix location of perl of course!)
enjoy,
-function THEO( Penitent );
#!/usr/bin/perl -w
my $a = $ARGV[0];
my $b;
my $line;
if ( $ARGV[0] =~ /(.*)\.[eE][pP][fF]/ ) {
$b = $1 . "_FIXED.epf";
print "Processing $a into $b\n";
} else {
die "Source file must come from eSignal and have an .epf extension.\n";
}
open (INFILE, "< $a");
open (OUTFILE, ">$b");
while (<INFILE>) {
$line = $_;
$line =~ s/Q,(.*)/T,$1/;
print OUTFILE "$line";
}
close(INFILE) || die "Can't close $a: $!";
close(OUTFILE) || die "Can't close $b: $!";
Comment