OA S/R PowerPurpose of the Script
This script identifies the strength of support and resistance levels based on key factors like volume, bounce frequency, and retests. Each level is assigned a score (0-100) and visualized with color-coded labels on the chart.
Key Features
Dynamic Strength Calculation:
Volume Strength: Measures the strength based on the volume of candles touching the level.
Bounce Strength: Evaluates how often the price bounces back from the level.
Retest Strength: Scores the consistency of retests over time.
Color-Coded Visualization:
Yellow: Strong levels (Strength ≥ 70).
Orange: Medium levels (Strength between 50-70).
Red: Resistance levels (Price is below the level).
Green: Support levels (Price is above the level).
Fully Customizable Settings:
Adjust the weight for volume, bounce, and retest contributions.
Configure timeframes, percentage range, and number of levels to analyze.
How It Works
Identify Peaks and Valleys: The script calculates local highs and lows using a configurable width setting to determine potential support and resistance levels.
Filter Key Levels: Nearby levels are merged based on a user-defined percentage range, ensuring clean and relevant levels.
Strength Scoring: Levels are scored dynamically based on:
The number of touches.
The volume of touches.
The frequency of bounces and retests.
Visual Feedback: Each level is plotted on the chart with a color-coded label, indicating its importance and price relationship.
Best Use Cases
Quickly identify strong support/resistance zones for breakout or reversal trades.
Use the dynamic scoring system to prioritize key levels for your strategy.
Customize weights to align with your trading style, such as emphasizing volume or retests.
Indicadores y estrategias
Bitcoin Cycle [BigBeluga]Bitcoin Cycle Indicator is designed exclusively for analyzing Bitcoin’s long-term market cycles, working only on the 1D BTC chart . This indicator provides an in-depth view of potential cycle tops and bottoms, assisting traders in identifying key phases in Bitcoin’s market evolution.
🔵 Key Features:
Heatmap Cycle Phases: The indicator colors each cycle from blue to red , reflecting Bitcoin’s market cycle progression. Cooler colors (blue/green) signal potential accumulation or early growth phases, while warmer colors (yellow/red) indicate maturation and potential top regions.
All-Time High (ATH) and Future ATH Projection: Tracks the current ATH in real-time, while applying a linear regression model to project a possible new ATH in the future. This projection aims to provide insights into the next major cycle peak for long-term strategy.
Dashboard Overview: Displays the current ATH, potential new ATH, and the percentage distance between them. This helps users assess how far the current price is from the projected target.
Top & Bottom Cycle Signals: Red down arrows mark significant price peaks, potentially indicating cycle tops. Up arrows, numbered sequentially (inside each cycle), denote possible bottom signals for strategic DCA (Dollar Cost Averaging) entries.
1D BTC Chart Only: Built solely for the 1D BTC timeframe. Switching to any other timeframe or asset will trigger a warning message: " BTC 1D Only ." This ensures accuracy in analyzing Bitcoin’s unique cyclical behavior.
🔵 When to Use:
Ideal for long-term Bitcoin investors and cycle analysts, the Bitcoin Cycle Indicator empowers users to:
Identify key accumulation and distribution phases.
Track Bitcoin’s cyclical highs and lows with visual heatmap cues.
Estimate future potential highs based on historical patterns.
Strategize long-term positions by monitoring cycle tops and possible accumulation zones.
By visualizing Bitcoin’s cycles with color-coded clarity and top/bottom markers, this indicator is an essential tool for any BTC analyst aiming to navigate market cycles effectively.
Heikin Ashi Processed Generalized Smooth StepDisclaimer : This is my attempt of smoothing and improving @tarasenko_ script. Find the originial author here :
Overview:
The Smooth Step Heikin Ashi Indicator is an enhanced version of the original script developed by tarasenko_. This advanced TradingView tool integrates Heikin Ashi candlestick calculations with a sophisticated smoothing oscillator, offering traders improved trend visualization and dynamic alert capabilities.
Key Enhancements:
Refined Heikin Ashi Calculations: The indicator computes smoothed Open, High, Low, and Close (OHLC) values with adjustable factors, allowing for more precise trend analysis. It also includes an optional second-level modified Heikin Ashi calculation for additional smoothing.
Advanced Smooth Step Oscillator: Utilizing Pascal’s triangle, this oscillator provides a visual representation of price momentum. Traders can configure the lookback period, equation order, and threshold to tailor the oscillator to specific trading strategies.
Enhanced Customization Options: Users can toggle between standard and Heikin Ashi candles, adjust smoothing parameters, and set display preferences to align with their analytical needs.
Noise Reduction: Smoothes out market fluctuations using customizable Heikin Ashi factors. Introduces a second-level smoothing option for even greater noise reduction, allowing traders to focus on the core trend.
Original Indicator :
Heikin Ashi processed version :
Visualization Features:
Heikin Ashi Candles: Displays candles with customizable colors and visibility settings, aiding in clearer trend identification.
Smooth Step Oscillator Line: Plots a line that reflects trend strength and momentum, assisting traders in making informed decisions.
Threshold Line: Provides a visual reference point to facilitate quick assessments of market conditions.
Conclusion:
Building upon tarasenko_'s original work, the Smooth Step Heikin Ashi Indicator delivers a robust tool for traders seeking refined market analysis. Its combination of advanced smoothing techniques and dynamic alert features makes it a valuable addition to any trader's toolkit.
5min and 15min Buy Sell Strategy By DemirkanThis script is designed to identify Buy and Sell signals based on multiple moving averages and the higher timeframe candle direction. It works as follows:
Key Components:
Higher Timeframe Analysis:
The indicator uses the 60-minute timeframe (or a custom timeframe set by the user) to assess the general market trend.
It compares the open and close prices of the higher timeframe candles:
Bullish Higher Timeframe: Close price > Open price.
Moving Averages:
The script uses three types of moving averages to identify trend and momentum:
Simple Moving Average (SMA) with a length of 9.
Exponential Moving Average (EMA) with a length of 21.
Hull Moving Average (HMA) with a length of 100.
These are calculated on the current timeframe's price data.
Crossover Conditions:
Bullish Crossover: When the 9 SMA crosses above the 21 EMA.
Bearish Crossover: When the 9 SMA crosses below the 21 EMA.
Signal Conditions:
Buy Signal:
A bullish crossover occurs (9 SMA crosses above 21 EMA).
The current price is above the 100 HMA (indicating an uptrend).
The higher timeframe (e.g., 60-minute) is bullish (close > open).
Sell Signal:
A bearish crossover occurs (9 SMA crosses below 21 EMA).
The current price is above the 100 HMA.
The higher timeframe is bullish.
Visual and Alert Outputs:
Moving Average Visualization:
The indicator plots the 9 SMA (blue), 21 EMA (red), and 100 HMA (black) directly on the price chart.
Signal Markers:
Buy signals are displayed as green upward triangles below the price bars.
Sell signals are displayed as red downward triangles above the price bars.
Alerts:
Users receive alerts for both buy and sell signals when conditions are met.
Info Table:
A table in the top-right corner displays:
Signal Type: "Cross Up" or "Cross Down."
Higher Timeframe Status: Indicates if the higher timeframe is bullish (e.g., "1H Bullish").
Purpose:
This indicator is suitable for traders who prefer combining lower timeframe signals (e.g., 5-minute or 15-minute charts) with confirmation from a higher timeframe (e.g., 60-minute) for better accuracy in identifying potential buy and sell opportunities.
T3 with ArrowsThe arrows indicate trend reversals - first time closing below and first time closing above.
Cloud EMA Ajustable (9, 21, 50) con Filtro de SeñalesEl "Cloud EMA Ajustable (9, 21, 50) con Filtro de Señales" es una herramienta de análisis técnico diseñada para identificar zonas de soporte o resistencia dinámicas basadas en tres medias móviles exponenciales (EMAs) ajustables. Este indicador también incluye un filtro de señales que combina un cruce de EMAs con confirmación del RSI para ayudar a identificar posibles puntos de entrada en tendencias alcistas o bajistas.
Características principales:
Medias móviles exponenciales (EMAs):
EMA 9: Actúa como un indicador rápido de la tendencia a corto plazo.
EMA 21: Marca un soporte o resistencia intermedia.
EMA 50: Representa una tendencia más amplia.
Relleno de color entre EMA 21 y EMA 50:
Verde para tendencias alcistas (EMA 21 > EMA 50).
Rojo para tendencias bajistas (EMA 21 < EMA 50).
Señales basadas en mechas y RSI:
Una señal de entrada ocurre cuando la mecha de la vela toca la EMA 21, y se confirma una tendencia mediante las EMAs y el RSI.
Totalmente personalizable: Los usuarios pueden ajustar los períodos de las EMAs y el RSI según sus necesidades.
Ajustes disponibles para los usuarios:
Períodos de las EMAs:
Periodo EMA 9 : Personaliza el período para la EMA más rápida.
Periodo EMA 21 : Define el período de la EMA media, utilizada como referencia clave.
Periodo EMA 50: Ajusta el período para la EMA más lenta.
Período del RSI:
Periodo RSI : Cambia el período del RSI utilizado como filtro de tendencia.
Cómo interpretar el indicador:
Colores y relleno:
Verde: Indica una tendencia alcista (EMA 21 por encima de EMA 50).
Rojo: Indica una tendencia bajista (EMA 21 por debajo de EMA 50).
Señales de entrada:
Una señal de entrada (punto amarillo) aparece cuando:
-La mecha de la vela toca la EMA 21.
-Las EMAs confirman la tendencia (EMA 9 > EMA 21 para alcista o EMA 9 < EMA 21 para bajista).
-El RSI refuerza la tendencia (RSI > 50 para alcista o RSI < 50 para bajista).
Personalización:
Ajusta los períodos de las EMAs y el RSI para adaptarlos a diferentes marcos temporales o estilos de trading.
Este indicador es ideal para traders que buscan confirmar entradas basadas en tendencias y validaciones adicionales como el RSI, mejorando la precisión de sus decisiones operativas.
Credito
Gracias a la publicacion de @Dezziinutz por la aportacion de los parametros para la realizacion de este indicador, y por eso es gratis para la comunidad y el codigo es libre para que puedan manipularlo y modificarlo.
//@version=5
indicator("Cloud EMA Ajustable (9, 21, 50) con Filtro de Señales", overlay=true)
// Permitir al usuario editar los periodos de las EMAs desde la interfaz gráfica
periodoEMA9 = input.int(9, title="Periodo EMA 9", minval=1, tooltip="Edita el periodo de la EMA 9")
periodoEMA21 = input.int(21, title="Periodo EMA 21", minval=1, tooltip="Edita el periodo de la EMA 21")
periodoEMA50 = input.int(50, title="Periodo EMA 50", minval=1, tooltip="Edita el periodo de la EMA 50")
rsiPeriodo = input.int(14, title="Periodo RSI", minval=1, tooltip="Edita el periodo del RSI")
// Calcular las EMAs y el RSI con los periodos ajustables
ema9 = ta.ema(close, periodoEMA9)
ema21 = ta.ema(close, periodoEMA21)
ema50 = ta.ema(close, periodoEMA50)
rsi = ta.rsi(close, rsiPeriodo)
// Definir el color de la sombra entre la EMA 21 y EMA 50
fillColor = ema21 > ema50 ? color.new(color.green, 80) : color.new(color.red, 80)
// Dibujar las EMAs y asignarlas a variables de tipo plot
plotEMA9 = plot(ema9, title="EMA 9", color=color.blue, linewidth=2)
plotEMA21 = plot(ema21, title="EMA 21", color=ema21 > ema50 ? color.green : color.red, linewidth=2)
plotEMA50 = plot(ema50, title="EMA 50", color=ema21 > ema50 ? color.green : color.red, linewidth=2)
// Crear la sombra entre EMA 21 y EMA 50
fill(plotEMA21, plotEMA50, color=fillColor, title="Sombra entre EMA 21 y EMA 50")
// Condición: Cuando la mecha superior o inferior de la vela toque la EMA 21
toqueEMA21 = (high >= ema21 and low <= ema21) // La mecha toca la EMA 21
// Filtro: Asegurarse de que el precio está en una tendencia alcista/bajista según el cruce de EMAs
tendenciaAlcista = ema9 > ema21
tendenciaBajista = ema9 < ema21
// Filtro adicional: RSI debe estar por encima de 50 para tendencia alcista y por debajo de 50 para tendencia bajista
rsiAlcista = rsi > 50
rsiBajista = rsi < 50
// Condición para la señal: El precio toca la EMA 21, y hay una confirmación de tendencia
senal_entrada = toqueEMA21 and ((tendenciaAlcista and rsiAlcista) or (tendenciaBajista and rsiBajista))
// Dibujar un punto amarillo en la mecha de la vela si se da la condición
plotshape(senal_entrada, title="Señal de Entrada", location=location.abovebar, color=color.yellow, style=shape.circle, size=size.small)
Adaptive Linear Regression ChannelOverview
The Adaptive Linear Regression Channel Script is an advanced, multi-functional trading tool crafted to help traders pinpoint market trends, identify potential reversals, assess volatility, and establish dynamic levels for profit-taking and position exits. By incorporating key concepts such as linear regression , standard deviation , and other volatility measures like the ATR , the script offers a comprehensive view of market behavior beyond traditional deviation metrics.
This dynamic model continuously adapts to changing market conditions, adjusting in real-time to provide clear visualizations of trends, channels, and volatility levels. This adaptability makes the script invaluable for both trend-following and counter-trend strategies, giving traders the flexibility to respond effectively to different market environments.
Background
What is Linear Regression?
Definition : Linear regression is a statistical technique used to model the relationship between a dependent variable (target) and one or more independent variables (predictors).
In its simplest form (simple linear regression), the relationship between two variables is represented by a straight line (the regression line).
y = mx + b
where :
- y is the target variable (price)
- m is the slope
- x is the independent variable (time)
- b is the intercept
Slope of the Regression Line
Definition: The slope (m) measures the rate at which the dependent variable (y) changes as the independent variable (x) changes.
Interpretation:
- A positive slope indicates an uptrend.
- A negative slope indicates a downtrend.
Uses in Trading:
- Identifying the strength and direction of market trends.
- Assessing the momentum of price movements.
R-squared (Coefficient of Determination)
Definition: A measure of how well the regression line fits the data, ranging from 0 to 1.
Calculation :
R2 = 1− (SS tot/SS res)
where:
- SSres is the sum of squared residuals.
- SStot is the total sum of squares.
Interpretation:
- Higher R2 indicates a better fit, meaning the model explains a larger proportion of the variance in the data.
Uses in Trading:
- Higher R-squared values give traders confidence in trend-based signals.
- Low R-squared values may suggest that the market is more random or volatile.
Standard Deviation
Definition: Standard Deviation quantifies the dispersion of data points in a dataset relative to the mean. A low standard deviation indicates that data points tend to be close to the mean, while a high standard deviation indicates that the data points are spread out over a larger range of values.
Calculation
σ=√∑(xi−μ)2/N
Where
- σ is the standard deviation.
- ∑ is the summation symbol, indicating that the expression that follows should be summed over all data points.
- xi, this represents the i-th data point in the dataset.
- μ\mu, this represents the mean(average) of all the data points in the dataset.
- (xi−μ)2, this is the squared difference between each data point and the mean.
- N is the total number of data points in the dataset.
- **Interpretation**
- A higher standard deviation indicates greater volatility.
- Useful for identifying overbought/oversold conditions in markets.
Key Features
Dynamic Linear Regression Channels:
The script automatically generates adaptive regression channels that expand or contract based on the current market volatility. This real-time adjustment ensures that traders are always working with the most relevant data, making it easier to spot key support and resistance levels.
The channel width itself serves as an indicator of market volatility, expanding during periods of heightened uncertainty and contracting during more stable phases. Additionally, the channel width is trained on previous channel widths , allowing the script to adapt and provide a more accurate view of volatility trends of the asset. Traders can also customize the script to train on less historical data , enabling a more recent view of volatility , which is particularly useful in fast-moving or changing markets.
Dynamic Profits and Stops:
What is it?
Dynamic profit levels allow traders to adjust take-profit targets based on real-time market conditions. Unlike static levels, which remain fixed regardless of market changes, these adaptive levels leverage past volatility data to create more flexible profit-taking strategies.
How does it work?
The script determines these levels using previously stored deviation values. These deviations are categorized into quantiles (like Q1, Q2, Q3, etc.) to classify current market conditions. As new deviation data is recorded, the profit levels are adjusted dynamically to reflect changes in market volatility. This approach helps to refine profit targets, especially when using regression channels with standard deviation rather than traditional ATR bands.
Why is it valuable?
By utilizing adaptive profit levels, traders can optimize their exits based on the current volatility landscape. For instance, when volatility increases, the dynamic levels expand, allowing trades to capture larger price movements. Conversely, during low volatility, profit targets tighten to lock in gains sooner, reducing exposure to market reversals. This flexibility is especially beneficial when combined with adaptive regression channels that respond to changes in standard deviation.
Slope-Based Trend Analysis:
One of the core elements of this script is the slope of the regression line , which helps define the direction and strength of the trend. Positive slopes indicate bullish momentum, while negative slopes suggest bearish conditions. The slope's steepness gives traders insight into the market's momentum, allowing them to adjust their strategies based on the strength of the trend.
Additionally, the script uses the slope to create a color gradient , which visually represents the intensity of the market's momentum. The gradient peaks at one color to show the maximum bullish momentum experienced in the past, while another color represents the maximum bearish momentum experienced in the past. This color-coded visualization makes it easier for traders to quickly assess the market's strength and direction at a glance.
Volatility Heatmap:
The integrated heatmap provides an intuitive, color-coded visualization of market volatility. The heatmap highlights areas where price action is expanding or contracting, giving traders a clear view of where volatility is rising or falling. By mapping out deviations from the regression line, the heatmap makes it easier to spot periods of high volatility that could lead to major market moves or potential reversals.
Deviation Concepts:
The script tracks price deviations from the regression line when a new range is formed, providing valuable insights when the price significantly deviates from the expected trend. These deviations are key in identifying potential breakout points or trend shifts .
This helps traders understand when the market is overextended or when a pullback may be imminent, allowing them to make more informed trading decisions.
Adaptive Model Properties:
Unlike static indicators, this script adapts over time . As the market changes, it stores historical data related to channel widths , slope dynamics , and volatility levels , adjusting its analysis accordingly to stay relevant to current market conditions.
Traders have the ability to train the model on all available data or specify a set number of bars to focus on more recent market activity. This flexibility allows for more tailored analysis , ensuring that traders can work with data that best fits their trading style and time horizon.
This continuous learning approach ensures that traders always have the most up-to-date insight into the market's structure.
Table
The table displays key metrics in real time to provide deeper insights into market behavior:
1. Deviation & Slope : Shows the current deviation if set to standard deviation or atr if set to atr(values used to calculated the channel widths) and the trend slope, helping to gauge market volatility and trend direction.
2. Rate of Change : For both deviation/atr and slope, the table also calculates the rate of change of their rates—essentially capturing the acceleration or deceleration of trends and volatility. This helps identify shifts in market momentum early.
3. R-squared : Indicates the strength and reliability of the trend fit. A higher value means the regression line better explains the price movements.
4. Quantiles : Uses historical deviation data to categorize current market conditions into quartiles (e.g., Q1, Q2, Q3). This helps classify the market's current volatility level, allowing traders to adjust strategies dynamically.
By combining these metrics, the table offers a comprehensive, real-time snapshot of market conditions, enabling more informed and adaptive trading decisions.
Settings
Here’s a breakdown of the script's settings for easy reference:
Linear Regression Settings
Show Dynamic Levels :Toggle to display dynamic profit levels on the chart.
Deviation Type :Select the method for calculating deviation—options include ATR (Average True Range) or Standard Deviation.
Timeframe :Sets the specific timeframe for the regression analysis (default is the chart’s timeframe).
Period :Defines the number of bars used for calculating the regression line (e.g., 50 bars).
Deviation Multiplier :Multiplier used to adjust the width of the deviation channel around the regression line.
Rate of Change :Sets the period for calculating the rate of change of the slope (used for momentum analysis).
Max Bars Back :Limits the number of historical bars to analyze (0 means all available data).
Slope Lookback :Number of bars used to calculate the slope gradient for trend detection.
Slope Gradient Display :Toggle to enable gradient coloring based on slope direction.
Slope Gradient Colors :Set colors for positive and negative slopes, respectively.
Slope Fill :Adjusts the transparency of the slope gradient fill.
Volatility Gradient Display :Toggle to enable gradient coloring based on volatility levels.
Volatility Gradient Colors :Set colors for low and high volatility, respectively.
Volatility Fill :Adjusts the transparency of the volatility gradient fill.
Table Settings
Show Table :Toggle to display the metrics table on the chart.
Table Position :Choose where to position the table (e.g., top-right, middle-center, etc.).
Font Size :Set the size of the text in the table. Options include Tiny, Small, Normal, Large, and Huge.
AI Buy/Sell SIgnals by price prediction//@version=5
indicator("AI Buy/Sell SIgnals by price prediction", overlay=true)
learning_times = input.int(200, "Learning times")
ema_length = input.int(1, "EMA length")
learn_filter_length = input.int(5, "SMA Filter length")
learning_block = input.bool(title="Filter Learning data", defval=true)
reaction = input.int(1, "Reaction (1-3)")
a = close
var input_list = array.new_float(100)
var weights = array.new_float(100)
var outt = array.new_float(2)
//def info table
var tab = label.new(bar_index, high, ".", style=label.style_label_left, color=color.white)
infotable = table.new(position=position.top_right, columns=3, rows=3, bgcolor=color.new(color.white, 0))
label.delete(tab)
get_errg(input_array, weights_array, len_of_both) =>
out = 0
for x = 0 to len_of_both
out += int(array.get(weights_array, x) * array.get(input_array, x))
out
//getting inputs
array.set(input_list, 0, ta.valuewhen(bar_index, close, 10))
array.set(input_list, 1, ta.valuewhen(bar_index, close, 20))
array.set(input_list, 2, ta.valuewhen(bar_index, close, 30))
array.set(input_list, 3, ta.valuewhen(bar_index, close, 40))
array.set(input_list, 4, ta.valuewhen(bar_index, close, 50))
array.set(input_list, 5, ta.valuewhen(bar_index, close, 60))
array.set(input_list, 6, ta.valuewhen(bar_index, close, 70))
array.set(input_list, 7, ta.valuewhen(bar_index, close, 80))
array.set(input_list, 8, ta.valuewhen(bar_index, close, 90))
array.set(input_list, 9, ta.valuewhen(bar_index, close, 100))
array.set(input_list, 10, ta.valuewhen(bar_index, open, 10))
array.set(input_list, 11, ta.valuewhen(bar_index, open, 20))
array.set(input_list, 12, ta.valuewhen(bar_index, open, 30))
array.set(input_list, 13, ta.valuewhen(bar_index, open, 40))
array.set(input_list, 14, ta.valuewhen(bar_index, open, 50))
array.set(input_list, 15, ta.valuewhen(bar_index, open, 60))
array.set(input_list, 16, ta.valuewhen(bar_index, open, 70))
array.set(input_list, 17, ta.valuewhen(bar_index, open, 80))
array.set(input_list, 18, ta.valuewhen(bar_index, open, 90))
array.set(input_list, 19, ta.valuewhen(bar_index, open, 100))
// teaching neural network
sma = ta.sma(ta.ema(close, 10), learn_filter_length)
if math.abs(ta.valuewhen(bar_index, sma, 1) - sma) > close / 10000 or not learning_block
for rn = 0 to learning_times
for list_number = 0 to 19
if rn == 0
array.set(weights, list_number, 1) // Initialisiere die Gewichte mit 1
else
target_output = close
current_output = get_errg(input_list, weights, 19)
current_input = array.get(input_list, list_number)
target_input = target_output / current_output * current_input // Berechne die entsprechende Eingabe für das Gewicht
array.set(weights, list_number, target_input)
// getting new output
array.set(outt, 0, get_errg(input_list, weights, 19))
var col = #ff1100
var table_i_col = ''
var pcol = #ff1100
// getting signals
if ta.ema(ta.valuewhen(bar_index, array.get(outt, 0), 1), ema_length) < ta.sma(ta.ema(array.get(outt, 0), ema_length), 10)
col := #39ff14
table_i_col := 'AI Up'
if ta.ema(ta.valuewhen(bar_index, array.get(outt, 0), 1), ema_length) > ta.sma(ta.ema(array.get(outt, 0), ema_length), 10)
col := #ff1100
table_i_col := 'AI down'
if ta.valuewhen(bar_index, col, 50) == col and ta.valuewhen(bar_index, col, 10) == ta.valuewhen(bar_index, col, 20) and ta.valuewhen(bar_index, col, 30) == ta.valuewhen(bar_index, col, 40) and reaction == 1
pcol := col
if ta.valuewhen(bar_index, col, 50) == col and ta.valuewhen(bar_index, col, 10) == ta.valuewhen(bar_index, col, 20) and reaction == 2
pcol := col
if ta.valuewhen(bar_index, col, 50) == col and reaction == 3
pcol := col
// plotting all info
plot(0, "plot2", col, offset=50)
plot(ta.sma(ta.ema(close, 10), 10), color=ta.valuewhen(bar_index, pcol, 50), linewidth=2)
table.cell(infotable, 0, 0, str.tostring(float(array.get(outt, 0))))
table.cell(infotable, 0, 1, str.tostring(float(ta.valuewhen(bar_index, array.get(outt, 0), 50))))
table.cell(infotable, 0, 2, str.tostring(table_i_col))
B-Xtrender By Neal inspired from @PuppytherapyThanks to @puppytherapy for creating the original B-Xtrender indicator, available at this link: B-Xtrender by @QuantTherapy
I played around the code to have entry and exit condition. The B-Xtrender @QuantTherapy
indicator is a momentum-based tool designed to help traders identify potential trade opportunities by tracking shifts in market momentum. Using a smoothed momentum oscillator, it detects changes in trend direction and provides clear signals for entry and exit points.
Features
Momentum Detection:
Tracks market momentum using the BX-Trender Oscillator.
Green bars indicate bullish momentum, while red bars indicate bearish momentum.
Lighter shades of green/red reflect weakening momentum.
Entry and Exit Signals:
Entry Condition: A long trade is triggered when the oscillator changes from red to green .
Exit Condition: A long trade exit is triggered when the oscillator changes from green to red .
Dynamic PnL Calculation:
Automatically calculates profit or loss in percentage (%) when a trade is exited.
Positive PnL values are prefixed with `+`, and negative values are shown as `-`.
Clear Visualization:
Bar chart-style oscillator in a separate pane for better trend visualization.
Trade labels on the main price chart for clear entry and exit points.
Inputs
Short-Term Momentum Parameters:
Short - L1: Length of the first EMA for short-term momentum calculations.
Short - L2: Length of the second EMA for short-term momentum calculations.
Short - L3: RSI smoothing period applied to the short-term momentum.
Long-Term Momentum Parameters:
Long - L1: Length of the EMA for long-term momentum calculations.
Long - L2: RSI smoothing period applied to the long-term momentum.
Entry and Exit Logic
Entry Condition:
A long trade is triggered when:
The BX-Trender Oscillator changes from red to green .
This shift indicates bullish momentum.
Exit Condition:
A long trade exit is triggered when:
The BX-Trender Oscillator changes from green to red .
This shift indicates a loss of bullish momentum or the start of bearish momentum.
PnL Calculation:
When exiting a trade, the indicator calculates the profit or loss as a percentage of the entry price.
Example:
A profit is displayed as +5.67% .
A loss is displayed as -3.21% .
Visualization
Oscillator Bars:
Green Bars: Represent increasing bullish momentum.
Light Green Bars: Represent weakening bullish momentum.
Red Bars: Represent increasing bearish momentum.
Light Red Bars: Represent weakening bearish momentum.
Just make sure that you checked off the B-Xtrend oscillator off from the style so chart can be active
Trade Labels:
Entry Labels: Displayed below the candle with the text Entry, long .
Exit Labels: Displayed above the candle with the text Exit .
Bar Chart Pane:
The oscillator is displayed in a separate pane for clear trend visualization.
Default Style
Oscillator Colors:
Green for bullish momentum.
Red for bearish momentum.
Light green and light red for weaker momentum.
Trade Labels:
Green labels for entries.
Red labels for exits, with percentage PnL displayed.
Use Cases
Momentum-Based Entries:
Detects shifts in momentum from bearish to bullish for precise trade entry points.
Trend Reversal Detection:
Identifies when bullish momentum weakens, signaling an exit opportunity.
Visual Simplicity:
Offers an intuitive way to track trends with its bar chart-style oscillator and clear trade labels.
This indicator doesn't indicate that it will work perfectly. More updates on the way.
Advanced Pivot Manipulation SuperTrend - Consolidation ZoneHere’s the description translated into English for your TradingView publication:
---
Advanced Pivot Manipulation SuperTrend - Consolidation Zone
Description :
This advanced indicator combines multiple technical tools to provide a comprehensive analysis of trends, key levels, and consolidation zones. Ideal for traders seeking to spot opportunities while avoiding the traps of flat markets, it helps you better understand market dynamics and improve your trading decisions.
Key Features:
1.
Dynamic SuperTrend with Pivot Points:
- An enhanced SuperTrend algorithm based on pivot points for more precise trend tracking.
- Thresholds (Up/Dn) are dynamically adjusted using ATR (Average True Range) for improved volatility adaptation.
2. Consolidation Zones:
- Automatically identifies periods when the market moves within a narrow range (1% by default).
- Consolidation zones are visually highlighted to help avoid risky trades.
3. Dynamic Support and Resistance:
- Automatically calculates support and resistance levels based on a rolling period (configurable).
- These levels serve as key references for potential breakouts or trend reversals.
4. Advanced Detection Tools:
- Includes a volume multiplier and shadow-to-body ratio to signal unusual or potentially manipulated moves (e.g., spoofing).
5. Intuitive Visuals:
- SuperTrend lines are color-coded to indicate bullish (green) or bearish (red) trends.
- Semi-transparent lines mark support and resistance levels, and red backgrounds indicate consolidation zones.
Customizable Parameters:
- Pivot Point Period: Adjust the period for detecting pivot highs and lows.
- ATR Factor and Period: Control the sensitivity of the SuperTrend indicator.
- Lookback Period for S/R: Define the duration for calculating support and resistance levels.
- Volume Multiplier and Shadow/Body Ratio: Configure thresholds for detecting high volumes or anomalies in candlestick patterns.
How to Use:
- Easily identify dominant trends using the SuperTrend.
- Spot consolidation zones to avoid inefficient trades or prepare breakout strategies.
- Use support and resistance levels as reference points for placing orders or adjusting risk management.
Target Audience:
- Intraday and swing traders.
- Anyone looking for a comprehensive and customizable indicator to effectively analyze volatile markets.
---
Notes:
The indicator is fully customizable to suit your needs and strategies. Feel free to experiment with the parameters to maximize its effectiveness according to your trading style.
Keywords: SuperTrend, Support and Resistance, Consolidation, Pivot Points, Trends, ATR, Advanced Trading.
---
This description highlights the indicator’s strengths and is designed to appeal to the TradingView community.
MA Ratio Weighted Trend System I [InvestorUnknown]The MA Ratio Weighted Trend System I combines slow and fast indicators to identify stable trends and capture potential market turning points. By dynamically adjusting the weight of fast indicators based on the Moving Average Ratio (MAR), the system aims to provide timely entry and exit signals while maintaining overall trend stability through slow indicators.
Slow and Fast Indicators with Dynamic Weighting
Slow Indicators: Designed for stable trend identification, these indicators maintain a constant weight in the overall signal calculation. They include:
DMI For Loop (Directional Movement Index)
CCI For Loop (Commodity Channel Index)
Aroon For Loop
Fast Indicators: Aim to detect rapid market changes and potential turning points. Their weights are dynamically adjusted based on the absolute value of the Moving Average Ratio (MAR). Fast indicators include:
ZLEMA For Loop (Zero-Lag Exponential Moving Average)
IIRF For Loop (Infinite Impulse Response Filter)
Dynamic Weighting Mechanism:
Moving Average Ratio (MAR) is calculated as the ratio of the price to its moving average, minus one (for simplicity and visualization).
Weight Calculation
Fast indicator weights are determined based on the absolute value of MAR, possibly with an offset to avoid scenarios where MAR follows rapid price reversals too closely:
// Function to calculate weights based on MAR
f_mar_weights(series float mar, simple int offset, simple float weight_thre) =>
o_mar = math.abs(mar )
float fast_weight = 0
float slow_weight = 1
if o_mar != 0
if weight_thre > 0
if o_mar <= weight_thre
fast_weight := o_mar
else
fast_weight := o_mar
Threshold-Based vs. Continuous Weighting:
Threshold-Based: Fast indicators receive weight only when the absolute MAR exceeds a user-defined threshold (weight_thre).
Continuous: By setting weight_thre to zero, fast indicators always receive some weight, though this may increase false signals.
Offset Mechanism
The offset parameter shifts the MAR used for weighting by a certain number of bars. This helps avoid situations where the MAR follows sudden price movements too closely, preventing fast indicators from failing to provide timely exit signals.
Signal Calculation
The final signal is a weighted average of the slow and fast indicators:
// Calculate Signal (as weighted average)
float sig = math.round(((DMI*slow_w) + (CCI*slow_w) + (Aroon*slow_w) + (ZLEMA*fast_w) + (IIRF*fast_w)) / (3*slow_w + 2*fast_w), 2)
Backtesting and Performance Metrics
Enables users to test the indicator's performance over historical data, comparing it to a buy-and-hold strategy.
Alerts
Set up alerts for when the signal crosses above or below the thresholds.
alertcondition(long_alert, "LONG (MAR Weighted Trend System)", "MAR Weighted Trend System flipped ⬆LONG⬆")
alertcondition(short_alert, "SHORT (MAR Weighted Trend System)", "MAR Weighted Trend System flipped ⬇Short⬇")
Important Notes
Customization: Due to the experimental nature of this indicator, users are strongly encouraged to adjust and calibrate the settings to align with their trading strategies and market conditions.
Default Settings Disclaimer: The default settings are not optimized or recommended for any specific use and serve only as placeholders for the indicator's publication.
Backtest Results Disclaimer: Historical backtest results are not indicative of future performance. Market conditions change, and past results do not guarantee future outcomes.
Support & resistance - DHJ : BUY/SELL Signal//@version=5
indicator(" Support & resistance - DHJ : Support/Resistance, EMA Crossover, Previous Day High/Low", shorttitle = "Support & resistance - DHJ", overlay=true, max_boxes_count=50)
// User Inputs
int lookbackPeriod = input.int(20, "Lookback Period", minval=1, group="Settings")
int vol_len = input.int(2, "Delta Volume Filter Length", tooltip="Higher input, will filter low volume boxes", group="Settings")
float box_withd = input.float(1, "Adjust Box Width", maxval=1000, minval=0, step=0.1, group="Settings")
// Define the EMAs
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
// Plot the EMAs
plot(ema9, color=color.blue, linewidth=1)
plot(ema21, color=color.red, linewidth=1)
// Crossover conditions
longCondition = ta.crossover(ema9, ema21)
shortCondition = ta.crossunder(ema9, ema21)
// Plot buy/sell signals
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Previous day high and low
var float pdHigh = na
var float pdLow = na
if (ta.change(time("1D")))
pdHigh := high
pdLow := low
plot(pdHigh, color=color.green, linewidth=1, title="Previous Day High")
plot(pdLow, color=color.red, linewidth=1, title="Previous Day Low")
// Delta Volume Function
upAndDownVolume() =>
posVol = 0.0
negVol = 0.0
var isBuyVolume = true
switch
close > open => isBuyVolume := true
close < open => isBuyVolume := false
if isBuyVolume
posVol += volume
else
negVol -= volume
posVol + negVol
// Function to identify support and resistance boxes
calcSupportResistance(src, lookbackPeriod) =>
// Volume
Vol = upAndDownVolume()
vol_hi = ta.highest(Vol / 2.5, vol_len)
vol_lo = ta.lowest(Vol / 2.5, vol_len)
var float supportLevel = na
var float supportLevel_1 = na
var float resistanceLevel = na
var float resistanceLevel_1 = na
var box sup = na
var box res = na
var color res_color = na
var color sup_color = na
var float multi = na
var bool brekout_res = na
var bool brekout_sup = na
var bool res_holds = na
var bool sup_holds = na
// Find pivot points
pivotHigh = ta.pivothigh(src, lookbackPeriod, lookbackPeriod)
pivotLow = ta.pivotlow(src, lookbackPeriod, lookbackPeriod)
// Box width
atr = ta.atr(200)
withd = atr * box_withd
// Find support levels with Positive Volume
if (not na(pivotLow)) and Vol > vol_hi
supportLevel := pivotLow
supportLevel_1 := supportLevel - withd
topLeft = chart.point.from_index(bar_index - lookbackPeriod, supportLevel)
bottomRight = chart.point.from_index(bar_index, supportLevel_1)
sup_color := color.from_gradient(Vol, 0, ta.highest(Vol, 25), color(na), color.new(color.green, 30))
sup := box.new(
top_left = topLeft,
bottom_right = bottomRight,
border_color = color.green,
border_width = 1,
bgcolor = sup_color,
text = "Vol: " + str.tostring(math.round(Vol, 2)),
text_color = chart.fg_color,
text_size = size.small
)
// Find resistance levels with Negative Volume
if (not na(pivotHigh)) and Vol < vol_lo
resistanceLevel := pivotHigh
resistanceLevel_1 := resistanceLevel + withd
topLeft = chart.point.from_index(bar_index - lookbackPeriod, resistanceLevel)
bottomRight = chart.point.from_index(bar_index, resistanceLevel_1)
res_color := color.from_gradient(Vol, ta.lowest(Vol, 25), 0, color.new(color.red, 30), color(na))
res := box.new(
top_left = topLeft,
bottom_right = bottomRight,
border_color = color.red,
border_width = 1,
bgcolor = res_color,
text = "Vol: " + str.tostring(math.round(Vol, 2)),
text_color = chart.fg_color,
text_size = size.small
)
// Adaptive Box Len
sup.set_right(bar_index + 1)
res.set_right(bar_index + 1)
// Break of support or resistance conditions
brekout_res := ta.crossover(low, resistanceLevel_1)
res_holds := ta.crossunder(high, resistanceLevel)
sup_holds := ta.crossover(low, supportLevel)
brekout_sup := ta.crossunder(high, supportLevel_1)
// Change Color of Support to red if it was break, change color of resistance to green if it was break
if brekout_sup
sup.set_bgcolor(color.new(color.red, 80))
sup.set_border_color(color.red)
sup.set_border_style(line.style_dashed)
if sup_holds
sup.set_bgcolor(sup_color)
sup.set_border_color(color.green)
sup.set_border_style(line.style_solid)
if brekout_res
res.set_bgcolor(color.new(color.green, 80))
res.set_border_color(color.new(color.green, 0))
res.set_border_style(line.style_dashed)
if res_holds
res.set_bgcolor(res_color)
res.set_border_color(color.new(color.red, 0))
res.set_border_style(line.style_solid)
// Calculate support and resistance levels and their breakouts
= calcSupportResistance(close, lookbackPeriod)
// Check if Resistance becomes Support or Support Becomes Resistance
var bool res_is_sup = na
var bool sup_is_res = na
switch
brekout_res => res_is_sup := true
res_holds => res_is_sup := false
switch
brekout_sup => sup_is_res := true
sup_holds => sup_is_res := false
// Plot Res and Sup breakouts and holds
plotchar(res_holds, "Resistance Holds", "◆", color = #e92929, size = size.tiny, location = location.abovebar, offset = -1)
plotchar(sup_holds, "Support Holds", "◆", color = #20ca26, size = size.tiny, location = location.belowbar, offset = -1)
plotchar(brekout_res and res_is_sup , "Resistance as Support Holds", "◆", color = #20ca26, size = size.tiny, location = location.belowbar, offset = -1)
plotchar(brekout_sup and sup_is_res , "Support as Resistance Holds", "◆", color = #e92929, size = size.tiny, location = location.abovebar, offset = -1)
// Break Out Labels
if brekout_sup and not sup_is_res
label.new(
bar_index , supportLevel ,
text = "Break Sup",
style = label.style_label_down,
color = #7e1e1e,
textcolor = chart.fg_color,
size = size.small
)
if brekout_res and not res_is_sup
label.new(
bar_index , resistanceLevel ,
text = "Break Res",
style = label.style_label_up,
color = #2b6d2d,
textcolor = chart.fg_color,
size = size.small
)
Order Block Zones | Ahmed HALLOUB
This indicator identifies and displays key trading zones based on order block theory, helping traders spot potential support and resistance areas where significant buying or selling pressure has occurred.
Key Features
Dynamic Zone Detection
Automatically identifies bullish and bearish order blocks
Uses volume-weighted analysis for zone strength
Displays clear BUY and SELL zone labels
Customizable Parameters
Swing Length: Adjustable sensitivity (default: 10)
Zone Count: Options from "One" to "High" (1-10 zones)
ATR Multiplier: Controls zone size validation (default: 3.5)
Volume Information: Optional display of volume data
Visual Elements
Green zones indicate bullish order blocks (potential support)
Red zones indicate bearish order blocks (potential resistance)
Volume percentage shown for each zone
Clear labeling of BUY/SELL zones with precise levels
Advanced Features
Zone combining logic to prevent overlapping
Multiple timeframe support
Dynamic zone extension
Historical zone tracking
Zone invalidation monitoring
Adjustable ORB with ORB multipliers "Adjustable ORB with ORB Multipliers," calculates and visually represents the Opening Range Breakout (ORB) based on a user-defined timeframe (defaulting to 15 minutes). It identifies the high and low of the opening range and shades the area between these levels in blue for clear visualization. The indicator then computes additional levels at multiples of the opening range—specifically 1x and 2x the range distance above and below the ORB. These multiplier levels are plotted on the chart (with white lines for 1x levels and yellow lines for 2x levels) and are labeled accordingly ("1x" and "2x") on the left side of each line for easy reference. Users can choose to display or hide the 1x and 2x levels through input options, allowing for customization based on trading preferences. This tool aids traders in identifying potential breakout zones and setting target levels based on the initial market movement of the day.
Trend Intensity Index TeyoV5This indicator measures the strength and direction of a trend by analyzing the relationship between multiple smoothed price averages. It calculates an intensity index value, which ranges from 0 to 100, indicating the strength of the current trend.
Key Features:
Multiple Smoothing Methods: Users can select from various smoothing techniques (e.g., SMA, EMA, WMA) to customize the indicator's sensitivity.
Adjustable Smoothing Periods: Different smoothing periods can be applied to the price data to identify trends at various timeframes.
Intensity Index Calculation: The indicator computes the intensity index by comparing the values of the smoothed price averages. A higher positive value indicates a stronger uptrend, while a higher negative value suggests a stronger downtrend.
Visual Representation: The indicator is displayed as a line plot, with the intensity index values plotted against the price chart.
This indicator can be used to identify potential trend reversals, filter out false signals, and improve the timing of entry and exit points.
Funded System CloudVisually Enhanced EMA Cross Trading Alerts
Customize your strategy with fast and slow EMA crossovers.
Intelligent cloud filtering to highlight trending opportunities.
Visually identify trend direction with color-coded clouds.
Set dynamic stop loss levels with a trailing stop or cloud boundaries.
Receive timely alerts for EMA crosses and stop-loss triggers.
Original script was borrowed from SyntaxGeek - I made an adjustment by erasing the arrows.
CICLOS DE INDUCCIÓN - GHOST TRADER"El indicador Ciclos de Inducción está diseñado para identificar patrones clave en el mercado, combinando conceptos avanzados como Fair Value Gaps (FVG), Change of Character (CHoCH) y zonas de liquidez. Este indicador te ayudará a visualizar los puntos de manipulación e inducción de precios que suelen preceder a movimientos significativos del mercado.
Funcionalidades principales:
FVG (Fair Value Gaps): Detecta desequilibrios en el mercado para identificar posibles zonas de retroceso y entrada óptima.
CHoCH (Change of Character): Marca los cambios estructurales en el precio, indicando potenciales giros de tendencia.
Zonas de Liquidez: Resalta niveles de alta probabilidad donde el precio puede buscar liquidez, como máximos/mínimos anteriores.
Cómo funciona:
Identifica ciclos de inducción utilizando confluencias entre las zonas de FVG, CHoCH y niveles de liquidez.
Proporciona alertas visuales cuando hay una alta probabilidad de manipulación o movimiento direccional.
Resalta entradas potenciales basadas en el comportamiento del precio en zonas críticas.
Ideal para traders que siguen estrategias de Smart Money Concepts (SMC) y buscan precisión en la identificación de patrones de manipulación del mercado."
USDEGP Rate MultipleIndicator shows the ratio between USDEGP rate calculated using CIB GDR and the official rate. In no stress, value should be stable.
ICT SETUP BY SHUBHAM MEWARAICT concept setups for buying and selling above ema 200 for long and below ema 200 for short win rate is 70-80% manage proper riskmanagement of your capital
London USDEGP priceThis indicator calculates the hypothetical USDEGP price using CIB receipts price in London Stock Exchange and its price in EGX. Values are smoothed.
Renko ATR con Maximos y Minimos de VelasEste es un script para colocar velas Renko en su gráfico junto con otro tipo de vela o, lo que es más importante, al usar las variables de este script, puede crear una estrategia con velas Renko que representará entradas y salidas verdaderas y adecuadas en una estrategia al usar la función de prueba retrospectiva.
Es importante conocer que funciona en cualquier temporalidad y el tamaña del "ladrillo" puede ser customizado en "TICKS" con calculo ATR tomando no el precio de apertura y cierre, POR EL CONTRARIO TOMA EL PRECIO MAXIMO Y MINIMO.
¡Esperamos que esto le resulte útil!
Daily MA Levels on Intraday ChartsThis indicator 'Daily MA Levels on Intraday Charts' shows the price levels of key daily moving averages such as the 10d EMA, 21d EMA, 50d SMA and 200d SMA as horizontal lines on intraday charts such as the 5-minute, 15-minute, 30-minute etc.
This indicator provides the user with the ability to quickly see where higher timeframe daily support could be found in the form of daily key moving averages (10d EMA, 21d EMA, 50d SMA etc) if/when price trades to those levels and can be analysed in more detail using this indicator combined with intraday timeframe charts.
For traders that look for intraday bounces around key daily moving average levels on pullbacks, this indicator may be a useful addition to their intraday charts.