Ehlers Instantaneous Phase Dominant Cycle [CC]The Instantaneous Phase Dominant Cycle was created by John Ehlers (Stocks & Commodities V. 18:3 (16-27)) and this is one of many similar indicators that I will be publishing from Ehlers in the next few months that calculate the current dominant cycle period. The cycle period can be used in multiple ways but generally this means that if the stock is currently at a low then the current cycle period will tell you when the next lowest low will get hit or vice versa. This is also useful for using this cycle period as an input for other indicators to provide a very good adaptive length. Let me know how you wind up using these indicators in your daily trading. I have included the same buy and sell signals from my recent Hilbert Transform and so buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish!
Cycle
Ehlers Adaptive Cyber Cycle [CC]The Adaptive Cyber Cycle was created by John Ehlers and this is a cycle based indicator which you don't find too many of these days. Each stock goes through cycles which are repeating patterns of price movement and cycle indicators help you find the timing of the cycle to capitalize on the underlying cycle. That is an extremely simple explanation but most importantly don't interpret these indicators as the same as other indicators because it may seem like there are very many false signals but that is because of the different cycles the stock is undergoing. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish.
Cyclic Smoothed RSI MTFAdaptive cyclic smoothed Relative Strength Indicator (csRSI MTF)
The cyclic smoothed RSI MTF indicator is an enhancement of the RSI , adding zero-lag smoothing, adaptive oversold/overbought bands and period color highlighting from higher timeframe to filter signals.
Providing the following advanced features:
using the current dominant cycle length as input for the indicator to ensure more accurate change in trends,
additional smoothing without introducing lag and maintaining clear sharp turns for signal generation,
adaptive upper and lower bands to avoid whipsaw trades and adapt the indicator to trending/cyclic conditions,
using higher time-frame csRSI oversold/overbought conditions to automatically highlight time windows with green/red backgrounds on the indicator panel for signal filtering and/or alert rules,
can be used to trigger alerts on your key symbols to get informed when a red/green windows are reached.
The following common problems with standard indicators are solved by this indicator:
First, normal indicators introduce a lot of false signals due to their noisy signal line. Second, to compensate for the noise, one would normally try to add some smoothing. But this only results in adding more delay to the indicator, which makes it almost useless. Third, oscillators contain static threshold levels to define oversold/overbought conditions. However, the market is not static and changes between trending and cycling periods. In trending periods, these static oversold/overbought levels are useless ore will trigger too much whipsaw trades. Finally, indicators don't take their state from other timeframes into account to filter signals.
All four problems described above are solved by the developed adaptive cyclic RSI with embedded MTF period highlighting.
Examples
S&P500 EMini Futures - csRSI 2H chart / 1D filter example signals
S&P E-Mini Futures 2h chart with daily higher time-frame filtering period for the csRSI, showing the standard RSI in the lower panel for signal comparison, signals from the csRSI are marked on the price chart
Bitcoin BTC /USD - csRSI 2H chart / 1D filter example signals
Bitcoin BTC /USD 2h chart with daily higher time-frame filtering period for the csRSI, signals marked
EUR/USD Forex - csRSI 20min chart / 2h filter example signals
EUR/USD 20min chart with 2H higher time-frame filtering period for the csRSI, signals marked
Info:
All three examples are setup with the basic standard settings and no additional parameter adjustments. The placed arrows on the price/indicator panel and the projection price areas have been added manually to visualize the signals for an discretionary trading approach. They are derived based on standard technical indicator oscillator readings (signal turn above/below bands). Due to the nature of the indicator (ultra-smooth, sharp curves, dynamic bands), these signals are easy to spot, and will help to avoid whipsaw trades in volatile conditions.
Settings & Parameter
The Inputs section allows you to select the time frame for the indicator signals. We recommend keeping the indicator time-frame according to your chart time frame ("Same as chart"). The cycle length allows to improve the signals by entering the dominant cycle length of the analyzed dataset. This parameter is optional if the current dominant cycle is not known. In that case, leave it at 20. The dominant cycle length can even improve the indicator signal generation. The examples above have not been optimized by using the dominant cycle length and just used the standard setting of 20.
The MTF CYCLE FILTER area is used to set the time-frame used as filter to plot the colored indicator background in red and green areas when the higher time-frame indicator is above (red) or below (green) the dynamic bands. These indicate the period of time with high probability to look for signals on the main indicator line.
The MTF Resolution parameter input is important for generating the highlighted red/green areas on the indicator panel. You must enter a higher time-frame than your indicator time-frame in order to get the reliable highlighting. We recommend the following combinations of trading time-frame and filter time-frame resolutions:
Chart Timeframe | MTF Indicator Highlighting Resolution
------------------------------------------------------------------------
20 min | 2 h
2 h | 1 d
You can enter the current dominant cycle length on the chosen higher time-frame resolution to even further optimize the indicator accuracy in the field "MTF CYCLE FILTER - Cycle Length".
The Style sections allows to active/de-active individual plots. The standard setting disables the higher time-frame csRSI indicator which is only used to indicate the colored areas. If required, you can also enable the MTF indicator and adaptive bands to be plotted in the same indicator panel. The values shown in the style section also indicate which values are available for individual alert generation.
Automatic Signals & Alerts
It is possible to create your own automatic signals with the csRSI MTF indicator using the TradingView alert function. Click on the three dots "More" beside the indicator name label and select "Add Alert on csRSI ..." from the context menu. For example, if you want to receive an alert when the high probability periods (red/green highlighted areas) have been reached for a symbol without manually watching the indicator panel, you can set up a custom alert. The csRSI indicator provides the raw values necessary to set up your alarm conditions. Set the "CSRSI MTF" as the value for the "Out of Channel" condition and select the "HigBand MTF" and "LowBand MTF" indicator values as the upper and lower limit parameters in the alarm's dialog box. Once you have set up this alarm, you will not need to monitor your charts manually. The TradingView alert will inform you as soon as an important time zone is reached. These are the situations when you would open the chart and watch for trigger signals on the indicator line. If you set up this alert as an email, you can even focus on other things and let the csRSI MTF highlighter condition alert you when you should pay attention to the trading chart.
Usage & Trade Signals
Classic rules apply as with every technical oscillator. In addition use this indicator to identify the following conditions:
Indicator turns above/below the adaptive upper and lower bands (expected trend reversals)
Indicator crosses below upper band / crossed above lower band (start of trend reversal)
Indicator crosses above upper band / crossed below lower band (trend continuation/confirmation)
Divergence between price / indicator indicate strong signal confidence
Hidden divergences between price/indicator indicate string signal confidence
After strong price movements, wait for the second signal confirmed by a divergence
Use the mentioned conditions in the highlighted red/green periods indicated by the MTF settings
Purpose & Disclaimer
This indicator is not designed for use as an automated trading strategy. This is an improved technical indicator using the dominant cycle to provide its advanced features. The basic applications of technical analysis for using oscillators apply. The script is intended for use in discretionary trading and can be used as a part of automated systems. Indicator signal failures will occur as you should expect with every technical indicator. If you are not sure if this indicator might help your trading style, please try and check our open source public version which will give you basic understanding upfront.
Basic open-source public version
This indicator is an advanced version of our public available open-source cyclic smoothed RSI indicator named "RSI cyclic smoothed v2". The advanced invite-only version provides fully automatic time frame highlighting by using a cyclically smoothed RSI from a higher time frame to indicate time frames with high probability signals. These high probability windows are highlighted when the indicator from the higher time frame is in dynamic overbought or oversold territory. You will find the basic open-source public version here below for your own review:
How to get access
Please check the "authors instructions" section for further details.
Bitcoin Price Bottom IndicatorThis Indicator flashes up on bottoms of each Bitcoin market cycle. It’s suggesting, that the price of BTC finds strong support at the 200W SMA . Thats why it’s not flashing up in the first cycle, because there was not enough price data at that moment.
This Indicator uses price data from the weekly timeframe so for the best experience USE WEEKLY TIMEFRAME .
Ehlers Adaptive Center Of Gravity [CC]The Adaptive Center Of Gravity was created by John Ehlers and this is a regular center of gravity indicator combined to be use with the current cycle period. If you are not familiar with stock cycles then I would highly recommend his book on the subject: Cycle Analytics. Buy when the indicator turns green and sell when it turns red.
Let me know if there are any other indicators you want me to publish!
Battleplan 2-Time Cycle v1This chart indicator is one of the most used cyclical analysis tools in the world!
It is possible to set offsets and scales of the battleplan.
Up to six sub-waves added together can be displayed.
With this tool, only 2-times cycles can be displayed.
For any bugs contact the creators
Bottom Touch[Dizart]--------------- ---------------
The indicator determines the bottom in the market, from which a rebound or a global reversal may start with a high probability. Works on any symbol or market.
tuning - If the asset is low volatility, then the price often does not reach the bottom. Adjust the `Bottom Touch` to the closest bottom on the graph.
--------------- ---------------
Индикатор определяет дно на рынке, от которого с большой вероятность может начаться отскок или глобальный разворот. Работает на любом символе или рынке.
tuning - Если актив низковолатильный, то цена часто не доходит до дна. Отрегулируйте `Bottom Touch` до ближайшего дна на графике.
2T sine wave + correlation ranks v1This indicator produces up to 6 sinusoids very useful in the cyclical analysis, moreover a correlation index has been inserted to understand which cycle is more correlated to the price trend.
The degree of correlation is represented by the small dots at the end of the waves.
//The highest is the most correlated; all the others to follow
Carpe Diem [Strategy]Carpe Diem Strategy, a wave cycle strategy that only enters when markets are up trending.
The script uses 3 different trend detection indicators including volume which helps with confirmation.
This script has 10 variations built within it which are fitted for the coins differnt coinditions
The coins included are
BTC/USDT 4H
ETH/USDT 4H
LTC/USDT 4H
ADA/USDT 4H
BNB/USDT 2H
BAND/USDT 4H
BAT/USDT 3H
OGN/USDT 4H
ZIL/USDT 4H
BZRX/USDT 2H
How to use the Indicator
You can change what plots are shown in the settings Cog
When the wave lines are green, the market is up trending and will be looking for a trade whereas when they are red, the market is in a sideways or downtrend.
The buy signal is given by the fast wave either crossing over the slow wave line, or crossing over the value of 25.
The exit signal is when the wave crosses back under the 75 value
This strategy includes Fees and there is NO Repaint. The script is written in version 4
There is an option in the settings cog to choose from 10 Coins and timeframes which the Strategies have been optimised for.
There is also another option in the settings cog to change the backtesting range.
There is also another option to adjust the stop loss. I have left it on the Default value which I believe works best
This strategy performs best on the Binance listings
Sharktank - Pi Cycle PredictionThe Pi Cycle indicator has called tops in Bitcoin quite accurately. Assuming history repeats itself, knowledge about when it might happen again could benefit you.
The indicator is fairly simple:
- A daily moving average of 350 ("long_ma" in script)
- A daily moving average of 111 ("short_ma" in script)
The value of the long moving average is multiplied by two. This way the longer moving average appears above the shorter one.
When the shorter one (orange colored) crosses above the longer (green colored) one, it could mean the top is in.
These moving averages rise at a certain rate. Using these rates we could try to estimate a possible crossover moment. That's exactly what this indicator does! It gives the user a prediction of when a crossover might happen.
Special thanks to:
- Ninorigo, for making his indicator public. This one uses his as a starting point.
- The_Caretaker, for coming up with this idea about calling a top. Yet, his is more price-based, this one is more time-based.
CT Reverse Pi Cycle Bitcoin Top IndicatorIntroducing the Reverse BTC Pi Market Cycle Top indicator
Much respect to Philip Swift the original creator of this idea and big thanks to Tradingview author Ninorigo for sharing the script which this indicator is based on.
Philip Swift has noted that:
Using the x2 multiple of the 350 day moving average along with the 111 day moving average provides an interesting market cycle indicator.
Over the past three market cycles, when the 350DMA x2 crosses below the 111DMA, Bitcoin price peaks in its market cycle, this has been accurate to within three days of Bitcoin price topping out.
Here I have modified an existing script by Tradingview author @Ninorigo which shows the moving averages and gives signals upon crossover by adding the following features:
A function which shows the price at which the 350DMA will Cross Below the 111DMA.
(This is calculated from the prior bar closing data and does not repaint)
An “anticipated cross” function which may give a 1 bar advanced warning of a cross.
(this is calculated from current bar values and may change and repaint)
The crossover levels are shown in an info label to the right of the current price.
When there is a BTC Pi Market Cycle Top anticipated cross on the next bar there will be an orange background signal.
When there is an actual BTC Pi Market Cycle Top cross there will be a red background signal
When there is an anticipated cross back there will be a blue background signal
When there is an actual cross back there will be a green background signal
This indicator will show the appropriate moving averages and crossover information from the daily timeframe regardless of the timeframe you are using.
This should be helpful in more accurately identifying the price level where the Pi Market Cycle moving averages will cross denoting a possible market cycle top.
It is interesting to note:
350 / 111 = 3.153
Which is the closest we can get to Pi when dividing 350 by another whole number.
This is a script to give another view and metric on an interesting experimental idea. This is not financial advice.
Medium Term Weighted Stochastic (STPMT) by DGTLa Stochastique Pondérée Moyen Terme (STPMT) , or Mᴇᴅɪᴜᴍ Tᴇʀᴍ Wᴇɪɢʜᴛᴇᴅ Sᴛᴏᴄʜᴀꜱᴛɪᴄꜱ created by Eric Lefort in 1999, a French trader and author of trading books
█ The STPMT indicator is a tool which concerns itself with both the direction and the timing of the market. The STPMT indicator helps the trader with:
The general trend by observing the level around which the indicator oscillates
The changes of direction in the market
The timing to open or close a position by observing the oscillations and by observing the relative position of the STPMT versus its moving average
STPMT Calculation
stpmt = (4,1 * stoch(5, 3) + 2,5 * stoch(14, 3) + stoch(45, 14) + 4 * stoch(75, 20)) / 11.6
Where the first argument of the stoch function representation above is period (length) of K and second argument smoothing period of K. The result series is then plotted as red line and its moving average as blue line. By default disabled gray lines are the components of the STPMT
The oscillations of the STPMT around its moving average define the timing to open a position as crossing of STMP line and moving average line in case when both trends have same direction. The moving average determines the direction.
Long examples
█ Tʜᴇ CYCLE Iɴᴅɪᴄᴀᴛᴏʀ is derived from the STPMT. It is
cycle = stpmt – stpmt moving average
It is indicates more clearly all buy and sell opportunities. On the other hand it does not give any information on market direction. The Cycle indicator is a great help in timing as it allows the trader to more easily see the median length of an oscillation around the average point. In this way the traders can simply use the time axis to identify both a favorable price and a favorable moment. The Cycle Indicator is presented as histogram
The Lefort indicators are not a trading strategy. They are tools for different purposes which can be combined and which can serve for trading all instruments (stocks, market indices, forex, commodities…) in a variety of time frames. Hence they can be used for both day trading and swing trading.
👉 For whom that would like simple version of the Cycle indicator on top of the main price chart with signals as presented below.
Please note that in the following code STMP moving average direction is not considered and will plot signals regardless of the direction of STMP moving average. It is not a non-repainting version too.
here is pine code for the overlay version
// © dgtrd
//@version=4
study("Medium Term Weighted Stochastic (STPMT) by DGT", "STPMT ʙʏ DGT ☼☾", true, format.price, 2, resolution="")
i_maLen = input(9 , "Stoch MA Length", minval=1)
i_periodK1 = input(5 , "K1" , minval=1)
i_smoothK1 = input(3 , "Smooth K1", minval=1)
i_weightK1 = input(4.1 , "Weight K1", minval=1, step=.1)
i_periodK2 = input(14 , "K2" , minval=1)
i_smoothK2 = input(3 , "Smooth K2", minval=1)
i_weightK2 = input(2.5 , "Weight K2", minval=1, step=.1)
i_periodK3 = input(45 , "K3" , minval=1)
i_smoothK3 = input(14 , "Smooth K3", minval=1)
i_weightK3 = input(1. , "Weight K3", minval=1, step=.1)
i_periodK4 = input(75 , "K4" , minval=1)
i_smoothK4 = input(20 , "Smooth K4", minval=1)
i_weightK4 = input(4. , "Weight K4", minval=1, step=.1)
i_data = input(false, "Components of the STPMT")
//------------------------------------------------------------------------------
// stochastic function
f_stoch(_periodK, _smoothK) => sma(stoch(close, high, low, _periodK), _smoothK)
//------------------------------------------------------------------------------
// calculations
// La Stochastique Pondérée Moyen Terme (STPMT) or Medium Term Weighted Stochastics calculation
stpmt = (i_weightK1 * f_stoch(i_periodK1, i_smoothK1) + i_weightK2 * f_stoch(i_periodK2, i_smoothK2) + i_weightK3 * f_stoch(i_periodK3, i_smoothK3) + i_weightK4 * f_stoch(i_periodK4, i_smoothK4)) / (i_weightK1 + i_weightK2 + i_weightK3 + i_weightK4)
stpmt_ma = sma(stpmt, i_maLen) // STPMT Moving Average
cycle = stpmt - stpmt_ma // Cycle Indicator
//------------------------------------------------------------------------------
// plotting
plotarrow(change(sign(cycle)), "STPMT Signals", color.green, color.red, 0, maxheight=41)
alertcondition(cross(cycle, 0), title="Trading Opportunity", message="STPMT Cycle : Probable Trade Opportunity {{exchange}}:{{ticker}}-> Price = {{close}}, Time = {{time}}")
Ark Crypto HeatlineThis is the 'on chart' indicator. See also "Ark Crypto Heatband" indicator for a side-by-side BTC view, without a re-scaled line.
The crypto landscape is largely dominated by BTC and characterised by cyclical stages with varying degrees of mean reversion.
To understand what stage of the cycle we are currently experiencing, it is useful to examine to what degree the current price has extended beyond the long term average that BTC has established. This is true even when analysing other crypto assets as BTC is the dominant force in the crypto asset class.
This indicator uses the 1400 period daily SMA , which is broadly the 200 period weekly SMA. This can be configured, but historically has represented a baseline to which BTC commonly returns.
The graph plots current price in terms of multiples of this long term average. Traditionally, at multiples beyond 10, BTC is considered overextended with a higher likelihood of trending towards the mean thereafter. Colors indicate the extent of price extension.
Where the indicator is applied to non BTCUSD pairs, a smoothed conversion is applied, seeking to superimpose the BTC long period SMA onto the current chart.
The indicator specifically references BTC by default on all charts, as it is designed to use BTC as general purpose indication of where crypto as a whole currently sits. Accordingly the indicator is only to be used on crypto charts.
For best results on BTC, using BNC:BLX will give the longest historical view.
Ark Crypto HeatbandThe crypto landscape is largely dominated by BTC and characterised by cyclical stages with varying degrees of mean reversion.
To understand what stage of the cycle we are currently experiencing, it is useful to examine to what degree the current BTC price has extended beyond a long term average. This is true even when analysing other crypto assets and helpful to view side by side.
This indicator uses the 1400 period daily SMA, which is broadly the 200 period weekly SMA. This can be configured, but historically has represented a baseline to which BTC commonly returns.
The graph plots current price in terms of multiples of this long term average. Traditionally, at multiples beyond 10, BTC is considered overextended with a higher likelihood of trending towards the mean thereafter. Colors indicate the extend of price extension.
The indicator specifically references BTC by default on all charts as it is designed to use BTC as general purpose indication of where crypto as a whole currently sits. Accordingly the indicator is only to be used on crypto charts.
TopTenAlgo 8. Elliottwave Cycle EN: The Elliottwaves Cycle Oscillator is an indicator that allows the detection of impulsive (impulsive / ascend) or corrective (correction / fall) waves, ie each cycle (cycle) in Elliott Waves . The aim is to measure the speed of a real trend and to predict returns. In the uptrend or impulsive movement, Cycle continues its movement in the upper band after the price is set on a certain band, while in the downtrend or corrective move, the Cycle continues its movement in the lower band.
This algorithm is prepared with @Top10Algo ...
TR: Elliottwaves Cycle Osilatörü Elliott Dalgalarında ki impulsive (itkisel/yükseliş) yada corrective (düzeltme/düşüş) dalgaların yani her bir siklus’ un (cycle) önceden tespit edilmesini sağlayan bir göstergedir. Amaç gerçek bir trendin hızını ölçmek ve geri dönüşleri önceden tespit etmektir. Yükseliş trendi içinde yada impulsive bir harekette fiyat belli bir banda oturduktan sonra Cycle üst band’ da hareketine devam ederken, düşüş trendi içinde yada corrective bir harekette fiyat belli bir banda oturduktan sonra Cycle alt bandda hareketine devam eder.
Bu algoritma @Top10Algo ile beraber hazırlanmıştır...
Cycle Swing MomentumAdaptive Ultra-Smooth Momentum indicator
The Cycle-Swing-Indicator "CSI" provides an optimized "momentum" oscillator based on the current dominant cycle by looking at the swing of the dominant cycle instead of the raw source momentum. Offering the following improvements:
Smoothness
Zero delay
Sharpness at turning points
Robust and adaptable to market conditions
Accurate deviation detection
The following common problems with standard indicators are solved by this indicator:
First, normal indicators introduce a lot of false signals due to their noisy signal line. Second, to compensate for the noise, one would normally try to add some smoothing. But this only results in adding more delay to the indicator, which makes it almost useless. Third, standard indicators require a length adjustment to derive reliable signals. However, you never know how to set the right length.
All three problems described above are solved by the developed adaptive cyclic algorithm.
The above chart shows current Bitcoin 4h data from the last days as of writing with the proposed signal reading for this indicator. The standard momentum indicator is included for comparison.
HOW TO USE
The indicator works without any parameter and can be applied to any chart and any time-frame. It will adapt automatically to the Dominant Cycle and use the dominant cycle of the source data to derive the ultra smooth momentum curve. Adaptive upper/lower bands are included and highlight areas with extreme readings. Automatic divergence detection can be turned off/on.
HOW TO READ
The indicator can be used like any oscillator. In addition, it provides adaptive high and low bands.
* Look for turns above the upper/lower bands
* Look for divergences between source and signals line
Further reading/Original source:
The indicator uses the dominant cycle to optimize signal, smoothing and cyclic memory. To get more in-depth information on the Cycle Swing Indicator, please read Chapter 10 "Cycle Swing Indicator: Trading the swing of the dominant cycle" of the book "Decoding the Hidden Market Rhythm, Part 1" available at your favorite book store.
Related ideas:
Please also check the cyclic RSI indicator which also uses cyclic information to improve the signal.
[blackcat] L2 Ehlers Dual Differential Cycle Period MeasurerLevel: 2
Background
John F. Ehlers introuced Dual Differential Cycle Period Measurer in his "Rocket Science for Traders" chapter 7. The In-phase and Quadrature components are computed with the Hilbert Transformer using procedures identical to those in the Dual Differentiator.
Function
blackcat L2 Ehlers Homodyne Discriminator Cycle Period Measurer is used to measure Dominant Cycle (DC). This is one of John Ehlers three major methods to measure DC. These components undergo a complex averaging and are smoothed in an EMA to avoid any undesired cross products in the multiplication step that follows. The period is solved directly from the smoothed Inphase and Quadrature components. The interim calculation for the denominator is performed as Value1 to ensure that the denominator will not have a zero value. The sign of Valuel is reversed relative to the theoretical equation because the differences are looking backward in time.
Key Signal
Smooth --> 4 bar WMA w/ 1 bar lag
Detrender --> The amplitude response of a minimum-length HT can be improved by adjusting the filter coefficients by
trial and error. HT does not allow DC component at zero frequency for transformation. So, Detrender is used to remove DC component/ trend component.
Q1 --> Quadrature phase signal
I1 --> In-phase signal
Period --> Dominant Cycle in bars
SmoothPeriod --> Period with complex averaging
Pros and Cons
100% John F. Ehlers definition translation of original work, even variable names are the same. This help readers who would like to use pine to read his book. If you had read his works, then you will be quite familiar with my code style.
Remarks
The 4th script for Blackcat1402 John F. Ehlers Week publication.
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.
[blackcat] L2 Ehlers Phase Accumulator Cycle Period MeasurerLevel: 2
Background
John F. Ehlers introuced Phase Accumulation technique of cycle period measurement in his "Rocket Science for Traders" chapter 7. It is perhaps the easiest to comprehend. In this technique, John Ehlers measures the phase at each sample by taking the arctangent of the ratio of the Quadrature component to the In-phase component. A delta phase is generated by taking the difference of the phase between successive samples. At each sample Dr. Ehlers then looks backward, adding up the delta phases. When the sum of the delta phases reaches 360 degrees (2*pi in tradingview), we must have passed through one full cycle, on average. The process is repeated for each new sample.
Function
blackcat L2 Ehlers Phase Accumulator Cycle Period Measurer is used to measure Dominant Cycle (DC). This is one of John Ehlers three major methods to measure DC. The Phase Accumulation method of cycle measurement always uses one full cycle’s worth of historical data. This is both an advantage and disadvantage. The advantage is the lag in obtaining the answer scales directly with the cycle period. That is, the measurement of a short cycle period has less lag than the measurement of a longer cycle period. However, the number of samples used in making the measurement means the averaging period is variable with cycle period. Longer averaging reduces the noise level compared to the signal. Therefore, shorter cycle periods necessarily have a higher output Signal-to-Noise Ratio (SNR).
Key Signal
Smooth --> 4 bar WMA w/ 1 bar lag
Detrender --> The amplitude response of a minimum-length HT can be improved by adjusting the filter coefficients by
trial and error. HT does not allow DC component at zero frequency for transformation. So, Detrender is used to remove DC component/ trend component.
Q1 --> Quadrature phase signal
I1 --> In-phase signal
Period --> Dominant Cycle in bars
Pros and Cons
100% John F. Ehlers definition translation of original work, even variable names are the same. This help readers who would like to use pine to read his book. If you had read his works, then you will be quite familiar with my code style.
Remarks
The 2nd script for Blackcat1402 John F. Ehlers Week publication.
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.
Shenlong V2.3 - Trend cycleShenlong V2 is a script developed to facilitate the interpretation of long and short entries according to various conditionals that play with the trend.
The use of trend clouds has been implemented, which can be used as dynamic support / resistance . They also allow us to identify the current price cycle according to these guidelines, marking with a LONG or SHORT depending on the cycle in question. The appearance settings are user configurable. You can set alerts (long o short) to be aware of movements.
The use of recommended stop loss has been implemented, this can be used as a trailing stop to ensure profits or give the possibility of catching the trend, since it will move as the price forms its structure.
An information panel on stop prices has been implemented for ease of use.
Strategy - Uber STC - Schaff Trend Cycle [UTS]Backtesting of Uber STC - Schaff Trend Cycle
Backtest with focus win/loss profitability.
Formula: profitability = win / (win+loss)
Default equity 100k USD
Default 2% Risk per trade
Default currency USD
Define backtest interval precisely by month, year, day
LONG and SHORT positions
Visualize SL and TP on chart
ATR (len: 14, smooth: SMA)
ATR based Stop-Loss, if hit trade will be closed and considered as loss
ATR based Take-Profit, if hit trade will be closed and considered as win
On TP or SL hit the trade is closed and marked as win/loss
Uber STC - Schaff Trend Cycle [UTS]Desc:
The Schaff Trend Cycle (STC) is a charting indicator that is commonly used to identify market trends and provide
buy and sell signals to traders.
Developed in 1999 by noted currency trader Doug Schaff, STC is a type of oscillator and is based on the assumption that,
regardless of time frame, currency trends accelerate and decelerate in cyclical patterns.
This indicators source code is based on Releasing the Code to the Schaff Trend Cycle.pdf
Executive Summary
Schaff Trend Cycle is a charting indicator used to help spot buy and sell points in the markets.
Compared to the popular MACD indicator, STC will react faster to changing market conditions.
A drawback to STC is that it can stay in overbought or oversold territory for long stretches of time.
General Usage
There are two lines indicating overbought and oversold conditions, default at 75 and 25 which is customizable of course.
Signals are created on line crosses. They that can be used to enter LONG/SHORT or EXIT a trade.
If the STC crosses the lower line upwards a LONG signal is triggered and if it crosses the upper line a SHORT signal is triggered.
Line crosses in the other direction than the current trade also work as EXIT signal.
Alerts
Traders can easily use the reversal signal to trigger alerts from:
Cross Up
Cross Down
Those values are > zero if a condition is triggered.
Alert condition example: "Cross Up" - "Greater Than" - "0"
Moving Averages
16 different Moving Averages are available:
ALMA (Arnaud Legoux Moving Average)
DEMA (Double Exponential Moving Average)
EMA (Exponential Moving Average)
FRAMA (Fractal Adaptive Moving Average)
HMA (Hull Moving Average)
JURIK (Jurik Moving Average)
KAMA (Kaufman Adaptive Moving Average)
Kijun (Kijun-sen / Tenkan-sen of Ichimoku)
LSMA (Least Square Moving Average)
RMA (Running Moving Average)
SMA (Simple Moving Average)
SuperSmoothed (Super Smoothed Moving Average)
TEMA (Triple Exponential Moving Average)
VWMA (Volume Weighted Moving Average)
WMA (Weighted Moving Average)
ZLEMA (Zero Lag Moving Average)
A freely determinable length allows for sensitivity adjustments that fits your own requirements.
Ehlers Cyber Cycle [CC]The Cyber Cycle was created by John Ehlers (Cybernetic Analysis For Stocks And Futures pg 34) and this is one of my favorite Ehlers indicators. I use it personally for exits but it has several uses. It gives great entry and exit signals when you enter when it is at the bottom or at the very top during a cycle. When it is above 0 then the stock is in a strong uptrend and when it is below 0 then the stock is in a strong downtrend. It is also very reactive as well with zero lag according to Ehlers. Buy when the indicator line is green and sell when it is red.
Let me know if there are other scripts you would like to see me publish or if you want something custom done!