TradingView
gorx1
10 אפר׳ 2022 13:30

Relative slope 

Henry Hub Natural Gas FuturesNYMEX

תיאור

Relative slope metric

Description:
I was in need to create a simple, naive and elegant metric that was able to tell how strong is the trend in a given rolling window. While abstaining from using more complicated and arguably more precise approaches, I’ve decided to use Linearly Weighted Linear Regression slope for this goal. Outright values are useful, but the problem was that I wasn’t able to use it in comparative analysis, i.e between different assets & different resolutions & different window sizes, because obviously the outputs are scale-variant.

Here is the asset-agnostic, resolution-agnostic and window size agnostic version of the metric.

I made it asset agnostic & resolution agnostic by including spread information to the formula. In our case it's weighted stdev over differenced data (otherwise we contaminate the spread with the trend info). And I made it window size agnostic by adding a non-linear relation of length to the output, so finally it will be aprox in (-1, 1) interval, by taking square root of length, nothing fancy. All these / 2 and * 2 in unexpected places all around the formula help us to return the data to it’s natural scale while keeping the transformations in place.

Peace TV



תגובות
KinetiCapital
very cool indicator. Thank you
WinnerCYI
Seems like a good indicator. For my study, can you show an example of the points to trade using this?
gorx1
@WinnerCYI, Hi, I can't say think this metric should be used to directly generate trading decisions (imo just as all the others so called "indicators"), but rather than to quantify current market state (in this particular case - trend gradient). Then you either use or own built-in neural network (your brain) / external models to process all these metrics and let em assist you in your trading decisions.

But if you insist xd, try using it just like all the other mainstream oscillators. By the way, looks like the population of our metric output is normally distributed.
Omni-Trading
upgrade to V5
gorx1
@OmniTekTrading, I decided to use v5 for more tech stuff and v4 for more quant stuff, that's my socio-political position regarding TV
עוד