Linear Cross Trading StrategyLinear Cross Trading Strategy
The Linear Cross trading strategy is a technical analysis strategy that uses linear regression to predict the future price of a stock. The strategy is based on the following principles:
The price of a stock tends to follow a linear trend over time.
The slope of the linear trend can be used to predict the future price of the stock.
The strategy enters a long position when the predicted price crosses above the current price, and exits the position when the predicted price crosses below the current price.
The Linear Cross trading strategy is implemented in the TradingView Pine script below. The script first calculates the linear regression of the stock price over a specified period of time. The script then plots the predicted price and the current price on the chart. The script also defines two signals:
Long signal: The long signal is triggered when the predicted price crosses above the current price.
Short signal: The short signal is triggered when the predicted price crosses below the current price.
The script enters a long position when the long signal is triggered and exits the position when the short signal is triggered.
Here is a more detailed explanation of the steps involved in the Linear Cross trading strategy:
Calculate the linear regression of the stock price over a specified period of time.
Plot the predicted price and the current price on the chart.
Define two signals: the long signal and the short signal.
Enter a long position when the long signal is triggered.
Exit the long position when the short signal is triggered.
The Linear Cross trading strategy is a simple and effective way to trade stocks. However, it is important to note that no trading strategy is guaranteed to be profitable. It is always important to do your own research and backtest the strategy before using it to trade real money.
Here are some additional things to keep in mind when using the Linear Cross trading strategy:
The length of the linear regression period is a key parameter that affects the performance of the strategy. A longer period will smooth out the noise in the price data, but it will also make the strategy less responsive to changes in the price.
The strategy is more likely to generate profitable trades when the stock price is trending. However, the strategy can also generate profitable trades in ranging markets.
The strategy is not immune to losses. It is important to use risk management techniques to protect your capital when using the strategy.
I hope this blog post helps you understand the Linear Cross trading strategy better. Booost and share with your friend, if you like.
Centered Oscillators
Coppock Curve w/ Early Turns [QuantVue]The Coppock Curve is a momentum oscillator developed by Edwin Coppock in 1962. The curve is calculated using a combination of the rate of change (ROC) for two distinct periods, which are then subjected to a weighted moving average (WMA).
History of the Coppock Curve:
The Coppock Curve was originally designed for use on a monthly time frame to identify buying opportunities in stock market indices, primarily after significant declines or bear markets.
Historically, the monthly time frame has been the most popular for the Coppock Curve, especially for long-term trend analysis and spotting the beginnings of potential bull markets after bearish periods.
The signal wasn't initially designed for finding sell signals, however it can be used to look for tops as well.
When the indicator is above zero it indicates a hold. When the indicator drops below zero it indicates a sell, and when the indicator moves above zero it signals a buy.
While this indicator was originally designed to be used on monthly charts of the indices, many traders now use this on individual equities and etfs on all different time frames.
About this Indicator:
The Coppock Curve is plotted with colors changing based on its position relative to the zero line. When above zero, it's green, and when below, it's red. (default settings)
An absolute zero line is also plotted in black to serve as a reference.
In addition to the classic Coppock Curve, this indicator looks to identify "early turns" or potential reversals of the Coppock Curve rather than waiting for the indicator to cross above or below the zero line.
Give this indicator a BOOST and COMMENT your thoughts!
We hope you enjoy.
Cheers!
Support and Resistance Oscillator [CC]The Support and Resistance Oscillator is an experimental script I created to identify when the current price breaks a support or resistance line and reflect this value in an oscillator formula. This indicator uses a threshold to decide the dividing line between buying and selling points. Feel free to change the threshold or smoothing settings to see if you find anything better since this is so experimental. I'm double smoothing the difference between the indicator and its signal line to attempt to capture a combo of the price momentum combined with the general support and resistance levels. I have used dark colors for strong signals and lighter colors for normal signals and make sure to buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts or indicators you would like to see me publish!
MACD 3D with Signals [Quantigenics]Quantigenics MACD 3D with Buy Sell Signals is a MACD-based trading indicator that aims to identify market trends and potential turning points, for Buy/Sell opportunities, by leveraging price data and volatility.
Unlike the traditional MACD indicator, the average price is calculated from the high, low, and close prices, from which a specialized MACD value is derived. This MACD value, combined with an average and standard deviation, takes into account volatility, and is used to generate an upper and lower boundary.
The indicator color-codes market trends: aqua indicates upward trends (signifying increased buying pressure), red suggests downward trends (increased selling pressure). When the MACD value crosses above the upper boundary or falls below the lower boundary, the color changes to yellow indicating a possible reversal point and "Momentum Crossover Signals" can be plotted at this point. "Standard Signal" arrows can also plotted when the MACD 3D changes from auqa to red and vice-versa.
A trendline is drawn at the median value, providing a baseline for comparison. A differential value, which measures the distance between the MACD value and the median line, provides additional insight into the price's deviation from this baseline (divergences from the underlying price can be spotted using this data as well). The differential is color-coded: green when MACD is above the median, and red when it's below, with darker shades representing a decreasing gap.
Alerts can be set to trigger with the "Standard Signal" arrows appearing after MACD 3D changes from auqa to red and vice-versa and when the "Momentum Crossover Signal" arrows appear when the MACD value crosses above the upper boundary or falls below the lower boundary indicating a potential reversal. Providing immediate notifications which can be especially helpful in larger time frames where it may take time for a trade setup to develop.
CME_MINI:NQ1!
OANDA:XAUUSD
Enjoy the MACD 3D indicator. Happy Trading!
Velocity Acceleration Convergence Divergence Indicator [CC]I created the Velocity Acceleration Convergence Divergence Indicator, and it is quite a mouthful if I do say so. I based this script on my two previous scripts: Velocity Indicator and Velocity Acceleration Indicator . This acts like a typical MACD but is much faster with the responses. This indicator is created by finding the difference between the Velocity Indicator and Velocity Acceleration Indicator to determine the overall trend strength of the underlying stock. Like the other scripts, I coded the general buy and sell signals the same, so you would want to buy when the indicator crosses over above the zero midline and sell when it crosses below the zero midline. I have also used the same colors, so darker colors for strong signals and lighter colors for normal signals.
Please let me know if you would like me to publish another script or if you want something custom done!
Velocity Acceleration Indicator [CC]The Velocity Acceleration Indicator was created by Scott Cong (Stocks and Commodities Sep 2023, pgs 8-15). This is another personal variation of his formula designed to capture the overall velocity acceleration of the underlying stock by applying the velocity formula to the original indicator to find the acceleration of the underlying velocity. I changed a few things around and managed actually to get less lag and quicker signals for this version, so make sure you compare the Velocity Indicator script that I published yesterday. This indicator is also visually similar to a typical stochastic indicator but uses a different underlying calculation. This works well as a momentum indicator, and the values are completely unbounded, so the best ways to determine bullish or bearish trends is either by using a crossover or crossunder between the indicator and the midline or to buy or sell the indicator when it reaches a high or low point and starts to fall or rise respectively. I used the zero line for my default version to help determine the bullish or bearish trends. I have also included multiple colors to differentiate between very strong signals and normal signals, so very strong signals are darker in color, and normal signals use lighter colors. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators or scripts you would like to see me publish! I will have some more new scripts in the next week or so.
Adaptive MACD [LuxAlgo]The Adaptive MACD indicator is an adaptive version of the popular Moving Average Convergence Divergence (MACD) oscillator, returning longer-term variations during trending markets and cyclic variations during ranging markets while filtering out noisy variations.
🔶 USAGE
The proposed oscillator contains all the elements within a regular MACD, such as a signal line and histogram. A MACD value above 0 would indicate up-trending variations, while a value under 0 would be indicating down-trending variations.
Just like most oscillators, our proposed Adaptive MACD is able to return divergences with the price.
As we can see in the image above ranging markets will make the Adaptive MACD more conservative toward more cyclical conservations, filtering out both noise and longer-term variations. However, when longer-term variations (such as in a trending market) are prominent the oscillator will conserve longer-term variations.
The R2 Period setting determines when trending/ranging markets are detected, with higher values returning indications for longer intervals.
The fast and slow settings will act similarly to the regular MACD, however, closer values will return more cyclical outputs.
The image above compares our proposed MACD (top) with a regular MACD (bottom), both using fast = 19 and slow = 20 .
🔶 DETAILS
It is common to be solely interested in the trend component when the market is trending, however, during a ranging market it is more common to observe a more prominent cyclical/noise component. We want to be able to preserve one of the components at the appropriate market conditions, however, the regular MACD lack the ability to preserve cyclical component with high accuracy.
The MACD is an IIR bandpass filter. In order to obtain a lower passband bandwidth and a more symmetrical magnitude response (which would allow to conserve more precise cyclical variations) we can directly change the system calculation:
y = (price - price ) × g + ((1 - a1) + (1 - a2)) × y - (1 - a1) × (1 - a2) × y
where:
a1 = 2/(fast + 1)
a2 = 2/(slow + 1)
g = a1 - a2
Using division instead of multiplication on the second feedback weight allows further weighting the 2 samples lagged output, returning a more desirable magnitude response with a higher degree of filtering on both ends of the spectrum as shown in the image below:
We are interested in conserving cycles during ranging markets, and longer-term variations during trending markets, we can do this by interpolating between our two filter coefficients:
α × + (1 - α) ×
where 1 > α > 0 . α is measuring if the market is trending or ranging, with values closer to 1 indicating a trending market. We see that for higher values of α the original coefficient of the MACD is used. The image below shows various magnitude responses given multiple values of α :
We use a rolling R-Squared as α , this measurement has the benefit of indicating if the market is trending or ranging, as well as being constrained within range (0, 1), and having a U-shaped distribution.
If you are interested to learn more about the MACD see:
🔶 SETTINGS
R2 Period: Calculation window of the R-Squared.
Fast: Fast period for the calculation of the Adaptive MACD, lower values will return more noisy results.
Slow: Slow period for the calculation of the Adaptive MACD, higher values will return result with longer-term conserved variations.
Signal: Period of the EMA applied to the Adaptive MACD.
Velocity Indicator [CC]The Velocity Indicator was created by Scott Cong (Stocks and Commodities Sep 2023, pgs 8-15). This is my variation of his formula designed to capture the overall velocity of the underlying stock by applying the typical velocity formula. This indicator is visually similar to a typical stochastic indicator but uses a different underlying calculation. This works well as a momentum indicator, and the values are completely unbounded, so the best ways to determine bullish or bearish trends is either by using a crossover or crossunder between the indicator and the midline or to buy or sell the indicator when it reaches a high or low point and starts to fall or rise respectively. For my default version, I used the zero line to help determine the bullish or bearish trends. I have also included multiple colors to differentiate between very strong signals and normal signals, so very strong signals are darker in color, and normal signals use lighter colors. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators or scripts you would like to see me publish! I will have some more new scripts in the next week or so.
MACD Bands - Multi Timeframe [TradeMaster Lite]We present a customizable MACD indicator, with the following features:
Multi-timeframe
Deviation bands to spot unusual volatility
9 Moving Average types
Conditional coloring and line crossings
👉 What is MACD?
MACD is a classic, trend-following indicator that uses moving averages to identify changes in momentum. It can be used to identify trend changes, overbought and oversold conditions, and potential reversals.
👉 Multi-timeframe:
This feature allows to analyze the same market data on multiple time frames, which can be in help to identify trends and patterns that would not be visible on a single time frame. When using the multi-timeframe feature, it is important to start with the higher time frame and then look for confirmation on the lower time frames. This will help you to avoid false signals. Please note that only timeframes higher than the chart timeframe is supported currently with this feature enabled. Might get updated in the future.
👉 Deviation bands to spot unusual volatility:
Deviation bands are plotted around the Signal line that can be in help to identify periods of unusual volatility. When the MACD line crosses outside of the deviation bands, it suggests that the market is becoming more volatile and a strong trend may form in that direction.
👉 9 Moving Average types can be used in the script. Each type of moving average offers a unique perspective and can be used in different scenarios to identify market trends.
SMA (Simple Moving Average): This calculates the average of a selected range of values, by the number of periods in that range.
SMMA (Smoothed Moving Average): This takes into account all data available and assigns equal weighting to the values.
EMA (Exponential Moving Average): This places a greater weight and significance on the most recent data points.
DEMA (Double Exponential Moving Average): This is a faster-moving average that uses a proprietary calculation to reduce the lag in data points.
TEMA (Triple Exponential Moving Average): This is even quicker than the DEMA, helping traders respond more quickly to changes in trend.
LSMA (Least Squares Moving Average): This moving average applies least squares regression method to determine the future direction of the trend.
HMA (Hull Moving Average): This moving average is designed to reduce lag and improve smoothness, providing quicker signals for short-term market movements.
VWMA (Volume Weighted Moving Average): This assigns more weight to candles with a high volume, reflecting the true average values more accurately in high volume periods.
WMA (Weighted Moving Average): This assigns more weight to the latest data, but not as much as the EMA.
👉 Conditional coloring :
This feature colors the MACD line line based on it's direction and fills the area between the MACD line and Deviation band edges to highlight the potential volatility and the strength of the momentum. This can be useful to identify when the market is trending strongly and when it is in a more neutral or choppy state.
👉 MACD Line - Signal Line crossings:
This is a classic MACD trading signal that occurs when the MACD line crosses above or below the signal line. Crossovers can be used to identify potential trend reversals. This can be a bullish or bearish signal, depending on the direction of the crossover.
👉 General advice
Confirming Signals with other indicators:
As with all technical indicators, it is important to confirm potential signals with other analytical tools, such as support and resistance levels, as well as indicators like RSI, MACD, and volume. This helps increase the probability of a successful trade.
Use proper risk management:
When using this or any other indicator, it is crucial to have proper risk management in place. Consider implementing stop-loss levels and thoughtful position sizing.
Combining with other technical indicators:
The indicator can be effectively used alongside other technical indicators to create a comprehensive trading strategy and provide additional confirmation.
Keep in Mind:
Thorough research and backtesting are essential before making any trading decisions. Furthermore, it's crucial to have a solid understanding of the indicator and its behavior. Additionally, incorporating fundamental analysis and considering market sentiment can be vital factors to take into account in your trading approach.
Limitations:
This is a lagging indicator. Please note that the indicator is using moving averages, which are lagging indicators.
The indicators within the TradeMaster Lite package aim for simplicity and efficiency, while retaining their original purpose and value. Some settings, functions or visuals may be simpler than expected.
⭐ Conclusion
We hold the view that the true path to success is the synergy between the trader and the tool, contrary to the common belief that the tool itself is the sole determinant of profitability. The actual scenario is more nuanced than such an oversimplification. Our aim is to offer useful features that meet the needs of the 21st century and that we actually use.
🛑 Risk Notice:
Everything provided by trademasterindicator – from scripts, tools, and articles to educational materials – is intended solely for educational and informational purposes. Past performance does not assure future returns.
MarketSmith Daily Market IndicatorsMarketSmith Daily Market Indicators is designed to mimic the Daily Market Indicators tab found in MarketSmith. This tab contains 4 different secondary indicators to help gauge the health of the overall market.
This indicator allows you to choose which of the 4 indicators to show, as well as which index to pull data from, Nasdaq or NYSE. There is also a snapshot table showing the following:
# of stock advancing and up volume
# of stocks declining and down volume
# of stock unchanged and unchanged volume
# of stocks making new highs and new lows
Now let's look at the 4 indicators and how they work.
Advance/Decline Line
Plots the number of advancing shares vs the number of declining shares. Heavily weighted index stocks can skew price action, this line helps reveal that and whether most stocks are aligned with the trend.
Short Term Overbought/Oversold Oscillator
A 10-day moving average of the number of stocks moving up in price less the number of stocks moving down in price.
10 Day Moving Average of Up & Down Volume
Two 10 day moving averages to represent the volume of all stocks. Blue line: total volume of all stocks moving up in price. Red line: the total volume of all stocks moving down in price.
10 Day Moving Average of New Highs & New Lows
Two 10-day moving average to represent stocks making new highs and new lows. Blue line: The number of stocks making new price highs. Red line: The number of stocks reaching new lows.
Note this indicator is designed to work on a daily time frame chart. Data typically updates 90 minutes after the close. Data may differ from Marketsmith due to different providers, however the general trends are the same.
Trig-Log Scaled Momentum OscillatorTaylor Series Approximations for Trigonometry:
1. The indicator starts by calculating sine and cosine values of the close price using Taylor Series approximations. These approximations use polynomial terms to estimate the values of these trigonometric functions.
Mathematical Component Formation:
2. The calculated sine and cosine values are then multiplied together. This gives us the primary mathematical component, termed as the 'trigComponent'.
Smoothing Process:
3. To ensure that our indicator is less susceptible to market noise and more reactive to genuine price movements, this 'trigComponent' undergoes a smoothing process using a simple moving average (SMA). The length of this SMA is defined by the user.
Logarithmic Transformation:
4. With our smoothed value, we apply a natural logarithm approximation. Again, this approximation is based on the Taylor expansion. This step ensures that all resultant values are positive and offers a different scale to interpret the smoothed component.
Dynamic Scaling:
5. To make our indicator more readable and comparable over different periods, the logarithmically transformed values are scaled between a range. This range is determined by the highest and lowest values of the transformed component over the user-defined 'lookback' period.
ROC (Rate of Change) Direction:
6. The direction of change in our scaled value is determined. This offers a quick insight into whether our mathematical component is increasing or decreasing compared to the previous value.
Visualization:
7. Finally, the indicator plots the dynamically scaled and smoothed mathematical component on the chart. The color of the plotted line depends on its direction (increasing or decreasing) and its boundary values.
TaLib RSI (ta-lib uses SMA)If you've ever been confused because Ta-Lib RSI differs from TradingView's RSI...
Look no further than here which instead of using the Rolling Moving Average, will instead use the Simple Moving Average
Ultimate Momentum OscillatorThe Ultimate Momentum Oscillator is a tool designed to help traders identify the current trend direction and the momentum of the prices.
This oscillator is composed of one histogram and one line, paired with the two overbought and the two oversold levels.
The histogram is a trend-based algorithm that allows the user to read the market bias with multiple trend lengths combined.
The line is a momentum-based formula that allows traders to identify potential reversal and the speed of the price.
This tool can be used to:
- Identify the current trend direction
- Identify the momentum of the price
- Identify oversold and overbought levels
Relative Strength Volume ComparisonThe Relative Strength Volume Comparison is a powerful tool that can help traders identify the current trend based on volume pressure and potential reversals.
This oscillator is made of two lines and the overbought and oversold levels. Each of these two lines is a relative-strength formula that contains both the famous RSI and CCI formulas, smoothed by a Hull moving average.
The two lines are different for input. The colored line is based just on price and changes color based on the relation with the other line. The second line uses as input an average of three different popular volume indicators: The OBV, the Accumulation/Distribution, and the PVT.
Thanks to this tool, which uses 6 different formulas combined, traders can:
- Identify the current trend direction, based on the color of the area fill and the first colored line
- Identify potential reversal areas thanks to the overbought and oversold levels, customizable in the input section alongside the length and smoothing parameters.
Trend Change DetectorThe trend change detector oscillator is a tool designed to help traders identify the current trend direction paired with the potential reversal zones.
The oscillator is made of multiple parts:
- The colored histogram, that displays the current long-term trend direction (long if above 0, short if below)
- The trend line, which shows the price in relation to the fair value of the current trend
- The reversal zones, which are the area that alarms the traders that the price might reverse soon after having touched them
The indicator can work with three different inputs. In the Source panel, you can choose between "Price", "Price and Volume" and "Ponderated Volume". The price input uses only the price, the price and volume use the average between the price and the ponderated volume, and the ponderated volume shows the indicator working with volume data, with formulas such as the On Balance Volume and the Accumulation-Distribution line.
This indicator can be used both for trend following technique, using the cross of the trend line with the 0-line as signals in conjunction with the bias given by the histogram, and for mean reversal technique thanks to the reversal zones that allow traders to identify potential tops and bottoms.
Extreme Entry with Mean Reversion and Trend FilterThis non-repainting indicator is an improved version of my previous work, a more versatile tool designed to provide traders with dynamic and adaptive entry signals while incorporating a mean reversion and trend filtering mechanism. By combining RSI overbought/oversold, regular divergence and confirmatory momentum oscillator such as CCI or MOM, this indicator generates more precise and timely signals for entering trades.
The indicator offers a comprehensive set of entry conditions for both Buy and Sell entries:
• For Buy entries, it checks for oversold conditions based on RSI levels, and detects bullish divergence patterns while oversold and it identifies upward crossovers in the selected entry signal source (CCI or Momentum).
• Similarly, for Sell entries, it identifies downward crossovers of the CCI or Mom, after the recent overbought conditions, and bearish divergence patterns inside the overbought RSI.
To refine the entry signals even further, the indicator utilizes a mean reversion filter. Traders can choose to display signals that occur inside or outside the upper and lower mean reversion bands:
• Range Entries are indicating potential buying opportunities near the lower band and selling opportunities near the upper band. This is based on the concept of mean reversion, which suggests that prices tend to return to the average when they reach the upper or lower bands. By focusing on these signals, traders can take advantage of price movements that have a higher probability of reversing towards the mean.
• Extreme Entries, on the other hand, represent signals that occur outside of the bands, signaling potential pullbacks during strong trends. By entering positions only at extreme highs or lows, traders can avoid getting caught in the middle of the trend. This approach helps traders capitalize more favorable trading opportunities which have a high reward-risk ratio.
Trend Filter acts as a directional bias for the entry signals. When enabled, long and short entry conditions are filtered based on the relationship between the closing price and the EMA.
Traders have the flexibility to customize, tweak the indicator filter and values in the settings according to their preferences strategies and traded assets, tailoring the signals to their specific needs. The script sets alert conditions to trigger alerts for buy, sell, or both entry signals. This indicator can be used in conjunction with price action or other technical analysis tools for confirmation and better trading decisions.
I created this indicator for my own use, and I share this for informational purposes only. It does not constitute financial advice so use at your own risk and consider your financial situation before making any trading decisions. The indicator's accuracy is not guaranteed, and past performance is not indicative of future results.
I appreciate your feedback on this indicator. As I am new to script development, I am open to comments and suggestions to improve it. If you encounter any issues while using this indicator, please let me know in the comments section. If you find it helpful, I kindly ask for your support in boosting it. Thank you for your cooperation.
Bar Color Long / Short Indicator With Advised SL Rev 1This is the Revised Version of Bar Color Long / Short Indicator With Advised SL with some extra features
Overview
This script is a trading indicator named "Bar Color Long / Short Indicator With Advised SL" designed for the TradingView platform. The indicator's primary purpose is to provide entry signals for long and short positions, based on various technical analysis methods. Additionally, the indicator suggests stop-loss levels for both long and short positions.
User Inputs
The indicator has several user inputs, such as:
Length
Smoothing
Multiplier
Show bar colors (ON/OFF)
When the bar colors are turned off, the alert signals for long and short positions will be displayed instead.
Custom Risk Calculation
The script calculates a custom risk level based on a modified version of the RSI (Relative Strength Index) formula. The custom risk level is divided into three categories: low, medium, and high.
Sentiment Score Calculation
The indicator calculates a sentiment score based on a combination of methods resembling EMA (Exponential Moving Average), MACD (Moving Average Convergence Divergence), and ROC (Rate of Change). The sentiment score is used to determine if the sentiment is positive or negative.
Bollinger Bands Percent and Combined Signal
The Bollinger Bands Percent is calculated, and the custom risk, sentiment score, and Bollinger Bands Percent are combined to generate a new signal. This signal is used in conjunction with EMA10 to determine the bar colors and provide entry signals.
Bar Colors
Based on the combined signal and EMA10, the script determines the bar colors as follows:
Orange: Positive sentiment
Blue: Negative sentiment
Gray: Neutral
Entry Signals and Alerts
When the bar colors are turned off, the indicator displays large green arrow signals for long (buy) positions and red arrow signals for short (sell) positions based on the sentiment and EMA10 conditions. The script also includes alert conditions for long and short signals, which can be used to set up notifications when these signals are triggered in the TradingView platform.
Advised Stop-Loss Levels
The indicator plots stop-loss lines for both long and short positions at the last candle, accompanied by labels showing the advised stop-loss levels in numeric values
Rev 1
added / changed :
SMA50 slope check
EMA20 higher or lower than EMA10
color ON/OFF changed
Signal once Buy and Sell
MACDh with divergences & impulse system (overlayed on prices)-----------------------------------------------------------------
General Description:
This indicator ( the one on the top panel above ) consists on some lines, arrows and labels drawn over the price bars/candles indicating the detection of regular divergences between price and the classic MACD histogram (shown on the low panel). This script is special because it can be adjusted to fit several criteria when trading divergences filtering them according to the "height" and "width" of the patterns. The script also includes the "extra features" Impulse System and Keltner Channels, which you will hardly find anywhere else in similar classic MACD histogram divergence indicators.
The indicator helps to find trend reversals, and it works on any market, any instrument, any timeframe, and any market condition (except against really strong trends that do not show any other sign of reversion yet).
Please take on consideration that divergences should be taken with caution.
-----------------------------------------------------------------
Definition of classic Bullish and Bearish divergences:
* Bearish divergences occur in uptrends identifying market tops. A classical or regular bearish divergence occurs when prices reach a new high and then pull back, with an oscillator (MACD histogram in this case) dropping below its zero line. Prices stabilize and rally to a higher high, but the oscillator reaches a lower peak than it did on a previous rally.
In the chart above (weekly charts of NKE, Nike, Inc.), in area X (around August 2021), NKE rallied to a new bull market high and MACD-Histogram rallied with it, rising above its previous peak and showing that bulls were extremely strong. In area Y, MACD-H fell below its centerline and at the same time prices punched below the zone between the two moving averages. In area Z, NKE rallied to a new bull market high, but the rally of MACD-H was feeble, reflecting the bulls’ weakness. Its downtick from peak Z completed a bearish divergence, giving a strong sell signal and auguring a nasty bear market.
* Bullish divergences , in the other hand, occur towards the ends of downtrends identifying market bottoms. A classical (also called regular) bullish divergence occurs when prices and an oscillator (MACD histogram in this case) both fall to a new low, rally, with the oscillator rising above its zero line, then both fall again. This time, prices drop to a lower low, but the oscillator traces a higher bottom than during its previous decline.
In the example in the chart above (weekly charts of NKE, Nike, Inc.), you see a bearish divergence that signaled the October 2022 bear market bottom, giving a strong buy signal right near the lows. In area A, NKE (weekly charts) appeared in a free fall. The record low A of MACD-H indicated that bears were extremely strong. In area B, MACD-H rallied above its centerline. Notice the brief rally of prices at that moment. In area C, NKE slid to a new bear market low, but MACD-H traced a much more shallow low. Its uptick completed a bullish divergence, giving a strong buy signal.
-----------------------------------------------------------------
Some cool features included in this indicator:
1. This indicator also includes the “ Impulse System ”. The Impulse System is based on two indicators, a 13-day exponential moving average and the MACD-Histogram, and identifies inflection points where a trend speeds up or slows down. The moving average identifies the trend, while the MACD-Histogram measures momentum. This unique indicator combination is color coded into the price bars for easy reference.
Calculation:
Green Price Bar: (13-period EMA > previous 13-period EMA) and
(MACD-Histogram > previous period's MACD-Histogram)
Red Price Bar: (13-period EMA < previous 13-period EMA) and
(MACD-Histogram < previous period's MACD-Histogram)
Price bars are colored blue when conditions for a Red Price Bar or Green Price Bar are not met. The MACD-Histogram is based on MACD(12,26,9).
The Impulse System works more like a censorship system. Green price bars show that the bulls are in control of both trend and momentum as both the 13-day EMA and MACD-Histogram are rising (you don't have permission to sell). A red price bar indicates that the bears have taken control because the 13-day EMA and MACD Histogram are falling (you don't have permission to buy). A blue price bar indicates mixed technical signals, with neither buying nor selling pressure predominating (either both buying or selling are permitted).
2. Another "extra feature" included here is the " Keltner Channels ". Keltner Channels are volatility-based envelopes set above and below an exponential moving average.
3. It were also included a couple of EMAs.
Everything can be removed from the chart any time.
-----------------------------------------------------------------
Options/adjustments for this indicator:
*Horizontal Distance (width) between two tops/bottoms criteria.
Refers to the horizontal distance between the MACH histogram peaks involved in the divergence
*Height of tops/bottoms criteria (for Histogram).
Refers to the difference/relation/vertical distance between the MACH HISTOGRAM peaks involved in the divergence: 1st Histogram Peak is X times the 2nd.
*Height/Vertical deviation of tops/bottoms criteria (for Price).
Deviation refers to the difference/relation/vertical distance between the PRICE peaks involved in the divergence.
*Plot Regular Bullish Divergences?.
*Plot Regular Bearish Divergences?.
*Delete Previous Cancelled Divergences?.
*Shows a pair of EMAs.
*Shows Keltner Channels (using ATR)
Keltner Channels are volatility-based envelopes set above and below an exponential moving average.
*This indicator also has the option to show the Impulse System over the price bars/candles.
MACDh with divergences & impulse system-----------------------------------------------------------------
General Description:
This indicator ( the one on the low panel ) is a classic MACD that also shows regular divergences between its histogram and the prices. This script is special because it can be adjusted to fit several criteria when trading divergences filtering them according to the "height" and "width" of the patterns. The script also includes the "extra feature" Impulse System, which you will hardly find anywhere else in similar classic MACD histogram divergence indicators.
The indicator helps to find trend reversals, and it works on any market, any instrument, any timeframe, and any market condition (except against really strong trends that do not show any other sign of reversion yet).
Please take on consideration that divergences should be taken with caution.
-----------------------------------------------------------------
Definition of classic Bullish and Bearish divergences:
* Bearish divergences occur in uptrends identifying market tops. A classical or regular bearish divergence occurs when prices reach a new high and then pull back, with an oscillator (MACD histogram in this case) dropping below its zero line. Prices stabilize and rally to a higher high, but the oscillator reaches a lower peak than it did on a previous rally.
In the chart above (weekly charts of NKE, Nike, Inc.), in area X (around August 2021), NKE rallied to a new bull market high and MACD-Histogram rallied with it, rising above its previous peak and showing that bulls were extremely strong. In area Y, MACD-H fell below its centerline and at the same time prices punched below the zone between the two moving averages. In area Z, NKE rallied to a new bull market high, but the rally of MACD-H was feeble, reflecting the bulls’ weakness. Its downtick from peak Z completed a bearish divergence, giving a strong sell signal and auguring a nasty bear market.
* Bullish divergences , in the other hand, occur towards the ends of downtrends identifying market bottoms. A classical (also called regular) bullish divergence occurs when prices and an oscillator (MACD histogram in this case) both fall to a new low, rally, with the oscillator rising above its zero line, then both fall again. This time, prices drop to a lower low, but the oscillator traces a higher bottom than during its previous decline.
In the example in the chart above (weekly charts of NKE, Nike, Inc.), you see a bearish divergence that signaled the October 2022 bear market bottom, giving a strong buy signal right near the lows. In area A, NKE (weekly charts) appeared in a free fall. The record low A of MACD-H indicated that bears were extremely strong. In area B, MACD-H rallied above its centerline. Notice the brief rally of prices at that moment. In area C, NKE slid to a new bear market low, but MACD-H traced a much more shallow low. Its uptick completed a bullish divergence, giving a strong buy signal.
-----------------------------------------------------------------
Extra feature: Impulse System
This indicator also includes the “ Impulse System ”. The Impulse System is based on two indicators, a 13-day exponential moving average and the MACD-Histogram, and identifies inflection points where a trend speeds up or slows down. The moving average identifies the trend, while the MACD-Histogram measures momentum. This unique indicator combination is color coded into the price bars or macd histogram bars for easy reference.
Calculation:
Green Price Bar: (13-period EMA > previous 13-period EMA) and
(MACD-Histogram > previous period's MACD-Histogram)
Red Price Bar: (13-period EMA < previous 13-period EMA) and
(MACD-Histogram < previous period's MACD-Histogram)
Histogram bars are colored blue when conditions for a Red Histogram Bar or Green Histogram Bar are not met. The MACD-Histogram is based on MACD(12,26,9).
The Impulse System works more like a censorship system. Green histogram bars show that the bulls are in control of both trend and momentum as both the 13-day EMA and MACD-Histogram are rising (you don't have permission to sell). A red histogram bar indicates that the bears have taken control because the 13-day EMA and MACD Histogram are falling (you don't have permission to buy). A blue histogram bar indicates mixed technical signals, with neither buying nor selling pressure predominating (either both buying or selling are permitted).
The impulse system can be removed from the chart any time.
-----------------------------------------------------------------
Options/adjustments for this indicator:
*Horizontal Distance (width) between two tops/bottoms criteria.
Refers to the horizontal distance between the MACH histogram peaks involved in the divergence
*Height of tops/bottoms criteria (for Histogram).
Refers to the difference/relation/vertical distance between the MACH HISTOGRAM peaks involved in the divergence: 1st Histogram Peak is X times the 2nd.
*Height/Vertical deviation of tops/bottoms criteria (for Price).
Deviation refers to the difference/relation/vertical distance between the PRICE peaks involved in the divergence.
*Plot Regular Bullish Divergences?.
*Plot Regular Bearish Divergences?.
*Delete Previous Cancelled Divergences?.
*This indicator also has the option to show the Impulse System over the MACD histogram bars
Crude Oil Top and Bottoms -by Trevor GeallDiscover the Crude Oil Tops and Bottoms Predictor Indicator: Your Key to Market Precision!
How to Use:
Ideal for the daily chart. Wait for the colored background to form.
Confirm signals by waiting for the first candle to close after the background disappears. That would be your sign to go long (if the line is crossing up) or short (if line is crossing dow).
Combine with other indicators for enhanced insights.
Unveil Market Secrets:
Identifies potential tops and bottoms in crude oil.
Empowers strategic trading decisions.
Advanced divergence detection and price channel analysis.
Note: While powerful, no indicator guarantees perfect predictions. Use it alongside comprehensive analysis and risk management. Elevate your crude oil trading now!
PS If I get enough positive feedback on my indicators ill release some of the better ones.
CCI+EMA Strategy with Percentage or ATR TP/SL [Alifer]This is a momentum strategy based on the Commodity Channel Index (CCI), with the aim of entering long trades in oversold conditions and short trades in overbought conditions.
Optionally, you can enable an Exponential Moving Average (EMA) to only allow trading in the direction of the larger trend. Please note that the strategy will not plot the EMA. If you want, for visual confirmation, you can add to the chart an Exponential Moving Average as a second indicator, with the same settings used in the strategy’s built-in EMA.
The strategy also allows you to set internal Stop Loss and Take Profit levels, with the option to choose between Percentage-based TP/SL or ATR-based TP/SL.
The strategy can be adapted to multiple assets and timeframes:
Pick an asset and a timeframe
Zoom back as far as possible to identify meaningful positive and negative peaks of the CCI
Set Overbought and Oversold at a rough average of the peaks you identified
Adjust TP/SL according to your risk management strategy
Like the strategy? Give it a boost!
Have any questions? Leave a comment or drop me a message.
CAUTIONARY WARNING
Please note that this is a complex trading strategy that involves several inputs and conditions. Before using it in live trading, it is highly recommended to thoroughly test it on historical data and use risk management techniques to safeguard your capital. After backtesting, it's also highly recommended to perform a first live test with a small amount. Additionally, it's essential to have a good understanding of the strategy's behavior and potential risks. Only risk what you can afford to lose .
USED INDICATORS
1 — COMMODITY CHANNEL INDEX (CCI)
The Commodity Channel Index (CCI) is a technical analysis indicator used to measure the momentum of an asset. It was developed by Donald Lambert and first published in Commodities magazine (now Futures) in 1980. Despite its name, the CCI can be used in any market and is not just for commodities. The CCI compares current price to average price over a specific time period. The indicator fluctuates above or below zero, moving into positive or negative territory. While most values, approximately 75%, fall between -100 and +100, about 25% of the values fall outside this range, indicating a lot of weakness or strength in the price movement.
The CCI was originally developed to spot long-term trend changes but has been adapted by traders for use on all markets or timeframes. Trading with multiple timeframes provides more buy or sell signals for active traders. Traders often use the CCI on the longer-term chart to establish the dominant trend and on the shorter-term chart to isolate pullbacks and generate trade signals.
CCI is calculated with the following formula:
(Typical Price - Simple Moving Average) / (0.015 x Mean Deviation)
Some trading strategies based on CCI can produce multiple false signals or losing trades when conditions turn choppy. Implementing a stop-loss strategy can help cap risk, and testing the CCI strategy for profitability on your market and timeframe is a worthy first step before initiating trades.
2 — AVERAGE TRUE RANGE (ATR)
The Average True Range (ATR) is a technical analysis indicator that measures market volatility by calculating the average range of price movements in a financial asset over a specific period of time. The ATR was developed by J. Welles Wilder Jr. and introduced in his book “New Concepts in Technical Trading Systems” in 1978.
The ATR is calculated by taking the average of the true range over a specified period. The true range is the greatest of the following:
The difference between the current high and the current low.
The difference between the previous close and the current high.
The difference between the previous close and the current low.
The ATR can be used to set stop-loss orders. One way to use ATR for stop-loss orders is to multiply the ATR by a factor (such as 2 or 3) and subtract it from the entry price for long positions or add it to the entry price for short positions. This can help traders set stop-loss orders that are more adaptive to market volatility.
3 — EXPONENTIAL MOVING AVERAGE (EMA)
The Exponential Moving Average (EMA) is a type of moving average (MA) that places a greater weight and significance on the most recent data points.
The EMA is calculated by taking the average of the true range over a specified period. The true range is the greatest of the following:
The difference between the current high and the current low.
The difference between the previous close and the current high.
The difference between the previous close and the current low.
The EMA can be used by traders to produce buy and sell signals based on crossovers and divergences from the historical average. Traders often use several different EMA lengths, such as 10-day, 50-day, and 200-day moving averages.
The formula for calculating EMA is as follows:
Compute the Simple Moving Average (SMA).
Calculate the multiplier for weighting the EMA.
Calculate the current EMA using the following formula:
EMA = Closing price x multiplier + EMA (previous day) x (1-multiplier)
STRATEGY EXPLANATION
1 — INPUTS AND PARAMETERS
The strategy uses the Commodity Channel Index (CCI) with additional options for an Exponential Moving Average (EMA), Take Profit (TP) and Stop Loss (SL).
length : The period length for the CCI calculation.
overbought : The overbought level for the CCI. When CCI crosses above this level, it may signal a potential short entry.
oversold : The oversold level for the CCI. When CCI crosses below this level, it may signal a potential long entry.
useEMA : A boolean input to enable or disable the use of Exponential Moving Average (EMA) as a filter for long and short entries.
emaLength : The period length for the EMA if it is used.
2 — CCI CALCULATION
The CCI indicator is calculated using the following formula:
(src - ma) / (0.015 * ta.dev(src, length))
src is the typical price (average of high, low, and close) and ma is the Simple Moving Average (SMA) of src over the specified length.
3 — EMA CALCULATION
If the useEMA option is enabled, an EMA is calculated with the given emaLength .
4 — TAKE PROFIT AND STOP LOSS METHODS
The strategy offers two methods for TP and SL calculations: percentage-based and ATR-based.
tpSlMethod_percentage : A boolean input to choose the percentage-based method.
tpSlMethod_atr : A boolean input to choose the ATR-based method.
5 — PERCENTAGE-BASED TP AND SL
If tpSlMethod_percentage is chosen, the strategy calculates the TP and SL levels based on a percentage of the average entry price.
tp_percentage : The percentage value for Take Profit.
sl_percentage : The percentage value for Stop Loss.
6 — ATR-BASED TP AND SL
If tpSlMethod_atr is chosen, the strategy calculates the TP and SL levels based on Average True Range (ATR).
atrLength : The period length for the ATR calculation.
atrMultiplier : A multiplier applied to the ATR to set the SL level.
riskRewardRatio : The risk-reward ratio used to calculate the TP level.
7 — ENTRY CONDITIONS
The strategy defines two conditions for entering long and short positions based on CCI and, optionally, EMA.
Long Entry: CCI crosses below the oversold level, and if useEMA is enabled, the closing price should be above the EMA.
Short Entry: CCI crosses above the overbought level, and if useEMA is enabled, the closing price should be below the EMA.
8 — TP AND SL LEVELS
The strategy calculates the TP and SL levels based on the chosen method and updates them dynamically.
For the percentage-based method, the TP and SL levels are calculated as a percentage of the average entry price.
For the ATR-based method, the TP and SL levels are calculated using the ATR value and the specified multipliers.
9 — EXIT CONDITIONS
The strategy defines exit conditions for both long and short positions.
If there is a long position, it will be closed either at TP or SL levels based on the chosen method.
If there is a short position, it will be closed either at TP or SL levels based on the chosen method.
Additionally, positions will be closed if CCI crosses back above oversold in long positions or below overbought in short positions.
10 — PLOTTING
The script plots the CCI line along with overbought and oversold levels as horizontal lines.
The CCI line is colored red when above the overbought level, green when below the oversold level, and white otherwise.
The shaded region between the overbought and oversold levels is plotted as well.
Impulse MACD buy OwlPixelDescription:
The Impulse MACD Buy Indicator, developed by OwlPixel, is a powerful trading tool for traders using TradingView's Pine Script version 5. This indicator aims to provide valuable insights for identifying potential buy signals in the market using the popular MACD (Moving Average Convergence Divergence) oscillator.
Key Features:
MACD Analysis: The indicator displays the MACD line (blue) and the signal line (orange) on the chart, helping traders assess the momentum and trend direction of an asset.
Impulse Histo: The Impulse Histo (blue histogram) visualizes the difference between the MACD line and the signal line, making it easier to spot changes in market strength and potential trend reversals.
Impulse MACD CD Signal: This histogram (maroon color) highlights the divergence between the Impulse Histo and the signal line, providing further insights into trend shifts.
Background Boxes: The indicator features three rows of different colored background boxes that represent distinct market conditions - an uptrend (light green), a downtrend (light red), and a neutral trend (light yellow).
Crossover Points: Buy signals are marked with green circles when the MACD line crosses above the signal line, suggesting potential entry points for long positions.
Demand and Supply Bars: The demand (lime/green) and supply (red/orange) bars are intensified, aiding traders in identifying possible reversal areas.
Stop Loss and Take Profit:
The Impulse MACD Buy Indicator automatically calculates Stop Loss (SL) and Take Profit (TP) levels for buy signals. The SL level is set at the highest of the last three candles, while the TP level is determined by a user-defined percentage of the closing price. This information helps traders manage risk and optimize their profit potential.
Usage:
Apply the Impulse MACD Buy Indicator to your TradingView chart by copying the provided Pine Script into the Pine Editor.
Configure the input parameters, such as the MA Length and Signal Length, to suit your trading preferences.
Observe the MACD line, signal line, and histograms to gain insights into market momentum and trends.
Identify buy signals when the MACD line crosses above the signal line, signaled by green circles.
Utilize the provided Stop Loss and Take Profit levels for risk management and exit strategies.
Please note that this indicator is for informational purposes only and should be used in conjunction with other analysis techniques to make well-informed trading decisions. Happy trading!
Flat & Trend MACD💡 The MACD indicator with trend interpretation and flat zones on top of the chart!
👉 This indicator clearly shows the zones of predominance of buyers, sellers, as well as zones of uncertainty (flat).
Suitable for any instrument and timeframe!
The MACD settings are standard.
The setup menu sets the length of Fast, Slow and smoothing for calculating the MACD oscillator.
🔹The indicator tracks the value of the MACD relative to zero, taking into account the uncertainty zone, which is calculated at 50% of the average value of the deviation of the MACD for a short period. This avoids most false buy and sell signals.
🔹When the MACD value is positive and goes beyond uncertainty, a buy signal appears (green triangle on the chart), when the MACD value is negative and goes beyond uncertainty, a sell signal appears (red triangle on the chart). The built-in alert gives a signal of a trend change.
Also, the trend direction is highlighted by the background color of the price channel on the chart.
🔹If the MACD value is in the zone of uncertainty of the buyer and seller, the background turns gray and an orange square appears on the chart. The built-in alert gives a signal about the beginning of the flat zone.
A scoreboard is displayed in the upper right corner, which shows the current status of the indicator and a warning about the presence of a flat.
The flat display can be disabled in the indicator settings.
The colors can be changed in the Style menu.
👉 I wish everyone a profit and be sure to follow risk management in trading!
For any questions, you can write to me in private messages or by the contacts in my signature.
===============================================
💡 Индикатор MACD с интерпретацией тренда и флэтовых зон поверх графика!
👉 Данный индикатор наглядно показывает зоны преобладания покупателей, продавцов, а также зоны неопределенности (флэт).
Подходит для любого инструмента и таймфрейма!
Параметры настройки MACD - стандартные.
В меню настройки задается длина Fast, Slow и сглаживание для расчета MACD-осциллятора.
🔹Индикатор отслеживает значение MACD относительно нуля с учётом зон неопределённости, которая расчитывается в 50% среднего значения отклонения MACD за небольшой период. Это позволяет избежать большинства ложных сигналов на покупку и продажу.
🔹Когда значение MACD является положительным и выходит за пределы неопределённости - появляется сигнал на покупку (зеленый треугольник на графике), когда значение MACD является отрицательным и выходит за пределы неопределённости - появляется сигнал на продажу (красный треугольник на графике). Встроенное оповещение дает сигнал о смене тренда.
Также направление тренда подсвечивается окраской фона ценового канала на графике.
🔹Если значение MACD находится в зоне неопределённости покупателя и продавца - фон окрашивается в серый цвет и на графике появляется оранжевый квадрат. Встроенное оповещение дает сигнал о начале зоны флэта.
В правом верхнем углу высвечивается табло, которое показывает текущий статус индикатора и предупреждение о наличии флэта.
Отображение флэта можно отключить в настройках индикатора.
Цвета можно изменить в меню "Стиль".
👉 Желаю всем профита и обязательно соблюдайте риск-менеджмент в торговле!
По любым вопросам Вы можете написать мне в личные сообщения или по контактам в моей подписи.