TradingView
btrnc
16 de Jan de 2022 21:20

Linear Regression 200/100/50/20 

VTBMOEX

Descrição

Four time frames in one indicator in different colors, showing current price trend in different scopes.
If the slope of the smaller time frame is in a (0,75;1,25) interval of some of the bigger ones the smaller one is omitted (different signs near zero are not coalesced in that way though).
Every time frame has four deltas of range in trend lines of different grade of transparency (2-1-4-3), as well as a vertical line denoting regression date range start, also bearing the same color (blue-red-green-gray for 200/100/50/20).
On the right of the latest bar are Pearson coefficients and slopes of the regressions, 200/100/50/20 bottom-up, also appropriately colored.

Notas de Lançamento

Some of the trends can now be disabled in the config.
Parameter layout fixes.

Notas de Lançamento

Label format fix.

Notas de Lançamento

Added exponential scale support, should be selected manually in the config.
Minor fixes

Notas de Lançamento

Minor fix.
Comentários
Ether2020
Very good script my friend! One question. Is it possible to change the code so that it works for Log. charts also. That would be amazing!
btrnc
@Ether2020, added log scale support.
Unfortunately it seems impossible for now to make appropriate changes in the script automatically when the scale is changed on the graph (stackoverflow.com/questions/69551716/how-can-i-check-if-the-pane-is-in-log-scale), so I've added checkbox "log scale" to config pane.
maroof81
thank you
alexei_me
It's so sad that it repaints on the go as crazy. Boys, anyone nows a similar script with lines changing their position on bar close?
renta108
Super! Spasibo&
PUMPmaps
Bravo! great job!
Mais