K's Reversal Indicator IK's reversal indicator I is a special combination between Bollinger bands and the MACD oscillator. It is a contrarian indicator that depends on the following conditions:
• A buy signal is generated whenever the current market price is below the 100-period lower Bollinger band while simultaneously, the MACD value must be above its signal line. At the same time, the previous MACD value must be below its previous signal line.
• A sell (short) signal is generated whenever the current market price is above the 100-period upper Bollinger band while simultaneously, the MACD value must be below its signal line. At the same time, the previous MACD value must be above its previous signal line.
The way to use K's reversal indicator is to combine it with your already long/short bias in a sideways/range market in order to maximize the probability of success.
Limitations of the indicator include the following:
• There are no clear exit rules that work well on average across the markets. Even though K’s reversal indicator gives contrarian signals, it does not show when to exit the positions.
• As with other indicators, it underperforms on some markets and is not to be used everywhere.
• False signals tend to occur during trending markets but there is no proven way to detect a false signal.
Forecasting
Taylor RuleThe Taylor rule is a simple formula that John Taylor devised to guide policymakers. It calculates what the federal funds rate should be, as a function of the output gap and current inflation. Here, we measure the output gap as the difference between potential output and real GDP. Inflation is measured by changes in the CPI, and we use a target inflation rate of 2%. We also assume a steady-state real interest rate of 2%.
MTF previous high and low quarter levelsDescription
An experimental script that prints quarter levels of the previous timeframe's high and low to the current timeframe. The idea is quite simple and is basically the Fibonacci pivoted on the previous high and low with quarter level settings (0,0.25,0.5,0.75,1 etc). The default setting is the previous daily high and low but can be customized on user discretion.
New quarter levels are printed after the close of the previous timeframe and open of the new timeframe (user's timeframe setting)
How To Use
Levels should not be used blindly. Levels can be used as confluence when aligned with high probability supply and demand zones, support, resistance, order blocks, and so on.
Credit to @HeWhoMustNotBeNamed for the Previous High/Low MTF indicator code and @mrbirman for the idea to put this together.
Recession indicator US2/10 Ysimple recession "forecaster" based on the US treasury bond rates.
When 2Y flips 10Y, a recession within a few months can happen.
US Treasury Constant Maturity SpreadsPlots and tabulates constant maturity treasury yield spreads
// colours per curve type for the plots and table headers
C_30Y_20Y=color.orange
C_10Y_5Y=color.purple
C_10Y_2Y=color.blue
C_7Y_5Y=color.gray
C_5Y_2Y=color.red
C_3Y_2Y=color.yellow
C_10Y_1Y=color.olive
Basic Binance Premium IndexA premium index indicator for Binance futures.
The premium index is based on the difference in price between the perpetual swap contract last price and the price of a volume weighted spot index.
Simply put: it shows you for each coin whether the spot market is trading higher than the Binance perpetual or not.
If future price is higher than spot in a rally, the rally isn't backed by real buys (spot) but by dumb perpetual longs which can indicate bearish PA. If spot price is higher than futures in a rally, the upside is backed by real money (spot) which can indicate bullish PA.
To calculate the premium, I simply took (futures_price/vwap(spot_price)-1)*100
This version includes
•BTC
•ETH
•LTC
•ICP
•BNB
•ADA
•DOGE.
You can display data as a smoothed moving average for improved readability.
This code is open source so feel free to use it in your scripts.
US Treasury All Yield Curve IORB WeightedI've updated my US Treasury All Yield Curve indicator to use the new FRED:IORB (interest on reserve balances), instead of the FRED:FEDFUNDS which is only updated monthly.
The new IORB doesn't provide very long lookback for data, so I'm publishing this as a new version and not an update, making it possible for users to choose which version best suits their needs.
BTC NVM Ratio - Onchain AnalysisIt is an onchain oscillator and is designed to operate at weekly timeframes and is only for Bitcoin.
Network Value to Metcalfe Ratio (NVM Ratio) is defined as the ratio of the log of market capitalization divided by the log of the square of daily active addresses in the specified window.
This oscillator evaluates bitcoin price according to the Metcalfe Ratio to shows whether the current value of Bitcoin is higher or lower than the real price
I made this comparison using a moving average of 100. The areas that are red in the weekly timeframe indicate that bitcoin is Overvalued. and The areas that are blue in the weekly timeframe indicate that bitcoin is undervalued.
BTC Composite Man V.1Wyckoff's theory t is one of the most influential theories of market expression, and the most important components of which are lateral movement areas and trends. This theory turns the graph into something like Dots and lines (stations and paths).
After getting acquainted with Wyckoff's theory, I read several books on the subject, hoping that they could help me identify this area of lateral movement, the area of accumulation, or distribution. But there was a fundamental drawback. It is challenging to diagnose this issue. The rules discussed in these books are highly interpretive and subjective, and two different individual traders may come to exactly opposite conclusions based on their interpretation.
But as I became more familiar with the onchain analysis, an idea came to my mind that might be useful for more objectively recognizing charts based on Wyckoff's theory.
Composite Man: Wyckoff proposed a theory to help understand stock price movements. this is the “Composite Man” theory. (The same concept of whales or strong hands.)
he said: “…all the fluctuations in the market and all the various stocks should be studied as if they were the result of one man’s operations. Let us call him the Composite Man, who, in theory, sits behind the scenes and manipulates the stocks to your disadvantage if you do not understand the game as he plays it; and to your great profit if you do understand it.” (The Richard D. Wyckoff Course in Stock Market Science and Technique, section 9, p. 1-2)
Composite Man is a hypothetical man who has so much money and stocks that when he wants he can gradually increase the price by buying stocks and creating demand, and when the price goes high enough he sells his stock and lower the price. The composite man is the main player in the market. Wyckoff says that if you want to make a good profit from the market, figure out what a composite man game is.
Having a way of showing us where the Composite Man is in the market, can help us understand future trends
Who are the strong hands in the cryptocurrency market? (I use the strong hand word here instead of the composite man)
Some buy or sell more per capita than other market participants (retailers).
To understand this in the bitcoin market, I have used 3 charts and concepts:
1- Sending Addresses: The number of coins addresses making inflow transactions to the exchange.
Indicates the number of sellers' wallets (number of sellers)
2- buyers Addresses: The number of coins addresses making outflow transactions from the exchange.
Indicates the number of buyers' wallets (number of buyers)
3- Pay attention to this issue: the volume of transactions shows both the volume of sales and the buy ( Volume of buy and sale is equal in the market)
The Composite Man indicator is created by dividing the Receiving Addresses of bitcoin by the Sending Addresses. After dividing these addresses, the moving average of Alma was calculated for them and compared with the moving average of 100 days.
Considering the above 3 issues, it can be concluded:
- If the number of Receiving Addresses is higher than the Sending Addresses (the number of people who bought compared to the number of those who sold), it indicates that more people bought and fewer people sold (given that the volume of sales and buys are the same) So the sellers were stronger hands. In such a situation, the composite man is on the sales side.
- If the number of Sending Addresses is higher than the Receiving Addresses (number of people who have sold more than the number of people who have bought), it indicates that more people have been sellers and fewer people have been buyers (given that the volume of sales and buys are the same) so the buyers were stronger hands. In such a situation, the Composite man is on the buying side.
Accordingly, if the swing line is above the 100-day moving average line, it indicates that stronger addresses are being sold and retailers are buying, and vice versa.
Ichimoku Cloud MasterIchimoku Cloud Master aims to provide the ichimoku trader with easy alert functionality to not miss out on valuable trade setups. The key purpose of this script is to better visualise crucial moments in Ichimoku trading. These alerts should not be used for botting in my opinion as they always need a human to confirm the ichimoku market structure. For example, is the Kijun-Sen flat and too far away from price? A good ichimoku trader will not enter at such a point in time.
Explanation of script:
Chikou(lagging span): pink line, this is price plotted 26 bars ago. People ignore the power of this it is crucial to see how chikou behaves towards past price action as seen in the chart below where we got an entry at red arrow because chikou bounced from past fractal bottom.
Kijun-Sen(base line): Black line or color coded line. This is the equilibrium of last 26 candles. To me this is the most important line in the system as it attracts price.
Kijun = (Highest high of 26 periods + Lowest low of 26 periods) ÷ 2
Tenkan-Sen(conversion line): Blue line. This is the equilibrium of last 9 candles. In a strong uptrend price stays above this line.
Tenkan = (Highest high of 9 periods + Lowest low of 9 periods) ÷ 2
Senkou A (Leading span A)= Pink cloud line, this is the average of the 2 components projected 26 bars in the future.
Senkou A = (Tenkan + Kijun) ÷ 2
Senkou B (Leading span B) = Green cloud line, this is the 52 day equilibrium projected 26 bars in the future.
Senkou B = (Highest high of prior 52 periods + Lowest low of prior 52 periods) ÷ 2
Notice how the distance between Chikou and the cloud is also 52 bars. This is all part of Hosoda's numbers which I am not going to explain here.
Fractals: These are the black triangles you find at key turning point. If you want to know how they work reseach williams fractals. I've used fractals with a period of 9 as it is an ichimoku number. These fractals are useful when working with ichimoku wave theory. Again I will not explain that here but in further education
Fractal Support: Ability to extend lines from the fractals which can be used as an entry/exit mechanism in your trading. For example wait for tenkan to cross kijun and then enter on fractal breakout.
Signals:
Crossing of Chikou (lagging span) with past Kijun-Sen: this will color code the Bars / Kijun-Sen (you can turn this off in options)
The script also has a signal for this, this will be the green and purple diamonds. Where green is bullish and purple is bearish.
wy is this important?
When current price plotted 26 candles back (chikou) crosses over the past equilibrium (kijun-sen) this usualy means price has moved past resistance levels where sellers come in. This indicates a switch in market structure and price is bullish from this point, this is the same in the other direction.
Kumo Twist: when the kumo cloud (future) has a crossover from for example green to red (bull to bear). The script plots these using the colored cross symbols as seen in the picture above. A chikou cross + a Kumo twist at same bar of next to eachother below the cloud can be a great entry sign: this would be an entry after cross in the chart above.
Kijun Bounce: when in an uptrend the price retraces back to Kijun-Sen and starts to go back up. These are marked by the yellow circles as seen in chart below:
low below Kijun-Sen and close above it
Strong Trend: when Tenkan is above Kijun, price above cloud, future cloud green, chikou above close, chikou above Kijun we establish a strong bullish trend. For bearish the exact opposite. The script has a function to send an alert at the start of such trends and to plot them with small colored circles above the bars.
Customisation:
I've added options to disable specific aspects of the indicator for those traders who do not want to use all aspects of the indicator. In the customisation tab I've given each part a clear title so you can use your own colors/shapes.
The perfect entry?
Further info:
Look into my education pane, I will be adding education in the future. The chance of me making a more advanced version of the script including line forecasting etc is rather high so watch out for that.
For those who want to master this system I recommend reading the book:
How to make money with the ichimoku system by Balkrishna M. Sadekar
Or the originals books by Hosoda the inventor of Ichimoku if you can get your hands on them and can read Japanese.
Almost all info about the ichimoku system you find on the internet will lose you money because they reduce the system to simple signals that do not generate money.
I will be providing educational material on tradingview using this indicator.
make lead signalAdd derivative of a signal for leading behaviour
formula: sig = (lambda/100)*source + (1-lambda/100)**momentum )
it has a multiplier and an offset for adjustment of result.
final formula: sig = multiplier*( (lambda/100)*src + (1-lambda/100)*mom_coef*mom ) + offset
Bitcoin Best Value CorridorHere is my interpretation of the "Best Time To Buy" Bitcoin over its lifetime using a logarithmic regression trendline. The upper and lower lines are 10% deviations from the centre line. I calculated the trendline in excel and then coded my results into pine script.
CapX Core SignalsThis is an indicator that generates Long and Short Signals on multiple marketable instruments such as Indices, Stocks and Crypto. This indicator has almost everything for intraday and Swing trading. Works perfectly on multiple timeframe and give signal on real time. Tested on Indices.
We make use of Relative Strength and Moving Averages to Generate Signal but at the same time, a signal is confirmed by Volatility Indicators and trend. This way we are able generate a few signals but more precise one. While generating a signal, system gives us Stop Loss Level Instantly which is calculated from Average Ture Range.
MACD Level Modified - The Smooth Line help reduce false break out
RSI is confirmed with Crossover of RSI and EMA
ADX level used to Identify Volatility ,
ATR Multiplied with float factor to give Stop Loss Range. - User get option to input ATR Float Value
EMA 9, EMA 14 and EMA 21 Used to Identify Short trend in market
DEMA 100 and DEMA 200 used to find Long Trend in Market
Support Resistance Levels marked
What makes this Indicator Unique is that it is free from clutters, indicators and signals. Less Number of signals but precise one are only generated. Charts are not cluttered with many drawing or indicators so you get a clear view of price actions and you can further work on chart and candle Pattern.
We have placed a Information Dashboard on top right corner that work real time to give you exact trend checked with EMA and Confirmed by other moving averages. The Dashboard also informs about On Going Market volatility in simple words and gives faster signal in color coded cells.
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!
Momentum CloudThis is a modified Ichimoku Cloud:
-The default Lookback-Length and Displacement settings have been modified to operate optimally on 24/7 markets - which is popular among Crypto analysts.
-The Lagging Span, Base Line, and Conversion Line have been removed - leaving just the bare cloud.
-Additionally, the Cloud's color will shift blue when it is compressed. (More specifically - when Leading Span A retreats to Leading Span B, the color changes.)
This allows the user to easily identify when the Cloud is "thinning", either to the upside, or the downside.
Being that the "spread" or "width" of an Ichimoku Cloud generally gauges it's efficacy as potential Support or Resistance, this tool is particularly useful for highlighting when momentum is weakening.
*This script will be updated in the future to allow the user to view the Momentum Cloud of alternate time-frames! (e.g, Viewing the 1D Momentum Cloud on the 1H timeframe)
High Low Index SPY Top 40Modification from original code for "High Low Index" by © LonesomeTheBlue
- Made modification specifically for Top 40 AMEX:SPY holdings
- Added Market sentiment histogram (Total count green vs red), and SMA line for it
- Added arrows for peaks and dips on High Low Index and Market Sentiment MA
Idea behind this indicator is that SPY should follow the overall sentiment of its top holdings. I believe this bring great value to SPY traders.
Enjoy~!
Current bar predicted volumeDrag this indicator in the same panel with the volume in the object tree, then right click on the scale bar and set "merge all scale into one" for a correct visualization.
This indicator multiply the current traded volume of a candle with the total time of that candle. This offer a prediction of where, in case the volumes would keep trading at a comparable magnitude, the volume bar would close when the candle will close.
The predicted volume is indicated with a blue short line above the current volume bar, and updates in real time.
I find this indicator extremely useful to offer at a glance an idea of an ascending or descending volume pattern, that can serve as confirmation for a reversal or breakout for example.
Very suitable for short time frames, where decisions have to be taken fast.
Enjoy,
Luca.
Cubic Bézier Curve Extrapolation [LuxAlgo]The following script allows for the extrapolation of a Cubic Bézier Curve fit using custom set control points and can be used as a drawing tool allowing users to estimate underlying price trends or to forecast future price trends.
Settings
Extrapolation Length: Number of extrapolated observations.
Source: Source input of the script.
Style
Width: Bézier curve line width.
Colors: The curve is colored based on the direction it's taking, the first color is used when the curve is rising, and the second when it is declining.
The other settings determine the locations of the control points. The user does not need to change them from the settings, instead only requiring adjusting their location on the chart like with a regular drawing tool. Setting these control points is required when adding the indicator to your chart.
Usage
Bézier curves are widely used in a lot of scientific and artistic fields. Using them for technical analysis can be interesting due to their extrapolation capabilities as well as their ease of calculation.
A cubic Bézier curve is based on four control points. Maxima/Minimas can be used as control points or the user can set them such that part of the extrapolated observation better fits the most recent price observations.
A possible disadvantage of Bézier curves is that obtaining a good fit with the data is not their primary goal. Rational Bézier curves can be used if obtaining a good fit is the primary user goal.
Details
At their core, Bézier curves are obtained from nested linear interpolation between each control point and the resulting linearly interpolated results. The Bézier curve point located at the first control point P0 and the last curve point located at the last control point Pn are equal to their respective control points. However, this script does not make use of this approach, instead using a more explicit form.
As mentioned previously, the complexity of a Bézier curve can be determined by its number of control points which is related to the Bézier curve degree (number of control points - 1). Instead of using nested linear interpolations to describe Bézier curves, one can describe them as a polynomial of a degree equal to the degree of the wanted Bézier curve.
The Bounded Slope IndicatorThis indicator uses the concept of slopes and normalizes the values so that they are bounded between 0 and 100. The steps required to calculate the indicator are as follows:
* Calculate the slope of the price using a lookback period (by default, it is either 14 or 21). The slope is calculated by subtracting the current close price from the close price 21 (or 14) periods ago and dividing the result by 21 (or 14).
* Calculate the RSI of the slope calculations to get a normalized slope indicator.
The bounded slope indicator can be used the same way as the RSI:
* Through oversold and overbought levels. A bullish bias is present whenever the indicator is close to its oversold level (by default, it is 30) and a bearish bias is present whenever the indicator is close to its overbought level (by default, it is 70).
* Through the divergence technique. A bullish bias is present whenever the indicator is making higher lows and the market is making lower lows. A bearish bias is present whenever the indicator is making lower highs and the market is making higher highs.
The main advantage of the indicator is its different approach to measuring momentum which can be a good uncorrelated indicator to other classical ones (such as the stochastic oscillator and the MACD).
Financial GrowthThis indicator will acquire the financial data provided by Tradview.
the data is compare between Quarter, Annual and TTM in term of percent of growth.
YoY, QoQ and CAGR is also available by this script (The minimum is 4).
in addition, ploting of data, label and table also available (you can check the mark to toggle on / off).
Data : Revenue, Net Income, EBITDA, EPS, DVPS, Free Cash Flow and Forward PE .
How to use it.
just select the financial data, period and size of data to compare.
you can check the box to toggle the plotting line, label and table.
Enjoy.
Nifty_Price_Movement_BuildUPDashboard to see Price Momentum Build-Up at Nifty.
It cumulates all prices and their respective weightage.
During initial of a candle, we are not aware of volume is High or Not, we only get it in later buildup. But Price buildup will display it at the same instant that what is going with the price of all stocks.
The logic used here is that
1) If a stock close > open at a particular instant it will add that stock multiplied with its weightage in Nifty to the list of stocks that are positive.
2) If a stock close < open at a particular instant it will add that stock multiplied with its weightage in Nifty to the list of stocks that are negative.
3) Above two will give you data that how many of them are positive and are negative at a particular instant and how they are going to affect Nifty.
In one of the many possible ways, it is superior than that of Volume buildup is that, to determine volume is higher than previous volume, we have to wait for first few seconds/minutes/hours (depending on timeframe you are in) to see volume buildup. The Volume buildup function based indicator is kind of lagging, though volume itself being instant.
Saylor to Schiff RatioI'm reposting the Saylor to Schiff Ratio indicator that was originally developed by Michael Silva
This indicator may be used to predict key momentum shifts in the price of Bitcoin
I've set up this indicator for it to be used on the weekly timeframe as was intended.
The indicator plots in any BTCUSD spot, futures , BLX index and BTCEUR .
It paints in all time frames, but Weekly time frame is the correct one to interpret the 'official' read of it.
For that reason, I've enabled by default an option that forces the indicator to display on the Weekly value even though the time frame could be higher or lower.
Credit for this idea goes to Michael Silva: @mikepsilva