TradingView
rumpypumpydumpy
6 de Out de 2021 10:21

log-log Regression From Arrays 

Bitcoin Liquid IndexBrave New Coin

Descrição

Calculates a log-log regression from arrays. Due to line limits, for sets greater than the limit, only every nth value is plotted in order to cover the entire set.

Notas de Lançamento

typo correction
Comentários
LudaCode
Beautiful.
Time_Out_2021
@LudaCode, Agree !!!
Time_Out_2021
I have been playing with your indicator and script
but for the life of me I can not get multiple of them into one script
so I just stacked them



really cool thank you for building this script and publishing it
rumpypumpydumpy
@Sneaker_Wave, lol, with that many levels, it wouldn't be possible to do it with the 500 line per script limit, you would have had to use multiple scripts anyway. If you want to do it with one script it would require a different approach. You pre calculate the coefficients, enter them into an input (or hard code them) and use plot() instead. I think there's some scripts already that do it this way that could be adapted.
Time_Out_2021
@rumpypumpydumpy, thank you kindly
for your reply :)
I will look into just that !!!
rumpypumpydumpy
@Sneaker_Wave, np, if you're using deviations for the spacing, you really only need the result from a, b and dev, then you should be able to use them like : y = (a + b * bar_index) +/- dev * mult, plot(math.exp(y))
rumpypumpydumpy
@Sneaker_Wave, Sorry, it should be y = (a + b * math.log(bar_index)) +/- dev * mult
Time_Out_2021
@rumpypumpydumpy, thanks for the reply i am really great full for your input
my logic or ability breaks down when it comes to pinescript arrays

how do i get the a and b
out of the array or first part of the script

to me it seams like the a and be are hidden inside of an array ?
Time_Out_2021
@Sneaker_Wave, i am a master of bashing
control a
and control c
and control v

:) but i am still learning the depths of pine
Alien9999
The GOAT
Mais