Reference lines are ... well, reference lines. Simple chart level lines with only one value. Not whatever kind of polynomial regression lines you seem to be after. So you'll have to find another way to create your curved rollercoaster line. I don't think you can do this in a basic line chart in Qlik Sense.
What you should do , Lets say you have one dimension time and one is amount and now you want to plot a line which will be a curve and follow the same manner as you want So , Drag and Drop COMBO chart and select dimension as Time and Amount or any other fact as measure and add one more Measure with expression count(distinct ID) and go to the data and click on it and select its type as Line and you will get what you want.
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.