Skip to content

Commit

Permalink
Parsing logic for @profit update
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanbrudiu committed Nov 30, 2018
1 parent da21af6 commit 15d50e5
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

1 comment on commit 15d50e5

@pauloram
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm this is required if you want the Profit numbers in the report to be anything other than zero.

Please sign in to comment.