How to promote a build when certain value in output is above threshold? I'm using the Promoted Builds Plugin and I'd like to promote my freestyle job to have a gold star when a certain value in my output is above a given threshold (e.g. above 1.00).

Here is a sample output from backtesting jobs:

Pass  Profit Total trades Profit factor Expected Payoff Drawdown $ Drawdown %
   1  622.71           76          1.38            8.19     526.77       4.94
  10  301.09           36          1.38            8.36     526.77       4.93
  14  240.96           62          1.18            3.89     589.60       5.60


My aim is to promote the build to gold when the first line right after the header line has a Profit factor column value above 1.00 and only to silver star when it is below.

How can this be achieved?
What you are looking for is at the bottom of the GitHub README describing Job DSL for the Promoted Builds Plugin. Link to GitHub is on every plugin's page. There are also links to plugins it depends on and you should read the documentation for those like the Job DSL plugin wiki. You can also ask questions in the Job DSL forum or simply read the documentation. Here is a plugin that extends the promotion syntax of the DSL.