I have a formula in an old Excel file that I would like to translate into Pine so that I can also use it in Tradingview. But I can’t get any further.
In Excel the formula is:
=INDEX(LINEST(K11:K15;J11:J15^{1.2});1)*J15^2
Whereby J11 to J15 are auxiliary numbers for the calculation (x-axis). Here 1,2,3,4,5
Lines K11 to K15 contain the last close price.
Image of the values in Excel. In yellow is the result of the calculation.
Is it possible to perform this calculation in Pine? Is there a function for this? If it is possible in Excel, it should also be possible in Pine, right?
Julian JJ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.