Donchian MA Bands [LuxAlgo]The Donchian MA Bands script is a complete trend indicator derived from the popular Donchian channel indicator as well as various customizable moving averages to estimate trend direction and build support/resistance levels & zones.
🔶 USAGE
The indicator outputs various elements, the main ones being a lower dynamic zone (blue by default), an upper dynamic zone (in orange by default), and one support and resistance level/zones (red/green by default).
A prominent lower zone is indicative of an uptrend, while a prominent upper zone is indicative of a downtrend. These zones can be used as support/resistance as well.
Support/resistance zones and levels can be used using a breakout methodology or to determine price bounced if a level was tested multiple times.
The indicator contains various modes affecting the output of the indicator, described below.
🔹 Clouds
Clouds return one upper/lower dynamic zone and look/act similarly to a trailing stop. Price over the lower zone is indicative of an uptrend, and price under the upper zone is indicative of a downtrend.
🔹 Upper Band
The upper band mode returns a dynamic zone closer to prices during an uptrend, and farther away during a downtrend.
This band can act as a support during uptrends.
🔹 Lower Band
The lower band mode returns a dynamic zone closer to prices during an uptrend, and farther away during a downtrend.
This band can act as a resistance during downtrends.
🔹 Bands
Bands return both upper and lower zones, the zones are more apparent depending on the price trend direction, with uptrends being indicated by a more visible lower zone, and downtrends being indicated by a more visible upper zone.
Breakout dots are highlighted when price breakout the indicator displayed extremities, and can be indicative of a confirmed trend reversal.
These breakouts can be more effective for trend following during trending markets. Ranging markets might return breakouts highlighting the top/bottom.
🔶 DETAILS
The core of this script is the highest / lowest mean average (MA) value for a given number of bars back ( Donchian lines).
This is repeated a few times with the obtained values.
When Bands are chosen ( Style ) this will be repeated 1 more time.
The type of mean average can be customized ( Type MA ), as well as the number of bars back ( Length ).
Depending on the choice of bands ( Style ) the script will focus on certain area's of interest.
When the option Clouds , Upper band or Lower band is chosen, an extra feature, support/resistance (S/R), will be shown.
These color-filled areas are visible when there is a difference between the 2nd and 3rd highest/lowest values.
The lines/areas can be used for stop loss, entry, exit,...
You can set the type of MA and Length separately ( Settings -> S/R ).
If you don't need this feature, simply set Type ( Settings -> S/R ) -> NONE
The shape sometimes resembles triangles, indicating a potential direction
Default the average of the highest and lowest values is plotted (Style -> Mid Donchian)
This can act as potential support/resistance or visualization of the trend, the mean average is not plotted but can be (Style -> MA)
🔹 Note
When the option Bands is chosen, an indication is plotted when the closing price breaks above the highest band or breaks below the lower band. This isn't necessarily a buy/sell signal, it is merely a signal that these lines are broken.
Users should decide on their own how they use the bands/lines/areas as entry, exit, trailing stop, stop loss, profit taking,...
🔶 SETTINGS
🔹 Bands
Style: Clouds (default), Upper band, Lower band, Bands
Type MA: choose between SMA, EMA, RMA, HullMA, WMA, VWMA (default), DEMA, TEMA, NONE (off)
Length: Length of moving average and Donchian calculations (default 20)
Colour Bands
🔹 S/R (Support/Resistance, visible with Clouds, Upper band or Lower band)
Type MA: choose between SMA, EMA, RMA, HullMA, WMA, VWMA (default), DEMA, TEMA, NONE (off)
Length: Length of moving average and Donchian calculations (default 20)
Colour S/R
Moving Averages
RSI + Fibonacci HH LL Support Resistance I have integrated my past scripts and brushed them up further.
This tool allows for support/resistance, stop loss, take profit, and trend analysis using RSI and Fibonacci ratios.
For example, the Fibonacci ratio is used as follows
l1 = m - dist * 0.618
l2 = m - dist * 1.618
l3 = m - dist * 2.618
l4 = m - dist * 4.235
l5 = m - dist * 6.857
l6 = m - dist * 11.089
When the Fibonacci ratio reaches 2.618 or higher and the RSI smoothed by the 5-day EMA is oversold/overbought, the bar color is changed by a gradation.
We have tried to make the design as beautiful and good-looking as possible. You can also hide the lines to suit your own preference.
Example usages are here:
BTCUSDT 1Hour Chart
Using Fibonacci numbers
BTCUSDT 15min Chart, for Scalping
Here, to set the highest and lowest prices one hour ago, "4" is substituted as the calculation: 15 minutes x 4 = 60
BTCUSDT 15min Chart, for Scalping
To set the highest and lowest prices 4 hours ago , "4" is substituted as the calculation: 15 minutes x 16 = 240
BTCUSDT 15min Chart, for Scalping
To draw yesterday's high and low as support/resistance lines, I substituted the number "96" as 1440/15=96.
BTCUSDT 1min Chart, for Scalping
Substituted "60" to trail the highest and lowest prices over a 60-minute period on a 1-minute chart, and removed lines to beautify
BTCUSDT 1day Chart, for Long-Term Investers
This is an example of using "90" because it is a 1-day chart and assumes that 3 months = 90 days in order to trail the highest and lowest prices over a 3-month period and no lines.
My past scripts are here:
RSI + FIB HH LL StopLoss Finder/Contrarian Trades
Fibonacci HH LL TRAMA Band
MA RSI @KINGThis Pine Script is designed to create a trading indicator with moving averages (MA) and relative strength index (RSI), along with arrow signals and background color changes based on those signals. Here's a description of its functions:
1. Moving Averages and RSI Calculation:
- Two moving averages (`fastMA` and `slowMA`) are calculated based on user-input lengths.
- The Relative Strength Index (`rsi`) is calculated based on a user-defined length.
2. Crossover Conditions:
- `crossoverUp` is true when the fastMA crosses above the slowMA and RSI is above an overbought level.
- `crossoverDown` is true when the fastMA crosses below the slowMA and RSI is below an oversold level.
3. Arrow Signals:
- Triangle-shaped arrows (`arrowUp` and `arrowDown`) are plotted below and above bars, indicating buy (green) and sell (red) signals, respectively.
4. Background Color Changes:
- The background color (`bgColor`) changes based on buy and sell signals.
- If there's a buy signal (`crossoverUp`), the background color is set to a light blue with 40% transparency.
- If there's a sell signal (`crossoverDown`), the background color is set to a light red with 40% transparency.
- On the next opposite signal, the background color is scaled up (transparency set to 80%) to indicate a stronger signal.
In summary, this script provides visual cues through arrows and background color changes to assist traders in identifying potential buy and sell signals based on moving average crossovers and RSI conditions. The background color variations aim to highlight the strength of the signal, with scaling based on consecutive signals in the same direction.
********************************************************************************
1. Buy Signal:
- Condition: The arrow points up (green) with a background color indicating a buy signal.
- Confirmation: Ensure that there is a strong upward crossover (fastMA above slowMA) and RSI is above the overbought level.
2. Sell Signal:
- Condition: The arrow points down (red) with a background color indicating a sell signal.
- Confirmation: Ensure that there is a strong downward crossover (fastMA below slowMA) and RSI is below the oversold level.
3. Exit Signal:
- Condition: No arrow is present, and the background color is reset.
- Confirmation: Confirm that there is no active buy or sell signal.
Example Trading Rules:
Opening a Long Position (Buy):
- Enter a long (buy) position when:
- The green arrow appears with a light blue background.
- Confirm that the fastMA is above the slowMA.
- Confirm that RSI is above the overbought level.
Opening a Short Position (Sell):
- Enter a short (sell) position when:
- The red arrow appears with a light red background.
- Confirm that the fastMA is below the slowMA.
- Confirm that RSI is below the oversold level.
Exiting a Position:
- Close the position when:
- There is no arrow present (neither green nor red).
- The background color is reset, indicating no active signal.
Risk Management:
Position Sizing: Determine the size of your positions based on your risk tolerance and the size of your trading account.
Stop-Loss and Take-Profit: Set stop-loss orders to limit potential losses and take-profit orders to secure profits.
Risk-Reward Ratio: Consider maintaining a favorable risk-reward ratio in your trades.
Notes:
Backtesting: Before applying this strategy in a live market, it's crucial to backtest it using historical data to assess its performance.
Market Conditions: Adapt the strategy to different market conditions, and be aware that no strategy is guaranteed to be profitable.
Continuous Monitoring: Regularly monitor the performance of the strategy and make adjustments as needed.
Educational Purpose: This strategy is for educational purposes only. Always consult with financial professionals and use your judgment when making trading decisions.
Remember that trading involves risk, and past performance is not indicative of future results. It's recommended to paper trade or use a demo account to test the strategy before risking real capital.
Best wishes on your trading journey! May your strategies be profitable, your risks well-managed, and your decisions guided by wisdom and success. Happy trading!
2Mars strategy [OKX]The strategy is based on the intersection of two moving averages, which requires adjusting the parameters (ratio and multiplier) for the moving average.
Basis MA length: multiplier * ratio
Signal MA length: multiplier
The SuperTrend indicator is used for additional confirmation of entry into a position.
Bollinger Bands and position reversal are used for take-profit.
About stop loss:
If activated, the stop loss price will be updated on every entry.
Basic setup:
Additional:
Alerts for OKX:
Yearly and 12-Week Percentage Difference with EMAThe indicator "Yearly and 12-Week Percentage Difference with EMA" is designed to display the annual and 12-week difference in the percentage variability of asset prices, as well as their exponential moving averages (EMA) on the TradingView chart.
EMA Period (EMA Period): This is a configurable parameter that allows you to select a period for calculating the EMA.
Yearly % Difference (Annual percentage difference): This indicator shows the percentage difference between the current price and the asset price a year ago on weekly bars. The graph is displayed in blue.
12-Week % Difference (12 weeks difference as a percentage): This indicator shows the percentage difference between the current price and the asset price 12 weeks ago on weekly bars. The graph is displayed in green.
Zero Line (Zero Line): This black line on the chart shows the zero level.
EMA of Yearly % Difference (EMA of annual percentage difference): This line represents the exponential moving average (EMA) of the annual percentage difference. The graph is displayed in red.
EMA of 12-Week % Difference (EMA of the difference over 12 weeks as a percentage): This line represents the exponential moving average (EMA) of the difference over 12 weeks as a percentage. The graph is displayed in orange.
Use this indicator to analyze the percentage variability of asset prices on an annual and 12-week basis, as well as to track their EMA, which can help in making trading decisions.
Русская версия \\\\\
Индикатор "Разница в процентах за год и за 12 недель с EMA" предназначен для отображения цены от год к году, и за 12 недель процентной изменчивости цен актива, а также их экспоненциальных скользящих средних (EMA) на графике TradingView.
- EMA Period (Период EMA): Это настраиваемый параметр, который позволяет выбрать период для расчета EMA.
- Yearly % Difference (Годовая разница в процентах): Этот индикатор показывает процентную разницу между текущей ценой и ценой актива год назад на недельных барах. График отображается синим цветом.
- 12-Week % Difference (Разница за 12 недель в процентах): Этот индикатор показывает процентную разницу между текущей ценой и ценой актива 12 недель назад на недельных барах. График отображается зеленым цветом.
- Zero Line (Линия нуля): Эта черная линия на графике показывает нулевой уровень.
- EMA of Yearly % Difference (EMA годовой разницы в процентах): Эта линия представляет собой экспоненциальное скользящее среднее (EMA) годовой разницы в процентах. График отображается красным цветом.
- EMA of 12-Week % Difference (EMA разницы за 12 недель в процентах): Эта линия представляет собой экспоненциальное скользящее среднее (EMA) разницы за 12 недель в процентах. График отображается оранжевым цветом.
Используйте этот индикатор для анализа процентной изменчивости цен актива на годовой и 12-недельной основе, а также для отслеживания их EMA, что может помочь в принятии торговых решений.
Keltner Channel Strategy with Golden CrossOnly trade with the trend.
This Keltner Channel-based strategy that will only enter into a trade if the signal of the Keltner Channel agrees with a moving average crossover as defined by the user.
Long Position Entries
2 Conditions must be present
1. There must be a Golden Cross (lower period moving average is above higher period moving average). ex 50 period MA > 200 period MA.
2. Price must cross above the Keltner Channel ATR defined by the user.
Short Position Entries
2 Conditions must be present
1. There must be a Death Cross (lower period moving average is below higher period moving average). ex 50 period MA < 200 period MA.
2. Price must cross below the Keltner Channel ATR defined by the user
Closing Trades:
The strategy closes trades as follows:
1. Price crossing the Keltner Channel's Take Profit ATR (defined by User)
2. Price crossing the Keltner Channel's Stop Loss ATR (defined by User)
Advanced EMA Cross with Normalized ATR Filter, Controlling ADX
Description:
This strategy is based on EMA cross strategy and additional filters are used to get better results, a normalized ATR filter, and ADX control...
It aims to provide traders with a code base that generates signals for long positions based on market conditions defined by various indicators.
How it Works:
1. EMA: Uses short (8 periods) and long (20 periods) EMAs to identify crossovers.
2. ATR: Uses a 14-period ATR, normalized to its 20-period historical range, to filter out noise.
3. ADX: Uses a 14-period RMA to identify strong trends.
4. Volume: Filters trades based on a 14-period SMA of volume.
5. Super Trend: Uses a Super Trend indicator to identify the market direction.
How to Use:
- Buy Signal: Generated when EMA short crosses above EMA long, and other conditions like ATR and market direction are met.
- Sell Signal: Generated based on EMA crossunder and high ADX value.
Originality and Usefulness:
This script combines EMA, ATR, ADX, and Super Trend indicators to filter out false signals and identify more reliable trading opportunities.
USD Strength in the code is not working, just simulated it as PSEUDO CODE:
Strategy Results:
- Account Size: $1000
- Commission: Not considered
- Slippage: Not considered
- Risk: Manageable through parameters, now less than 5% per trade
- Dataset: Aim for more than 100 trades for a sufficient sample size
- Test Conditions: Test in 30 min chart for BTCUSDT
IMPORTANT NOTE: This script should be used for educational purposes and should not be considered as financial advice.
Chart:
- The script's output is plotted as Buy and Sell signals on the chart.
- No other scripts are included for clarity.
- Have tested with 30mins period
- You are encouraged to play with parameters, let me know if it helps you and/or if you can upgrade the code to a better level.
WHY DID I USE ATR AND ADX?
ATR filter is usually used for the following purposes.
Market Volatility: ATR measures how volatile the market is. High ATR values indicate that the price is experiencing significant fluctuations.
Filtering: Crossing a certain ATR threshold may indicate that the market is active enough to present trading opportunities.
Risk Management: ATR can also be used to set stop-loss and take-profit levels, helping to manage risk effectively.
And ADX is usually used for;
Trend Strength: ADX measures the strength of a trend. High ADX values indicate a strong trend.
Filtering: An ADX value above a certain level suggests that the trend is strong and it might be safer to trade.
Versatility: ADX does not indicate the direction of the trend, only its strength. This makes it useful in both bullish and bearish markets.
Using these indicators together can help filter out false signals and produce more reliable trading signals. While ATR helps to determine if the market is active enough, ADX measures the strength of the trend. Combined, they can create a more complex and effective trading strategy.
I've used ADX data to support generating a buy signal after a golden cross (bullish trend) and waiting until this is a strong trend. It sounds good to check for different trend strengths for bullish and bearish markets to decide a buy signal. Additionally I used ATR to check if the market has enough fluctuations.
BTC hash rate oscillatorOVERVIEW:
This script looks to identify entry point opportunities when moving averages over Bitcoin's hash rate are indicative of Miner capitulation. The script implements an oscillator based on Charles Capriole's "Hash Ribbons & Bitcoin Bottoms" concept. It analyses the short-term and long-term moving averages of Bitcoin's hash rate and then identifies potential entry opportunities from this.
KEY FEATURES:
Signal Generation: The script identifies entry points when the short-term moving average crosses under the long-term moving average and the rate of change falls below a specified threshold. These conditions suggest potential trading opportunities.
Historical Signals: Optionally the script displays historical signals, indicating past instances where hash rate conditions suggested favourable entry points. Users can also assess the script's historical performance.
USAGE:
The generated opportunities can be used as potential entry points for BTC. The script provides visual cues on the chart (blue labels above the miner capitulation zones) for identification of signals. Customisable moving average lengths and threshold values are supported, which allow adaptation to various strategies.
CONSIDERATIONS:
Validation: It's recommended that careful backtesting over historical data be done before acting on any identified opportunities.
User Discretion: Trading decisions should not rely solely on this script. Users should exercise their judgment and consider market conditions.
Note: This script identifies opportunities based on historical data and should be used with caution, as past performance is not indicative of future results.
Fibonacci HH LL TRAMA BandLuxAlgo's Trend Moving Adaptive Moving Average was used as a reference to create bands by reading the highest and lowest prices of past bars based on Fibonacci numbers and then multiplying them by the Fibonacci ratio.
LuxAlgo/ LuxAlgo/
In particular, the so-called TRAMA is characterized by its adaptation to the average of the highest and lowest prices over a specific period of time and is used to identify support/resistance.
In order to apply this feature to the maximum extent possible, I used the high or low prices as the source of input, rather than the closing price.
For example,
src = high
not original like
src = close
In addition, I created 6 levels by multiplying the Fibonacci ratio
//Midline
mah = ama1
mal = ama2
m = (mah + mal)/2
//Half Mean Range
dist = (mah - mal)/2
//Levels
h6 = m + dist * 11.089
h5 = m + dist * 6.857
h4 = m + dist * 4.235
h3 = m + dist * 2.618
h2 = m + dist * 1.618
h1 = m + dist * 0.618
l1 = m - dist * 0.618
l2 = m - dist * 1.618
l3 = m - dist * 2.618
l4 = m - dist * 4.235
l5 = m - dist * 6.857
l6 = m - dist * 11.089
If you want to use it for scalping, such as 15 minutes, you can include Fibonacci numbers such as 21,34,55 for a quick reaction type to detect the trend. Also, by including Fibonacci numbers such as 89,144,233, you can see where you stand in the larger trend. Some examples are included below.
For Investors
BTCUSDT 1day Chart Fibonacci number "55"
For Daytraders
BTCUSDT 4hour Chart Fibonacci number "34"
For Scalpers
BTCUSDT 15min Chart Fibonacci number "55"
BTCUSDT 15min Chart Fibonacci number "89"
BTCUSDT 15min Chart Fibonacci number "233"
Fibonacci numbers are 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, etc.,
Fibonacci ratios are 0.618, 1.618, 2.618, 4.236, 6.854, 11.089, etc.,
PA-Adaptive Hull Parabolic [Loxx]The PA-Adaptive Hull Parabolic is not your typical trading indicator. It synthesizes the computational brilliance of two famed technicians: John Ehlers and John Hull. Let's demystify its sophistication.
█ Ehlers' Phase Accumulation
John Ehlers is well-known in the trading community for his digital signal processing approach to market data. One of his standout techniques is phase accumulation. This method identifies the dominant cycle in the market by accumulating the phases of individual cycles. By doing so, it "adapts" to real-time market conditions.
Here's the brilliance of phase accumulation in this code
The indicator doesn't merely use a static look-back period. Instead, it dynamically determines the dominant market cycle through phase accumulation.
The calcComp function, rooted in Ehlers' methodology, provides a complex computation using a digital signal processing approach to filter out market noise and pinpoint the current cycle's frequency.
By measuring and adapting to the instantaneous period of the market, it ensures that the indicator remains relevant, especially in non-stationary market conditions.
Hull's Moving Average
John Hull introduced the Hull Moving Average (HMA) aiming to reduce lag and improve smoothing. The HMA's essence lies in its weighted average computation, prioritizing more recent prices.
This code takes an adaptive twist on the HMA
Instead of a fixed period, the HMA uses the dominant cycle length derived from Ehlers' phase accumulation. This makes the HMA not just fast and smooth, but also adaptive to the dominant market rhythm.
The intricate iLwmp function in the script provides this adaptive HMA computation. It's a weighted moving average, but its length isn't static; it's based on the previously determined dominant market cycle.
█ Trading Insights
The indicator paints the bars to represent the immediate trend: green for bullish and red for bearish.
Entry points, both long ("L") and short ("S"), are presented visually. These are derived from crossovers of the adaptive HMA, a clear indication of a potential shift in the trend.
Additionally, alert conditions are set, ready to notify a trader when these crossovers occur, ensuring real-time actionable insights.
█ Conclusion
The PA-Adaptive Hull Parabolic is a masterclass in advanced technical indicator design. By marrying John Ehlers' adaptive phase accumulation with John Hull's HMA, it creates a dynamic, responsive, and precise tool for traders. It's not just about capturing the trend; it's about understanding the very rhythm of the market.
Ehlers SuperSmootherJohn F. Ehlers has provided the SuperSmoother filter in several of his works, including his book "Cyclical Analytics for Traders", Chapter 3.
The SuperSmoother filter is utilized whenever one might typically apply a moving average of any kind. The outcome is that the output signal from the SuperSmoother filter displays significantly less lag compared to an equivalent amount of smoothing from a moving average. The lag difference between a moving average and the SuperSmoother filter becomes even more pronounced when critical periods are extended.
Market data contains noise, and the purpose of smoothing filters is to mitigate this noise. In fact, there are various types of noise inherent in market data. One type of noise is systemic, originating from random trading activities. Another type is aliasing noise, which arises due to the use of discrete data. Aliasing noise dominates the data when considering shorter cycle durations.
It's tempting to perceive market data as a continuous wave, but that's a misconception. Taking the closing price as representative of a bar provides just a single data point. Whether you opt for the midpoint between the high and low instead of the closing price, you're still limited to one sample per bar. Given the discrete nature of this data, certain spectral implications must be considered. For instance, the shortest feasible analysis period (without aliasing) is a two-bar cycle. This is referred to as the Nyquist frequency, at 0.5 cycles per sample.
An ideally sampled two-beat sinusoidal cycle becomes rectified when discretized. However, peak sampling for the cycle isn't always guaranteed, and interference between the sampling rate and the data frequency results in aliasing noise. This noise decreases as the data period lengthens. For example, a four-beat cycle implies four samples per cycle. With more samples, the sampled data provides a better representation of the sinusoidal component. The replica becomes even more accurate for an eight-bar data component. The increased precision of discrete data signifies that aliasing noise decreases as cycle durations expand.
A smoothing filter should possess the selectivity to reduce the aliasing noise below systemic noise levels. Given that aliasing noise increases by 6 dB per octave above the filter's selected cutoff frequency and the SuperSmoother's attenuation rate is 12 dB per octave, the SuperSmoother filter emerges as an effective tool to virtually eliminate aliasing noise in its output signal.
There are already several SuperSmoother indicators on Tradingview, but I like to structure the code and highlight the main components as functions rather than hiding them in the code. I hope this is useful for those who are starting to learn Pine Script.
Ehlers DecyclerJohn F. Ehlers introuced Decycler in his book "Cycle Analytics for Traders", chapter 4.
The decycler is designed to remove the influence of shorter cycle fluctuations, resulting in an output that closely resembles a one-pole low-pass filter.
A standout feature of the decycler is its notably minimal lag. The most extended cycle elements experience a delay of less than five bars. When considering a frequency of 0.05 cycles per bar (equivalent to a 20-bar cycle period), the lag approximates 1.5 bars. Components with a higher frequency face even lesser delays. Consequently, any higher-frequency variations that pass the filter's attenuation align closely with the price fluctuations. This makes the decycler an optimal "immediate trend detector," giving a true depiction of the data's trend.
While the SuperSmoother filter can yield a comparably smoothed output, the decycler typically exhibits less lag when the two are juxtaposed. It's worth noting that the decycler operates as a one-pole filter, implying it doesn't have the best filtering capabilities. It's not advisable to use the decycler as a smoothing filter to eliminate aliasing disturbances. Instead, its application should focus on generating an immediate trend representation, especially when choosing a larger cutoff period. The broad cutoff period equips the decycler with the ability to reduce aliasing disturbances, given that it's significantly distant from the Nyquist frequency.
There are already several decycler indicators on Tradingview, but I like to structure the code and highlight the main components as functions rather than hiding them in the code. I hope this is useful for those who are starting to learn Pine Script.
Weighted Bulls-Bears Variety Smoothed [Loxx]Weighted Bulls-Bears Variety Smoothed highlights potential buy and sell moments in the market. Users can customize the data source and select their preferred type of moving average for calculations. The resulting visualization is a column-style plot that changes color based on bullish or bearish market conditions. Additionally, the script can color chart bars and provide visual markers to indicate buying ("Long") or selling ("Short") opportunities. Alerts can also be set for these trading signals.
█ Inputs:
Users can choose the source for calculations (e.g., closing price).
They can set periods for calculations and smoothing.
They can select the type of moving average they prefer for smoothing: EMA, FEMA, LWMA, SMA, or SMMA.
█ Weighted Bulls-Bears Calculation:
It determines the highest and lowest prices over a user-defined period.
Then, it calculates the 'bull' and 'bear' values based on these highest and lowest prices. These values are weighted based on their distance from the current price.
█ Extras
Alerts
Signals
AI Momentum [YinYang]Overview:
AI Momentum is a kernel function based momentum Indicator. It uses Rational Quadratics to help smooth out the Moving Averages, this may give them a more accurate result. This Indicator has 2 main uses, first it displays ‘Zones’ that help you visualize the potential movement areas and when the price is out of bounds (Overvalued or Undervalued). Secondly it creates signals that display the momentum of the current trend.
The Zones are composed of the Highest Highs and Lowest lows turned into a Rational Quadratic over varying lengths. These create our Rational High and Low zones. There is however a second zone. The second zone is composed of the avg of the Inner High and Inner Low zones (yellow line) and the Rational Quadratic of the current Close. This helps to create a second zone that is within the High and Low bounds that may represent momentum changes within these zones. When the Rationalized Close crosses above the High and Low Zone Average it may signify a bullish momentum change and vice versa when it crosses below.
There are 3 different signals created to display momentum:
Bullish and Bearish Momentum. These signals display when there is current bullish or bearish momentum happening within the trend. When the momentum changes there will likely be a lull where there are neither Bullish or Bearish momentum signals. These signals may be useful to help visualize when the momentum has started and stopped for both the bulls and the bears. Bullish Momentum is calculated by checking if the Rational Quadratic Close > Rational Quadratic of the Highest OHLC4 smoothed over a VWMA. The Bearish Momentum is calculated by checking the opposite.
Overly Bullish and Bearish Momentum. These signals occur when the bar has Bullish or Bearish Momentum and also has an Rationalized RSI greater or less than a certain level. Bullish is >= 57 and Bearish is <= 43. There is also the option to ‘Factor Volume’ into these signals. This means, the Overly Bullish and Bearish Signals will only occur when the Rationalized Volume > VWMA Rationalized Volume as well as the previously mentioned factors above. This can be useful for removing ‘clutter’ as volume may dictate when these momentum changes will occur, but it can also remove some of the useful signals and you may miss the swing too if the volume just was low. Overly Bullish and Bearish Momentum may dictate when a momentum change will occur. Remember, they are OVERLY Bullish and Bearish, meaning there is a chance a correction may occur around these signals.
Bull and Bear Crosses. These signals occur when the Rationalized Close crosses the Gaussian Close that is 2 bars back. These signals may show when there is a strong change in momentum, but be careful as more often than not they’re predicting that the momentum may change in the opposite direction.
Tutorial:
As we can see in the example above, generally what happens is we get the regular Bullish or Bearish momentum, followed by the Rationalized Close crossing the Zone average and finally the Overly Bullish or Bearish signals. This is normally the order of operations but isn’t always how it happens as sometimes momentum changes don’t make it that far; also the Rationalized Close and Zone Average don’t follow any of the same math as the Signals which can result in differing appearances. The Bull and Bear Crosses are also quite sporadic in appearance and don’t generally follow any sort of order of operations. However, they may occur as a Predictor between Bullish and Bearish momentum, signifying the beginning of the momentum change.
The Bull and Bear crosses may be a Predictor of momentum change. They generally happen when there is no Bullish or Bearish momentum happening; and this helps to add strength to their prediction. When they occur during momentum (orange circle) there is a less likely chance that it will happen, and may instead signify the exact opposite; it may help predict a large spike in momentum in the direction of the Bullish or Bearish momentum. In the case of the orange circle, there is currently Bearish Momentum and therefore the Bull Cross may help predict a large momentum movement is about to occur in favor of the Bears.
We have disabled signals here to properly display and talk about the zones. As you can see, Rationalizing the Highest Highs and Lowest Lows over 2 different lengths creates inner and outer bounds that help to predict where parabolic movement and momentum may move to. Our Inner and Outer zones are great for seeing potential Support and Resistance locations.
The secondary zone, which can cross over and change from Green to Red is also a very important zone. Let's zoom in and talk about it specifically.
The Middle Zone Crosses may help deduce where parabolic movement and strong momentum changes may occur. Generally what may happen is when the cross occurs, you will see parabolic movement to the High / Low zones. This may be the Inner zone but can sometimes be the outer zone too. The hard part is sometimes it can be a Fakeout, like displayed with the Blue Circle. The Cross doesn’t mean it may move to the opposing side, sometimes it may just be predicting Parabolic movement in a general sense.
When we turn the Momentum Signals back on, we can see where the Fakeout occurred that it not only almost hit the Inner Low Zone but it also exhibited 2 Overly Bearish Signals. Remember, Overly bearish signals mean a momentum change in favor of the Bulls may occur soon and overly Bullish signals mean a momentum change in favor of the Bears may occur soon.
You may be wondering, well what does “may occur soon” mean and how do we tell?
The purpose of the momentum signals is not only to let you know when Momentum has occurred and when it is still prevalent. It also matters A LOT when it has STOPPED!
In this example above, we look at when the Overly Bullish and Bearish Momentum has STOPPED. As you can see, when the Overly Bullish or Bearish Momentum stopped may be a strong predictor of potential momentum change in the opposing direction.
We will conclude our Tutorial here, hopefully this Indicator has been helpful for showing you where momentum is occurring and help predict how far it may move. We have been dabbling with and are planning on releasing a Strategy based on this Indicator shortly.
Settings:
1. Momentum:
Show Signals: Sometimes it can be difficult to visualize the zones with signals enabled.
Factor Volume: Factor Volume only applies to Overly Bullish and Bearish Signals. It's when the Volume is > VWMA Volume over the Smoothing Length.
Zone Inside Length: The Zone Inside is the Inner zone of the High and Low. This is the length used to create it.
Zone Outside Length: The Zone Outside is the Outer zone of the High and Low. This is the length used to create it.
Smoothing length: Smoothing length is the length used to smooth out our Bullish and Bearish signals, along with our Overly Bullish and Overly Bearish Signals.
2. Kernel Settings:
Lookback Window: The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars. Recommended range: 3-50.
Relative Weighting: Relative weighting of time frames. As this value approaches zero, the longer time frames will exert more influence on the estimation. As this value approaches infinity, the behavior of the Rational Quadratic Kernel will become identical to the Gaussian kernel. Recommended range: 0.25-25.
Start Regression at Bar: Bar index on which to start regression. The first bars of a chart are often highly volatile, and omission of these initial bars often leads to a better overall fit. Recommended range: 5-25.
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
K's Reversal Indicator IIK’s Reversal Indicator II uses a moving average timing technique to deliver its signals. The method of calculation is as follows:
* Calculate a moving average (by default, a 13-period moving average).
* Calculate the number of times where the market is above its moving average. Whenever that number hits 21, a bearish signal is generated, and whenever that number if zero, a bullish signal is generated.
The indicator signals short-term to mid-term reversals as a mean-reversion move.
wosabi Investment assistant and Swing trading CRYPTOThis indicator works to calculate the exponential moving average (EMA) of three symbols. The first is the symbol shown on the chart in front of you, the second is for Bitcoin (it can be changed), and the third is the dollar strength index (DXY), which can be changed.
- The indicator calculates the exponential average of more than one symbol that you choose from the settings
When one of the lines appears in green, this means that the exponential average (EMA) is positive. Each line represents a different value for the averages that can be changed from the default settings to any other appropriate value.
Every five lines represent the averages of the symbol, and the three symbols are separated by a dashed white line to differentiate between the indicators of the three symbols.
Note: The colors have been changed inversely for the third symbol (dxy). When the averages are positive, the color will be red, and if they are negative, the color will be green, as the current settings are suitable for encrypted digital currency symbols that interact inversely with the Dollar Strength Index, and the colors can be changed from the indicator’s settings.
Integrating the values of the three symbols into the Relative Strength Index, which can be changed according to the leading symbols that influence positively or negatively, and this varies from one market to another to give a clearer indication when the negative symbol rises or falls and affects the rest of the symbols.
The current settings are suitable for the digital currency market, and the symbols must be changed for the rest of the markets
Note: The second symbol is the positive influence and the third symbol is the negative influence
NSDT Average 6This is a pretty simple concept that we were asked to put together. It uses 6 Moving Averages, and takes the average of each one, then averages them all together.
If you don't want to use 6, and only 3 for example, then just enter the same length in two of the input fields as pairs.
Example:
For 6, you could use 10, 20, 30, 40, 50, 60
For 3, you could use 10, 10, 50, 50, 100, 100
It doesn't ploy 6 MA's, it only plots one - the result of the average of an average of an average, etc..
Publishing open source so other can modify as needed.
Price Volume Trend Crosses This script is a modified version of the Price Volume Trend ( PVT ) that uses a moving average of the PVT as a signal ( sig ) line.
The length of the signal line can be adjusted as needed by changing the "PVTC Signal Length" value inside the indicator settings menu.
"PVTC Signal Type" allows you to pick between EMA and SMA as the signal line.
Logic behind this script:
If PVT > sig it indicates an bullish environment and gets coloured with the UP color.
If PVT < sig it indicates a bearish environment and get coloured with the DOWN color.
Colors can be modified in the indicator settings menu.
Crosses can be highlighted by ticking the "Highlight Crosses" box in the indicator settings menu.
"Fill Gaps" fills the gap between PVT and sig with the prevailing trends color.
PVTC should not be used on its own but in conjunction with other indicators!
Auto trend overlayThis uses a custom moving average where the front half of the measured length is weighted as 2x of the back half. This makes the cma act like a combo of an ma and ema. It can also measure the rate of change of the cma using a varible derivation length to remove noise. When the cma rate of change is positive it can overlay green candles and vice versa when negative.
Anchored Moving Average By Market Mindset - Zero To EndlessAnchored Moving Average?
An anchored moving average (AMA) is created when you select a point on the chart and start calculating the moving average from there. Thus the moving average’s denominator is not fixed but cumulative and dynamic.
In this indicator, I've provided three different types of Anchored Moving Averages, viz., WMA, SMA and VWAP.
WMA is relevant if big moves are there.
SMA is relevant if volume data is not to be considered or if it is not available.
VWAP is the standard anchored MA, which is most commontly used. Is consider the volume data along with the price move.
In this indicator, Auto anchor is time based anchor. A trader can opt for Pivot Type Anchor or Volume Type Anchor or some higher resolution based anchor too. The length of the pivot lookback can also be changed by the user.
It can be used for intraday, swing trading and even for technical based investment purpose.
Xeeder - US Government Bonds AnalysisXeeder - US Government Bonds Analysis (USBA)
The "Xeeder - US Government Bonds Analysis" (USBA) is a comprehensive tool designed to assist traders in analyzing the spread, historical volatility, and correlation between two different U.S. Government Bonds. This indicator is crucial for understanding the relative performance and risk factors between two bond assets.
Details of the Indicator:
Bond Input Settings: This feature allows traders to select two different U.S. Government Bonds from a dropdown list. The bonds range from 1-month to 30-year maturities.
Timeframe Settings: Traders can choose the timeframe for the analysis, such as Daily, Weekly, etc.
Moving Average (MA) Settings: The indicator offers various types of moving averages like SMA, EMA, WMA, etc., for calculating the spread's moving average. Traders can also specify the length of the moving average.
Spread Calculation: The indicator calculates the spread between the selected bonds and plots it on the chart.
Historical Volatility: The indicator calculates and plots the historical volatility of the spread, which is useful for risk assessment.
Correlation Coefficient: This feature calculates the correlation between the two selected bonds over a specified period.
How to Use the Indicator:
Select Bonds: Choose two U.S. Government Bonds from the dropdown list that you are interested in analyzing.
Choose Timeframe: Select the timeframe that aligns with your trading or investment strategy.
Configure MA Settings: Adjust the type and length of the moving average according to your needs.
Analyze Plots: Observe the plotted spread, its moving average, historical volatility, and correlation coefficient to gain insights into the bonds' relative performance and risk factors.
Interpret Data: Use the plotted data to make informed decisions about bond trading or hedging strategies.
Example of Usage:
As a trader focused on swing trading and strategy development, you can use the USBA indicator to:
Select Bonds: Choose bonds that you believe will show significant spread changes based on your macroeconomic and geopolitical analysis.
Adjust Settings: Configure the MA settings to suit your trading strategy.
Analysis and Comparison: Examine the spread, historical volatility, and correlation to identify potential trading opportunities or hedging strategies.
Content Creation: Use the insights gained to write compelling articles on bond market trends, risks, and opportunities, enriching your financial journalism portfolio.
Remember, the USBA indicator is a versatile tool that provides a multi-faceted analysis of U.S. Government Bonds. Always consider your broader trading strategy and market conditions when using this tool.
VWAP with CharacterizationThis indicator is a visual representation of the VWAP (Volume Weighted Average Price), it calculates the weighted average price based on trading volume. Essentially, it provides a measure of the average price at which an asset has traded during a given period, but with a particular focus on trading volume. In our case, the indicator calculates the VWAP for the current trading symbol, using a predefined simple moving average (SMA) with a period of 14. This volume-weighted moving average offers a clearer view of the behavior of the VWAP and, of consequence of market dynamics.
One of the distinctive features of this indicator is its ability to provide a more "linear" representation of the data. This means that the data is "smoothed" to remove noise, allowing you to more easily identify the direction of the market trend. This smoother representation is especially useful because the financial market can be subject to significant fluctuations and volatility, and this indicator can help get a more stable view of the trend.
The indicator also offers a visualization of the market trend in a very intuitive way. Using an evaluation of the highs and lows of the last 10 days, determine whether the market is in an uptrend, downtrend, or no trend at all. To make this evaluation even clearer and more immediate, the indicator line is colored dynamically. When the trend is bullish, the line is blue, while in case of a bearish trend, it takes on a distinctive color, such as pink. If the trend is not defined, the line will be colored differently, for example light yellow. This coloration gives traders an immediate visual indication of the prevailing trend, allowing them to make more informed decisions regarding trading operations.
One potential strategy involves watching candles when they cross the VWAP line strongly. If, for example, a candlestick breaks above the VWAP line, we may look for retest areas near key support levels to gauge a potential long entry. In other words, we would consider that the price may have the potential to rise further after breaking above the VWAP line, and we would look to enter a long position to take advantage of this opportunity.
On the other hand, if a candlestick crosses below the VWAP line, we might consider looking for retest areas near the VWAP line itself, which now serves as potential resistance. This could indicate a possible short entry opportunity, as the price may struggle to break above the resistance represented by the VWAP line after breaking it down. In this case, we would look to take advantage of the expected continuation of the downtrend.
In both cases, the idea is to exploit significant movements across the VWAP line as signals of potential reversal or continuation of the trend. This strategy can help identify key entry points based on price behavior relative to the VWAP line.
Weighted Momentum Forecast
The Weighted Momentum Forecast (EWMF) is a predictive indicator designed to forecast the potential direction and magnitude of the next candle's close. It combines the principles of momentum, trend confirmation, and volatility adjustment to make its predictions.
**Components:**
1. **Rate of Change (ROC)**: Measures the momentum of the market.
2. **Average True Range (ATR)**: Represents the market's recent volatility.
3. **Moving Average Convergence Divergence (MACD)**: Used to confirm the momentum's direction.
4. **Trend Moving Average**: A longer-term moving average to confirm the general trend.
5. **Bollinger Bands**: Adjusts the forecast to account for extreme predictions.
**Logic:**
1. **Momentum Bias**: The crossover and crossunder of the MACD line and its signal line are used to determine the momentum's bias. A crossover indicates a bullish bias, while a crossunder indicates a bearish bias.
2. **Trend Confirmation**: If the current close is above the trend moving average, the indicator has a bullish bias, and vice versa.
3. **Forecast Calculation**: The forecast for the next candle's close is calculated based on the current close, the rate of change, the momentum's bias, and the trend's bias. This value is then adjusted for volatility using the ATR.
4. **Volatility Adjustment**: If the forecasted value is beyond the Bollinger Bands, it's adjusted to be within the bands to account for extreme predictions.
**Usage:**
The EWMF plots a purple line representing the forecasted value of the next candle's close. This forecasted value provides traders with a visual representation of where the price might head in the next period, based on recent momentum, trend, and volatility.
**Note**: This is a heuristic approach and is not guaranteed to be accurate. It's essential to use this indicator in conjunction with other tools, backtest on historical data, and use proper risk management techniques. Always be aware of the inherent risks involved in trading and never risk more than you're willing to lose.