Author

Topic: Support line, resistance line and linear regression line / long term strategy (Read 146 times)

legendary
Activity: 1806
Merit: 1521
Hi,

Does anyone have an idea ? Maybe some one knows to write a script ?

Thanks,
HC

You probably won't find many Pine Script coders around here. Tradingview has an active Pine Script chat room that will probably be more helpful: https://www.tradingview.com/chat/#BfmVowG1TZkKO235

If you want to learn to code it yourself, Tradingview's tutorial is here: https://www.tradingview.com/pine-script-docs/en/v4/Introduction.html
full member
Activity: 225
Merit: 106
Hi,

Does anyone have an idea ? Maybe some one knows to write a script ?

Thanks,
HC
full member
Activity: 225
Merit: 106
Hello everyone !

I read an article rather interesting, especially for this category of the forum. I think it can be one tool among many others for trading strategies. Here is the article in question: https://medium.com/coinmonks/bitcoins-natural-long-term-power-law-corridor-of-growth-649d0e9b3c94

Rather convinced by the explanations, I would like to recreate the general graph of the article (support line, resistance line and linear regression line). For this, I use the site : tradingview. I am not a programmer and honestly, between the complexity of formulas and the need for knowledge to retranscribe the mathematical formulas in the scripts of trading view, I'm lost.

Can someone help me here, hoping it helps other people too?

First, you have to change the BTC / USD graph to Log / Log scale. Unfortunately, I only manage to have a Log graph. How to switch to Log / Log on trading view, for the X and Y axes and not only X? It seems to me that this is not possible. We'll have to keep a Log graph. Instead of having beautiful lines, we will have slight curves.

Then, do you know how to add the formula of each of the 3 curves, in tradingview (or in a dialog box finally)?

if i'm right, the formulas are:

- Linear regression: price = 10 ^ (a + blog10 (d))
with a = -17.01593313, b = 5.84509376 and "d" the number of days passed since 2009.
- Support curves and resistances: These curves are both linear regression curves shifted up or down to become supports or resistance. I think, to do it, we must modify the variable b, no? What would be the formulas then?

Once the three formulas are found, how to add them in tradingview (creation of an account, even free, necessary) ? Can anyone know to write the script?

Thank you all and courage to our gray cells,
HC
Jump to: