Power Law Regression with SDThis idea use power law to determine price and use to predict state of random walk and trend.
Индикаторы и стратегии
ATR Only-{Jebri}Displays the ATR, a key volatility measure. Use it to gauge market swings, set stops, and manage risk. Higher readings indicate bigger moves; lower readings suggest calmer phases. Adjust the ATR length to suit your timeframe. Combine with other tools for robust decision-making.
World Digital Clock Original code developed by br.tradingview.com
In this update I added the Frankfurt stock exchange, left the times according to Western Europe, and added another light signal to identify whether the stock exchange is open or closed.
This indicator provides a digital clock and real-time status for major financial markets, including Tokyo, London, New York, and Frankfurt. It displays whether each market is currently OPEN or CLOSED, along with the time remaining until the market opens or closes. The indicator is designed to keep traders informed about market activity at a glance.
Key Features:
Digital Clock:
Displays the current time based on a user-defined UTC offset.
Customizable text color, size, and background color.
Market Status:
Shows whether each major market is OPEN or CLOSED.
Displays a countdown timer indicating the time remaining until the market opens or closes.
Includes markets for Tokyo, London, New York, and Frankfurt.
Color Indicators:
A green dot indicates the market is open.
A red dot indicates the market is closed.
Text colors for open and closed markets can be customized.
Customizable Layout:
Choose the table position on the chart (e.g., top right, bottom left).
Adjust text sizes for both the clock and market status.
Daylight Saving Time:
Automatically adjusts market opening and closing times based on daylight saving rules (e.g., summer and winter time).
Alerts:
Optionally triggers alerts when a market opens, keeping you updated in real-time.
Use Cases:
Perfect for day traders or swing traders who need to monitor global market activity.
Useful for keeping track of trading hours and planning strategies based on market availability.
Helps avoid trading outside active market hours, reducing slippage and volatility risks.
This versatile and customizable tool ensures you're always aware of market status and time zones, enhancing your trading efficiency and decision-making.
Average ATR & Average Volume TableProvides a comparison (above or below average) of the current Average True Range (ATR) with the ATR values from the previous 13 periods at the same point in time, offering insight into the average range over the past 13 sessions. Additionally, it includes the current trading volume alongside the average volume for the previous 13 periods during the same time frame offering insight into the average volume over the past 13 sessions.
Bullish Reversal Bar Strategy [Skyrexio]Overview
Bullish Reversal Bar Strategy leverages the combination of candlestick pattern Bullish Reversal Bar (description in Methodology and Justification of Methodology), Williams Alligator indicator and Williams Fractals to create the high probability setups. Candlestick pattern is used for the entering into trade, while the combination of Williams Alligator and Fractals is used for the trend approximation as close condition. Strategy uses only long trades.
Unique Features
No fixed stop-loss and take profit: Instead of fixed stop-loss level strategy utilizes technical condition obtained by Fractals and Alligator or the candlestick pattern invalidation to identify when current uptrend is likely to be over (more information in "Methodology" and "Justification of Methodology" paragraphs)
Configurable Trading Periods: Users can tailor the strategy to specific market windows, adapting to different market conditions.
Trend Trade Filter: strategy uses Alligator and Fractal combination as high probability trend filter.
Methodology
The strategy opens long trade when the following price met the conditions:
1.Current candle's high shall be below the Williams Alligator's lines (Jaw, Lips, Teeth)(all details in "Justification of Methodology" paragraph)
2.Price shall create the candlestick pattern "Bullish Reversal Bar". Optionally if MFI and AO filters are enabled current candle shall have the decreasing AO and at least one of three recent bars shall have the squat state on the MFI (all details in "Justification of Methodology" paragraph)
3.If price breaks through the high of the candle marked as the "Bullish Reversal Bar" the long trade is open at the price one tick above the candle's high
4.Initial stop loss is placed at the Bullish Reversal Bar's candle's low
5.If price hit the Bullish Reversal Bar's low before hitting the entry price potential trade is cancelled
6.If trade is active and initial stop loss has not been hit, trade is closed when the combination of Alligator and Williams Fractals shall consider current trend change from upward to downward.
Strategy settings
In the inputs window user can setup strategy setting:
Enable MFI (if true trades are filtered using Market Facilitation Index (MFI) condition all details in "Justification of Methodology" paragraph), by default = false)
Enable AO (if true trades are filtered using Awesome Oscillator (AO) condition all details in "Justification of Methodology" paragraph), by default = false)
Justification of Methodology
Let's explore the key concepts of this strategy and understand how they work together. The first and key concept is the Bullish Reversal Bar candlestick pattern. This is just the single bar pattern. The rules are simple:
Candle shall be closed in it's upper half
High of this candle shall be below all three Alligator's lines (Jaw, Lips, Teeth)
Next, let’s discuss the short-term trend filter, which combines the Williams Alligator and Williams Fractals. Williams Alligator
Developed by Bill Williams, the Alligator is a technical indicator that identifies trends and potential market reversals. It consists of three smoothed moving averages:
Jaw (Blue Line): The slowest of the three, based on a 13-period smoothed moving average shifted 8 bars ahead.
Teeth (Red Line): The medium-speed line, derived from an 8-period smoothed moving average shifted 5 bars forward.
Lips (Green Line): The fastest line, calculated using a 5-period smoothed moving average shifted 3 bars forward.
When the lines diverge and align in order, the "Alligator" is "awake," signaling a strong trend. When the lines overlap or intertwine, the "Alligator" is "asleep," indicating a range-bound or sideways market. This indicator helps traders determine when to enter or avoid trades.
Fractals, another tool by Bill Williams, help identify potential reversal points on a price chart. A fractal forms over at least five consecutive bars, with the middle bar showing either:
Up Fractal: Occurs when the middle bar has a higher high than the two preceding and two following bars, suggesting a potential downward reversal.
Down Fractal: Happens when the middle bar shows a lower low than the surrounding two bars, hinting at a possible upward reversal.
Traders often use fractals alongside other indicators to confirm trends or reversals, enhancing decision-making accuracy.
How do these tools work together in this strategy? Let’s consider an example of an uptrend.
When the price breaks above an up fractal, it signals a potential bullish trend. This occurs because the up fractal represents a shift in market behavior, where a temporary high was formed due to selling pressure. If the price revisits this level and breaks through, it suggests the market sentiment has turned bullish.
The breakout must occur above the Alligator’s teeth line to confirm the trend. A breakout below the teeth is considered invalid, and the downtrend might still persist. Conversely, in a downtrend, the same logic applies with down fractals.
How we can use all these indicators in this strategy? This strategy is a counter trend one. Candle's high shall be below all Alligator's lines. During this market stage the bullish reversal bar candlestick pattern shall be printed. This bar during the downtrend is a high probability setup for the potential reversal to the upside: bulls were able to close the price in the upper half of a candle. The breaking of its high is a high probability signal that trend change is confirmed and script opens long trade. If market continues going down and break down the bullish reversal bar's low potential trend change has been invalidated and strategy close long trade.
If market really reversed and started moving to the upside strategy waits for the trend change form the downtrend to the uptrend according to approximation of Alligator and Fractals combination. If this change happens strategy close the trade. This approach helps to stay in the long trade while the uptrend continuation is likely and close it if there is a high probability of the uptrend finish.
Optionally users can enable MFI and AO filters. First of all, let's briefly explain what are these two indicators. The Awesome Oscillator (AO), created by Bill Williams, is a momentum-based indicator that evaluates market momentum by comparing recent price activity to a broader historical context. It assists traders in identifying potential trend reversals and gauging trend strength.
AO = SMA5(Median Price) − SMA34(Median Price)
where:
Median Price = (High + Low) / 2
SMA5 = 5-period Simple Moving Average of the Median Price
SMA 34 = 34-period Simple Moving Average of the Median Price
This indicator is filtering signals in the following way: if current AO bar is decreasing this candle can be interpreted as a bullish reversal bar. This logic is applicable because initially this strategy is a trend reversal, it is searching for the high probability setup against the current trend. Decreasing AO is the additional high probability filter of a downtrend.
Let's briefly look what is MFI. The Market Facilitation Index (MFI) is a technical indicator that measures the price movement per unit of volume, helping traders gauge the efficiency of price movement in relation to trading volume. Here's how you can calculate it:
MFI = (High−Low)/Volume
MFI can be used in combination with volume, so we can divide 4 states. Bill Williams introduced these to help traders interpret the interaction between volume and price movement. Here’s a quick summary:
Green Window (Increased MFI & Increased Volume): Indicates strong momentum with both price and volume increasing. Often a sign of trend continuation, as both buying and selling interest are rising.
Fake Window (Increased MFI & Decreased Volume): Shows that price is moving but with lower volume, suggesting weak support for the trend. This can signal a potential end of the current trend.
Squat Window (Decreased MFI & Increased Volume): Shows high volume but little price movement, indicating a tug-of-war between buyers and sellers. This often precedes a breakout as the pressure builds.
Fade Window (Decreased MFI & Decreased Volume): Indicates a lack of interest from both buyers and sellers, leading to lower momentum. This typically happens in range-bound markets and may signal consolidation before a new move.
For our purposes we are interested in squat bars. This is the sign that volume cannot move the price easily. This type of bar increases the probability of trend reversal. In this indicator we added to enable the MFI filter of reversal bars. If potential reversal bar or two preceding bars have squat state this bar can be interpret as a reversal one.
Backtest Results
Operating window: Date range of backtests is 2023.01.01 - 2024.12.31. It is chosen to let the strategy to close all opened positions.
Commission and Slippage: Includes a standard Binance commission of 0.1% and accounts for possible slippage over 5 ticks.
Initial capital: 10000 USDT
Percent of capital used in every trade: 50%
Maximum Single Position Loss: -5.29%
Maximum Single Profit: +29.99%
Net Profit: +5472.66 USDT (+54.73%)
Total Trades: 103 (33.98% win rate)
Profit Factor: 1.634
Maximum Accumulated Loss: 1231.15 USDT (-8.32%)
Average Profit per Trade: 53.13 USDT (+0.94%)
Average Trade Duration: 76 hours
How to Use
Add the script to favorites for easy access.
Apply to the desired timeframe and chart (optimal performance observed on 4h ETH/USDT).
Configure settings using the dropdown choice list in the built-in menu.
Set up alerts to automate strategy positions through web hook with the text: {{strategy.order.alert_message}}
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test strategies in a simulated environment before live implementation
These results are obtained with realistic parameters representing trading conditions observed at major exchanges such as Binance and with realistic trading portfolio usage parameters.
SPX Lin Reg with SD -1 +1 -2 +2 -3 +3 (Extented) V1.0Here is a script to plot a linear regression for a given period and add standard deviations.
SPX Lin Reg with SD -1 +1 -2 +2 (Extented) V1.0Here is a script to plot a linear regression for a given period and add standard deviations.
SPX Lin Reg with SD -1 +1 (Extented) V 1.0Here is a script to plot a linear regression for a given period and add standard deviations.
[blackcat] L3 Top and Bottom Divine JudgmentOVERVIEW
The "Top and Bottom Divine Judgment" indicator is designed to identify potential tops and bottoms in the market using a combination of EMAs, SMAs, and custom calculations based on high and low prices. It provides multiple lines and plots to help traders visualize different market conditions and potential turning points.
FEATURES
Customizable EMA and SMA periods for various calculations.
Identification of bullish and bearish trends using EMAs.
Detection of overbought and oversold conditions.
Multiple lines and histograms to indicate specific market conditions and potential reversals.
Visual alerts with colored lines and shapes.
HOW TO USE
Add the script to your TradingView chart.
Customize Settings:
Adjust the short_ema_period, long_ema_period, sma_period, high_period, low_period, and other period inputs in the "Inputs" section.
Bullish and Bearish EMAs:
bullish_ema (yellow) and bearish_ema (fuchsia) are plotted to assess the overall market trend.
When bullish_ema is above bearish_ema, it suggests an uptrend.
When bullish_ema is below bearish_ema, it suggests a downtrend.
High-Low Boundary Line:
A horizontal line at 50 (yellow) represents a midpoint in the normalized price range, helping to identify overbought or oversold conditions.
Danger and Caution, Sell Signal, etc.:
These lines indicate specific conditions where the market might be overextended or due for a reversal.
Histograms for CZS1 and CZS4:
These histograms (aqua and purple) represent changes in certain indicators, possibly related to momentum or volatility, helping traders gauge the strength of trends.
Support Line Cross:
A shape ("●") is plotted when the close price crosses above a calculated support line, which could be a buy signal.
Generate Trading Signals:
Bullish and Bearish Trends:
Use the crossover of bullish_ema and bearish_ema to identify potential trend changes.
Overbought/Oversold Conditions:
Use the High-Low Boundary Line to identify overbought or oversold levels.
Specific Market Conditions:
Use the lines for "Danger and Caution," "Sell Signal," "Weak Out Strong Stay," "Opportunity," "Low Suck," and "High Sell" to identify specific market conditions and potential reversals.
Support Line Cross:
Use the plotted shape to identify potential buy signals when the close price crosses above the support line.
Risk Management:
Use the indicator in conjunction with other tools and risk management strategies to confirm trading signals and manage positions effectively.
LIMITATIONS
The script is based on historical data and does not guarantee future performance.
It is recommended to use the script in conjunction with other analysis tools.
The effectiveness of the strategy may vary depending on the market conditions and asset being traded.
NOTES
The script is designed for educational purposes and should not be considered financial advice.
Users are encouraged to backtest the strategy on a demo account before applying it to live trades.
THANKS
Special thanks to the TradingView community for their support and feedback.
5-8-13-21-34-55-89-144-200 Günlük Basit Hareketli Ortalama & Fib//@version=5
indicator("5-8-13-55-144 Günlük Basit Hareketli Ortalama", shorttitle="SMA Combo", overlay=true)
// Hareketli Ortalama Hesaplama
sma5 = ta.sma(close, 5)
sma8 = ta.sma(close, 8)
sma13 = ta.sma(close, 13)
sma21 = ta.sma(close, 21)
sma34 = ta.sma(close, 34)
sma55 = ta.sma(close, 55)
sma89 = ta.sma(close, 89)
sma144 = ta.sma(close, 144)
sma200 = ta.sma(close, 200)
// Hareketli Ortalamaları Çizme
plot(sma5, color=color.blue, title="5 Günlük SMA")
plot(sma8, color=color.red, title="8 Günlük SMA")
plot(sma13, color=color.green, title="13 Günlük SMA")
plot(sma21, color=color.green, title="21 Günlük SMA")
plot(sma34, color=color.green, title="34 Günlük SMA")
plot(sma55, color=color.green, title="55 Günlük SMA")
plot(sma89, color=color.green, title="89 Günlük SMA")
plot(sma144, color=color.green, title="144 Günlük SMA")
plot(sma200, color=color.green, title="200 Günlük SMA")
SPX Lin Reg with SD -1 +1 V1.0
110 / 5 000
Here is a script to plot a linear regression for a given period and add standard deviations.
Daily/Weekly/Monthly LevelsDaily/Weekly/Monthly Levels
TLDR
Shows Daily/Weekly/Monthly reversal levels. These can act as support/resistance levels.
Can only see what's in your candle history. I.e. It won't see old monthlies on your 1m chart! Use Daily to see everything with the most history.
Can only see levels higher than or equal to your current time frame. I.e. it will not see daily levels if you're looking at a weekly chart.
Doesn't keep levels that have been closed through. Does keep levels that have been only wicked.
This indicator shows you daily, weekly and monthly horizontal reversal levels to save you the hassle of doing it yourself. It's a little aid to speed up your TA routine.
Usage Details and Limitations
All daily, weekly, and monthly levels will be marked with lines on the chart automatically. Levels will only be visible from that level's TF or lower, i.e. you can't see the daily levels from the weekly chart, but you can see all levels from daily or lower charts. No levels will be displayed if you select a time frame higher than 1 month.
New levels will not be drawn if they are very close to existing levels. You can change the 'closeness' threshold in settings. It is specified as a percentage move from the existing level.
However, higher TF levels will REPLACE lower TF levels if they are too close. If you set the 'closeness' setting to 0, all levels will be drawn.
Levels will only be drawn if they are in your displayed candle range! I.e. the lower you go in timeframe, the less history you can see, and so levels originating from further back might be missed!
One technique you might have is to load up the daily timeframe and use that to mark any nearby levels of interest.
How does it work?
Basically, it looks for reversal candles on the D/W/M Timeframes, and draws a line for you from the open of the reversal candle (of that TF), so long as you are on a TF equal or lower than that level.
New bars on that TF that close through that TF's old levels will clear that level. Wicks do not clear.
Each newly found level will not be drawn if it's within the percentage distance of an existing level of equal or higher time frame.
Each new level also checks for existing levels on lower TFs that it can replace. E.g. if a monthly bar closes and produces a monthly level equal to an existing daily or weekly level, that daily or weekly level will be replaced. Use the settings to specify your 'closeness' allowance.
Please remember, it can only see as far back as your candle history, so you won't see old monthlies on a 1 minute chart! Use the daily TF to see all three levels at once with maximum history.
Wick ProportionsThis simple indicator highlights candles with short and long wicks matching a specified percentage of the candle's price range.
The candle is highlighted if the short wick is less than or equal to a specified percentage of the candle price range and the long wick is more than or equal to a specified percentage of the candle price range.
Both percentages can be separately specified as inputs, within reasonable ranges.
The indicator is useful for various strategies attempting to identify price reversal points.
UM EMA SMA WMA HMA with Directional Color ChangeUM EMA SMA WMA HMA with Directional Color Change
Description:
This is a Swiss Army knife type of Moving Average tool. Select your favorite Moving Average type, EMA - Exponential Moving Average, SMA - Simple Moving Average, WMA - Weighted Moving Average, or HMA - Hull Moving Average. Then selection your number of periods. The MA line is green when trending higher and red when trending lower. The fill between price and the MA line matches the red/green of the direction.
Defaults and Configuration:
The default setting is 65 period and EMA. Line colors and optional fill colors are user-configurable.
Alerts:
An alert can be set on the MA for directional color changes (red to green, or green to red) Right click the indicator and select Add Alert. Then select Bullish or Bearish color change.
Suggested Uses:
Add this to any timeframe chart with your favorite Moving averages. A strategy I use frequently is to "stretch" the Moving average. For example if you like the 8 day moving average on the daily chart, try the 52 period Moving average on the hourly chart. (6.5 market hours per day * 8) By looking at smaller time frames with longer MAs you get smoother color transitions on the Moving average. Add multiple instances of the MA. I prefer to use a smaller quick MA with a longer MA that represents a longer time frame.
Another use case I also like is the color transition over a Moving Average crossover. While I do like the daily 2/6 and 8/3 moving average crossovers, red-to-green and green-to-red color transitions seem to work with less lag than the crossovers.
Suggested Settings:
Daily charts: 8 EMA
Hourly charts: 55 EMA
30 minute charts: 65 WMA. (I like this one for inverse ETFs)
3 minutes charts: 178 EMA and 233 EMA
I also like to round MA settings up or down to the nearest fibonacci number: 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, etc.
Solid Background for Current CandleWhat Does This Script Do?
Background Reflects Current Candle:
The entire chart background changes to green if the current candle is bullish (close > open).
It changes to red if the current candle is bearish (close < open).
Solid Background Without Per-Candle Behavior:
The background doesn't depend on individual candle colors. It applies one unified color for the entire chart based on the current candle's direction.
Uses a Box to Cover the Chart:
Instead of using bgcolor (which applies per candle), this script creates a large invisible rectangle (box) that spans the entire chart area.
The box dynamically updates its color with each new candle.
Enhanced SMA Strategy with Trend Lines & S&R by DaxThe Enhanced SMA Strategy with Trend Lines & Support/Resistance (S&R) by Dax indicator is a technical analysis tool designed to improve trading decisions by combining the simplicity of the Simple Moving Average (SMA) with the insight provided by trend lines and support/resistance levels. This hybrid approach aims to create a more robust and reliable trading strategy.
Key Components:
Simple Moving Average (SMA):
SMA is a basic trend-following indicator that calculates the average of a set of price data over a specified period. It helps identify the direction of the market, such as whether an asset is in an uptrend or downtrend.
The Enhanced SMA Strategy may use multiple SMAs, such as short-term (e.g., 20-period) and long-term (e.g., 50-period), to detect crossovers that signal buy or sell opportunities. For example, a bullish crossover occurs when a short-term SMA crosses above a long-term SMA, indicating a potential buying signal, while a bearish crossover signals a potential sell.
Trend Lines:
Trend lines are drawn on the price chart to visually identify the direction of the market, acting as dynamic support and resistance levels. A trend line is drawn by connecting two or more price points that demonstrate the overall price movement.
Trend lines can help traders see potential breakout or breakdown points. A price breaking above a downtrend line or below an uptrend line often signals a trend reversal.
Support and Resistance (S&R):
Support levels are price levels where an asset tends to find buying interest and stop falling, while Resistance levels are points where selling pressure emerges and prevent the price from rising further.
These levels are critical in determining where price reversals or consolidations are likely to occur. Enhanced S&R indicators can automatically identify these levels and draw horizontal lines at these critical points on the chart.
Combining S&R with SMA can help traders decide whether a breakout or bounce is likely at these levels, increasing the odds of a successful trade.
How It Works:
Trend Identification: The SMA is used to determine the trend direction. A rising SMA indicates an uptrend, while a falling SMA suggests a downtrend.
Signal Generation: The strategy often uses a combination of SMA crossovers (bullish or bearish) along with the confirmation of price action near trend lines and support/resistance levels. For example:
If a price breaks above resistance and the short-term SMA crosses above the long-term SMA, a buy signal is confirmed.
Conversely, if the price breaks below support and the short-term SMA crosses below the long-term SMA, a sell signal is given.
Dynamic Support/Resistance: Trend lines are drawn automatically or manually to spot areas where price might reverse. The Enhanced SMA Strategy checks if the price is close to these levels, providing a more precise entry/exit point based on the broader market context.
Advantages of the Enhanced SMA Strategy with Trend Lines & S&R:
Improved Accuracy: By combining trend-following (SMA) with key levels like trend lines and S&R, the strategy filters out false signals, leading to more reliable trade setups.
Trend Confirmation: The use of trend lines and S&R confirms the broader market context, reducing the risk of trading against the trend or entering at weak price points.
Flexible: This strategy can be applied to various timeframes, from short-term day trading to longer-term swing trading.
Visual Clarity: The combination of trend lines, S&R, and moving averages provides a clear and visually intuitive strategy for identifying key price levels and trend shifts.
How to Use It:
Draw Trend Lines: Identify the most recent price peaks and troughs to draw trend lines, marking the potential resistance and support levels.
Use SMAs: Apply two different-period SMAs to detect the trend (e.g., 20-period and 50-period). Pay attention to crossovers for buy/sell signals.
Watch for Breakouts or Reversals: Monitor how the price behaves at support or resistance levels and the trend lines. A price move beyond these levels, accompanied by a confirming SMA crossover, can signal a strong trade opportunity.
Conclusion:
The Enhanced SMA Strategy with Trend Lines & S&R by Dax is a powerful, multi-layered approach to technical analysis. It enhances the basic SMA strategy by incorporating additional tools like trend lines and support/resistance levels, which help traders make more informed decisions with higher accuracy. This method is suitable for both novice and experienced traders, offering clear trade signals while reducing the risk of false entries.
0️⃣ Bollinger Bands with GMMABollinger Bands Implementation
Inputs:
Users can adjust the Bollinger Bands' parameters, including the length of the moving average, type of moving average (SMA, EMA, SMMA, WMA, VWMA), source data (e.g., close price), and standard deviation multiplier.
An offset is also available for shifting the Bollinger Bands horizontally.
Calculation:
The basis line is calculated using the selected moving average type and length.
The upper and lower bands are computed by adding and subtracting the standard deviation (multiplied by the user-defined multiplier) from the basis line.
Plot:
The basis, upper, and lower Bollinger Bands are plotted on the chart with customizable colors and offsets.
GMMA (Guppy Multiple Moving Averages) Implementation
Exponential Moving Averages (EMAs):
A series of EMAs with different lengths (3, 5, 8, 10, 12, 15, 30, 33, 40, 45, 50, 60, and 90) are computed using the close price.
Visualization:
Short-term EMAs (3–15) are plotted in cyan.
Medium-term EMAs (30–45) are plotted in red.
Long-term EMAs (50–90) are plotted in varying shades of blue, indicating different levels of transparency for better distinction.
Application and Use
This indicator is designed for traders who want to:
Identify trends:
Use the GMMA to gauge short-term, medium-term, and long-term price movements.
Converging or diverging EMAs can indicate trend strength or potential reversals.
Spot volatility:
Bollinger Bands help detect periods of high or low volatility.
When prices touch or cross the upper or lower band, they may signal overbought or oversold conditions.
Combine both tools for confirmation:
Bollinger Bands can validate trend directions identified by the GMMA.
For example, if short-term EMAs in the GMMA start crossing above long-term EMAs and the price stays above the Bollinger Bands' basis, it could signal a bullish trend.
RSI Comparison Signals with DifferenceRSI Comparison Signals with Difference
RSI Comparison Signals with Difference
Trend Detection with AlertsPurpose of the Script
The script identifies trends on a chart (uptrend, downtrend, or sideways trend) and provides both visual cues and alerts when a trend changes. It uses two methods for trend detection:
Moving Averages (MA): It compares a short-term moving average (fast) with a long-term moving average (slow).
An uptrend occurs when the short-term MA is above the long-term MA.
A downtrend occurs when the short-term MA is below the long-term MA.
Price Action:
Higher highs (HH) indicate bullish momentum.
Lower lows (LL) indicate bearish momentum.
When these methods align, the script determines the trend and notifies the user of any trend changes.
Key Features
Moving Average Calculation:
A short-term moving average and a long-term moving average are calculated to determine the overall trend direction.
Trend Determination:
An uptrend is detected when the short-term MA is above the long-term MA and higher highs are present.
A downtrend is detected when the short-term MA is below the long-term MA and lower lows are present.
Otherwise, the trend is classified as sideways.
Alerts for Trend Changes:
Alerts are triggered when the trend changes from one state to another (e.g., sideways to uptrend).
Custom messages indicate the type of trend detected.
Background Colors:
The script changes the chart’s background color based on the current trend:
Green for uptrends.
Red for downtrends.
Gray for sideways trends.
Visualization of Moving Averages:
The moving averages are plotted on the chart for visual reference.
How It Works
Inputs for Flexibility:
The user can configure the lengths of the short-term and long-term moving averages.
A lookback period is used to determine higher highs or lower lows for additional confirmation.
Trend Logic:
The script checks the relationship between the moving averages to identify general trends.
It also evaluates price action to confirm trend strength (e.g., whether a higher high or lower low occurred).
Alert System:
When the detected trend changes (e.g., from sideways to uptrend), an alert is triggered. This ensures the user is notified of important market movements.
Dynamic Background Coloring:
The background color of the chart changes to reflect the current trend, making it easy to interpret the trend visually.
Use Cases
Trend Identification: Helps traders quickly identify market trends for decision-making.
Alerts for Trend Changes: Notifies traders when a new trend begins, ensuring they don’t miss key opportunities.
Visual Assistance: Makes it easier to interpret trends through color-coded backgrounds and moving average overlays.
Customization Options
Adjust Moving Average Lengths: Users can modify the short-term and long-term moving averages to suit their trading strategies.
Change Lookback Period: The sensitivity of higher highs and lower lows can be adjusted.
Personalized Alerts: Alerts can be customized for different trading scenarios.
Summary
This script provides an intuitive way to detect and visualize market trends while offering real-time alerts for trend changes. It’s an excellent tool for traders who want to stay informed about market conditions and make data-driven decisions.
Helper Indicator for Crypto Scalping Pro//@version=5
indicator("Helper Indicator for Crypto Scalping Pro", overlay=true)
// === НАСТРОЙКИ ===
showTrendLines = input.bool(true, "Показывать линии тренда")
showSupportResistance = input.bool(true, "Показывать уровни поддержки и сопротивления")
showAdditionalSignals = input.bool(true, "Показывать дополнительные сигналы")
// === БАЗОВЫЕ ИНДИКАТОРЫ ===
fastEMA = ta.ema(close, 8)
mediumEMA = ta.ema(close, 13)
slowEMA = ta.ema(close, 21)
// Определение тренда
isBullishTrend = fastEMA > mediumEMA and mediumEMA > slowEMA
isBearishTrend = fastEMA < mediumEMA and mediumEMA < slowEMA
// Поддержка и сопротивление
highestHigh = ta.highest(high, 20)
lowestLow = ta.lowest(low, 20)
// Линии тренда
plot(fastEMA, "Fast EMA (8)", color=color.blue, linewidth=1)
plot(mediumEMA, "Medium EMA (13)", color=color.orange, linewidth=1)
plot(slowEMA, "Slow EMA (21)", color=color.red, linewidth=1)
// Уровни поддержки и сопротивления
plot(showSupportResistance ? highestHigh : na, "Resistance", color=color.red, style=plot.style_line, linewidth=2)
plot(showSupportResistance ? lowestLow : na, "Support", color=color.green, style=plot.style_line, linewidth=2)
// Сигналы
buySignal = isBullishTrend and close > mediumEMA
sellSignal = isBearishTrend and close < mediumEMA
// Визуализация сигналов
plotshape(showAdditionalSignals and buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(showAdditionalSignals and sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
// === АЛЕРТЫ ===
alertcondition(buySignal, title="Buy Signal", message="Тренд восходящий! Вход в покупку!")
alertcondition(sellSignal, title="Sell Signal", message="Тренд нисходящий! Вход в продажу!")