Trendgetter: Trend Detection, Regime Change, Bias Filter by [CR]Trendgetter: Trend Detection, Regime Change, Bias Filter by Cryptorhythms
“If you are not a trend setter, at least be able to exploit the ones you see.”
― Jeffrey Fry
Intro
Cryptorhythms back again with a members only indicator for trend capture this time! Trendgetter is not crypto specific and can be applied to a variety of timeframes, markets, and tickers. Its meant to be a general purpose trading aid and bias filter, providing reliable trend, bias and regime change information.
Introduction
This indicator relies upon various methods related to probabilities/statistics, digital signal processing and data science to predict optimal fair local price given any financial time series data. The goal was to create a tool that isolates trends and captures their bias, making it easier to follow a noisy market. The focus is making high hit rate uncorrelated returns to your base market. The way in which this indicator is constructed is not based upon any previous public work, and was researched and refined over a period of 6 months of trading and testing based on my own personal trading experiences and observations of the market. I use novel techniques I developed in house to denoise the data and determine a local fair price.
Description
The parameters in this indicator are mostly fixed and do not lend themselves to overfitting. So when you find good settings, its probably legit and not a false positive. They were pre-determined based on my own testing and research to handle almost all possible combinations of price action for determining trends. By fixing some parameters, you automatically reduce the chances of overfitting to historical data. The pre determined levels were carefully chosen after many options were considered.
Not just a bias filtooor, fair price predictooor and regime change detectoooor though! TG also provides a price envelope feature which shows a likely fair price range that price will distribute itself upon. Above or below the envelope indicates the presence of a very strong trend . Within the envelope indicates consolidation , but still conforming to the bias. TG then uses a statistics-based approach to display a likely range that price could potentially travel over the near term which we called a price envelope.
An additional option provides background coloration when there is the potential for a regime change on the trend bias. This can be used as a feature to help you manage your trades risk. This is simply measured by an internal (non exposed) script value returning to a mean which triggers the color to appear.
Further Explanation of Settings
-Timeframe : Change the timeframe the indicator is calculated on allowing you to for instance use the 15m Trendgetter output while remaining on the 5 minute chart.
-Trend Capture : This is the "type" of trend you are trying to follow. The different options will attempt to find the trends at various levels of noise cancellation within the lookback period you specify. "Reactive" means it will quickly change its bias and capture smaller trends. "Slow" means it will filter more noise and capture larger trends. "Adaptive" is completely in its own class of behavior and was my attempt to mix both a slow and reactive profile into one setting, it uses a few market metrics like volume and volatility to adjust parameters on the fly.
-Sample Length : Bars to consider in the calculation. Using large numbers here is not going to help, but rather hurt your results. Generally 10-100 is the range you should use for the best results. The exact value will depend on the timeframe, volatility and market/asset you are trading, and you should experiment to find it. (There is no "one size fits all" for potential trading situations)
-Source : Data series used for calculation. I recommend hlcc4 or hl2 or hlc3 instead of just "close." This will help to pre process a noisy data series for the rest of the algo.
-Certainty Level : This setting effects how easily the indicator will confirm a new trend and change its bias. " Reactive" does just as it says and will confirm new regimes faster, but can also lead to false signals or "flip flop" in certain types of price action. "Slow" will change biases less frequently or in conjunction with large moves - but this level of certainty requires the sacrifice of reactivity meaning its a bit laggy (but thats ok when you are following a larger trend). "Medium" is as you would expect the middle ground between reactive and slow. Lastly "Adaptive" tends to fall between reactive and medium in its behavior typically, but it will somewhat adjust itself to suit the variability of market conditions.
-Price Envelope :
-----My own personally created price distribution spread (not monte carlo based)
-----Above or below the envelope indicates the presence of a very strong trend. You should not be fading a trend when its in this position!
-----Within the envelope indicates consolidation, but still conforming to the bias.
User Requests :
Of course we also listen to the needs of our members and added these features upon request.
-Added dark mode and light mode themes.
----Dark Mode is for dark/black charts and uses lighter colorations
----Light mode is for light/white charts and uses darker colorations
-More updates to display and color selection options such as background colors and fill colors.
Priceenvelope
[blackcat] L2 Price Envelope TrackerLevel: 2
Background
Price envelopes sare shown at a set percentage above and below a moving average. They are used to indicate overbought and oversold levels and can be traded individually or in conjunction with a momentum indicator.
Function
L2 Price Envelope Tracker is an innovative indicator that use customized envelope of price to disclose overbought and oversold periods. With this function, long and short entries can be further developped in this pine script.
Key Signal
sma5 --> typical price moving average line
resistance --> upper envelope as resistance line
support ---> lower envelope as support line
Pros and Cons
Pros:
1. easy observe overbought and oversold zone
2. disclose exact long and short entries in overbought and oversold zones
Cons:
1. Only applicable for the trading pairs that support financial() functions. crypto/xau/xag/indice are not applicable
2. Need to tune r1 and s1 for different trading pairs
Remarks
NA
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.