jth88

Market Trend using First Derivative of MAs + Volatility

jth88 Uppdaterad   
Based on Smooth First Derivative Indicator by tbiktag
Volatility also from another public TV script, forgot which one though, sorry if this is yours and I haven't credited your work, let me know if it is and I'll reference it properly.

About this indicator:

Estimates whether market is trending up, down or sideways by adding the slope (first derivatives) of a fast & slow MA. Uptrend = Green, Downtrend = Red, Sideways = Yellow

Uses a minimum slope percentile to determine threshold for uptrend, downtrend & sideways. Definitely adjust this when changing timeframes, for BTCUSD at 1 hour timeframe a value of 25 is decent
Also has a measure of Volatility if you're into that

Explanation of inputs:
Bandwidth - for derivative function
Fastma - period for fast Moving Average
Slowma - period for slow Moving Average
Derivmalength - smooths out the signal, reducing single contrasting bars, but delays the signal. Use 1 if don't want to use
V length - ema of volatility if you want to smooth it
Min Slope Percentile - slope should exceed this percentile to be classified as uptrend (green) or downtrend (red) anything in this bottom percentile will be considered sideways
Mine Slope Lookback Period - # of bars back to calculate Slope Percentile
Versionsinformation:
Fixed Min Slope Percentile error, now properly goes from 1 - 100
Versionsinformation:
Added option to use Squeeze Momentum based derivative to determine trend (less laggy but maybe requires a lot more tweaking to properly identify ranging zones). By default it's still MA-based derivatives.
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?