Adaptive Trend Cipher loxx]Adaptive Trend Cipher
Highly experimental!
Features:
-Implements 5 different Dominant Adaptive Cycle Measures to determine optimal inputs for correlation functions. These cycle calculations include the following: **
* Ehler's Autocorrelation Dominant Cycle
* Ehler's Instantaneous Dominant Cycle
* Ehler's Band-pass Dominant Cycle
* Ehler's Hilbert Period Dominant Cycle
* Ehler's Dual Differentiator Dominant Cycle
**additional cycle measures to be added in future releases
-Uses price to time correlation with look-back periods determined by the dominant cycle measures
-Allows users to manipulate the range of Dominant Cycle inputs, also allows the user to change the size % of the the output Dominant cycle to be used to determine correlation lengths
-Bars are colored according to correlation extremes. Green bars are uptrend, Red bars are downtrend; Yellow bars are high correlation, Fuchsia bars are low correlation
Uses
-Trend cipher is a novel approach to teasing out macro trends in the market. This version is geared to be used on the daily time frame only
-Reversals at yellow and fuchsia bars when they appear, it shows price exhaustion using
Warning: This may not work on certain assets due to the high processing power required to calculate cycle dominance. This also uses a custom correlation function since the data being input intot he correlation function is not constant but variable based on cycle dominance at every bar. To correct this in most circumstances you must change the max_bars_back constant in the indicator method call
If you use parts of the code, please let me know, I would love to hear what you do with it.
Happy trading!
Trend
Universal logarithmic growth curves, with support and resistanceLogarithmic regression is used to model data where growth or decay accelerates rapidly at first and then slows over time. This model is for the long term series data (such as 10 years time span).
The user can consider entering the market when the price below 25% or 5% confidence and consider take profit when the price goes above 75% or 95% confidence line.
This script is:
- Designed to be usable in all tickers. (not only for bitcoin now!)
- Logarithmic regression and shows support-resistance level
- Shape of lines are all linear adjustable
- Height difference of levels and zones are customizable
- Support and resistance levels are highlighted
Input panel:
- Steps of drawing: Won't change it unless there are display problems.
- Resistance, support, other level color: self-explanatory.
- Stdev multipliers: A constant variable to adjust regression boundaries.
- Fib level N: Base on the relative position of top line and base line. If you don't want all fib levels, you might set all fib levels = 0.5.
- Linear lift up: vertically lift up the whole set of lines. By linear multiplication.
- Curvature constant: It is the base value of the exponential transform before converting it back to the chart and plotting it. A bigger base value will make a more upward curvy line.
FAQ:
Q: How to use it?
A: Click "Fx" in your chart then search this script to get it into your chart. Then right click the price axis, then select "Logarithmic" scale to show the curves probably.
Q: Why release this script?
A: - This script is intended to to fix the current issues of bitcoins growth curve script, and to provide a better version of the logarithmic curve, which is not only for bitcoin , but for all kinds of tickers.
- In the public library there is a hardcoded logarithmic growth curve by @quantadelic . But unfortunately that curve was hardcoded by his manual inputs, which makes the curve stop updating its value since 2019 the date he publish that code. Many users of that script love using it but they realize it was stop updating, many users out there based on @quantadelic version of "bitcoin logarithmic growth curves" and they tried their best to update the coordinates with their own hardcode input values. Eventually, a lot of redundant hardcoded "Bitcoin growth curve" scripts was born in the public library. Which is not a good thing.
Q: What about looking at the regression result with a log scale price axis?
A: You can use this script that I published in a year ago. This script display the result in a log scale price axis.
Volume Bar Breakout and Breakdown IndicatorVolume shows strength of a movement and highest volume shows the region that pushed price to certain extent with full strength. Breakout or Breakout of the highest volume bar range shows continuity further push by sellers or buyers indicating a trend continuation for a small period if not for long duration. Entries can be taken once signal is generated with stoploss as recommended.
Guidelines:
Don't trade if range is too large
Don't trade if Breakdown or Breakdown candle body / range is too large or if there is high volatility
Use additional indicator to get the idea of overall trend analysis
Keltner Channels BandsKeltner Channel Bands
Great indicator for mean reversion strategies.
Alerts you can set:
Crossover EMA
Crossunder EMA
Crossover upper band
Crossunder upper band
Crossover lower band
Crossunder lower band
Have fun!
RSI Moving Average CrossoversThis script is an improved version of the RSI indicator, using a moving average on the RSI itself, as well as two other moving averages used to determine the current trend.
A small screener indicating the current movement is displayed in the bottom-left zone of the chart: trend (Bullish/Bearish/Uncertain) and status (Impulse or Correction)
Trends are simply based on moving averages crossovers, coupled to the fact that the current candle closes above the fast MA in a bull trend, and under the fast MA in a bear trend. In other cases, the trend and the movement are considered as "Uncertain" by the indicator.
Options
Various types of moving averages for the RSI and trend MA
Show/Hide crossovers between the RSI and its MA
Color the RSI normal zone with the current trend/movement colors
Show/Hide the screener indicating the current movement
Defaults Parameters
Fast MA 20
Slow MA 50
MA source: Close
RSI Length 14
RSI MA: SMMA (RMA)
RSI MA Length: 20
Don't hesitate to suggest any idea which could improve this indicator.
Moving Average Multitool CrossoverAs per request, this is a moving average crossover version of my original moving average multitool script .
It allows you to easily access and switch between different types of moving averages, without having to continuously add and remove different moving averages from your chart. This should make backtesting moving average crossovers much, much more easier. It also has the option to show buy and sell signals for the crossovers of the chosen moving averages.
It contains the following moving averages:
Exponential Moving Average (EMA)
Simple Moving Average (SMA)
Weighted Moving Average (WMA)
Double Exponential Moving Average (DEMA)
Triple Exponential Moving Average (TEMA)
Triangular Moving Average (TMA)
Volume-Weighted Moving Average (VWMA)
Smoothed Moving Average (SMMA)
Hull Moving Average (HMA)
Least Squares Moving Average (LSMA)
Kijun-Sen line from the Ichimoku Kinko-Hyo system (Kijun)
McGinley Dynamic (MD)
Rolling Moving Average (RMA)
Jurik Moving Average (JMA)
Arnaud Legoux Moving Average (ALMA)
Vector Autoregression Moving Average (VAR)
Welles Wilder Moving Average (WWMA)
Sine Weighted Moving Average (SWMA)
Leo Moving Average (LMA)
Variable Index Dynamic Average (VIDYA)
Fractal Adaptive Moving Average (FRAMA)
Variable Moving Average (VAR)
Geometric Mean Moving Average (GMMA)
Corrective Moving Average (CMA)
Moving Median (MM)
Quick Moving Average (QMA)
Kaufman's Adaptive Moving Average (KAMA)
Volatility-Adjusted Moving Average (VAMA)
Modular Filter (MF)
MAROC Fast/SlowNot sure if a similar indicator already exist, so I created my own. After creating this indicator, I realize it looks very similar to MACD. However, it strictly uses Hull moving average in its calculation for the lines.
MAROC is simply Moving Average Rate of Change. This is a trend-following indicator that calculates the rate of change on two Hull moving averages. By default it calculates the ROC on 60-period HMA (green and red) and 180-period HMA (blue and orange). The zero line represents the confirmation of change in trend. Above zero is up trend and below zero is down trend. Note the difference between the "trend reversal" and the "confirmation of a trend". I like to define trend reversal by the change in direction
The colored squares on the zero line has 4 colors that represents the overall trend. Here I include the slowdown of MAROC as the start of a trend.
- bright green = when both the slow and fast MA are trending up
- faded green = when slow MA trending up, but fast MA trending down
- faded red = when slow MA trending down, but fast MA trending up
- bright red = when both the slow MA and fast MA are trending down
Trend changes triangles are shown to signal the change in trend direction (trend reversal). Green and blue triangles are trend reversal to the upside. Red and orange triangles are trend reversal to the downside.
This indicator includes the option of displaying buy(long) and sell(short) signals that follows these rules. Use at your own discretion, as it may not apply well with your market or ticker.
- Long = Bright green square and either fast or slow MAROC changes trend direction to the upside
- Short = Bright red square and either fast or slow MAROC changes trend direction to the downside
Enjoy~! Please let me know if you find this useful and which market / ticker and timeframe you are using it on~ :)
[cache_that_pass] 1m 15m Function - Weighted Standard DeviationTradingview Community,
As I progress through my journey, I have come to the realization that it is time to give back. This script isn't a life changer, but it has the building blocks for a motivated individual to optimize the parameters and have a production script ready to go.
Credit for the indicator is due to @rumpypumpydumpy
I adapted this indicator to a strategy for crypto markets. 15 minute time frame has worked best for me.
It is a standard deviation script that has 3 important user configured parameters. These 3 things are what the end user should tweak for optimum returns. They are....
1) Lookback Length - I have had luck with it set to 20, but any value from 1-1000 it will accept.
2) stopPer - Stop Loss percentage of each trade
3) takePer - Take Profit percentage of each trade
2 and 3 above are where you will see significant changes in returns by altering them and trying different percentages. An experienced pinescript programmer can take this and build on it even more. If you do, I ask that you please share the script with the community in an open-source fashion.
It also already accounts for the commission percentage of 0.075% that Binance.US uses for people who pay fees with BNB.
How it works...
It calculates a weighted standard deviation of the price for the lookback period set (so 20 candles is default). It recalculates each time a new candle is printed. It trades when price lows crossunder the bottom of that deviation channel, and sells when price highs crossover the top of that deviation channel. It works best in mid to long term sideways channels / Wyckoff accumulation periods.
LocalLimitLibrary "LocalLimit"
Calculates the local upper or local lower limit for a given series. Applying multiple passes produces what appears like support or resistance levels.
See Local Limits for more detail.
upper(src) Produces the recent local upper limit for a given series.
Parameters:
src : The source series to derive from.
lower(src) Produces the recent local lower limit for a given series.
Parameters:
src : The source series to derive from.
RSI Rising Crypto Trending AlertAlert version of the strategy with the same name
This is crypto and stock market trending strategy designed for long timeframes such as 4h+
From my tests it looks like it works better to trade crypto against crypto than trading against fiat.
Indicators used:
RSI for rising/falling of the trend
BB sidemarket
ROC sidemarket
Rules for entry
For long: RSI values are rising, and bb and roc tells us we are not in a sidemarket
For long: RSI values are falling, and bb and roc tells us we are not in a sidemarket
Rules for exit
We exit when we receive an opposite direction.
Cuation: Because this strategy uses no risk management, I recommend you takje care with it.
If you have any questions, let me know !
Highs-Lows Bands Trend FollowingTwo bands formed by moving averages of highs and lows.
The lower band should provide zone of support in uptrends while the upper band should provide zone of resistance during downtrends.
Bands that turn green in bullish trends should provide buy signals while bands that turn red in bearish trends should provide sell signals.
Spread of ScriptsHello all
This indicator helps you to find spread between scripts.
Very much helpful for finding spread of script with relative future script. (Index or Stocks).
The are two methods to find spread –
1. Divide
2. Difference
You can select your choice from indicator settings.
pNRTRLibrary "pNRTR"
Provides functions for calculating Nick Rypock Trailing Reverse (NRTR) trend values with higher precision offsets for both low, and high points rather than the standard single offset.
pnrtr(float low_offset = 0.2, float high_offset = 0.2, float value = close)
low_offset
Offset used for nrtr low_point calculations. Default is 0.2.
high_offset
Offset used for nrtr high_point calculations. Default is 0.2.
value
Variable used for nrtr point calculations. Default is close.
TrendCalculusThis indicator makes visualising some of the core TrendCalculus algorithm's key information and features both fast and easy for casual analysis.
Interpretation:
a) The light blue channel is the lagged price channel calculated over the timeframe of your choosing for a period of N values. When the current price breaks out of this channel the previous price major high/low can be identified as a trend reversal. This helps in counting trend "waves" and is a rolling visual version of ideas I developed for counting Elliot Waves. For EW analysis, your mileage may vary depending on the asset inspected, but the chart allows you to clearly count waves on a particular scale of time (period) ignoring noise on other time scales.
b) The green/red channel is a support/resistance indicator region that shows the relationship of the current price to the key pivot points on this time scale (period) and these make for good visual indication that the current trend is up (green), or down (red). You may find them helpful for identifying breakouts and placing stops - but this was not their original intention. The pink line is the mid point of closing values in the lagged price channel, and the orange line the mid point of closing values in the current price channel.
About TrendCalculus (TC):
TC is implemented in several languages including Lua, Scala and Python. The Lua implementation is the reference and has the most advanced functionality and delivers a powerful data processing tool for both multi-scale trend reversal detection, reversal labelling, as well as trend feature production - all useful things helping it to produce training data for machine learning models that detect trend changes in real time.
This charting tool includes: (1) two consecutive lagged Donchian channels configured to a common period N, (2) the current price, and (3) the mid price of both Donchian channels. These calculations are all part of the TC codebase, and are brought to life in this charting tool.
Motivation:
By creating a TC charting tool - the machine learning model is swapped for *your eyes* and *your brain*. Using the same inputs as the machine, you can use this chart to learn to detect trend changes, and understand how time frame (long periods, short periods) affect your view of trend change. If you choose to use it to trade, or make investment decisions, do so at your own risk. This indicator does not deliver financial advice.
TrendCalculus is the invention of Andrew Morgan, author of Mastering Spark for Data Science (2017).
The original core TrendCalculus (TC) algorithm itself is published as open-source code on github under a GPL licence, and free to use and develop.
Fibonacci Moving AverageThe Fibonacci Moving Average is a powerful indicator that takes into account many underlying moving averages to give out an approximate short-term/long-term view of the markets. Its strength lies with dynamic support and resistance levels. I have created this indicator in order to improve trend-following entry positions.
Rational Root TimelineThis script is based on RationalRoot's spiral btc chart. Since I dont know how to make spirals in pinescript I just flattened it out into a readable chart. All this shows is the log price for btc over a 4 year timeframe. I found it interesting how well things line up with this idea. The white circle just shows the current day price location. You need to be on the Daily timeframe to view this correctly.
Elder's Force Index Color BarBased on the Elder's Force Index (EFI) , +/- of the EFI and its ema is used to describe the rise, fall or possible reversal of the market, and finally shown by bar color.
The green bar represents a strong bull and the red bar represents a strong bear;
The blue bar indicates that the downtrend is exhausted and may rise. Likewise the yellow bar.
Of course, it is difficult to buy the bottom and sell the top at any time. This indicator needs to be judged together with the pattern or other indicators that predict reversals in order to increase the win rate.
Happy Trading.
根据Elder's Force Index修改而成,取消了幅图指标,仅用bar color来表现上涨,下跌和转折。
绿色k线代表上涨动能充足,红色k线表示下跌动能充足;
蓝色k线表示下跌力竭,可能会上涨;
黄色k线表示上涨力竭,可能会下跌。
当然,任何时候抄底摸顶都是困难的,该指标需要和形态或者其他预测反转的指标一起判断才能增加成功率。
祝交易愉快。
緑は上昇トレンドで、赤は下落トレンドです;
青は下落が尽きて上昇する可能性があることを示すことで、黄色は上昇が終わり、下落の可能性があることを示しています。
成功率を高めるためには、パターンや反転を予測する他の指標と合わせて判断する必要があります。
Happy Trading。
[LanZhu] - Bursa Index/Sector Trend With PortfolioDescription
Hi all, this is a simple indicator that shows trend of both KLCI and sectors of Bursa . The sector finding is using my Bursa_Sector library. Besides, I have also included portfolio tracker which is by Mohamed3nan in this script.
Usage
Top Trend - Malaysia KLCI Index Trend
Bottom Trend - Any Bursa Sector Trend
Portfolio Table - Copy from Portfolio Tracker by Mohamed3nan
Dynamic Moving AveragesThis indicator uses what I call Dynamic Moving Averages to identify trends. The reason these moving averages are dynamic is that they track different sources based on the trend. Allow me to explain...
Low = identifies the least sellers were willing to sell for in a given period.
High = Identifies the most buyers were willing to buy for in a given period.
Avg Low = Shows the least sellers were willing to sell for over several periods.
Avg High = Shows the least buyers were willing to buy for over several periods.
If, in an uptrend, the closing price closes below the Avg Low, a trend change could be coming to the downside. If, in a downtrend, the closing price closes above the Avg high, a trend change could be coming to the upside.
This indicator uses a single moving average to identify the trend. If price is above this MA, we are in an uptrend. Below it, we are in a downtrend. I recommend using that 50 length as your trend. Any moving averages that are Dynamic, will track the low when above the Trend MA and track the High when below the trend MA.
When Price crosses a Dynamic Moving Average, the trend is likely changing. I recommend using 3 MAs at a time (trend + 2 shorter MAs), but I have provided 7 in total.
Daily HIGH/LOW strategyThis is a DAILY High/LOW strategy combined with a moving average and volume for more accuracy.
The rules are simple :
For long if we had a cross of the high with the previous high and close of the candle is above moving average and chaikin money flow volume is positive we have a long entry.
We exit when we cross down the moving average with the close of the candle.
For short if we had a crossdown of the low with the previous low and close of the candle is below moving average and chaikin money flow volume is negative we have a short entry.
We exit when we cross above the moving average with the close of the candle.
This strategy has no risk management inside so use it with caution.
If you have any questions, let me know
Bank Levels - Psychological Levels - Bitcoin, Indices, ForexThis got removed so I'm publishing it again.
What it is:
- This script draws in levels refereed to as bank levels. They are basically psychological/even numbers(40000, 45000, 150, 1850..)
Why doesn't it work on some charts?
- Each pair has a different tick value. You will have to edit the code to make it work on certain pairs. It's pretty simple, take a look.
Flow of RangeThe Flow of Range is calculated by averaging the range for the given bars for the short term oscillations, then averaging the average to determine long term runs.
Above 0 indicates bullish momentum, below 0 indicates bearish momentum.
Notice the behavior of the market when the range is increasing and decreasing - both on the long and short term oscillations.
The indicator should be used in a discretionary manner along with your usual preferred tools.