TradingView
RicardoSantos
2 сен 2015 г., 09:48

[RS]Linear Regression Bull and Bear Power V0 

Euro Fx/U.S. DollarFXCM

Описание

EXPERIMENTAL:
Bull and Bear power based on linear regression (this is a non lagging oscillator, the parameter are for the lookup window for the donchian extremes)
this indicator can also be used for convergence/divergence.
Комментарии
accidentje
Great. Thanks for your continuing contribution!
marketrading001
Maybe I'm misunderstanding, but why are you adding the height to the height/length? How is that linear regression if y = ax + b?
Would appreciate your explanation. Thanks.
accidentjev2
Ricardo, just thinking out loud... would it be difficult to incorporate an accumation option into this script?

For example: sum up al bull bars (above the 0-line) and bear bars (below the 0-line) within a given time period (which would be an input).
RicardoSantos
its possible, ill have stab at it on the weekend
accidentje
Superb. Thanks man
accidentje
Ricardo, I've been playing with it and it would be very useful to make the script "multi-timeframe-able". Only I'm not succeeding in modifying it succesfully :). Could you take a last look?
accidentje
> the accumulation version I mean
RicardoSantos
i can add a security() to get the values for higher timeframes, or you can use higher length values on the inputs to fit the higher timeframes.
the security is just a matter of adding 1/2 lines to the script(altho by using security its subject to repaint values when it re updates).
accidentje
I leave that decision up to you Ricardo since I don't fully grasp the implications. The idea is to have a view of the net bull-bear accumulation on the daily (for example), and underneath that the net accumulation on the weekly (or any higher timeframe, for example). So making the prefered timeframe an input would be ideal (preferably without having to calibrate length values). Thanks in advance!
Ещё