[blackcat] L1 Richard Poster Trend PersistenceLevel 1
Background
In Traders’ Tips of February 2021, the focus is Richard Poster’s article in the February 2021 issue, “Trend Strength: Measuring The Duration Of A Trend”.
Function
In his article in this issue, Richard Poster outlines several common ways to evaluate the strength and duration of trends. Then he evaluates their sensitivity to volatility. Next, he steps up our game a bit by proposing an indicator that seeks to measure a trend’s persistence rate, or TPR for short. TPR turns out to be relatively insensitive to the influence of volatility.
Financial markets are not stationary; price curves can swing all the time between trending, mean-reverting, or entire randomness. Without a filter for detecting trend regime, any trend-following strategy will bite the dust sooner or later. In his article in this issue, Richard Poster offers a trend persistence indicator (TPR) for helping to avoid unprofitable market periods.The TPR indicator measures the steepness of a SMA (simple moving average) slope and counts the bars where the slope exceeds a threshold. The more steep bars, the more trending the market. Threshold, TPR period, and SMA period are the parameters of the TPR indicator.
Remarks
This is a Level 1 free and open source indicator.
Feedbacks are appreciated.
Cycles
S2BU2 Stochastic Momentum Convergence DivergenceFair Use:
Please do not take my work and sell it under your own name. This was created to benefit everyone - not one person. Feel free however to use it as part of whatever work you wish to sell (of course i would applaud also giving ideas away for free - your choice though ;)
What it is:
This is a twist on the stochastic momentum indicator . It combines the classic stochastic momentum with a slow moving trendline to improve the warning signal for the end of a trend
How it works:
The classic Stochastic Momentum indicates an uptrend when the smi crosses above the signalline and conversely a downtrend when it crosses below.
The improved indicator also shows trend sustainability by displaying a vertical line when the trendline and signal line cross each other. Trendline above signalline indicates a sustained uptrend, trendline below signalline indicates a sustained downtrend.
How to use:
Note this is only a recommendation and not advice. Feel free to experiment and adjust the indicator to fit your tradingstyle. This is only my personal setup. Feel free to share your findings.
Set Alerts for crossovers between smi and signal on 1h and 4h. Also set alerts for crossovers between trend and signal on 4h.
(again, no advice - think for yourself!)
If smi and signal crossdown -> short
If smi and signal crossup -> long
If trend and signal crossdown between top and middle line-> major short
If trend and signal crossup between bottom and middle line -> major long
If trend and signal cross anywhere else -> get out and wait for a new signal
You could also stay in a trend for as long as the trendline does not crossover on the 4h. This works well for major trends and indicates very well the end it.
The end of a major trend is not necessarily the start of a major uptrend - there can and probably will be a consolidation phase.
This does not work well in a choppy market, do not keep a trade going until trend crossover if the market is choppy - you will mostly close with losses!
//chart
BRT Trading Hours CryptoBackground to let you know when it's weekend days and when it's between 8am and 12pm in BRT timezone for studies.
Fed and ECB Calendar by KziHello traders,
Here is a script that i've done for testing the timestamp and the input.time fonction.
You can see verticals lines blue and yellow.
The blue are the ECB meeting date (7 dates)
The yellow are the FED meeting date. (10 Dates)
// In the parameter you can enter the next rolling month date for ECB and FED
// I don't figure out how to add label / Txt on the lines
// And be carreful i don't put the real hours of the meeting.
Phantom - My Session RangeThis is a modification of a script by RobMinty, "FXN - Asian Session Range" The script provides functionality to track specific trading sessions based on user preference rather than just the market sessions open and close. The idea is to help you hold yourself accountable to your specific trading times as well as backtest various marketing timings suitable to your schedule.
This script utilizes RobMinty's pine code to visualize your market session. We have adjusted the script to project the end of the session before the candles print - as well as adding/subtracting the horizontal and/or vertical lines around the current session box. This should help you understand how much time you have left in your session with a quick visual representation. While we have made some additions and adjustments to RobMinty's script- The inputs and functions of the combined script have not changed significantly from the originals. Like the originals, the code has been made open-source. If this script is reused or modified, please provide credit to RobMinty. If you plan to use this specific code with the ability to remove lines from the box and project session end forward, please credit both of us.
Cosmic Pi Troll CycleBased on the Cosmic Pi cycle for BTC, but this indicator also includes the cycles for ETH and LINK.
All credits to cosmic_indicators for the initial idea.
Risk Indicator OverlayInvestigates relationship between various moving averages for different crypto assets. Displays risk based on historical data. Can be used together with "Risk Indicator"
Risk IndicatorInvestigates relationship between various moving averages for different crypto assets. Displays risk based on historical data. Can be used together with "Risk Indicator Overlay"
Benjamin Cowen's Simplified Risk MetricJust a simple risk indicator for Bitcoin. Originally created by the great Benjamin Cowen. I just put his idea to code.
Inflation Rate of ChangeInflation and the Fed interest rate impacts all corners of the economy. Today I am releasing to the community an indicator that measures the rate of change of inflation with historical data back to ~1950. I built this to study the historical market impacts of inflation and changes to the Fed rate (see separate indicator I published for Fed Funds Rate here ).
What this indicator does:
This indicator pulls in Consumer Price Index data and applies a rate of change formula to it. The output is measured as a percentage. I.e. 7 would mean a 7% rate of change over the look-back period.
Options in the indicator:
You can change the amount of bars back it uses to calculate rate of change. By default it is set to 253, which would be looking 1 year back on a normal stock market day chart. If you are on a month chart, you would input 12 there to look 1 year back, etc.
There are also different versions of the CPI that you can select with a drop-down input to pull in different inflation measures:
FRED:CPIAUCSL = Urban Consumers, All Items (this is the default data it pulls, and is a common way to measure inflation)
FRED:CPIUFDNS = Food
FRED:CPIHOSNS = Housing
FRED:CPIENGSL = Energy
Disclaimer: Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
10-2 Year Treasury Yield Spread by zdmreLong-term bond yield reflects inflation. Short-term bond yields are tools used to predict Fed's interest rate policy. Spread between the two represents four cycles of an economy.
1. Growth
Short-term yield rises as interest rates rise. Spread narrows.
2. Slow growth
Central bank raises interest rates faster and short-term yield exceeds long-term yield. Spread turns negative.
3. Recession
High interest rates lead to more defaults. Inflation caps consumption. Central bank lowers interest rate to stimulate the economy and short-term yield falls. Spread widens.
4. Recovery
Central bank continues easing. Spread remains wide and yield curve remains steep.
0 = Recession Risk
2.6 = Recovery Plan
DYOR
Fed Funds Rate IndicatorWith the current level of inflation and the Fed outlook on interest rates, it inspired some studying on the relationship between Fed rate increases and stock market performance over periods of inflation. Today I am releasing to the community an indicator that will show you the Fed Funds Rate historically. You can add it to any chart or index to study the impact of Fed Funds Rate changes.
There are 2 options for the indicator data source you can select in the indicator settings. FRED:EFFR data updates daily but only goes back ~20 years. FRED:FEDFUNDS data only updates monthly but goes back to 1947.
Disclaimer: Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
GOOG v GOOGL ArbitrageTiny little indicator.
Class A shares of Google ($GOOG) have voting power. Class C shares ($GOOGL) don't. So Class A sells for more since they're strictly better than class C, but how much more?
With this indicator, we can see that it's usually about +0.5%. So if it's ever different than that, there might be a small arb opportunity as it rebalances itself. i.e. If it's negative, then class C is temporarily more expensive, and you could short class C and simultaneously buy class A. Alternatively, if it's 2% above, you could do the opposite.
ETH Gravity OscillatorThis indicator is a deviation of a Center of Gravity Oscillator corrected for the diminishing returns of Ethereum.
I've set up this indicator for it to be used on the weekly timeframe . The indicator oscillates between 0 and 10, where 0 indicates oversold conditions and 10 indicates overbought conditions. What is interesting is that it is not particularly ideal for identifying market cycle tops, but generally picks out the most euphoric region in the initial parabolic rally. Good to potentially keep in mind if there is a second bounce to the peak!
The indicator plots in any ETH charts. It paints in all time frames, but Weekly time frame is the correct one to interpret the 'official' read of it.
Made at the request of a kind commenter. If you would like to request different derivations of this script be sure to let me know!
Tesla Coil MLThis is a re-implementation of @veryfid's wonderful Tesla Coil indicator to leverage basic Machine Learning Algorithms to help classify coil crossovers. The original Tesla Coil indicator requires extensive training and practice for the user to develop adequate intuition to interpret coil crossovers. The goal for this version is to help the user understand the underlying logic of the Tesla Coil indicator and provide a more intuitive way to interpret the indicator. The signals should be interpreted as suggestions rather than as a hard-coded set of rules.
NOTE: Please do NOT trade off the signals blindly. Always try to use your own intuition for understanding the coils and check for confluence with other indicators before initiating a trade.
Lev Umanov Sin EquationThis indicator is taken from the calculations made by Lev Umanov. It predicts the peaks of Bitcoin. The indicator works with most BTCUSD pairings.
Mean Shift Pivot ClusteringCore Concepts
According to Jeff Greenblatt in his book "Breakthrough Strategies for Predicting Any Market", Fibonacci and Lucas sequences are observed repeated in the bar counts from local pivot highs/lows. They occur from high to high, low to high, high to low, or low to high. Essentially, this phenomenon is observed repeatedly from any pivot points on any time frame. Greenblatt combines this observation with Elliott Waves to predict the price and time reversals. However, I am no Elliottician so it was not easy for me to use this in a practical manner. I decided to only use the bar count projections and ignore the price. I projected a subset of Fibonacci and Lucas sequences along with the Fibonacci ratios from each pivot point. As expected, a projection from each pivot point resulted in a large set of plotted data and looks like a huge gong show of lines. Surprisingly, I did notice clusters and have observed those clusters to be fairly accurate.
Fibonacci Sequence: 1, 2, 3, 5, 8, 13, 21, 34...
Lucas Sequence: 2, 1, 3, 4, 7, 11, 18, 29, 47...
Fibonacci Ratios (converted to whole numbers): 23, 38, 50, 61, 78, 127, 161...
Light Bulb Moment
My eyes may suck at grouping the lines together but what about clustering algorithms? I chose to use a gimped version of Mean Shift because it doesn't require me to know in advance how many lines to expect like K-Means. Mean shift is computationally expensive and with Pinescript's 500ms timeout, I had to make due without the KDE. In other words, I skipped the weighting part but I may try to incorporate it in the future. The code is from Harrison Kinsley . He's a fantastic teacher!
Usage
Search Radius: how far apart should the bars be before they are excluded from the cluster? Try to stick with a figure between 1-5. Too large a figure will give meaningless results.
Pivot Offset: looks left and right X number of bars for a pivot. Same setting as the default TradingView pivot high/low script.
Show Lines Back: show historical predicted lines. (These can change)
Use this script in conjunction with Fibonacci price retracement/extension levels and/or other support/resistance levels. If it's no where near a support/resistance and there's a projected time pivot coming up, it's probably a fake out.
Notes
Re-painting is intended. When a new pivot is found, it will project out the Fib/Lucas sequences so the algorithm will run again with additional information.
The script is for informational and educational purposes only.
Do not use this indicator by itself to trade!
Interest Rates | USA / EU / UKThis script shows the Interest Rates of the USA, EU and UK.
USA = Red
EU = Blue
UK = White
CyclesTime based indicator attempting to show changes in a cycle based on the different time elapsed between new highs and new lows in a given time period. Useful when combined with elliott wave price structure. A drop above/below 0 suggests a wave 4 whilst new highs/lows of the indicator suggest whether a bullish or bearish trend is in place. You can change the time cycle as you like. Any Q's please post, i'll be happy to answer them. (If I can)
MACRO BTC HEALTH 1WThis indicator is used as MACRO tool to view the outlook of BTC on the 1W time frame to illustrate (BLX chart works best)
BTC's price action and where it's at, it helps provide an indication of the crypto market's current health as BTC health is an overall indicator in the crypto market as a whole.
This indicator uses historic data to fit between 4 bands fitted to MA, top(red) when BTC is overheated, 2 bands in middle(yellow) when BTC in fair value, and bottom band(blue) when BTC is oversold
I combined MA that fit BTC 1W chart precisely to show when BTC looks overheated vs over sold using historic data.
When BTC is in the top bands historically overheated.
When BTC is in the middle it is fighting at fair value with the 2 yellow lines in the middle, bullish when above yellow lines, as they act as support, and in downtrend when price is below yellow lines and can act as resistance.
Historically the 200W MA is where BTC finds support at an oversold level at the bottom blue line.
When two yellow lines in middle cross downwards historically results in a downtrend to the bottom oversold line (blue). and when two yellow lines cross up and BTC holds them as support bullish trend continues until it is overheated passed the red band.
This indicator is not meant for day trading but is meant to illustrate a MACRO view of BTC current situation from a zoomed-out view, and to help illustrate to investors where things are at so they leave emotions out of the market and can make decisions based on BTC current levels using Historic data. Pro tip use bottom line(blue, oversold) as an opportunity to buy in and top line red(overheated) to scale out of positions, LONG TERM CRYPTO IS BULLISH BUT GREAT TO GET AN OUTLOOK OF THE CURRENT STATE OF BTC, WHILE ALSO USING MACRO ECONOMIC SENTIMENT IRL, FUNDAMENTAL ECONOMIC DECISIONS, ECONOMIC CONDITIONS/ENVIRONMENT, ECONOMIC HEALTH ,FED DECISIONS, INTEREST RATE ENVIRONMENT AND OF COURSE LOOKING AT CRYPTO ADOPTION.
Hope this indicator helps leave emotions out of the market by providing a good guide of BTC sentiment, and its current health to make decisions accordingly. NFA but good to envision the MACRO BTC HEALTH at the 1W timeframe.