Cointegration Linear Regression

 

Guys, I want to make a multiple linear regression, I have the indicator which calculate the simple linear regression using 2 variables, I want to add one more variable which is time


Here's an example of what I want, I want to calculate the regression between MSFT (Y) AND NTFLX (X) but I want to add the variable time, I get the data from MT5, how Could I add this variable on the code?

I ADDED THE CODE IF YOU GUYS WANT TO TAKE A LOOK ON THE CODE

Arquivos anexados:
 
Amigo se vai fazer uma questão no forum portugues, escreve em pt...senão mude o idioma para ingles e assim escreve a pergunta em ingles