Capital Pros Gold R&S Simple s&r indicator made by capital pros to understand real support and resistance
Forecasting
Scalping MA Çapraz İndikatörüHareketli ortalama ile al sat sinyalleri veren indikatör
Tercihinize göre destekleyici yan indikatörler kullanabilirsiniz
FFMFFW Daily EMA 21 Trend Cross/Retest MarkupA script that marks up the daily close of possible entries and retests
Optimus trader
---
Indicateur : Optimus trader **
Cet indicateur avancé de Price Action est conçu pour fournir des signaux d'achat et de vente basés sur l'analyse des modèles de chandeliers, l'action des prix, le volume, et les zones de liquidité. Il est particulièrement utile pour les traders qui veulent identifier des points d'entrée et de sortie avec une analyse précise des tendances et des volumes.
**Caractéristiques principales :** 1.
**Moyenne Mobile et VWAP :**
- Utilisation de la **moyenne mobile simple (SMA)** de 50 périodes pour identifier la tendance générale du marché.
- Calcul du **VWAP (Volume Weighted Average Price)** pour détecter le prix moyen pondéré par le volume, permettant ainsi de mieux comprendre l'interaction entre les prix et les volumes.
2. **Détection des modèles de chandeliers :**
- **Pin Bar** : Cette configuration est détectée lorsqu'il y a une grande différence entre le plus haut et le plus bas de la bougie, avec un corps relativement petit. Elle est utilisée pour signaler des retournements potentiels.
- **Pin Bar Haussier (Pin Bar Up)** : Signale un potentiel retournement à la hausse.
- **Pin Bar Baissier (Pin Bar Down)** : Signale un potentiel retournement à la baisse.
- **Inside Bar** : Un modèle de chandelier où la bougie actuelle est entièrement contenue à l’intérieur de la bougie précédente, indiquant une période de consolidation avant un potentiel mouvement important.
3. **Analyse du volume :**
- Utilisation d'un seuil de volume basé sur la moyenne mobile des volumes des 20 dernières périodes, multipliée par 1.2 pour identifier les périodes de volume élevé. Cela permet de filtrer les signaux faibles qui se produisent avec un faible volume.
4. **Conditions de tendance :**
- **Tendance haussière** : Le prix est au-dessus de la moyenne mobile et du VWAP, suggérant une pression d'achat.
- **Tendance baissière** : Le prix est en dessous de la moyenne mobile et du VWAP, indiquant une pression de vente.
5. **Zones de liquidité :**
- L'indicateur identifie les **zones de liquidité** en utilisant les niveaux de support et de résistance basés sur les 20 dernières bougies. Les signaux d'achat et de vente sont filtrés pour ne se produire que lorsque le prix est proche de ces zones, offrant ainsi une probabilité plus élevée de succès.
#### **Signaux d'achat et de vente :**
- **Signal d'achat (BUY)** : Généré lorsque le modèle **Pin Bar haussier** ou l'**Inside Bar** se forme, dans une tendance haussière, avec un volume élevé et à proximité d'une zone de liquidité.
- **Signal de vente (SELL)** : Généré lorsque le modèle **Pin Bar baissier** ou l'**Inside Bar** se forme, dans une tendance baissière, avec un volume élevé et à proximité d'une zone de liquidité.
#### **Utilisation de l'indicateur :**
Cet indicateur est idéal pour les traders qui cherchent à capturer des mouvements de prix significatifs dans des conditions de volume élevé et dans des zones de liquidité cruciales. Il fournit des signaux de trading clairs et précis, ce qui en fait un outil précieux pour les stratégies de **price action**.
---
### **Conseils d'utilisation :**
- Utilisez cet indicateur pour identifier des points d'entrée potentiels dans des tendances fortes, en recherchant des configurations de chandeliers spécifiques à des niveaux clés de prix.
- Combiné avec d'autres indicateurs ou l'analyse technique, cet outil peut renforcer la précision de vos décisions de trading.
---
**Note :** Cet indicateur ne garantit pas les résultats mais offre des outils solides pour vous aider à prendre des décisions éclairées en fonction de l'analyse des prix, des volumes et des zones de liquidité.
Babil34 RSIBabil34 RSI göstergesi, fiyat hareketlerini analiz etmek için Jurik RSX algoritmasına dayalı bir yapı sunar. Bu gösterge, klasik RSI'den farklı olarak, fiyat dalgalanmalarına daha hızlı tepki verecek şekilde yumuşatılmış bir yaklaşım kullanır. Aşırı alış (85) ve aşırı satış (15) seviyeleri ile yatırımcıya trendin potansiyel dönüş noktaları hakkında bilgi sağlar.
Özellikler:
Aşırı Alış ve Aşırı Satış Bölgeleri: Kullanıcının tanımladığı seviyelerde renklendirilmiş sinyaller ile desteklenir.
Renk Kodlaması: Fiyatın aşırı alış bölgesinde yeşil, aşırı satış bölgesinde kırmızı ve nötr durumda özel bir renk ile gösterim yapılır.
Seviye Vurgulama: Aşırı alış ve satış bölgelerinde ek renk vurguları ile dikkat çekici hale getirilmiştir.
Kullanıcı Tanımlı Ayarlar: Aşırı alış/satış seviyeleri ve zaman periyodu kullanıcı tarafından özelleştirilebilir.
Bu gösterge, trendin gücünü ve momentumunu analiz etmek isteyen yatırımcılar için tasarlanmıştır. Özellikle, fiyatın aşırı alım ya da aşırı satım bölgelerinde olduğu durumlarda potansiyel dönüş sinyalleri verir. Babil34 RSI göstergesini stratejinize ekleyerek, fiyat hareketlerini daha yakından analiz edebilir ve potansiyel giriş/çıkış noktalarını belirleyebilirsiniz.
Advance RSI Renko CalculationRSI based BUY and SELL on Renko Chart, only works good on renko chart, choose block size wisely for better results.
Strategy without indicators v11. General Script Strategy
The objective of this strategy is to open buy or sell orders every new hour based on:
Whether the previous candle closed high (buy) or low (sell).
The presence of tops and bottoms to avoid opening orders at times of possible reversals.
The strategy also allows the user to set a date range (start date and end date) to calculate profit, loss, percentage of gain and percentage of loss only in that period.
2. Initial Settings and Parameters
Start Date and End Date: The start_date and end_date variables define the date range to account for profits and losses. These dates can be adjusted by the user to view results in specific periods.
3. Conditions for Order Entry
At each time change, the script checks the conditions for buying or selling, using the following variables and logic:
Detection of Bullish or Bearish Candle:
bullish_candle: True if the previous candle closed high.
bearish_candle: True if the previous candle closed lower.
Analysis of Tops and Bottoms:
To avoid opening orders close to tops and bottoms, the script uses the function find_top_and_bottom(period), which analyzes the last 500 candles and identifies the highest value (top) and the lowest value (bottom).
The variables current_top and current_bottom store these values.
next_top and next_bottom indicate whether the current candle is close to a top (prevents buying) or a bottom (prevents selling).
4. Opening Orders (Buy and Sell)
At each time change, the script checks the conditions to open buy or sell orders:
Condition for Sell:
The sell order is opened if the previous candle was bullish (bullish_candle) and is not close to a top (not next_top).
If there is an open buy order, it is closed before the new sell order.
Buy Condition:
The buy order is opened if the previous candle was bearish (bearish_candle) and is not near a bottom (not_near_bottom).
If there is an open sell order, it is closed before the new buy order.
5. Calculating Profit and Loss
The profit and loss calculation is only done within the configured date range (start_date and end_date):
Profit and Loss:
total_profit and total_loss accumulate the profit and loss values of all operations during the defined period.
percentage_gain and percentage_loss calculate the percentage of gain and loss in relation to the initial capital.
6. Displaying Results on the Chart
The script displays on the chart, next to the candles, the information on Total Profit, Total Loss, % Gain and % Loss:
Strategy Summary
Setting the Date Range: Allows you to set the period for calculating profit and loss.
Previous Candlestick Analysis: Decide whether to buy or sell based on the previous candlestick.
Preventing Entries at Tops and Bottoms: Avoids buying at tops and selling at bottoms to reduce false signals.
Result Calculation: Accumulates profits, losses and percentages within the configured date range.
Results Display on Chart: Displays the configured statistics directly on the chart, next to the candlesticks.
1. Estratégia Geral do Script
O objetivo dessa estratégia é abrir ordens de compra ou venda a cada nova hora com base em:
Se a vela anterior fechou em alta (compra) ou em baixa (venda).
A presença de topos e fundos para evitar abrir ordens em momentos de possíveis reversões.
A estratégia também permite que o usuário configure um intervalo de datas (data inicial e data final) para calcular o lucro, perda, percentual de ganho e percentual de perda apenas nesse período.
2. Configurações e Parâmetros Iniciais
Data Inicial e Data Final: As variáveis data_inicial e data_final definem o intervalo de datas para contabilizar os lucros e perdas. Essas datas podem ser ajustadas pelo usuário para visualizar resultados em períodos específicos.
3. Condições para Entrada de Ordens
A cada mudança de hora, o script verifica as condições de compra ou venda, usando as seguintes variáveis e lógicas:
Detecção de Vela de Alta ou Baixa:
vela_de_alta: Verdadeiro se a vela anterior fechou em alta.
vela_de_baixa: Verdadeiro se a vela anterior fechou em baixa.
Análise de Topos e Fundos:
Para evitar abrir ordens próximas de topos e fundos, o script utiliza a função find_top_and_bottom(periodo), que analisa as últimas 500 velas e identifica o valor mais alto (topo) e o valor mais baixo (fundo).
As variáveis topo_atual e fundo_atual armazenam esses valores.
topo_proximo e fundo_proximo indicam se a vela atual está perto de um topo (evita compra) ou de um fundo (evita venda).
4. Abertura de Ordens (Compra e Venda)
A cada mudança de hora, o script verifica as condições para abrir ordens de compra ou venda:
Condição para Venda:
A ordem de venda é aberta se a vela anterior foi de alta (vela_de_alta) e não está perto de um topo (not topo_proximo).
Se houver uma ordem de compra aberta, ela é fechada antes da nova ordem de venda.
Condição para Compra:
A ordem de compra é aberta se a vela anterior foi de baixa (vela_de_baixa) e não está perto de um fundo (not fundo_proximo).
Se houver uma ordem de venda aberta, ela é fechada antes da nova ordem de compra.
5. Cálculo de Lucros e Perdas
O cálculo de lucro e perda só é feito dentro do intervalo de datas configurado (data_inicial e data_final):
Lucro e Perda:
lucro_total e perca_total acumulam os valores de lucro e perda de todas as operações durante o período definido.
percentual_ganho e percentual_perca calculam o percentual de ganho e perda em relação ao capital inicial.
6. Exibição dos Resultados no Gráfico
O script exibe no gráfico, próximo das velas, as informações de Lucro Total, Perda Total, % de Ganho e % de Perda:
Resumo da Estratégia
Configuração de Intervalo de Datas: Permite configurar o período para cálculo do lucro e da perda.
Análise de Vela Anterior: Decide se a ordem é de compra ou venda com base na vela anterior.
Prevenção de Entradas em Topos e Fundos: Evita compras em topos e vendas em fundos para reduzir sinais falsos.
Cálculo de Resultados: Acumula lucros, perdas e percentuais dentro do período de datas configurado.
Exibição dos Resultados no Gráfico: Exibe as estatísticas configuradas diretamente no gráfico, próximo das velas.
Systematic Investment Tracker with Enhanced Features DCATürkçe Açıklama:
Bu TradingView Pine Script kodu, belirlenen tarih aralığında iki farklı yatırım stratejisi uygulayarak yatırım performansını analiz etmeyi sağlar. Kullanıcı, "Sürekli Alım" ve "Düştükçe Alım" stratejileri arasında bir karşılaştırma yapabilir. Her stratejide, toplam harcama, elde edilen miktar, ortalama maliyet ve kâr yüzdesi hesaplanır. Kod ayrıca dinamik alım miktarını ayarlama ve grafiksel işaretleyiciler ekleme özelliklerine sahiptir. Performans karşılaştırması için grafik üzerinde bilgi etiketi ve bir tablo sunulur. İki dil arasında geçiş yapma (Türkçe/İngilizce) seçeneği de mevcuttur.
English Description:
This TradingView Pine Script code enables users to analyze investment performance by applying two different investment strategies within a specified date range. Users can compare between "Systematic Purchase" and "Purchase on Decline" strategies. For each strategy, total expenditure, quantity acquired, average cost, and profit percentage are calculated. The script includes options for dynamic purchase adjustment and graphical markers. A performance comparison is presented through an info label and a table on the chart. Additionally, there is an option to switch between English and Turkish languages.
Quantum Trend IndicatorThis algorithm, named "Quantum Trend Indicator," is designed to generate trading signals based on a mix of indicators like RSI, Stochastic RSI, volatility (using standard deviation), and a Z-score filter. Here’s a breakdown of the components:
1. RSI Calculation:
Calculates the Relative Strength Index (RSI) of the closing price using a specified length (rsiLength).
RSI is a momentum oscillator that measures the speed and change of price movements.
2. Stochastic RSI:
A stochastic RSI is calculated from the RSI values, essentially a second layer of smoothing that is often more sensitive to price changes.
The code uses %K (fast) and %D (slow) components to smooth the Stochastic RSI, providing pivot signals based on crossovers:
stochRsiPivotUp: Signals a potential reversal to the upside.
stochRsiPivotDown: Signals a potential reversal to the downside.
3. Volatility Calculation:
Calculates volatility using the standard deviation of the closing prices over a set volatilityLength.
Standard deviation measures how spread out the prices are, giving an idea of the current price volatility.
4. Z-Score Calculation:
Computes the Z-score of the closing prices to see how far current prices are from their mean, normalized by volatility.
The Z-score helps identify rare price movements, indicating potential reversals when the value is extreme (either high or low).
5. Filtering Stages:
Stage 1: Uses Stochastic RSI pivots to detect initial reversal signals.
Stage 2: Uses volatility and the Z-score to ensure the signal is generated during high-volatility periods with significant price movements.
- signalUp: Generated when conditions indicate an upward reversal.
- signalDown: Generated for a potential downward reversal.
6. Signal Generation:
If all conditions for signalUp or signalDown are met, a "Buy" or "Sell" signal is shown on the chart.
Suggested Optimal Settings for S&P 500 Index on 3-Minute Timeframe
rsiLength (RSI Length):
Optimal Range: 8 to 14.
Recommendation: A shorter rsiLength (8–10) would make RSI more responsive on a 3-minute timeframe for S&P 500, helping to catch fast price movements.
stochRsiLength (Stochastic RSI Length):
Optimal Range: 8 to 14.
Recommendation: A length similar to the rsiLength (e.g., 8 or 10) will keep Stochastic RSI sensitive enough for shorter timeframes like 3 minutes.
stochRsiK (%K Period for Stochastic RSI):
Optimal Range: 3 to 5.
Recommendation: stochRsiK around 3 provides smoother Stochastic RSI values, with less noise on short timeframes.
stochRsiD (%D Period for Stochastic RSI):
Optimal Range: 3 to 5.
Recommendation: Use a period around 3 for stochRsiD to complement the sensitivity of %K while still filtering out excessive noise.
volatilityLength (Volatility Calculation Length):
Optimal Range: 14 to 20.
Recommendation: Around 14 to 16 works well on shorter timeframes, as it captures recent volatility trends without excessive lag.
sigmaMultiplier (Sigma Multiplier for Volatility Filter):
Optimal Range: 1.5 to 2.5.
Recommendation: A multiplier of around 1.8 to 2.2 strikes a balance, highlighting significant moves without over-filtering.
zScoreThreshold (Threshold for Signal Validity):
Optimal Range: 1.5 to 2.0.
Recommendation: A threshold of around 1.8 generally provides enough sensitivity while filtering out minor price swings, especially on a high-liquidity asset like the S&P 500.
High/Low Location Frequency [LuxAlgo]The High/Low Location Frequency tool provides users with probabilities of tops and bottoms at user-defined periods, along with advanced filters that offer deep and objective market information about the likelihood of a top or bottom in the market.
🔶 USAGE
There are four different time periods that traders can select for analysis of probabilities:
HOUR OF DAY: Probability of occurrence of top and bottom prices for each hour of the day
DAY OF WEEK: Probability of occurrence of top and bottom prices for each day of the week
DAY OF MONTH: Probability of occurrence of top and bottom prices for each day of the month
MONTH OF YEAR: Probability of occurrence of top and bottom prices for each month
The data is displayed as a dashboard, which users can position according to their preferences. The dashboard includes useful information in the header, such as the number of periods and the date from which the data is gathered. Additionally, users can enable active filters to customize their view. The probabilities are displayed in one, two, or three columns, depending on the number of elements.
🔹 Advanced Filters
Advanced Filters allow traders to exclude specific data from the results. They can choose to use none or all filters simultaneously, inputting a list of numbers separated by spaces or commas. However, it is not possible to use both separators on the same filter.
The tool is equipped with five advanced filters:
HOURS OF DAY: The permitted range is from 0 to 23.
DAYS OF WEEK: The permitted range is from 1 to 7.
DAYS OF MONTH: The permitted range is from 1 to 31.
MONTHS: The permitted range is from 1 to 12.
YEARS: The permitted range is from 1000 to 2999.
It should be noted that the DAYS OF WEEK advanced filter has been designed for use with tickers that trade every day, such as those trading in the crypto market. In such cases, the numbers displayed will range from 1 (Sunday) to 7 (Saturday). Conversely, for tickers that do not trade over the weekend, the numbers will range from 1 (Monday) to 5 (Friday).
To illustrate the application of this filter, we will exclude results for Mondays and Tuesdays, the first five days of each month, January and February, and the years 2020, 2021, and 2022. Let us review the results:
DAYS OF WEEK: `2,3` or `2 3` (for crypto) or `1,2` or `1 2` (for the rest)
DAYS OF MONTH: `1,2,3,4,5` or `1 2 3 4 5`
MONTHS: `1,2` or `1 2`
YEARS: `2020,2021,2022` or `2020 2021 2022`
🔹 High Probability Lines
The tool enables traders to identify the next period with the highest probability of a top (red) and/or bottom (green) on the chart, marked with two horizontal lines indicating the location of these periods.
🔹 Top/Bottom Labels and Periods Highlight
The tool is capable of indicating on the chart the upper and lower limits of each selected period, as well as the commencement of each new period, thus providing traders with a convenient reference point.
🔶 SETTINGS
Period: Select how many bars (hours, days, or months) will be used to gather data from, max value as default.
Execution Window: Select how many bars (hours, days, or months) will be used to gather data from
🔹 Advanced Filters
Hours of day: Filter which hours of the day are excluded from the data, it accepts a list of hours from 0 to 23 separated by commas or spaces, users can not mix commas or spaces as a separator, must choose one
Days of week: Filter which days of the week are excluded from the data, it accepts a list of days from 1 to 5 for tickers not trading weekends, or from 1 to 7 for tickers trading all week, users can choose between commas or spaces as a separator, but can not mix them on the same filter.
Days of month: Filter which days of the month are excluded from the data, it accepts a list of days from 1 to 31, users can choose between commas or spaces as separator, but can not mix them on the same filter.
Months: Filter months to exclude from data. Accepts months from 1 to 12. Choose one separator: comma or space.
Years: Filter years to exclude from data. Accepts years from 1000 to 2999. Choose one separator: comma or space.
🔹 Dashboard
Dashboard Location: Select both the vertical and horizontal parameters for the desired location of the dashboard.
Dashboard Size: Select size for dashboard.
🔹 Style
High Probability Top Line: Enable/disable `High Probability Top` vertical line and choose color
High Probability Bottom Line: Enable/disable `High Probability Bottom` vertical line and choose color
Top Label: Enable/disable period top labels, choose color and size.
Bottom Label: Enable/disable period bottom labels, choose color and size.
Highlight Period Changes: Enable/disable vertical highlight at start of period
TradingIQ - Counter Strike IQIntroducing "Counter Strike IQ" by TradingIQ
Counter Strike IQ is an exclusive trading algorithm developed by TradingIQ, designed to trade upside/downside breakouts of varying significance. By integrating artificial intelligence and IQ Technology, Counter Strike IQ analyzes historical and real-time price data to construct a dynamic trading system adaptable to various asset and timeframe combinations.
Philosophy of Counter Strike IQ
Counter Strike IQ operates on a single premise: Support and resistance levels cannot hold forever. At some point either side must break for the underlying asset to exhibit trends; otherwise, prices would be confined to an infinitely narrowing range.
Counter Strike IQ is designed to work straight out of the box. In fact, its simplicity requires just four user settings to manage output, making it incredibly straightforward to manage.
Minimum ATR Profit, Minimum ATR Stop, EMA Filter and EMA Filter Length are the only settings that manage the performance of Counter Strike IQ!
Traders don’t have to spend hours adjusting settings and trying to find what works best - Counter Strike IQ handles this on its own.
Key Features of Counter Strike IQ
Self-Learning Breakout Detection
Employs AI and IQ Technology to identify notable breakouts in real-time.
AI-Generated Trading Signals
Provides breakout trading signals derived from self-learning algorithms.
Comprehensive Trading System
Offers clear entry and exit labels.
Performance Tracking
Records and presents trading performance data, easily accessible for user analysis.
Self-Learning Trading Exits
Counter Strike IQ learns where to exit positions.
Long and Short Trading Capabilities
Supports both long and short positions to trade various market conditions.
Strike Channel
The Strike Channel represents what Counter Strike IQ considers a tradable long opportunity or a tradable short opportunity. The Strike Channel is dynamic and adjusts from chart to chart.
IQ Graph Gradient
Introduces the IQ Graph Gradient, designed to classify extreme values in price on a grand scale.
How It Works
Counter Strike IQ operates on a straightforward heuristic: go long during significant upside price moves that break established resistance levels and go short during significant downside price moves that break established support levels.
IQ Technology, TradingIQ's proprietary AI algorithm, defines what constitutes a “significant price move” and what’s considered a tradable breakout. For Counter Strike IQ, this algorithm evaluates all historical support/resistance breaks and any subsequent breakouts. For instance, the price move following up to a breakout is measured and learned from, including the significance of the identified support/resistance level (how long it’s been active, how far price moved away from it, etc). By analyzing these patterns, Counter Strike IQ adapts to identify and trade similar future breakout sequences.
In simple terms, Counter Strike IQ learns from violations of historical support/resistance levels to identify potential entry points at currently established support/resistance levels. Using this knowledge, it determines the optimal, current support/resistance price level where a breakout has a higher chance of occurring.
For long positions, Counter Strike IQ places a stop-market order at the AI-identified resistance point. If price violates this level a market order will be placed and a long position entered. Of course, this is how the algorithm trades, users can elect to use a stop-limit order amongst other order types for position entry. After the position is entered TP1 is placed (identifiable on the price chart). TP1 has a twofold purpose:
Acts as a legitimate profit target to exit 50% of the position.
Once TP1 is closed over, the initial stop loss is converted to a trailing stop, and the long position remains active so long as price continues to uptrend.
For short positions, Counter Strike IQ places a stop-market order at the AI-identified support point. If price violates this level a market order will be placed and a short position entered. Again, this is how the algorithm trades, users can elect to use a stop-limit order amongst other order types for position entry. Upon entry TP1 is placed (identifiable on the price chart). TP1 has a twofold purpose:
Acts as a legitimate profit target to exit 50% of the position.
Once TP1 is closed over, the initial stop loss is converted to a trailing stop, and the short position remains active so long as price continues to downtrend.
As a trading system, Counter Strike IQ exits TP1 using a limit order, with all stop losses exited as stop market orders.
What Classifies As a Tradable Upside Breakout or Tradable Downside Breakout?
For Counter Strike IQ, tradable price breakouts are not manually set but are instead learned by the system. What qualifies as a significant upside or downside breakout in one market might not hold the same significance in another. Counter Strike IQ continuously analyzes historical and current support/resistance levels, how far price has extended from those levels, the raw-dollar price move leading up to a violation of those levels, their longevity, and more, to determine which future levels have a higher chance of breaking out when retested!
The image above illustrates the Strike Channel and explains the corresponding prices and levels
The green upper line represents the Long Breakout Point.
The pink lower line represents the Short Breakout Point.
Any price between the two deviation points is considered “Acceptable”.
The image above shows a long position being entered after the Upside Breakout Point was reached.
Green arrows indicate that the strategy entered a long position at the highlighted price level.
Blue arrows indicate that the strategy exited a position, whether at TP1, the initial stop loss, or at the trailing stop.
Blue lines indicate the TP1 level for the current trade. Red lines indicate the initial stop loss price.
If price closes above TP1, the initial stop loss will be replaced with a trailing stop. A blue line (similar to the blue line shown for TP1) will trail price and correspond to the trailing stop price of the trade.
The image above shows the trailing stop price, represented by a blue line, used for the long position!
You can also hover over the trade labels to get more information about the trade—such as the entry price and exit price.
The image above shows a short position being entered after the Downside Breakout Point was reached.
Red arrows indicate that the strategy entered a short position at the highlighted price level.
Blue arrows indicate that the strategy exited a position, whether at TP1, the initial stop loss, or at the trailing stop.
Blue lines indicate the TP1 level for the current trade. Red lines indicate the initial stop loss price.
If price closes below TP1, the initial stop loss will be replaced with a trailing stop. A blue line (similar to the blue line shown for TP1) will trail price and correspond to the trailing stop price of the trade.
The image above shows the trailing stop price, represented by a blue line, used for the short position!
You can also hover over the trade labels to get more information about the trade—such as the entry price and exit price.
IQ Gradient Graph
The IQ Gradient Graph provides a macro characterization of extreme prices.
The lower macro extremity of the IQ Gradient Graph is colored green, while the upper macro extremity is colored red.
Minimum Profit Target And Stop Loss
The Minimum ATR Profit Target and Minimum ATR Stop Loss setting control the minimum allowed profit target and stop loss distance. On most timeframes users won’t have to alter these settings; however, on very-low timeframes such as the 1-minute chart, users can increase these values so gross profits exceed commission.
After changing either setting, Counter Strike IQ will retrain on historical data - accounting for the newly defined minimum profit target or stop loss.
AI Direction
The AI Direction setting controls the trade direction Counter Strike IQ is allowed to take.
“Trade Longs” allows for long trades.
“Trade Shorts” allows for short trades.
EMA Filter
The EMA Filter setting controls whether the AI should implement an EMA trading filter. Simply, if the EMA Filter is active, long trades can only initiate if price is trading above the user-defined EMA. Conversely, short trades can only initiate if price is trading below the user-defined EMA.
The image above shows the EMA Filter in action!
Verifying Counter Strike IQ’s Effectiveness
Counter Strike IQ automatically tracks its performance and displays the profit factor for the long strategy and the short strategy it uses. This information can be found in the table located in the top-right corner of your chart showing.
This table shows the long strategy profit factor and the short strategy profit factor.
The image above shows the long strategy profit factor and the short strategy profit factor for Counter Strike IQ.
A profit factor greater than 1 indicates a strategy profitably traded historical price data.
A profit factor less than 1 indicates a strategy unprofitably traded historical price data.
A profit factor equal to 1 indicates a strategy did not lose or gain money when trading historical price data.
Using Counter Strike IQ
While Counter Strike IQ is a full-fledged trading system with entries and exits - manual traders can certainly make use of its on chart indications and visualizations.
The hallmark feature of Counter Strike IQ is its ability to signal a breakout near its origin point. Long entries are often signaled near the start of a large upside price move; short entries are often signaled near the start of a large downside price move.
For live analysis, the Strike Channel serves as a valuable tool for identifying breakout points.
The further price moves toward the Upside Breakout Point (green), the stronger the indication that price might breakout to the upside. Conversely, the deeper price reaches toward the Downside Breakout Point (red), the stronger the indication that price might breakout to the downside.
Of course, should buying or selling pressure stall, price may fail to breakout at the identified breakout level. This is a natural consequence of any breakout trading strategy!
With this information at hand, traders can quickly switch between charts and timeframes to identify optimized areas of interest.
2024 - Median High-Low % Change - Monthly, Weekly, DailyDescription:
This indicator provides a statistical overview of Bitcoin's volatility by displaying the median high-to-low percentage changes for monthly, weekly, and daily timeframes. It allows traders to visualize typical price fluctuations within each period, supporting range and volatility-based trading strategies.
How It Works:
Calculation of High-Low % Change: For each selected timeframe (monthly, weekly, and daily), the script calculates the percentage change from the high to the low price within the period.
Median Calculation: The median of these high-to-low changes is determined for each timeframe, offering a robust central measure that minimizes the impact of extreme price swings.
Table Display: At the end of the chart, the script displays a table in the top-right corner with the median values for each selected timeframe. This table is updated dynamically to show the latest data.
Usage Notes:
This script includes input options to toggle the visibility of each timeframe (monthly, weekly, and daily) in the table.
Designed to be used with Bitcoin on daily and higher timeframes for accurate statistical insights.
Ideal for traders looking to understand Bitcoin's typical volatility and adjust their strategies accordingly.
This indicator does not provide specific buy or sell signals but serves as an analytical tool for understanding volatility patterns.
Global OECD CLI Diffusion Index YoY vs MoMThe Global OECD Composite Leading Indicators (CLI) Diffusion Index is used to gauge the health and directional momentum of the global economy and anticipate changes in economic conditions. It usually leads turning points in the economy by 6 - 9 months.
How to read: Above 50% signals economic expansion across the included countries. Below 50% signals economic contraction.
The diffusion index component specifically shows the proportion of countries with positive economic growth signals compared to those with negative or neutral signals.
The OECD CLI aggregates data from several leading economic indicators including order books, building permits, and consumer and business sentiment. It tracks the economic momentum and turning points in the business cycle across 38 OECD member countries and several other Non-OECD member countries.
Gann Square Root by ThamizhanIt is by far the simplest on chart presentation of Gann square & Cubic square calculation. It calculates the levels based on opening candle first 15mints high and low closing. These levels usually act as support and resistance. Also it may provide the proper support and resistance levels with maximum 3 tier of cycles.
How to use this indicator,?
Firstly, choose the current trading date, also choose the time starts the script on the selected day.
for example, XAUUSD as per IST 3.30am select the time,
Rest automatically draw the cyclic SR lines and will show the resistance and support,,,,,,,,
As per my view first 15mint above market is Bullish.,,, wiseversa bearish.......
The idea of using is to provide a confirmation of a change in trend.
CCI Threshold StrategyThe CCI Threshold Strategy is a trading approach that utilizes the Commodity Channel Index (CCI) as a momentum indicator to identify potential buy and sell signals in financial markets. The CCI is particularly effective in detecting overbought and oversold conditions, providing traders with insights into possible price reversals. This strategy is designed for use in various financial instruments, including stocks, commodities, and forex, and aims to capitalize on price movements driven by market sentiment.
Commodity Channel Index (CCI)
The CCI was developed by Donald Lambert in the 1980s and is primarily used to measure the deviation of a security's price from its average price over a specified period.
The formula for CCI is as follows:
CCI=(TypicalPrice−SMA)×0.015MeanDeviation
CCI=MeanDeviation(TypicalPrice−SMA)×0.015
where:
Typical Price = (High + Low + Close) / 3
SMA = Simple Moving Average of the Typical Price
Mean Deviation = Average of the absolute deviations from the SMA
The CCI oscillates around a zero line, with values above +100 indicating overbought conditions and values below -100 indicating oversold conditions (Lambert, 1980).
Strategy Logic
The CCI Threshold Strategy operates on the following principles:
Input Parameters:
Lookback Period: The number of periods used to calculate the CCI. A common choice is 9, as it balances responsiveness and noise.
Buy Threshold: Typically set at -90, indicating a potential oversold condition where a price reversal is likely.
Stop Loss and Take Profit: The strategy allows for risk management through customizable stop loss and take profit points.
Entry Conditions:
A long position is initiated when the CCI falls below the buy threshold of -90, indicating potential oversold levels. This condition suggests that the asset may be undervalued and due for a price increase.
Exit Conditions:
The long position is closed when the closing price exceeds the highest price of the previous day, indicating a bullish reversal. Additionally, if the stop loss or take profit thresholds are hit, the position will be exited accordingly.
Risk Management:
The strategy incorporates optional stop loss and take profit mechanisms, which can be toggled on or off based on trader preference. This allows for flexibility in risk management, aligning with individual risk tolerances and trading styles.
Benefits of the CCI Threshold Strategy
Flexibility: The CCI Threshold Strategy can be applied across different asset classes, making it versatile for various market conditions.
Objective Signals: The use of quantitative thresholds for entry and exit reduces emotional bias in trading decisions (Tversky & Kahneman, 1974).
Enhanced Risk Management: By allowing traders to set stop loss and take profit levels, the strategy aids in preserving capital and managing risk effectively.
Limitations
Market Noise: The CCI can produce false signals, especially in highly volatile markets, leading to potential losses (Bollinger, 2001).
Lagging Indicator: As a lagging indicator, the CCI may not always capture rapid market movements, resulting in missed opportunities (Pring, 2002).
Conclusion
The CCI Threshold Strategy offers a systematic approach to trading based on well-established momentum principles. By focusing on overbought and oversold conditions, traders can make informed decisions while managing risk effectively. As with any trading strategy, it is crucial to backtest the approach and adapt it to individual trading styles and market conditions.
References
Bollinger, J. (2001). Bollinger on Bollinger Bands. New York: McGraw-Hill.
Lambert, D. (1980). Commodity Channel Index. Technical Analysis of Stocks & Commodities, 2, 3-5.
Pring, M. J. (2002). Technical Analysis Explained. New York: McGraw-Hill.
Tversky, A., & Kahneman, D. (1974). Judgment under uncertainty: Heuristics and biases. Science, 185(4157), 1124-1131.
Future Trend Channel [ChartPrime]The Future Trend Channel indicator is a dynamic tool for identifying trends and projecting future prices based on channel formations. The indicator uses SMA (Simple Moving Average) and volatility calculations to plot channels that visually represent trends. It also detects moments of lower momentum, indicated by neutral color changes in the channels, and projects future price levels for up to 50 bars ahead.
⯁ KEY FEATURES AND HOW TO USE
⯌ Dynamic Trend Channels :
The indicator draws channels when a trend is identified. It uses a combination of SMA and volatility to determine the direction and strength of the trend. Each channel is visualized with a specific color, where green indicates an uptrend and orange represents a downtrend.
Example of channels during uptrend and downtrend:
⯌ Momentum-Based Color Shifts :
The indicator adapts its channel colors based on momentum changes. When the starting point (Y1) of a channel is higher than its ending point (Y2) during an uptrend, the channel turns neutral, indicating lower momentum and a possible ranging market. The same applies in a downtrend, where the channel turns neutral if Y1 is lower than Y2.
Example of neutral momentum channels:
⯌ Future Price Projection :
At the end of each channel, the indicator generates a projected future price based on the midpoint of the channel. By default, this projection is made 50 bars into the future, but users can adjust the number of bars to their preference.
Example of future price projection:
⯌ Diamond Signals for Valid Trends :
Lime-colored diamonds appear when an uptrend channel is confirmed, while orange diamonds indicate valid downtrend channels. These signals confirm the presence of a strong trend and help identify valid entry and exit points. Neutral channels, which indicate lower momentum, do not show diamond signals.
Example of trend confirmation signals:
⯌ Customizable Settings :
Users can adjust the channel length (how far back the trend is analyzed) and the width (which determines the channel boundaries based on volatility). The future price projection can also be customized to forecast further or fewer bars into the future.
⯁ USER INPUTS
Trend Length : Sets the number of bars used to calculate the trend channels.
Channel Width : Adjusts the width of the channels, based on volatility (ATR multiplier).
Up and Down Colors : Allows customization of the colors used for uptrend and downtrend channels.
Future Bars : Sets the number of bars used for future price projection.
⯁ CONCLUSION
The Future Trend Channel indicator is a versatile tool for identifying and trading trends. With its ability to detect momentum shifts and project future prices, it provides traders with key insights for making more informed decisions. The use of diamond signals for trend validation adds an extra layer of confirmation, helping traders act with greater confidence during volatile or trending markets.
Chessboard Support & ResistanceThe “Chessboard Support & Resistance” indicator is designed to assist traders in visualizing key levels of support and resistance on a chart by employing ATR (Average True Range) to create dynamic horizontal zones. This indicator automatically plots robust support and resistance bands that can help identify potential areas where price may reverse, consolidate, or react. These levels are particularly beneficial for traders who employ concepts like Smart Money analysis, as they illustrate zones where institutional trading activity might occur.
How It Works:
• The indicator uses ATR-based calculations to determine the placement of the support and resistance zones. This approach accounts for market volatility, making the zones adaptive to changing conditions.
• The Zone Thickness parameter allows users to customize the width of the plotted zones, enhancing visibility and fitting them to their specific trading style.
• The support and resistance zones extend horizontally across the chart, providing clear reference points for potential price reactions.
Practical Application:
• Trend Analysis: Identify areas of significant price resistance and support to understand potential turning points or trends in the market.
• Risk Management: Use these zones to better inform stop-loss placements or set profit targets.
• Confirmation Tool: Combine the indicator with other technical analysis tools for confirmation of potential trade entries or exits.
Customization Options:
• Change the colors of the support and resistance zones for better integration with different chart themes.
• Adjust the ATR Length and Multiplier to fine-tune the sensitivity of the zones based on personal preferences and the characteristics of the asset being analyzed.
Disclaimer:
This indicator is for educational and informational purposes only. It is not intended to serve as investment advice or a recommendation to buy or sell any financial instrument. Always perform your own research and consider consulting with a financial professional before making trading decisions. Trading involves significant risk, and past performance does not guarantee future results.
Dual Momentum StrategyThis Pine Script™ strategy implements the "Dual Momentum" approach developed by Gary Antonacci, as presented in his book Dual Momentum Investing: An Innovative Strategy for Higher Returns with Lower Risk (McGraw Hill Professional, 2014). Dual momentum investing combines relative momentum and absolute momentum to maximize returns while minimizing risk. Relative momentum involves selecting the asset with the highest recent performance between two options (a risky asset and a safe asset), while absolute momentum considers whether the chosen asset has a positive return over a specified lookback period.
In this strategy:
Risky Asset (SPY): Represents a stock index fund, typically more volatile but with higher potential returns.
Safe Asset (TLT): Represents a bond index fund, which generally has lower volatility and acts as a hedge during market downturns.
Monthly Momentum Calculation: The momentum for each asset is calculated based on its price change over the last 12 months. Only assets with a positive momentum (absolute momentum) are considered for investment.
Decision Rules:
Invest in the risky asset if its momentum is positive and greater than that of the safe asset.
If the risky asset’s momentum is negative or lower than the safe asset's, the strategy shifts the allocation to the safe asset.
Scientific Reference
Antonacci's work on dual momentum investing has shown the strategy's ability to outperform traditional buy-and-hold methods while reducing downside risk. This approach has been reviewed and discussed in both academic and investment publications, highlighting its strong risk-adjusted returns (Antonacci, 2014).
Reference: Antonacci, G. (2014). Dual Momentum Investing: An Innovative Strategy for Higher Returns with Lower Risk. McGraw Hill Professional.
MAPE of Expected Value and Percent ResidualsOverview
This indicator calculates and visualizes the Mean Absolute Percentage Error (MAPE) and the percent residuals of the expected value compared to the actual closing price. The purpose of this indicator is to provide insights into the accuracy of price forecasts by comparing predicted values to actual market outcomes. The expected values are derived from the transform model, which uses the mean line from the mean and standard deviation lines as an indicator for expected price movement. Users can customize the number of periods over which calculations are averaged.
Inputs
Mean Period (Bars) : Specifies the number of bars used to calculate the moving average of the change between closing prices. This value should match the value used in the mean and standard deviation lines indicator.
MAPE Period (Bars) : Specifies the number of bars used to calculate the moving average of the absolute percentage error.
Outputs
Percent Residuals Histogram : Displays the percentage error between the predicted (expected) value and the actual closing price. The bars are color-coded, with green indicating positive residuals (i.e., the actual value is higher than the predicted value) and red indicating negative residuals (i.e., the actual value is lower than the predicted value).
Reference Line : A horizontal line at zero is added to the chart to indicate the baseline for percent residuals.
Mean Absolute Percentage Error (MAPE) Line : Plots the moving average of the absolute percentage error over the specified period, helping users gauge the average accuracy of their predictions over time.
Methodology
Calculation of Individual Bar Normalized Residuals: The normalized residuals for each bar are computed by taking the difference between the actual closing price and the predicted (expected) value, divided by the closing price. If the actual closing price is above the expected value, the residual is considered positive and is represented in green; otherwise, it is negative and represented in red. This normalization provides a standardized measure of deviation that allows for consistent comparison across different bars.
Mean Absolute Percentage Error (MAPE) Calculation: Over the user-defined period, the absolute values of the normalized residuals are computed and subsequently averaged to determine the Mean Absolute Percentage Error (MAPE). This metric quantifies the average magnitude of the forecast errors, providing a clear indication of the model's predictive accuracy over time.
How to Use
Add Indicators to Chart : First, apply the mean and standard deviation lines indicator to the chart, then add the MAPE of Expected Value and Percent Residuals indicator to evaluate the accuracy of price forecasts.
Set Parameters : Set the `Mean Period (Bars)` to be the same value in both the mean and standard deviation lines indicator and the MAPE indicator to ensure accuracy. Adjust the `MAPE Period (Bars)` to fine-tune the length of historical data used in calculating the MAPE.
Interpret Residuals and MAPE : Use the percent residuals histogram to understand how the actual closing price deviates from predictions. The MAPE line helps track the average prediction accuracy over time.
This tool is particularly useful for traders who want to evaluate the performance of their price prediction models based on the transform model and track how well their expected values, derived from mean and standard deviation lines , align with actual market movements.
Stoch RSI and RSI Buy/Sell Signals with MACD Trend FilterDescription of the Indicator
This Pine Script is designed to provide traders with buy and sell signals based on the combination of Stochastic RSI, RSI, and MACD indicators, enhanced by the confirmation of candle colors. The primary goal is to facilitate informed trading decisions in various market conditions by utilizing different indicators and their interactions. The script allows customization of various parameters, providing flexibility for traders to adapt it to their specific trading styles.
Usefulness
This indicator is not just a mashup of existing indicators; it integrates the functionality of multiple momentum and trend-detection methods into a cohesive trading tool. The combination of Stochastic RSI, RSI, and MACD offers a well-rounded approach to analyzing market conditions, allowing traders to identify entry and exit points effectively. The inclusion of color-coded signals (strong vs. weak) further enhances its utility by providing visual cues about the strength of the signals.
How to Use This Indicator
Input Settings: Adjust the parameters for the Stochastic RSI, RSI, and MACD to fit your trading style. Set the overbought/oversold levels according to your risk tolerance.
Signal Colors:
Strong Buy Signal: Indicated by a green label and confirmed by a green candle (close > open).
Weak Buy Signal: Indicated by a blue label and confirmed by a green candle (close > open).
Strong Sell Signal: Indicated by a red label and confirmed by a red candle (close < open).
Weak Sell Signal: Indicated by an orange label and confirmed by a red candle (close < open).
Example Trading Strategy Using This Indicator
To effectively use this indicator as part of your trading strategy, follow these detailed steps:
Setup:
Timeframe : Select a timeframe that aligns with your trading style (e.g., 15-minute for intraday, 1-hour for swing trading, or daily for longer-term positions).
Indicator Settings : Customize the Stochastic RSI, RSI, and MACD parameters to suit your trading approach. Adjust overbought/oversold levels to match your risk tolerance.
Strategy:
1. Strong Buy Entry Criteria :
Wait for a strong buy signal (green label) when the RSI is at or below the oversold level (e.g., ≤ 35), indicating a deeply oversold market. Confirm that the MACD shows a decreasing trend (bearish momentum weakening) to validate a potential reversal. Ensure the current candle is green (close > open) if candle color confirmation is enabled.
Example Use : On a 1-hour chart, if the RSI drops below 35, MACD shows three consecutive bars of decreasing negative momentum, and a green candle forms, enter a buy position. This setup signals a robust entry with strong momentum backing it.
2. Weak Buy Entry Criteria :
Monitor for weak buy signals (blue label) when RSI is above the oversold level but still below the neutral (e.g., between 36 and 50). This indicates a market recovering from an oversold state but not fully reversing yet. These signals can be used for early entries with additional confirmations, such as support levels or higher timeframe trends.
Example Use : On the same 1-hour chart, if RSI is at 45, the MACD shows momentum stabilizing (not necessarily negative), and a green candle appears, consider a partial or cautious entry. Use this as an early warning for a potential bullish move, especially when higher timeframe indicators align.
3. Strong Sell Entry Criteria :
Look for a strong sell signal (red label) when RSI is at or above the overbought level (e.g., ≥ 65), signaling a strong overbought condition. The MACD should show three consecutive bars of increasing positive momentum to indicate that the bullish trend is weakening. Ensure the current candle is red (close < open) if candle color confirmation is enabled.
Example Use : If RSI reaches 70, MACD shows increasing momentum that starts to level off, and a red candle forms on a 1-hour chart, initiate a short position with a stop loss set above recent resistance. This is a high-confidence signal for potential price reversal or pullback.
4. Weak Sell Entry Criteria :
Use weak sell signals (orange label) when RSI is between the neutral and overbought levels (e.g., between 50 and 64). These can indicate potential short opportunities that might not yet be fully mature but are worth monitoring. Look for other confirmations like resistance levels or trendline touches to strengthen the signal.
Example Use : If RSI reads 60 on a 1-hour chart, and the MACD shows slight positive momentum with signs of slowing down, place a cautious sell position or scale out of existing long positions. This setup allows you to prepare for a possible downtrend.
Trade Management:
Stop Loss : For buy trades, place stop losses below recent swing lows. For sell trades, set stops above recent swing highs to manage risk effectively.
Take Profit : Target nearby resistance or support levels, apply risk-to-reward ratios (e.g., 1:2), or use trailing stops to lock in profits as price moves in your favor.
Confirmation : Align these signals with broader trends on higher timeframes. For example, if you receive a weak buy signal on a 15-minute chart, check the 1-hour or daily chart to ensure the overall trend is not bearish.
Real-World Example: Imagine trading on a 15-minute chart :
For a buy:
A strong buy signal (green) appears when the RSI dips to 32, MACD shows declining bearish momentum, and a green candle forms. Enter a buy position with a stop loss below the most recent support level.
Alternatively, a weak buy signal (blue) appears when RSI is at 47. Use this as a signal to start monitoring the market closely or enter a smaller position if other indicators (like support and volume analysis) align.
For a sell:
A strong sell signal (red) with RSI at 72 and a red candle signals to short with conviction. Place your stop loss just above the last peak.
A weak sell signal (orange) with RSI at 62 might prompt caution but can still be acted on if confirmed by declining volume or touching a resistance level.
These strategies show how to blend both strong and weak signals into your trading for more nuanced decision-making.
Technical Analysis of the Code
1. Stochastic RSI Calculation:
The script calculates the Stochastic RSI (stochRsiK) using the RSI as input and smooths it with a moving average (stochRsiD).
Code Explanation : ta.stoch(rsi, rsi, rsi, stochLength) computes the Stochastic RSI, and ta.sma(stochRsiK, stochSmoothing) applies smoothing.
2. RSI Calculation :
The RSI is computed over a user-defined period and checks for overbought or oversold conditions.
Code Explanation : rsi = ta.rsi(close, rsiLength) calculates RSI values.
3. MACD Trend Filter :
MACD is calculated with fast, slow, and signal lengths, identifying trends via three consecutive bars moving in the same direction.
Code Explanation : = ta.macd(close, macdLengthFast, macdLengthSlow, macdSignalLength) sets MACD values. Conditions like macdLine < macdLine confirm trends.
4. Buy and Sell Conditions :
The script checks Stochastic RSI, RSI, and MACD values to set buy/sell flags. Candle color filters further confirm valid entries.
Code Explanation : buyConditionMet and sellConditionMet logically check all conditions and toggles (enableStochCondition, enableRSICondition, etc.).
5. Signal Flags and Confirmation :
Flags track when conditions are met and ensure signals only appear on appropriate candle colors.
Code Explanation : Conditional blocks (if statements) update buyFlag and sellFlag.
6. Labels and Alerts :
The indicator plots "BUY" or "SELL" labels with the RSI value when signals trigger and sets alerts through alertcondition().
Code Explanation : label.new() displays the signal, color-coded for strength based on RSI.
NOTE : All strategies can be enabled or disabled in the settings, allowing traders to customize the indicator to their preferences and trading styles.
Trade 1 + StatergyThe Relative Strength Index (RSI) is a momentum oscillator used in technical analysis that measures the speed and change of price movements of a security within a range of 0 to 100. It is most commonly set to a 14-period timeframe and helps traders identify overbought or oversold conditions, suggesting potential reversal points in the market. Divergence occurs when the price trend and the RSI trend move in opposite directions. A bullish divergence signals potential upward movement when prices are making new lows while the RSI makes higher lows. Conversely, a bearish divergence suggests a possible downward trend when prices are making new highs but the RSI is making lower highs. These signals are crucial for traders looking to capture shifts in momentum and adjust their trading strategies accordingly.
use full to
5 min
10 min
15 min decition
Trend Counter [BigBeluga]The Trend Counter indicator is designed to help traders identify trend conditions and potential reversals by counting the number of bars within a specified period that are above or below an average price level. By smoothing and averaging these counts, the indicator provides a clear visual representation of market trends and highlights key trend changes.
Key Features:
⦾ Trend Counting:
Counts bars above and below average price levels over a specified period.
Smooths and rounds the count for better visualization.
// Count bars over length period above highest and lowest avg with offset loop
float mid = math.avg(ta.highest(length), ta.lowest(length))
for offset = 0 to length -1
switch
hl2 > mid => counter += 1.0
=> counter := 0.0
// Smooth Count and Round
counter := math.round(ta.ema(counter > 400 ? 400 : counter, smooth))
// Count Avg
count.push(counter)
avg = math.round(count.avg())
⦿ Color Indication:
Uses gradient colors to indicate the strength of the trend.
Colors the background based on trend strength for easier interpretation.
⦿ Trend Signals:
Provides visual cues for trend changes based on the counter crossing predefined levels.
⦿ Potential Tops:
Identifies potential market tops using a specified length and highlights these levels.
⦿ Additional Features:
Displays Trend Counter value with arrows to indicate the direction of the trend movement.
Displays average trend count and level for reference.
⦿ User Inputs Description
Length: Defines the period over which the trend counting is performed.
Trend Counter Smooth: Specifies the smoothing period for the trend counter.
Level: Sets the threshold level for trend signals.
Main Color: Determines the primary color for trend indication.
The Trend Counter indicator is a powerful tool for traders seeking to identify and visualize market trends.
By counting and smoothing price bars above and below average levels, it provides clear and intuitive signals for trend strength and potential reversals.
With customizable parameters and visual cues, the Trend Counter enhances trend analysis and decision-making for traders of all levels.
Liquidity Squeeze Indicator 1The provided Pine Script code implements a "Liquidity Squeeze Indicator" in TradingView, designed to detect potential bullish or bearish market squeezes based on EMA slopes, candle wicks, and body sizes.
Code Breakdown
EMAs Calculation: Calculates the 21-period (ema_21) and 50-period (ema_50) exponential moving averages (EMAs) on closing prices.
EMA Slope Calculation: Computes the slope of the 21-period EMA over a 21-period lookback to estimate trend direction, with a threshold of 0.45 to approximate a 45-degree angle.
Candle Properties: Measures the size of the candle's body and its upper and lower wicks for comparison to detect wick-to-body ratios.
Trend Identification: Defines a bullish trend when ema_21 is above ema_50 and a bearish trend when ema_21 is below ema_50.
Wick Conditions
Bullish Condition : In a bullish trend with the EMA slope up, checks if the upper wick is at least 3x the body size and the closing price is above the 21 EMA.
Bearish Condition: In a bearish trend with the EMA slope down, checks if the lower wick is at least 3x the body size and the closing price is below the 21 EMA.
Signal Plotting: Plots a green dot above the bar for bullish signals and a red dot below the bar for bearish signals.
Alerts: Defines alert conditions for both bullish and bearish signals, providing specific alert messages when conditions are met.
Summary
This indicator helps identify potential bullish or bearish liquidity squeezes by looking at trends, EMA slopes, and wick-to-body ratios in candlesticks. The primary signals are visualized through dots on the chart and can trigger alerts for notable market conditions.