Did it! Thanks to @Sukisen1981 and with a little perseverance I found a way to manage it!
If anyone else is facing the problem, some parts of my XML code below:
To set the tokens: (for some reason, the future timespan includes the holdback - so the future timespan has to be dynamic as well.)
<search>
<query>index=... | stats count as x | eval x=round(x*0.25,0) | eval y=x+28</query>
<earliest>1</earliest>
<latest>now</latest>
<done>
<set token="holdback_tok">$result.x$</set>
<set token="future_tok">$result.y$</set>
</done>
</search>
To use the tokens:
<panel>
<title>New User Prediction</title>
<viz type="Splunk_ML_Toolkit.ForecastViz">
<search>
<query>index=... | timechart span=1d count as NewUser | predict "NewUser" as prediction algorithm=LLP holdback=$holdback_tok$ future_timespan=$future_tok$ period=7 upper90=upper90 lower90=lower90 | eval prediction=round(prediction,0) | `forecastviz($future_tok$, $holdback_tok$, "NewUser", 90)`</query>
<earliest>1</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
</viz>
</panel>
... View more