Mean-Reverse ATR Strategy[15min]The strategy is designed to work on a 15-minute timeframe, using a combination of Bollinger Bands, Simple Moving Averages (SMA), and the Average True Range (ATR) to determine trade entries and exits.
Indicators Used in the Strategy :
Bollinger Bands consist of three lines:
Middle Band (EMA or SMA): A moving average that represents the market's average price over a set period.
Upper Band: The middle band plus a multiple (mult) of the standard deviation.
Lower Band: The middle band minus a multiple of the standard deviation.
When the price touches or crosses below the lower band, it suggests an oversold condition (potential buying opportunity).
When the price touches or crosses above the upper band, it suggests an overbought condition (potential selling opportunity).
A narrowing of bands indicates low volatility, while a widening of bands indicates increased volatility.
2. Simple Moving Averages (SMA)
Purpose: Identifies the overall trend direction by averaging past prices.
SMA1 (100-period): A medium-term moving average that reacts relatively quickly to price changes.
SMA2 (200-period): A long-term moving average that reacts slower to price changes.
Uptrend Confirmation: If SMA1 is above SMA2, the market is in an uptrend.
Downtrend Confirmation: If SMA1 is below SMA2, the market is in a downtrend.
Golden Cross: When SMA1 crosses above SMA2, it signals a bullish trend.
Death Cross: When SMA1 crosses below SMA2, it signals a bearish trend.
3. Average True Range (ATR)
Purpose: Measures market volatility and is used for setting stop-loss levels.
ATR calculates the average range between the high and low of each candlestick over a set period.
A higher ATR indicates more volatility, while a lower ATR indicates less volatility.
Used to set dynamic stop-loss levels:
For long positions: Stop-loss is set below the entry price based on ATR.
For short positions: Stop-loss is set above the entry price based on ATR.
Traders often use an ATR multiplier (e.g., 2× ATR) to define reasonable stop levels based on market conditions.
Bollinger Bands generate potential entry signals based on price crossing the upper/lower bands.
SMA (100 & 200) confirms the market trend and filters false signals.
ATR dynamically calculates stop-loss levels to manage risk effectively.
This combination ensures that trades are entered at optimal points while following the overall market trend and managing risk with volatility-based stops.
Strategy uses additional baisc stop-loss at 2.5% to avoid higher lose
to determine the level of stop loss and target point I used a piece of code by RafaelZioni, here is the script from which a piece of code was taken
Enjoy !
Simple Moving Average (SMA)
Antony Moving Average (AMA)EMA 9 (Blue), EMA 20 (Red), SMA 65 (Green), and SMA 200 (Yellow). Most times the stock respects 65 instead of 50 and so choosing 65 helps in better results.
Reversal Bands v1 (Public)SMA reversal bands that price action tends to stay within.
When the price is pushing into the upper band, the asset is over bought.
When the price is pushing into the lower band, the asset is over sold.
The price difference between the inner green bands is 1%.
The price difference between the outer red bands is 2%.
Multiple Moving Averages5 moving averages. One indicator. Valuable for those without premium TradingView.
Features:
- Display up to 5 user customizable moving averages.
- Toggle on/off each moving average.
- Customize the color and length of each moving average.
- Choose between a SMA (Simple Moving Average) or EMA (Exponential Moving Average).
Moving Averages (SMA 50/200, EMA 9/20)Moving Averages (SMA 50/200, EMA 9/20)
Simple grey colors for easy viewing
5EMAs 12, 26, 45, 90, 180EMA-12: Corto Plazo - Tendencia Rápida
Esta media móvil sigue de cerca el precio actual, proporcionando señales rápidas y frecuentes de cambio de tendencia. Es ideal para identificar puntos de entrada y salida en movimientos a corto plazo.
EMA-26: Mediano Plazo - Tendencia Intermedia
Esta media móvil ofrece una visión equilibrada de la tendencia a mediano plazo, filtrando parte del ruido del mercado y proporcionando señales de trading más estables.
EMA-45: Mediano Plazo Extendido - Confirmación de Tendencia
Una media móvil que ayuda a confirmar la dirección de la tendencia a mediano plazo, útil para validar las señales proporcionadas por las EMAs más cortas.
EMA-90: Largo Plazo - Tendencia Principal
Esta media móvil ayuda a identificar la tendencia general del mercado a largo plazo. Es útil para determinar la dirección predominante y evitar operar en contra de la tendencia principal.
EMA-180: Largo Plazo Extendido - Dirección General del Mercado
Esta media móvil proporciona una visión clara de la tendencia predominante a muy largo plazo, actuando como una línea de referencia para las grandes tendencias del mercado.
4x Moving Averages (baltrunask)This indicator plots four simple moving averages (SMAs) on your chart: a 5-period MA, a 20-period MA, a 50-period MA, and a 200-period MA. Each moving average line can be customized with its own color. Moving averages are commonly used to identify trends and potential support/resistance levels.
Long Only Moving Average Strategy with EMA/SMA/WMAThis script allows you to select the type of moving average (simple moving average SMA, exponential moving average EMA or weighted moving average WMA) and generates buy signals when the price closes above the moving average and closes the trade when the price closes below it. You can choose which length of moving average to use. It is designed to capture upward trending moves.
1/2/4 Moving Average STR 1.0.0A simple indicator that uses 1/2/4 SMA for Buy and Sell signals.
Buy signal: both 1 and 2 SMAs cross over the 4 SMA on the same bar.
Sell signal: both 1 and 2 SMAs cross under the 4 SMA on the same bar.
Can be coupled with TRP for better view.
EMA 20/50 ACHAT/VENTEParamètres par défaut :
EMA 20 - EMA - fermeture - vert
EMA 50 - EMA - fermeture - rouge
Explication des EMA vs SMA :
www.youtube.com
Script inspiré par l'indicateur de @Kromen34 :
Nikkei CFD Long Strategy by neco・対象は日経平均先物ミニCFD
・エントリー条件は以下
「ローソク足が終値ベースで日足の13MAを上抜けること」
これを「トリガー」とする。
・上記の場合において、
その次のローソク足の「始値」で「買い」でエントリーする
・損切りについて
「トリガー」より過去の2本のローソク足の最安値を損切りポイントとする。
・上記の損切りポイントを終値で割った時点で決済を行う。
・利確について
「トリガー」での13MAの値と「トリガー」より過去の2本のローソク足の最安値との差分を取る。
それを「トリガー」での13MAの価格に上乗せしたものを利確ポイントとする。
・上記の利確ポイントに到達した時点で決済を行う。
・エントリーから決済までの最大日数は8日とする。損切りや利確がない状態で期限に到達したら、その日の「終値」で決済する。
Pine初心者です。スクリプトはChatGPT-4の支援をもとに作成しました。
C&P MA/KT Compare & Predict Moving average / Current market price.
This is simple table indicator. Located at right-top of chart. Shows which way will MA's head go.
I made this indicator for automate candle countings & compare price. With this friend, you will be know trend more faster then waiting traditional MA golden / dead crossing.
In factory settings, current market price will be compared with closing price of the candle, corresponding to previous number 7, 25, 60, 99, 130, 240. If Current market price is lower then past, the box for the corresponding MA is highlighted in red and appears as Down. In opposite case, it will be highlighted in green and indicates Up.
MA와 시장가 차이로 MA의 머리 방향을 예측해주는 간단한 지표입니다.
수동으로 캔들 되돌려서 종가와 시장가 비교하는게 너무 번거로워서 자동화를 위해 제작되었습니다. 해당 지표를 이용하시면 MA의 골든/데드 크로스를 기다리는 것보다 더 빠른 예측이 가능합니다.
차트 우측 상단에 예측 값이 표시되며, 기본 설정에선 7, 25, 60, 99, 130, 240개 전 캔들의 종가와 시장가가 비교됩니다. 시장가가 비교 값보다 높을 때는 초록 배경에 Up 텍스트가 출력됩니다. 반대의 경우엔 빨간색 배경에 Down 표기가 나타납니다.
Smart MA Crossover BacktesterSmart MA Crossover Backtester - Strategy Overview
Strategy Name: Smart MA Crossover Backtester
Published on: TradingView
Applicable Markets: Works well on crypto (tested profitably on ETH)
Strategy Concept
The Smart MA Crossover Backtester is an improved Moving Average (MA) crossover strategy that incorporates a trend filter and an ATR-based stop loss & take profit mechanism for better risk management. It aims to capture trends efficiently while reducing false signals by only trading in the direction of the long-term trend.
Core Components & Logic
Moving Averages (MA) for Entry Signals
Fast Moving Average (9-period SMA)
Slow Moving Average (21-period SMA)
A trade signal is generated when the fast MA crosses the slow MA.
Trend Filter (200-period SMA)
Only enters long positions if price is above the 200-period SMA (bullish trend).
Only enters short positions if price is below the 200-period SMA (bearish trend).
This helps in avoiding counter-trend trades, reducing whipsaws.
ATR-Based Stop Loss & Take Profit
Uses the Average True Range (ATR) with a multiplier of 2 to calculate stop loss.
Risk-Reward Ratio = 1:2 (Take profit is set at 2x ATR).
This ensures dynamic stop loss and take profit levels based on market volatility.
Trading Rules
✅ Long Entry (Buy Signal):
Fast MA (9) crosses above Slow MA (21)
Price is above the 200 MA (bullish trend filter active)
Stop Loss: Below entry price by 2× ATR
Take Profit: Above entry price by 4× ATR
✅ Short Entry (Sell Signal):
Fast MA (9) crosses below Slow MA (21)
Price is below the 200 MA (bearish trend filter active)
Stop Loss: Above entry price by 2× ATR
Take Profit: Below entry price by 4× ATR
Why This Strategy Works Well for Crypto (ETH)?
🔹 Crypto markets are highly volatile – ATR-based stop loss adapts dynamically to market conditions.
🔹 Long-term trend filter (200 MA) ensures trading in the dominant direction, reducing false signals.
🔹 Risk-reward ratio of 1:2 allows for profitable trades even with a lower win rate.
This strategy has been tested on Ethereum (ETH) and has shown profitable performance, making it a strong choice for crypto traders looking for trend-following setups with solid risk management. 🚀
MTF Ichimoku Conversion Line SMA with H/L mirrored levelsWelcome to MTF Ichimoku Conversion Line with SMA Highs/Lows Extended Lines!
1. Overview
It is designed to provide a multi-timeframe view of market trends and potential support/resistance levels by obtaining a Simple Moving Average (SMA) of the Conversion Line of Ichimoku Equibilium (Ichimoku Kinko-Hyo), which acts as a substantial trend line on the candlestick chart. The SMA of the conversion line smooths out price fluctuations and indicates the overall trend direction—if the candles are above it, the trend can be read as an uptrend, while below it, the trend can be read as a downtrend.
2. Calculation
The indicator first calculates the Conversion Line (see the description of Ichimoku theory anywhere, e.g., Wikipedia), as the average of the highest high and lowest low over a user-defined period (Conversion Line Length, default is 9, also recommended is 9).
It then retrieves this Conversion Line from a higher timeframe (MTF Timeframe) to add a broader perspective. Using a specified period (SMA Length)., an SMA is computed on this multi-timeframe conversion line. This SMA serves as a trend line that visually represents the prevailing price trend, making it easier to assess market direction.
3. Pivot Highs/low detection and drawing their extensions
In addition, the indicator identifies pivot highs and lows from the SMA data using a defined pivot length. When these pivots occur, horizontal lines are drawn and extended across the chart. These extended lines (drawn in a yellowish color by default) include a full extension, a half extension, and a middle extension line representing the midpoint between the high and low pivot.
4. Mirror lines
The indicator also offers optional mirror line features. When the Mirror Upside option is enabled, five additional lines are drawn above the highest extended yellow line at equal intervals. Similarly, when the Mirror Downside option is enabled, five lines are drawn below the lowest extended yellow line. These light gray mirror lines serve as extra reference levels, which can help identify potential support or resistance zones.
5. Parameters
User parameters include:
- Conversion Line Length: The period used to calculate the conversion line.
- MTF Timeframe: The higher timeframe from which the conversion line is obtained.
- SMA Length: The period over which the SMA is calculated on the conversion line.
- SMA Mode: A toggle to display either the SMA or the raw conversion line (SMA recommended).
- SMA Line Width: The thickness of the SMA line.
- Pivot Length for SMA Highs/Lows: The period used to detect pivot highs and lows in the SMA.
- Horizontal Extension: Number of bars by which the pivot and extended lines are drawn across the chart
- Colors for High and Low Pivot Lines and Extended Lines: Customizable colors are used to draw the lines.
Mirror Upside and Mirror Downside: These options enable drawing additional mirror lines above and below the extended lines.
- Hide Old Lines: An option to hide previous pivot lines once new ones are drawn for a cleaner chart. Turned on by default.
6. Conclusion
Overall, the Conversion Line SMA in this indicator smooths out the conversion line data and effectively functions as a trend line for the candlestick chart, helping traders visually interpret the underlying market trend. The extended and mirror lines provide further context for potential price reversal or continuation areas, making this a powerful tool for multi-timeframe technical analysis.
EMA/SMA Ribbon Pro (AUTO HTF + Labels)This indicator is a multi-timeframe (MTF) moving average ribbon that dynamically adjusts to the next highest timeframe. It provides a visual representation of market trends by stacking multiple EMAs and SMAs with customizable color fills and labels.
Features
✅ Multi-Timeframe (MTF) Support: Automatically detects the next highest time frame or allows for manual selection
✅ Customizable Moving Averages: Supports EMA and SMA with different lengths for flexible configuration
✅ Ribbon Visualization: Smooth color transitions between different moving averages for better trend identification
✅ Crossover Labels: Detects bullish and bearish EMA/SMA crossovers and marks them on the chart
✅ Price Labels & Timeframe Display: Displays moving average values to the right of the price axis with customizable label padding and colors
How It Works
Select the HTF mode: Manual or automatic
Choose EMA/SMA lengths to create different ribbons
Enable/disable price labels for each moving average
Customize colors and transparency for ribbons and labels
Crossover labels appear when faster moving averages cross slower ones and vice versa
Use Cases
📌 Trend Identification: Identify bullish and bearish trends using multiple EMAs and SMAs
📌 Support & Resistance Zones: MAs can act as dynamic support and resistance levels
📌 Reversal & Confirmation Signals: Watch for MTF crossovers to confirm trend changes
Customization
🔹 Standard EMA Lengths: 6, 8, 13, 21, 34, 48, 100, 200, 300, 400
🔹 SMA Lengths: 48, 100, 200
🔹 Color Adjustments: Set custom colors for bullish/bearish ribbons
🔹 Crossovers: Enable/disable custom crossover pairs (e.g., 100/200 EMA, 200 EMA/SMA).
This indicator is perfect for traders who rely on multi-timeframe confluence while seeking to enhance their market analysis and decision-making process.
As always, by combining EMA/SMA Ribbon with other tools, traders ensure that they are not relying on a single indicator. This layered approach can reduce the likelihood of false signals and improve overall trading accuracy.
As always, be sure to use any indicator with price action and volume indicators for better trade confirmation!
Sma Indicator with Ratio (pr)SMA Indicator with Ratio (PR) is a technical analysis tool designed to provide insights into the relationship between multiple Simple Moving Averages (SMAs) across different time frames. This indicator combines three key SMAs: the 111-period SMA, 730-period SMA, and 1400-period SMA. Additionally, it introduces a ratio-based approach, where the 730-period SMA is multiplied by factors of 2, 3, 4, and 5, allowing users to analyze potential market trends and price movements in relation to different SMA levels.
What Does This Indicator Do?
The primary function of this indicator is to track the movement of prices in relation to several SMAs with varying periods. By visualizing these SMAs, users can quickly identify:
Short-term trends (111-period SMA)
Medium-term trends (730-period SMA)
Long-term trends (1400-period SMA)
Additionally, the multiplied versions of the 730-period SMA provide deeper insights into potential price reactions at different levels of market volatility.
How Does It Work?
The 111-period SMA tracks the shorter-term price trend and can be used for identifying quick market movements.
The 730-period SMA represents a longer-term trend, helping users gauge overall market sentiment and direction.
The 1400-period SMA acts as a very long-term trend line, giving users a broad perspective on the market’s movement.
The ratio-based SMAs (2x, 3x, 4x, 5x of the 730-period SMA) allow for an enhanced understanding of how the price reacts to higher or lower volatility levels. These ratios are useful for identifying key support and resistance zones in a dynamic market environment.
Why Use This Indicator?
This indicator is useful for traders and analysts who want to track the interaction of price with different moving averages, enabling them to make more informed decisions about potential trend reversals or continuations. The added ratio-based values enhance the ability to predict how the market might react at different levels.
How to Use It?
Trend Confirmation: Traders can use the indicator to confirm the direction of the market. If the price is above the 111, 730, or 1400-period SMA, it may indicate an uptrend, and if below, a downtrend.
Support/Resistance Levels: The multiplied versions of the 730-period SMA (2x, 3x, 4x, 5x) can be used as dynamic support or resistance levels. When the price approaches or crosses these levels, it might indicate a change in the trend.
Volatility Insights: By observing how the price behaves relative to these SMAs, traders can gauge market volatility. Higher multiples of the 730-period SMA can signal more volatile periods where price movements are more pronounced.
EMA CROSS v1.0 by ScorpioneroIndicator Description: Multi-Timeframe SMA Table & Plot
This indicator displays a structured table of Simple Moving Averages (SMA) across multiple timeframes and plots them directly on the chart for better trend analysis.
Features:
✅ Multi-Timeframe SMA Calculation: Computes SMAs for different periods (10, 60, and 223) across six timeframes (1m, 3m, 5m, 15m, 30m, 60m).
✅ Sorted SMA Table: Displays a table in the bottom-right corner of the chart, showing the three SMAs per timeframe, sorted in descending order.
✅ Color-Coded Cells: Each SMA is highlighted with a specific color:
🟡 Yellow → 10-period SMA
🔵 Blue → 60-period SMA
🟣 Purple → 223-period SMA
⚪ Gray → Other values
✅ SMA Plotting on the Chart: All calculated SMAs are plotted directly on the price chart, allowing users to visualize their interaction with price movements.
How to Use:
The table provides a quick overview of SMA rankings across timeframes, helping identify bullish or bearish trends.
The SMA plots on the chart can be used for dynamic support/resistance analysis and trend confirmation.
This indicator is ideal for traders who rely on multi-timeframe trend analysis to make informed trading decisions! 🚀
by Scorpionero
Custom Length Moving AverageThe Custom Length Moving Average is a dynamic indicator that allows traders to plot a moving average with an adjustable length based on their preferred number of days. Users can choose between Simple Moving Average (SMA), Exponential Moving Average (EMA), or Weighted Moving Average (WMA) to match their trading strategy. The script automatically calculates the moving average length by factoring in the chart’s timeframe and trading session duration, ensuring precision and adaptability. This makes it an ideal tool for traders looking for a flexible moving average that adjusts to different market conditions and timeframes.
AI Volume Breakout for scalpingPurpose of the Indicator
This script is designed for trading, specifically for scalping, which involves making numerous trades within a very short time frame to take advantage of small price movements. The indicator looks for volume breakouts, which are moments when trading volume significantly increases, potentially signaling the start of a new price movement.
Key Components:
Parameters:
Volume Threshold (volumeThreshold): Determines how much volume must increase from one bar to the next for it to be considered significant. Set at 4.0, meaning volume must quadruplicate for a breakout signal.
Price Change Threshold (priceChangeThreshold): Defines the minimum price change required for a breakout signal. Here, it's 1.5% of the bar's opening price.
SMA Length (smaLength): The period for the Simple Moving Average, which helps confirm the trend direction. Here, it's set to 20.
Cooldown Period (cooldownPeriod): Prevents signals from being too close together, set to 10 bars.
ATR Period (atrPeriod): The period for calculating Average True Range (ATR), used to measure market volatility.
Volatility Threshold (volatilityThreshold): If ATR divided by the close price exceeds this, the market is considered too volatile for trading according to this strategy.
Calculations:
SMA (Simple Moving Average): Used for trend confirmation. A bullish signal is more likely if the price is above this average.
ATR (Average True Range): Measures market volatility. Lower volatility (below the threshold) is preferred for this strategy.
Signal Generation:
The indicator checks if:
Volume has increased significantly (volumeDelta > 0 and volume / volume >= volumeThreshold).
There's enough price change (math.abs(priceDelta / open) >= priceChangeThreshold).
The market isn't too volatile (lowVolatility).
The trend supports the direction of the price change (trendUp for bullish, trendDown for bearish).
If all these conditions are met, it predicts:
1 (Bullish) if conditions suggest buying.
0 (Bearish) if conditions suggest selling.
Cooldown Mechanism:
After a signal, the script waits for a number of bars (cooldownPeriod) before considering another signal to avoid over-trading.
Visual Feedback:
Labels are placed on the chart:
Green label for bullish breakouts below the low price.
Red label for bearish breakouts above the high price.
How to Use:
Entry Points: Look for the labels on your chart to decide when to enter trades.
Risk Management: Since this is for scalping, ensure each trade has tight stop-losses to manage risk due to the quick, small movements.
Market Conditions: This strategy might work best in markets with consistent volume and price changes but not extreme volatility.
Caveats:
This isn't real AI; it's a heuristic based on volume and price. Actual AI would involve machine learning algorithms trained on historical data.
Always backtest any strategy, and consider how it behaves in different market conditions, not just the ones it was designed for.
John Bob-Trading-BotDeveloped by Ayebale John Bob with the help of his bestie, this innovative strategy combines advanced Smart Money Concepts with practical risk management tools to help traders identify and capitalize on key market moves.
Key Features:
Smart Money Concepts & Fair Value Gaps (FVG):
The strategy monitors price action for fair value gaps, which are visualized as extremely faint horizontal lines on the chart. These FVGs signal potential areas where institutional traders might have entered or exited positions.
Dynamic Entry Signals:
Buy signals are triggered when the price crosses above the 50-bar lowest low or when a bullish FVG is detected. Conversely, sell signals are generated when the price falls below the 50-bar highest high or a bearish FVG is identified. Each signal is visually marked on the chart with clear buy (green) and sell (red) labels.
Multi-Level Order Execution:
Once an entry signal occurs, the strategy places five separate orders, each with its own take-profit (TP) level. The TP levels are calculated dynamically using the Average True Range (ATR) and a set of predefined multipliers. This allows traders to scale out of positions as the market moves favorably.
Dynamic Risk Management:
A stop-loss is automatically set at a distance determined by the ATR, ensuring that risk is managed in accordance with current market volatility.
Real-Time Trade Information Table:
In the bottom-right corner of the chart, a trade information table displays essential details about the current trade:
Side: Displays "BUY NOW" (with a dark green background) for long entries or "SELL NOW" (with a dark red background) for short entries.
Entry Price & Stop-Loss: Shows the entry price (highlighted in green) and the corresponding stop-loss level (highlighted in red).
Take-Profit Levels: Lists the five TP levels, each of which turns green once the market price reaches that target.
Timer: A live timer in minutes counts from the moment the current trade trigger started, helping traders track the duration of their active trades.
Visual Progress Bar:
A histogram-style progress bar is plotted on the chart, visually representing the percentage gain (or loss) relative to the entry price.
This strategy was meticulously designed to incorporate both technical analysis and smart risk management, offering a robust trading solution that adapts to changing market conditions. Whether you're a seasoned trader or just starting out, the AyebaleJohnBob Trading Bot equips you with the tools and visual cues needed to make well-informed trading decisions. Enjoy a seamless blend of strategy and style—crafted with passion by Ayebale John Bob and his bestie!
Price Imbalance as Consecutive Levels of AveragesOverview
The Price Imbalance as Consecutive Levels of Averages indicator is an advanced technical analysis tool designed to identify and visualize price imbalances in financial markets. Unlike traditional moving average (MA) indicators that update continuously with each new price bar, this indicator employs moving averages calculated over consecutive, non-overlapping historical windows. This unique approach leverages comparative historical data to provide deeper insights into trend strength and potential reversals, offering traders a more nuanced understanding of market dynamics and reducing the likelihood of false signals or fakeouts.
Key Features
Consecutive Rolling Moving Averages: Utilizes three distinct simple moving averages (SMAs) calculated over consecutive, non-overlapping windows to capture different historical segments of price data.
Dynamic Color-Coded Visualization: SMA lines change color and style based on the relationship between the averages, highlighting both extreme and normal market conditions.
Median and Secondary Median Lines: Provides additional layers of price distribution insight during normal trend conditions through the plotting of primary and secondary median lines.
Fakeout Prevention: Filters out short-term volatility and sharp price movements by requiring consistent historical alignment of multiple moving averages.
Customizable Parameters: Offers flexibility to adjust SMA window lengths and line extensions to align with various trading strategies and timeframes.
Real-Time Updates with Historical Context: Continuously recalculates and updates SMA lines based on comparative historical windows, ensuring that the indicator reflects both current and past market conditions.
Inputs & Settings
Rolling Window Lengths:
Window 1 Length (Most Recent) Bars: Number of bars used to calculate the most recent SMA. (Default: 5, Range: 2–300)
Window 2 Length (Preceding) Bars: Number of bars for the second SMA, shifted by Window 1. (Default: 8, Range: 2–300)
Window 3 Length (Third Rolling) Bars: Number of bars for the third SMA, shifted by the combined lengths of Window 1 and Window 2. (Default: 13, Range: 2–300)
Horizontal Line Extension:
Horizontal Line Extension (Bars): Determines how far each SMA line extends horizontally on the chart. (Default: 10 bars, Range: 1–100)
Functionality and Theory
1. Calculating Consecutive Simple Moving Averages (SMAs):
The indicator calculates three SMAs, each based on distinct and consecutive historical windows of price data. This approach contrasts with traditional MAs that continuously update with each new price bar, offering a static view of past trends rather than an ongoing one.
Mean1 (SMA1): Calculated over the most recent Window 1 Length bars. Represents the short-term trend.
Mean1=∑i=1N1CloseiN1
Mean1=N1∑i=1N1Closei
Where N1N1 is the length of Window 1.
Mean2 (SMA2): Calculated over the preceding Window 2 Length bars, shifted back by Window 1 Length bars. Represents the medium-term trend.
\text{Mean2} = \frac{\sum_{i=1}^{N_2} \text{Close}_{i + N_1}}}{N_2}
Where N2N2 is the length of Window 2.
Mean3 (SMA3): Calculated over the third rolling Window 3 Length bars, shifted back by the combined lengths of Window 1 and Window 2 bars. Represents the long-term trend.
\text{Mean3} = \frac{\sum_{i=1}^{N_3} \text{Close}_{i + N_1 + N_2}}}{N_3}
Where N3N3 is the length of Window 3.
2. Determining Market Conditions:
The relationship between the three SMAs categorizes the market condition into either extreme or normal states, enabling traders to quickly assess trend strength and potential reversals.
Extreme Bullish:
Mean3Mean2>Mean1
Mean3>Mean2>Mean1
Indicates a strong and sustained downward trend. SMA lines are colored purple and styled as dashed lines.
Normal Bullish:
Mean1>Mean2andnot in extreme bullish condition
Mean1>Mean2andnot in extreme bullish condition
Indicates a standard upward trend. SMA lines are colored green and styled as solid lines.
Normal Bearish:
Mean1Mean2>Mean1
Mean3>Mean2>Mean1
Normal Bullish:
Mean1>Mean2andnot in Extreme Bullish
Mean1>Mean2andnot in Extreme Bullish
Normal Bearish:
Mean1 Mean2 > Mean3
Visualization: All three SMAs are displayed as gold dashed lines.
Median Lines: Not displayed to maintain chart clarity.
Interpretation: Indicates a strong and sustained upward trend. Traders may consider entering long positions, confident in the trend's strength without the distraction of additional lines.
2. Normal Bullish Condition:
SMAs Alignment: Mean1 > Mean2 (not in extreme condition)
Visualization: Mean1 and Mean2 are green solid lines; Mean3 is gray.
Median Lines: A thin blue dotted median line is plotted between Mean1 and Mean2, with two additional thin blue dashed lines as secondary medians.
Interpretation: Confirms an upward trend while providing deeper insights into price distribution. Traders can use the median and secondary median lines to identify optimal entry points and manage risk more effectively.
3. Extreme Bearish Condition:
SMAs Alignment: Mean3 > Mean2 > Mean1
Visualization: All three SMAs are displayed as purple dashed lines.
Median Lines: Not displayed to maintain chart clarity.
Interpretation: Indicates a strong and sustained downward trend. Traders may consider entering short positions, confident in the trend's strength without the distraction of additional lines.
4. Normal Bearish Condition:
SMAs Alignment: Mean1 < Mean2 (not in extreme condition)
Visualization: Mean1 and Mean2 are red solid lines; Mean3 is gray.
Median Lines: A thin blue dotted median line is plotted between Mean1 and Mean2, with two additional thin blue dashed lines as secondary medians.
Interpretation: Confirms a downward trend while providing deeper insights into price distribution. Traders can use the median and secondary median lines to identify optimal entry points and manage risk more effectively.
Customization and Flexibility
The Price Imbalance as Consecutive Levels of Averages indicator is highly adaptable, allowing traders to tailor it to their specific trading styles and market conditions through adjustable parameters:
SMA Window Lengths: Modify the lengths of Window 1, Window 2, and Window 3 to capture different historical trend segments, whether focusing on short-term fluctuations or long-term movements.
Line Extension: Adjust the horizontal extension of SMA and median lines to align with different trading horizons and chart preferences.
Color and Style Preferences: While default colors and styles are optimized for clarity, traders can customize these elements to match their personal chart aesthetics and enhance visual differentiation.
This flexibility ensures that the indicator remains versatile and applicable across various markets, asset classes, and trading strategies, providing valuable insights tailored to individual trading needs.
Conclusion
The Price Imbalance as Consecutive Levels of Averages indicator offers a comprehensive and innovative approach to analyzing price trends and imbalances within financial markets. By utilizing three consecutive, non-overlapping SMAs and incorporating median lines during normal trend conditions, the indicator provides clear and actionable insights into trend strength and price distribution. Its unique design leverages comparative historical data, distinguishing it from traditional moving averages and enhancing its utility in identifying genuine market movements while minimizing false signals. This dynamic and customizable tool empowers traders to refine their technical analysis, optimize their trading strategies, and navigate the markets with greater confidence and precision.
Ultimate Total MA + ATRIndicator Description (English)
Name: Tendencias FX - Multi-Line with Customizable Offsets (1x..6x)
This script is a multi-purpose trend-following indicator that calculates a central Moving Average (Mid Line) plus a set of 6 different bands (1x to 6x) above and below that average. Each band is determined by a user-defined ATR length and multiplier. Key features include:
Independent MA Types
Choose different moving average methods for the Mid Line and for the ATR calculation.
Available types: SMA, EMA, WMA, RMA, HMA, and ALMA.
Separate Lengths
Configure the length of the Mid Line independently from the ATR length.
This allows fine-tuning of both the central average and the volatility measure.
6 Customizable Multipliers
Bands are calculated for 1x, 2x, 3x, 4x, 5x, and 6x multiples of the chosen ATR.
Each level has its own checkbox in the Inputs tab so you can show or hide them at will.
Color Dynamics
The Mid Line automatically changes color to green when its current value is higher than the previous bar’s value, and red otherwise.
All upper/lower bands are rendered in a neutral gray (#787b86) for easy distinction.
Time Shift (Offset)
An offset parameter allows shifting the entire indicator (Mid Line plus bands) forward (to the right) or backward (to the left) by a certain number of bars.
This can help evaluate leads/lags, or compare the past behavior of these lines against future price developments.
Check Boxes for Visibility
Checkboxes in the Inputs let you toggle 1x..6x band levels.
By default, 1x, 2x, and 3x are visible, while 4x, 5x, and 6x are off.
Overlay with Shared Price Scale
The script is set as overlay=true and uses scale=scale.right, so it draws directly on the main chart and shares the same price axis as your candles.
This indicator is ideal if you want:
A central MA for trend detection.
ATR-based volatility bands (up to 6 multipliers).
Full control over the type and length of both the Mid Line MA and the ATR.
An optional offset to shift the lines in time for backtesting or forward-projection.
Usage Tips
In the Inputs tab, customize:
Mid Line length and ATR length independently.
MA methods for both Mid Line and ATR (SMA, EMA, WMA, RMA, HMA, ALMA).
Band visibility via checkboxes for 1x..6x.
Offset for shifting lines in time.
In the Style tab, you can further customize colors, line widths, and visibility of each element (Mid line, ±1x..±6x).
Enjoy exploring different settings to best match your preferred trading style and timeframe!
Smooth Moving Average (SMA) MTF Trend PanelDescription:
The SMA MTF Trend Panel is a multi-timeframe (MTF) trend visualization tool designed to help traders quickly assess market conditions across multiple timeframes based on the Simple Moving Average (SMA). This script calculates the trend direction (Bullish, Bearish, or Neutral) and the trend strength percentage for each selected timeframe. It displays the information in an intuitive panel that is dynamically updated in real-time.
How It Works:
1. SMA Calculation:
• For each timeframe, the script calculates the SMA based on a user-defined length (default: 50).
2. Trend Identification:
• Compares the current price to the SMA and assigns a label: “Bull,” “Bear,” or “Neutral.”
3. Panel Display:
• Displays trends, strengths, and shifts for each timeframe in an interactive table.
4. Real-Time Updates:
• Continuously monitors price movements and updates the panel to reflect the latest data.
Customizable Inputs:
1. Panel Settings:
• Orientation: Choose vertical or horizontal layout.
• Position: Select panel location on the chart.
• Border Width/Color: Adjust panel borders for better visualization.
2. Trend Colors:
• Define custom colors for bullish, bearish, neutral, and shift conditions.
3. SMA Length:
• Adjust the SMA period to suit your trading style (e.g., short-term scalping or long-term trend following).
4. Timeframes:
• Set specific timeframes to analyze based on your trading strategy.