Skip to content

Commit

Permalink
Merge pull request #4 from bogdanbrudiu/patch-2
Browse files Browse the repository at this point in the history
fix for Profit always zero (0.00) xFFFFF#37
  • Loading branch information
bogdanbrudiu authored Nov 30, 2018
2 parents da21af6 + e355bea commit eb0e42b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backtest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ sub toepoch {
print $fh2 join ("\n",$grun);
close $fh2;
}
my @profit = $grun =~ /(?<=simulated profit:\t\t )[0-9.\-][0-9.\-]* $sets[1] \((.*)(?=\%\))/;
my @profit = $grun =~ /(?<=profit:\t\t\t\t )[0-9.\-][0-9.\-]* $sets[1] \((.*)(?=\%\))/;
my @yearly = $grun =~ /(?<=simulated yearly profit:\t )[0-9.\-][0-9.\-]* $sets[1] \((.*)(?=\%\))/;
my @trades = $grun =~ /(?<=trades:\t\t )(.*?)(?=\n)/;
my @period = $grun =~ /(?<=timespan:\t\t\t )(.*?)(?=\n)/;
Expand Down

0 comments on commit eb0e42b

Please sign in to comment.