المتوسطات المتحركة
Média Biweight de Tukey indicador "Média Biweight de Tukey" é uma média móvel robusta que utiliza a função Biweight de Tukey para suavizar a série de preços, minimizando a influência de outliers. Em vez de tratar todos os valores com a mesma importância, ele atribui pesos diferenciados a cada preço dentro do período definido, de modo que os pontos mais distantes do centro (valores extremos) têm menor influência no cálculo da média.
Principais Características
Robustez aos Outliers:
Utiliza uma função de peso baseada na distância dos preços em relação à média e ao desvio padrão. Valores que se afastam muito da média (acima de um limiar definido) recebem peso zero, reduzindo o impacto de movimentos bruscos e anômalos.
Parâmetros Ajustáveis:
O usuário pode definir o período de cálculo (por exemplo, 20 barras) e uma constante (c) que determina a sensibilidade do indicador aos outliers. Além disso, é possível escolher a fonte dos dados (como o preço de fechamento).
Cálculo Baseado em Valores Absolutos:
O indicador calcula a média simples e o desvio padrão dos preços dentro do período selecionado para estabelecer um ponto de referência.
Plotagem no Gráfico:
A média ponderada resultante é plotada sobre o gráfico dos candles. Como o indicador opera com valores absolutos de preço, ele permanece ancorado ao nível de preço, ou seja, mesmo que a escala dos candles seja modificada (dilatação ou contração), a linha da média mantém sua posição relativa ao preço e não se ajusta visualmente ao tamanho dos candles.
Aplicações
Esse indicador é útil para:
Suavizar a série de preços, ajudando a identificar tendências subjacentes.
Reduzir o ruído causado por flutuações abruptas e valores extremos.
Fornecer um suporte mais robusto para análise técnica, principalmente em mercados voláteis.
Em resumo, a "Média Biweight de Tukey" oferece uma alternativa mais resiliente às médias móveis tradicionais, focando em um cálculo que filtra distorções causadas por outliers e proporciona uma visão mais consistente da tendência de preço.
Custom MACrossOverLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Moving Average DifferenceThe indicator computes the difference between m-day MA and n-day MA. It can be used to tell the price trend.
Estrategia Rentable de TradingDescripción de la Estrategia:
Medias Móviles: Utiliza una media móvil rápida y una lenta para identificar tendencias. Se generan señales de compra cuando la media rápida cruza por encima de la lenta y señales de venta cuando cruza por debajo.
RSI: Se utiliza el RSI para confirmar las entradas. Se busca comprar cuando el RSI está en sobreventa y vender cuando está en sobrecompra.
Gestión de Riesgos: Se establecen niveles de stop loss y take profit basados en porcentajes configurables.
sma 9/20 crossThis Pine Script is designed to visualize the crossover between two Simple Moving Averages (SMAs) on a chart: a fast SMA (9-period) and a slow SMA (20-period). The script will dynamically adjust the background color based on whether the fast SMA is above or below the slow SMA.
Key Components of the Script:
Inputs for SMA Lengths:
The script allows you to adjust the lengths of the two SMAs by inputting values for smaFastLength (default = 9) and smaSlowLength (default = 20). These lengths define how many periods (candles) the SMAs consider when calculating the moving averages.
SMA Calculations:
The script calculates two SMAs using the close price:
smaFast is the 9-period SMA.
smaSlow is the 20-period SMA.
These are calculated using TradingView’s built-in ta.sma function, which computes the simple moving average for the given period.
Background Color Logic:
The background color is dynamically updated based on the crossover condition:
Green background: When the fast SMA (smaFast) is above the slow SMA (smaSlow), indicating a bullish trend.
Red background: When the fast SMA is below the slow SMA, indicating a bearish trend.
The bgcolor function is used to change the background color on the chart. The transparency of the background color is set to 35% using color.new(color.green, 35) or color.new(color.red, 35).
Plotting the SMAs:
The two SMAs are plotted on the chart for visual reference:
The fast SMA is plotted in lime green (color.blue).
The slow SMA is plotted in red (color.red).
sma 9/20 crossThis Pine Script is designed to visualize the crossover between two Simple Moving Averages (SMAs) on a chart: a fast SMA (9-period) and a slow SMA (20-period). The script will dynamically adjust the background color based on whether the fast SMA is above or below the slow SMA.
Key Components of the Script:
Inputs for SMA Lengths:
The script allows you to adjust the lengths of the two SMAs by inputting values for smaFastLength (default = 9) and smaSlowLength (default = 20). These lengths define how many periods (candles) the SMAs consider when calculating the moving averages.
SMA Calculations:
The script calculates two SMAs using the close price:
smaFast is the 9-period SMA.
smaSlow is the 20-period SMA.
These are calculated using TradingView’s built-in ta.sma function, which computes the simple moving average for the given period.
Background Color Logic:
The background color is dynamically updated based on the crossover condition:
Green background: When the fast SMA (smaFast) is above the slow SMA (smaSlow), indicating a bullish trend.
Red background: When the fast SMA is below the slow SMA, indicating a bearish trend.
The bgcolor function is used to change the background color on the chart. The transparency of the background color is set to 35% using color.new(color.green, 35) or color.new(color.red, 35).
Plotting the SMAs:
The two SMAs are plotted on the chart for visual reference:
The fast SMA is plotted in lime green (color.lime).
The slow SMA is plotted in red (color.red).
TEMA OBOS Strategy PakunTEMA OBOS Strategy
Overview
This strategy combines a trend-following approach using the Triple Exponential Moving Average (TEMA) with Overbought/Oversold (OBOS) indicator filtering.
By utilizing TEMA crossovers to determine trend direction and OBOS as a filter, it aims to improve entry precision.
This strategy can be applied to markets such as Forex, Stocks, and Crypto, and is particularly designed for mid-term timeframes (5-minute to 1-hour charts).
Strategy Objectives
Identify trend direction using TEMA
Use OBOS to filter out overbought/oversold conditions
Implement ATR-based dynamic risk management
Key Features
1. Trend Analysis Using TEMA
Uses crossover of short-term EMA (ema3) and long-term EMA (ema4) to determine entries.
ema4 acts as the primary trend filter.
2. Overbought/Oversold (OBOS) Filtering
Long Entry Condition: up > down (bullish trend confirmed)
Short Entry Condition: up < down (bearish trend confirmed)
Reduces unnecessary trades by filtering extreme market conditions.
3. ATR-Based Take Profit (TP) & Stop Loss (SL)
Adjustable ATR multiplier for TP/SL
Default settings:
TP = ATR × 5
SL = ATR × 2
Fully customizable risk parameters.
4. Customizable Parameters
TEMA Length (for trend calculation)
OBOS Length (for overbought/oversold detection)
Take Profit Multiplier
Stop Loss Multiplier
EMA Display (Enable/Disable TEMA lines)
Bar Color Change (Enable/Disable candle coloring)
Trading Rules
Long Entry (Buy Entry)
ema3 crosses above ema4 (Golden Cross)
OBOS indicator confirms up > down (bullish trend)
Execute a buy position
Short Entry (Sell Entry)
ema3 crosses below ema4 (Death Cross)
OBOS indicator confirms up < down (bearish trend)
Execute a sell position
Take Profit (TP)
Entry Price + (ATR × TP Multiplier) (Default: 5)
Stop Loss (SL)
Entry Price - (ATR × SL Multiplier) (Default: 2)
TP/SL settings are fully customizable to fine-tune risk management.
Risk Management Parameters
This strategy emphasizes proper position sizing and risk control to balance risk and return.
Trading Parameters & Considerations
Initial Account Balance: $7,000 (adjustable)
Base Currency: USD
Order Size: 10,000 USD
Pyramiding: 1
Trading Fees: $0.94 per trade
Long Position Margin: 50%
Short Position Margin: 50%
Total Trades (M5 Timeframe): 128
Deep Test Results (2024/11/01 - 2025/02/24)BTCUSD-5M
Total P&L:+1638.20USD
Max equity drawdown:694.78USD
Total trades:128
Profitable trades:44.53
Profit factor:1.45
These settings aim to protect capital while maintaining a balanced risk-reward approach.
Visual Support
TEMA Lines (Three EMAs)
Trend direction is indicated by color changes (Blue/Orange)
ema3 (short-term) and ema4 (long-term) crossover signals potential entries
OBOS Histogram
Green → Strong buying pressure
Red → Strong selling pressure
Blue → Possible trend reversal
Entry & Exit Markers
Blue Arrow → Long Entry Signal
Red Arrow → Short Entry Signal
Take Profit / Stop Loss levels displayed
Strategy Improvements & Uniqueness
This strategy is based on indicators developed by "l_lonthoff" and "jdmonto0", but has been significantly optimized for better entry accuracy, visual clarity, and risk management.
Enhanced Trend Identification with TEMA
Detects early trend reversals using ema3 & ema4 crossover
Reduces market noise for a smoother trend-following approach
Improved OBOS Filtering
Prevents excessive trading
Reduces unnecessary risk exposure
Dynamic Risk Management with ATR-Based TP/SL
Not a fixed value → TP/SL adjusts to market volatility
Fully customizable ATR multiplier settings
(Default: TP = ATR × 5, SL = ATR × 2)
Summary
The TEMA + OBOS Strategy is a simple yet powerful trading method that integrates trend analysis and oscillators.
TEMA for trend identification
OBOS for noise reduction & overbought/oversold filtering
ATR-based TP/SL settings for dynamic risk management
Before using this strategy, ensure thorough backtesting and demo trading to fine-tune parameters according to your trading style.
EMA y Parabolic SARMarkoni 2.0 - Scaramuzza
Este indicador combina cuatro medias móviles exponenciales (EMA) y el Parabolic SAR para ayudarte a identificar tendencias y posibles puntos de reversión en el mercado. Las EMAs proporcionan una visión clara de la tendencia a largo y corto plazo, mientras que el Parabolic SAR se utiliza para señalar posibles cambios en la dirección del precio.
Características:
EMA 200: Representa la tendencia a largo plazo. Cuando el precio está por encima de esta EMA, se considera una tendencia alcista, y cuando está por debajo, una tendencia bajista.
EMA 50: Indicador de la tendencia intermedia. Ayuda a filtrar las señales de corto plazo y da un panorama más claro de la dirección del mercado.
EMA 8 y EMA 21: Son EMAs más cortas que se utilizan para identificar movimientos rápidos y cambios en el mercado. Las cruces entre estas dos EMAs son señales clave de entrada y salida.
Parabolic SAR: Señala posibles puntos de reversión en la tendencia, ayudando a identificar cuándo el precio podría cambiar de dirección, basado en un sistema de puntos que aparecen por encima o debajo del precio.
¿Cómo utilizarlo?
Tendencia alcista: Cuando el precio está por encima de las EMAs más largas (200 y 50), y la EMA 8 está por encima de la EMA 21, se considera que el mercado está en una tendencia alcista.
Tendencia bajista: Cuando el precio está por debajo de las EMAs más largas, y la EMA 8 está por debajo de la EMA 21, el mercado está en una tendencia bajista.
Señales de reversión: El Parabolic SAR marca puntos de reversión. Si los puntos están por debajo del precio, podría indicar una reversión alcista, y si están por encima, una reversión bajista.
Este indicador es útil para traders que buscan seguir la tendencia y capturar puntos de entrada y salida basados en el análisis de varias EMAs y señales del Parabolic SAR.
Pearson Correlation Best MA [victhoreb]Pearson Correlation Best MA is an innovative indicator designed to dynamically select the moving average that best aligns with price action based on the Pearson correlation coefficient. Here’s what it does:
- Multiple MA Evaluation: The indicator computes eight different moving averages — SMA, EMA, DEMA, TEMA, LSMA, RMA, WMA, and VWMA — using a user-defined period.
- Correlation Analysis: For each moving average, it calculates the Pearson correlation with the price (using the average of high and low) over a specified correlation length, then identifies the one with the highest correlation.
- Optional Smoothing: Users can opt to further smooth the selected best moving average for an even more refined signal.
- Visual Cues: The indicator plots the “Best MA” on the chart, colors it based on its direction (bullish or bearish), and also displays the correlation value. Additionally, it can color the price candles to reflect the trend indicated by the best moving average.
- Customizability: All key parameters such as moving average length, correlation length, smoothing options, and color settings are fully customizable.
This tool helps traders by automatically adapting to market conditions—highlighting the moving average that is most in sync with current price trends, potentially improving trade timing and decision-making.
Candle Trend ConfirmationCandle Trend Confirmation Indicator
The "Candle Trend Confirmation" indicator This indicator leverages an Exponential Moving Average (EMA) to visually confirm market trends through dynamic coloring of the EMA line, a shading effect, and candle color changes. It aims to help traders quickly identify strong trends and consolidation phases, enhancing decision-making in various market conditions.
Key Features
Customizable EMA Period:
Traders can adjust the EMA period via an input parameter, with a default setting of 20 periods. This flexibility allows the indicator to adapt to different timeframes and trading strategies.
Pip Threshold for Trend Strength:
A user-defined pip threshold (default set to 0.02) determines the distance from the EMA required to classify a trend as "strong." This parameter can be fine-tuned to suit specific instruments, such as forex pairs, cryptocurrencies, or stocks, where pip values may differ.
Trend Detection Logic:
Strong Uptrend: The closing price must be above the EMA by at least the pip threshold (e.g., 2 pips) and show consistent upward movement over the last three bars (current close > previous close > close two bars ago).
Strong Downtrend: The closing price must be below the EMA by at least the pip threshold and exhibit consistent downward movement over the last three bars.
Consolidation: Any price action that doesn’t meet the strong trend criteria is classified as a consolidation phase.
Dynamic Coloring:
EMA Line: Displayed using the line.new function, the EMA changes color based on trend conditions: green for a strong uptrend, red for a strong downtrend, and purple for consolidation. The line is drawn only for the most recent bar to maintain chart clarity.
Candles: Candlestick colors mirror the trend state—green for strong uptrends, red for strong downtrends, and purple for consolidation—using the barcolor function, providing an immediate visual cue.
Shading Effect: Two dashed lines are drawn above and below the EMA (at half the pip threshold distance) to create a subtle shading zone. These lines adopt a semi-transparent version of the EMA’s color, enhancing the visual representation of the trend’s strength.
How It Works
The indicator calculates the EMA based on the closing price and compares the current price to this average. By incorporating a pip-based threshold and a three-bar confirmation, it filters out noise and highlights only significant trend movements. The use of line.new instead of plot ensures compatibility with certain TradingView environments and offers a lightweight way to render the EMA and shading lines on the chart.
Usage
Trend Identification: Green signals a strong bullish trend, ideal for potential long entries; red indicates a strong bearish trend, suitable for short opportunities; purple suggests a range-bound market, where caution or range-trading strategies may apply.
Customization: Adjust the EMA period and pip threshold in the indicator settings to match your trading style or the volatility of your chosen market. For example, forex traders might set the threshold to 0.0002 for 2 pips on EUR/USD, while crypto traders might use 2.0 for BTC/USD.
Visual Clarity: The combination of EMA coloring, shading, and candle highlights provides a comprehensive view of market dynamics at a glance.
Trend SCANThe visually important moving averages EMA5, EMA20, EMA144 and EMA169 are seen on the indicator.
However, the main purpose of the indicator is to combine the changes in the rsi, ema, volume, momentum and cci data on the stock and to display them in a label on the chart with a formula aimed at determining the stocks that are in an uptrend.
The group that the stock group is desired to be scanned from the indicator settings is selected and the scanning process is instantly visible on the label in the chart period or in the time interval selected outside the chart period.
The stock groups are grouped as BIST50, BIST100, Yildiz Pazar and Main Pazar. But these can be selected as desired.
20 EMA Touch Alert [v5]The Focuz 20 EMA Touch Alert is a simple yet powerful tool developed by Focuz to help traders stay alert when the market price touches the 20-period Exponential Moving Average (EMA).
Stable Coin Dominance RSI with Proportional + InvertStable Coin Dominance RSI with addition of an Invert checkbox to align direction with pricing.
Current Average Gain and LossThe Momentum-Based Non-Lagging Indicator for Swift Trade Decisions is a unique, non-lagging technical analysis tool designed for high-frequency scalping trades with timeframes ranging from 1 minute to 2 hours. This indicator calculates and plots the moving averages of gains and losses over a 14-day period, providing instantaneous buy and sell signals based on real-time market condition
My Strategy//@version=5
strategy("My Strategy", overlay = true)
// Create Indicator's
ema1 = ta.ema(close, 8)
ema2 = ta.ema(close, 18)
ema3 = ta.ema(close, 44)
//plot the Indicators
plot(ema1, title = "EMA1", color = color.blue, linewidth = 2)
plot(ema2, title = "EMA2", color = color.red, linewidth = 2)
plot(ema3, title = "EMA3", color = color.black, linewidth = 2)
// Specify crossover conditions
Enterlong = ta.crossover(ema2, ema3)
Exitlong = ta.crossunder(ema1,ema2)
Entershort = ta.crossunder(ema2, ema3)
Exitshort = ta.crossover(ema1,ema2)
//Execution Logic - Placing Orders
strategy.entry("Long", strategy.long, 1, when = Enterlong)
strategy.close("Long", when = Exitlong)
strategy.entry("Short", strategy.short, 1, when = Entershort)
strategy.close("Short", when = Exitshort)
My CustomThis indicator combines the Session VWAP, EMA 13 by 21 crossover,Support and resistances and Previous day High/Low with 38.2% and 61.8% retracements.
So, one can confirm these for trading intraday as well as swing trade.
Triangular Hull Moving Average + Volatility [BigBeluga]This indicator combines the Triangular Hull Moving Average (THMA) with a volatility overlay to provide a smoother trend-following tool while dynamically visualizing market volatility.
🔵 Key Features:
THMA-Based Trend Detection: The indicator applies a Triangular Hull Moving Average (THMA) to smooth price data, reducing lag while maintaining responsiveness to trend changes.
// THMA
thma(_src, _length) =>
ta.wma(ta.wma(_src,_length / 3) * 3 - ta.wma(_src, _length / 2) - ta.wma(_src, _length), _length)
Dynamic Volatility Bands: When enabled, the indicator displays wicks extending from the THMA-based candles. These bands expand and contract based on price volatility.
Trend Reversal Signals The indicator marks trend shifts using triangle-shaped signals:
- Upward triangles appear when the THMA trend shifts to bullish.
- Downward triangles appear when the THMA trend shifts to bearish.
Customizable Settings: Users can adjust the THMA length, volatility calculation period, and colors for up/down trends to fit their trading style.
Informative Dashboard: The bottom-right corner displays the current trend direction and volatility percentage, helping traders quickly assess market conditions.
🔵 Usage:
Trend Trading: The colored candles indicate whether the market is trending up or down. Traders can follow the trend direction and use trend reversals for entry or exit points.
Volatility Monitoring: When the volatility feature is enabled, the expanding or contracting wicks help visualize market momentum and potential breakout strength.
Signal Confirmation: The triangle signals can be used to confirm potential entry points when the trend shifts.
This tool is ideal for traders who want a responsive moving average with volatility insights to enhance their trend-following strategies.
20 EMA Touch Alert [v5]The Focuz 20 EMA Touch Alert is a simple yet powerful tool developed by Focuz to help traders stay alert when the market price touches the 20-period Exponential Moving Average (EMA).