Ess
Ess

Reputation: 97

Is there a way to plot values from a google sheets workbook to tradingview pinescript?

I am trying to plot values calculated in an GoogleSheets workbook on a tradingview chart. I cannot do the same calculations in Tradingview because the values come from a dynamic webpage, so I am doing the calculations in excel, and was wondering if its possible to send these values to Tradingview somehow

Upvotes: 3

Views: 2864

Answers (1)

Bjorn Mistiaen
Bjorn Mistiaen

Reputation: 6885

Unfortunately, Pine currently does not have the ability to read external files as far as I know.
I'm faced with the exact same issue.
The way I solved it was by creating a function in Pine that pushes all my values into an array, and then use that array to calculate and plot. To move my data from Excel to Pine, I have a function that uses concat() to create a string for each value I have to add to the array.
Something like this:

myPineFunction(myArray, myExcelValue)

The drawback is that you have to edit your code, each time you have new values, but it's the best solution I've found so far.

Upvotes: 2

Related Questions