Analisi trend
Temporary Help Services Jobs - Trend Allocation StrategyThis strategy is designed to capitalize on the economic trends represented by the Temporary Help Services (TEMPHELPS) index, which is published by the Federal Reserve Economic Data (FRED). Temporary Help Services Jobs are often regarded as a leading indicator of labor market conditions, as changes in temporary employment levels frequently precede broader employment trends.
Methodology:
Data Source: The strategy uses the FRED dataset TEMPHELPS for monthly data on temporary help services.
Trend Definition:
Uptrend: When the current month's value is greater than the previous month's value.
Downtrend: When the current month's value is less than the previous month's value.
Entry Condition: A long position is opened when an uptrend is detected, provided no position is currently held.
Exit Condition: The long position is closed when a downtrend is detected.
Scientific Basis:
The TEMPHELPS index serves as a leading economic indicator, as noted in studies analyzing labor market cyclicality (e.g., Katz & Krueger, 1999). Temporary employment is often considered a proxy for broader economic conditions, particularly in predicting recessions or recoveries. Incorporating this index into trading strategies allows for aligning trades with potential macroeconomic shifts, as suggested by research on employment trends and market performance (Autor, 2001; Valetta & Bengali, 2013).
Usage:
This strategy is best suited for long-term investors or macroeconomic trend followers who wish to leverage labor market signals for equity or futures trading. It operates exclusively on end-of-month data, ensuring minimal transaction costs and noise.
[Taj_treyder] signal buy-sell + ZigZagСалом ба хама Трейдерони Точик! Ман Абдулло Ахмадов хастам.
Ман ин индикатор-ро барои истифодабарии трейдер-хо ва тредуня-хои Точик сохтам,
Аз сабабе ки ин индикатор-ро ман аз 4- авторхои дигари Тредингвью гирифтам якчоя кардам онро дар руйи хати умуми монда наметонам. Шумо метавонед ин индикатор-ро озод дар графикхои худ истифода баред (Таймфрейми аз 45М, 1Н, 2Н, 4Н, то D1).
Хусусият-хои ин индикатор: Ердам кардан дар Торговляи шумо, Осон намудани Тичорати шумо дар бозорхои чахони!
1.- Муян намудани уровен-хои Сапративления ва Подержка,
2.- Муаян намудани Линия Тренда.
3.- Муаян намудани Восходящий ё Нисходящий Тренд (Рынок боло ё поён харакат дорад).
4.- Муаян намудани Точка входа-100% (чойи аники 100% Сделкаро кушодан).
5.- Мондани-100% Стоп-Лосс (чойи аники-100% мондани басс-зарар-дидан, - 2% аз Капитал).
6.- Мондани Тейк-профит (Чойи аники-100% баландтар-ини гирифтани фойда, 1/3, 1/5).
Ман ин индикаторро барои истифода барии Трейдер-хои тамоми Точикони руи замин сохтам! истифода-барии ин ройгон (бе пул, "без платно" мебошад).
Ин Индикатор кори шуморо-95% осон мекунад, Ердами аники хисоби математикии Уровинхо, Ердами аники математикии Линия-Тренда, Ердами-100% аники кушодани сделкахои Лонг ё Шорт (100%- сигналы Buy и Sell с помощью искусственного интеллекта).
Ердами фахмиши боло ё поён равии Рынокхо (100%- определения Восходящего и Нисходящего рынока).
[Taj_treyder] signal buy-sell + ZigZagСалом ба хама Трейдерони Точик! Ман Абдулло Ахмадов хастам.
Ман ин индикатор-ро барои истифодабарии трейдер-хо ва тредуня-хои Точик сохтам,
Аз сабабе ки ин индикатор-ро ман аз 4- авторхои дигари Тредингвью гирифтам якчоя кардам онро дар руйи хати умуми монда наметонам. Шумо метавонед ин индикатор-ро озод дар графикхои худ истифода баред (Таймфрейми аз 45М, 1Н, 2Н, 4Н, то D1).
Хусусият-хои ин индикатор: Ердам кардан дар Торговляи шумо, Осон намудани Тичорати шумо дар бозорхои чахони!
1.- Муян намудани уровен-хои Сапративления ва Подержка,
2.- Муаян намудани Линия Тренда.
3.- Муаян намудани Восходящий ё Нисходящий Тренд (Рынок боло ё поён харакат дорад).
4.- Муаян намудани Точка входа-100% (чойи аники 100% Сделкаро кушодан).
5.- Мондани-100% Стоп-Лосс (чойи аники-100% мондани басс-зарар-дидан, - 2% аз Капитал).
6.- Мондани Тейк-профит (Чойи аники-100% баландтар-ини гирифтани фойда, 1/3, 1/5).
Ман ин индикаторро барои истифода барии Трейдер-хои тамоми Точикони руи замин сохтам! истифода-барии ин ройгон (бе пул, "без платно" мебошад).
Ин Индикатор кори шуморо-95% осон мекунад, Ердами аники хисоби математикии Уровинхо, Ердами аники математикии Линия-Тренда, Ердами-100% аники кушодани сделкахои Лонг ё Шорт (100%- сигналы Buy и Sell с помощью искусственного интеллекта).
Ердами фахмиши боло ё поён равии Рынокхо (100%- определения Восходящего и Нисходящего рынока).
BK BB Horizontal LinesIndicator Description:
I am incredibly proud and excited to share my second indicator with the TradingView community! This tool has been instrumental in helping me optimize my positioning and maximize my trades.
Bollinger Bands are a critical component of my trading strategy. I designed this indicator to work seamlessly alongside my previously introduced tool, "BK MA Horizontal Lines." This indicator focuses specifically on the Daily Bollinger Bands, applying horizontal lines to the bands for clarity and ease of use. The settings are fully adjustable to suit your preferences and trading style.
If you find success with this indicator, I kindly ask that you give back in some way through acts of philanthropy, helping others in the best way you see fit.
Good luck to everyone, and always remember: God gives us everything. May all the glory go to the Almighty!
BK MA Horizontal Lines
Indicator Description:
I am incredibly proud and excited to share my first indicator with the TradingView community! This tool has been instrumental in helping me optimize my positioning and maximize my trades.
Moving Averages (MAs) are among the top three most crucial indicators for trading, and I believe that the Daily, Weekly, and Monthly MAs are especially critical. The way I’ve designed this indicator allows you to combine MAs from your Daily timeframe with one or two from the Weekly or Monthly timeframes, depending on what is most relevant for the specific product or timeframe you’re analyzing.
For optimal use, I recommend:
Spacing your chart about 11 spaces from the right side.
Setting the Labels at 10 in the indicator configuration.
Keeping the line thickness at size 1, while using size 2 for my other indicator, "BK BB Horizontal Lines", which follows a similar concept but applies to Bollinger Bands.
If you find success with this indicator, I kindly ask that you give back in some way through acts of philanthropy, helping others in the best way you see fit.
Good luck to everyone, and always remember: God gives us everything. May all the glory go to the Almighty!
Support and Resistance Trading IndicatorИндикатор Support and Resistance Trading Indicator разработан для эффективной торговли на уровнях поддержки и сопротивления. Он автоматически определяет ключевые уровни, анализирует экстремумы цены за заданный период и отображает сигналы для входа в рынок на основе популярных разворотных паттернов.
Основные функции
Автоматическое определение уровней поддержки и сопротивления:
Анализ экстремумов цены за заданный пользователем период.
Игнорирование мелких рыночных движений и шума для отображения только значимых уровней.
Сигналы для входа в рынок:
Покупка: При формировании разворотного паттерна (пин-бар с длинной нижней тенью или бычье поглощение) на уровне поддержки, подтвержденного увеличением объема.
Продажа: При формировании разворотного паттерна (молот с длинной верхней тенью или медвежье поглощение) на уровне сопротивления, также подтвержденного объемом.
Отображение ключевой информации на графике:
Уровни поддержки и сопротивления в виде линий с гибкими настройками стиля и цвета.
Стрелки и метки для сигналов входа с указанием текущей цены.
Рекомендуемые уровни стоп-лосса (SL) и тейк-профита (TP) с соответствующими ценами.
Гибкие настройки:
Период для анализа уровней.
Настройка стоп-лосса: в процентах от цены.
Выбор типа тейк-профита: фиксированный (по соотношению риск/прибыль) или динамический (следующий уровень).
Параметры паттернов (например, минимальная длина тени для пин-бара).
Режимы отображения:
Минималистичный: Только уровни и сигналы для входа.
Расширенный: Дополнительная информация, включая визуализацию стоп-лосса, тейк-профита и выделение паттернов.
Кому подойдет этот индикатор?
Этот индикатор полезен для:
Трейдеров, которые торгуют от уровней поддержки и сопротивления.
Любителей паттернов Price Action.
Начинающих и опытных трейдеров, желающих автоматизировать поиск точек входа.
Как использовать?
Настройте параметры индикатора (период анализа, стиль уровней, параметры стоп-лосса и тейк-профита).
Следите за сигналами на покупку и продажу, которые отображаются стрелками и метками на графике.
Используйте рекомендуемые уровни стоп-лосса и тейк-профита для управления рисками.
Примечание
Индикатор не является торговой стратегией. Перед использованием обязательно протестируйте его на исторических данных и применяйте в сочетании с другими инструментами анализа.
//@version=6
indicator("Support and Resistance Trading Indicator", overlay=true)
// === Входные параметры ===
period = input.int(20, title="Период для расчета уровней")
support_color = input.color(color.green, title="Цвет уровня поддержки")
resistance_color = input.color(color.red, title="Цвет уровня сопротивления")
line_style = input.string("solid", title="Стиль линий", options= )
show_patterns = input.bool(true, title="Отображать паттерны на графике")
stop_loss_percent = input.float(1.0, title="Стоп-лосс (%)", step=0.1)
risk_reward_ratio = input.float(2.0, title="Соотношение риск/прибыль")
pattern_min_shadow = input.float(2.0, title="Мин. длина тени для пин-бара (%)")
mode = input.string("expanded", title="Режим отображения", options= )
// === Расчет уровней поддержки и сопротивления ===
var support_levels = array.new_float(0)
var resistance_levels = array.new_float(0)
highest_high = ta.highest(high, period)
lowest_low = ta.lowest(low, period)
is_support = low == lowest_low
is_resistance = high == highest_high
if is_support
array.push(support_levels, low)
if is_resistance
array.push(resistance_levels, high)
// Удаление старых уровней для оптимизации
if array.size(support_levels) > 10
array.shift(support_levels)
if array.size(resistance_levels) > 10
array.shift(resistance_levels)
// === Функция для отрисовки линий ===
draw_levels(levels, color, style) =>
for i = 0 to array.size(levels) - 1
line.new(x1=bar_index ,
x2=bar_index + period,
y1=array.get(levels, i),
y2=array.get(levels, i),
color=color, width=1, style=style)
// Отрисовка уровней
draw_levels(support_levels, support_color, line_style)
draw_levels(resistance_levels, resistance_color, line_style)
// === Проверка паттернов ===
is_pinbar_bullish = (close > open) and ((low / close) * 100 > pattern_min_shadow)
is_engulfing_bullish = close < open and close > open and close > open
is_pinbar_bearish = (close < open) and ((high / close) * 100 > pattern_min_shadow)
is_engulfing_bearish = close > open and close < open and close < open
is_volume_high = volume > ta.sma(volume, period)
// Сигналы для покупки и продажи
buy_signal = is_support and (is_pinbar_bullish or is_engulfing_bullish) and is_volume_high
sell_signal = is_resistance and (is_pinbar_bearish or is_engulfing_bearish) and is_volume_high
// === Отображение сигналов на графике ===
if buy_signal
label.new(bar_index, low,
str.tostring(close, "#.##") + " BUY",
style=label.style_label_up,
color=color.green,
textcolor=color.white)
if sell_signal
label.new(bar_index, high,
str.tostring(close, "#.##") + " SELL",
style=label.style_label_down,
color=color.red,
textcolor=color.white)
// === Расчет стоп-лосса и тейк-профита ===
stop_loss = buy_signal ? low * (1 - stop_loss_percent / 100) : sell_signal ? high * (1 + stop_loss_percent / 100) : na
take_profit = buy_signal ? close + (close - stop_loss) * risk_reward_ratio : sell_signal ? close - (stop_loss - close) * risk_reward_ratio : na
// Отображение стоп-лосса с ценой
if not na(stop_loss)
label.new(bar_index, stop_loss,
"SL: " + str.tostring(stop_loss, "#.##"),
style=label.style_label_left,
color=color.orange,
textcolor=color.black)
// === Визуализация сигналов через цветные линии ===
plotshape(series=buy_signal, style=shape.triangleup, location=location.belowbar, color=color.new(color.green, 0), size=size.small)
plotshape(series=sell_signal, style=shape.triangledown, location=location.abovebar, color=color.new(color.red, 0), size=size.small)
// === Дополнительное отображение ===
plot(stop_loss, title="Stop Loss", color=color.orange, style=plot.style_circles)
plot(take_profit, title="Take Profit", color=color.blue, style=plot.style_circles)
sajjad jamshidi Support The Bull Market Support Band Strategy is a trend-following strategy that leverages the relationship between two moving averages: the Simple Moving Average (SMA) and the Exponential Moving Average (EMA). This strategy aims to capture long positions in a bullish market when the EMA crosses above the SMA, signaling an upward trend, and to exit positions when the EMA crosses below the SMA, indicating a bearish reversal. The strategy is designed to operate on a weekly timeframe.
FRACTAL ACADEMY - GOLD - MORNING ZONEThis indicator is designed to identify key price zones (Golden Zone) and analyze market structures based on the fractal strategy. It highlights the most critical price ranges during the morning session, helping traders identify maximum and minimum price levels and essential trends.
Key Features:
Fractal-Based Zones: Identifies and visualizes fractal price zones for better market analysis.
Maximum and Minimum Levels: Tracks and displays the high and low points within the session for precise trading decisions.
Customizable Settings: Allows users to personalize the visual appearance and functionality of the indicator.
Daily Dividers: Highlights daily separations to organize market data clearly.
This indicator is a powerful tool for professional traders who want to leverage fractal strategies in the gold market, particularly in the morning trading session.
Consecutive Candles DevisSoHi Traders !!!
Level Calculation:
50% and 23.6% Fibonacci levels are calculated based on the open and close of the previous candles.
Consecutive Candle Check:
For an uptrend: Each candle's low must not touch the 50% levels of the previous candles.
For a downtrend: Each candle's high must not touch the 50% levels of the previous candles.
Pullback Level:
When a long signal is triggered, the current candle's low is recorded as a pullback level.
When a short signal is triggered, the current candle's high is recorded as a pullback level.
Breakout and Signal Generation:
If the price breaks above the calculated level, a long signal is generated; if it breaks below, a short signal is generated.
These signals are visualized on the chart.
Continuity:
The system checks the last signal to ensure the validity of new signals, maintaining the consistency of consecutive signals.
Relative StrengthThis strategy employs a custom "strength" function to assess the relative strength of a user-defined source (e.g., closing price, moving average) compared to its historical performance over various timeframes (8, 34, 20, 50, and 200 periods). The strength is calculated as a percentage change from an Exponential Moving Average (EMA) for shorter timeframes and a Simple Moving Average (SMA) for longer timeframes. Weights are then assigned to each timeframe based on a logarithmic scale, and a weighted average strength is computed.
Key Features:
Strength Calculation:
Calculates the relative strength of the source using EMAs and SMAs over various timeframes.
Assigns weights to each timeframe based on a logarithmic scale, emphasizing shorter timeframes.
Calculates a weighted average strength for a comprehensive view.
Visualizations:
Plots the calculated strength as a line, colored green for positive strength and red for negative strength.
Fills the background area below the line with green for positive strength and red for negative strength, enhancing visualization.
Comparative Analysis:
Optionally displays the strength of Bitcoin (BTC), Ethereum (ETH), S&P 500, Nasdaq, and Dow Jones Industrial Average (DJI) for comparison with the main source strength.
Backtesting:
Allows users to specify a start and end time for backtesting the strategy's performance.
Trading Signals:
Generates buy signals when the strength turns positive from negative and vice versa for sell signals.
Entry and exit are conditional on the backtesting time range.
Basic buy and sell signal plots are commented out (can be uncommented for visual representation).
Risk Management:
Closes all open positions and cancels pending orders outside the backtesting time range.
Disclaimer:
Backtesting results do not guarantee future performance. This strategy is for educational purposes only and should be thoroughly tested and refined before risking capital.
Additional Notes:
- The strategy uses a custom "strength" function that can be further customized to explore different timeframes and weighting schemes.
- Consider incorporating additional technical indicators or filters to refine the entry and exit signals.
- Backtesting with different parameters and market conditions is crucial for evaluating the strategy's robustness.
Levels Strength Index [BigBeluga]Levels Strength Index provides a unique perspective on market strength by comparing price positions relative to predefined levels, delivering a dynamic probability-based outlook for potential up and down moves.
🔵 Idea:
The Levels Strength Index analyzes the price position against a series of calculated levels, assigning probabilities for upward and downward movements. These probabilities are displayed in percentage form, providing actionable insights into market momentum and strength. The color-coded display visually reinforces whether the price is predominantly above or below key levels, simplifying trend analysis.
🔵 Key Features:
Dynamic Probability Calculation: The indicator compares the current price position relative to 10 predefined levels, assigning an "Up" and "Down" percentage. For example, if the price is above 8 levels, it will display 80% upward and 20% downward probabilities.
Color-Coded Trend Visualization: When the price is above the majority of levels, the display turns green, signaling strength. Conversely, when below, it shifts to orange, reflecting bearish momentum.
Clear Up/Down Probability Labels: Probabilities are displayed with directional arrows next to the price, instantly showing the likelihood of upward or downward moves.
Probability-Based Price Line: The price line is color-coded based on the probability percentages, allowing a quick glance at the prevailing trend and market strength. This can be toggled in the settings.
Customizable Transparency: Adjust the transparency of the levels to seamlessly integrate the indicator with your preferred chart setup.
Fully Configurable: Control key parameters such as the length of levels and price color mode (trend, neutral, or none) through intuitive settings.
🔵 When to Use:
The Levels Strength Index is ideal for traders looking to:
Identify strong upward or downward market momentum using quantified probabilities.
Visualize price strength relative to key levels with intuitive color coding.
Supplement existing level-based strategies by combining probabilities and market positioning.
Gain instant clarity on potential market moves with percentage-based insights.
Whether you're trading trends or ranges, this tool enhances decision-making by combining level-based analysis with a dynamic probability system, offering a clear, actionable perspective on market behavior.
Compare TOTAL, TOTAL2, TOTAL3, and OTHERSCompare TOTAL, TOTAL2, TOTAL3, and OTHERS
This indicator compares the performance of major cryptocurrency market cap indices: TOTAL, TOTAL2, TOTAL3, and OTHERS. It normalizes each index's performance relative to its starting value and visualizes their relative changes over time.
Features
- Normalized Performance: Tracks the percentage change of each index from its initial value.
- Customizable Timeframe: Allows users to select a base timeframe for the data (e.g., daily, weekly).
- Dynamic Labels: Displays the latest performance of each index as a label on the chart, aligned to the right of the corresponding line for easy comparison.
- Color-Coded Lines: Each index is assigned a distinct color for clear differentiation:
-- TOTAL (Blue): Represents the total cryptocurrency market cap.
-- TOTAL2 (Green): Excludes Bitcoin.
-- TOTAL3 (Orange): Excludes Bitcoin and Ethereum.
-- OTHERS (Red): Represents all cryptocurrencies excluding the top 10 by market cap.
- Baseline Reference: Includes a horizontal line at 0% for reference.
Use Cases:
- Market Trends: Identify which segments of the cryptocurrency market are outperforming or underperforming over time.
- Portfolio Insights: Assess the impact of Bitcoin and Ethereum dominance on the broader market.
- Market Analysis: Compare smaller-cap coins (OTHERS) with broader indices (TOTAL, TOTAL2, and TOTAL3).
This script is ideal for traders and analysts who want a quick, visual way to track how different segments of the cryptocurrency market perform relative to each other over time.
Note: The performance is normalized to highlight percentage changes, not absolute values.
Santa's Adventure [AlgoAlpha]Introducing "Santa's Adventure," a unique and festive TradingView indicator designed to bring the holiday spirit to your trading charts. With this indicator, watch as Santa, his sleigh, Rudolf the reindeer, and a flurry of snowflakes come to life, creating a cheerful visual experience while you monitor the markets.
Key Features:
🎁 Dynamic Santa Sleigh Visualization : Santa's sleigh, Rudolf, and holiday presents adapt to price movements and chart structure.
🎨 Customizable Holiday Colors : Adjust colors for Santa’s outfit, Rudolf’s nose, sleigh, presents, and more.
❄️ Realistic Snow Animation : A cascade of snowflakes decorates your charts, with density and range adjustable to suit your preferences.
📏 Adaptive Scaling : All visuals scale based on price volatility and market dynamics.
🔄 Rotation by Trend : Santa and his entourage tilt to reflect market trends, making it both functional and fun!
How to Use :
Add the Indicator to Your Chart : Search for "Santa's Adventure" in the TradingView indicator library and add it to your favorites. Use the input menu to adjust snow density, sleigh colors, and other festive elements to match your trading style or holiday mood.
Observe the Market : Watch Santa’s sleigh glide across the chart while Rudolf leads the way, with snowflakes gently falling to enhance the visual charm.
How It Works :
The indicator uses price volatility and market data to dynamically position Santa, his sleigh, Rudolf, and presents on the chart. Santa's Sleigh angle adjusts based on price trends, reflecting market direction. Santa's sleigh and the snowstorm are plotted using advanced polyline arrays for a smooth and interactive display. A festive algorithm powers the snowfall animation, ensuring a consistent and immersive holiday atmosphere. The visuals are built to adapt seamlessly to any market environment, combining holiday cheer with market insights.
Add "Santa's Adventure" to your TradingView charts today and bring the holiday spirit to your trading journey, Merry Christmas! 🎅🎄
Brijesh TTrades candle plot"Brijesh TTrades candle plot" is a powerful and customizable indicator that allows you to overlay higher timeframe candles directly on your chart. Choose your desired timeframe (e.g., Daily, Hourly) and plot up to 10 recent candles with precise control over color, wick style, and width. The candles are offset by 40 bars to the right, providing a clear and unobstructed view of the current price action. Ideal for multi-timeframe analysis and gaining deeper insights into market trends.
Intelligent Support & Resistance Lines (MTF)This script automatically detects and updates key Support & Resistance (S/R) levels using a higher timeframe (MTF) approach. By leveraging volume confirmation, levels are only identified when significant volume (relative to the SMA of volume) appears. Each level is drawn horizontally in real time, and whenever the market breaks above a resistance level (and retests it), the script automatically converts that resistance into support. The opposite occurs if the market breaks below a support level.
Key Features:
Multi-Timeframe (MTF) Data
Select a higher timeframe for more robust S/R calculations.
The script fetches High, Low, Volume, and SMA of Volume from the chosen timeframe.
Automatic Role Reversal
Resistance becomes Support if a breakout retest occurs.
Support becomes Resistance if a breakdown retest occurs.
Dynamic Line Width & Labeling
Each S/R line’s thickness increases with additional touches, making frequently tested levels easier to spot.
Labels automatically display the number of touches (e.g., “R 3” or “S 2”) and can have adjustable text size.
Volume Threshold
Only significant pivots (where volume exceeds a specified multiplier of average volume) are plotted, reducing noise.
Horizontal Offset for Clarity
Lines are drawn with timestamps instead of bar_index, ensuring that old levels remain visible without chart limitations.
Adjustable Maximum Levels
Maintain a clean chart by limiting how many S/R lines remain at once.
How It Works:
Pivot Detection: The script identifies swing highs and lows from the higher timeframe (timeframeSR).
Volume Check: Only pivots with volume ≥ (SMA Volume * volumeThreshold) qualify.
Line Creation & Updates: New lines are drawn at these pivots, labeled “R #” or “S #,” indicating how many times they’ve been touched.
Role Reversal: If price breaks above a resistance and retests it from above, that line is removed from the resistance array and re-created in the support array (and vice versa).
Inputs:
Timeframe for S/R: Choose the higher timeframe for S/R calculations.
Swing Length: Number of bars to consider in a pivot calculation.
Minimum Touches: Minimum required touches before drawing or updating a level.
Volume Threshold (Multiplier): Determines how much volume (relative to SMA) is needed to confirm a pivot.
Maximum Number of Levels: Caps how many S/R lines can be shown at once.
Color for Resistance & Color for Support: Customize your preferred colors for lines and labels.
Label Size: Select from "tiny", "small", "normal", "large", or "huge" to resize the labels.
Disclaimer:
This script is intended for educational purposes and should not be interpreted as financial or investment advice. Always conduct your own research or consult a qualified professional before making trading decisions.
MA Deviation Suite [InvestorUnknown]This indicator combines advanced moving average techniques with multiple deviation metrics to offer traders a versatile tool for analyzing market trends and volatility.
Moving Average Types :
SMA, EMA, HMA, DEMA, FRAMA, VWMA: Standard moving averages with different characteristics for smoothing price data.
Corrective MA: This method corrects the MA by considering the variance, providing a more responsive average to price changes.
f_cma(float src, simple int length) =>
ma = ta.sma(src, length)
v1 = ta.variance(src, length)
v2 = math.pow(nz(ma , ma) - ma, 2)
v3 = v1 == 0 or v2 == 0 ? 1 : v2 / (v1 + v2)
var tolerance = math.pow(10, -5)
float err = 1
// Gain Factor
float kPrev = 1
float k = 1
for i = 0 to 5000 by 1
if err > tolerance
k := v3 * kPrev * (2 - kPrev)
err := kPrev - k
kPrev := k
kPrev
ma := nz(ma , src) + k * (ma - nz(ma , src))
Fisher Least Squares MA: Aims to reduce lag by using a Fisher Transform on residuals.
f_flsma(float src, simple int len) =>
ma = src
e = ta.sma(math.abs(src - nz(ma )), len)
z = ta.sma(src - nz(ma , src), len) / e
r = (math.exp(2 * z) - 1) / (math.exp(2 * z) + 1)
a = (bar_index - ta.sma(bar_index, len)) / ta.stdev(bar_index, len) * r
ma := ta.sma(src, len) + a * ta.stdev(src, len)
Sine-Weighted MA & Cosine-Weighted MA: These give more weight to middle bars, creating a smoother curve; Cosine weights are shifted for a different focus.
Deviation Metrics :
Average Absolute Deviation (AAD) and Median Absolute Deviation (MAD): AAD calculates the average of absolute deviations from the MA, offering a measure of volatility. MAD uses the median, which can be less sensitive to outliers.
Standard Deviation (StDev): Measures the dispersion of prices from the mean.
Average True Range (ATR): Reflects market volatility by considering the day's range.
Average Deviation (adev): The average of previous deviations.
// Calculate deviations
float aad = f_aad(src, dev_len, ma) * dev_mul
float mad = f_mad(src, dev_len, ma) * dev_mul
float stdev = ta.stdev(src, dev_len) * dev_mul
float atr = ta.atr(dev_len) * dev_mul
float avg_dev = math.avg(aad, mad, stdev, atr)
// Calculated Median with +dev and -dev
float aad_p = ma + aad
float aad_m = ma - aad
float mad_p = ma + mad
float mad_m = ma - mad
float stdev_p = ma + stdev
float stdev_m = ma - stdev
float atr_p = ma + atr
float atr_m = ma - atr
float adev_p = ma + avg_dev
float adev_m = ma - avg_dev
// upper and lower
float upper = f_max4(aad_p, mad_p, stdev_p, atr_p)
float upper2 = f_min4(aad_p, mad_p, stdev_p, atr_p)
float lower = f_min4(aad_m, mad_m, stdev_m, atr_m)
float lower2 = f_max4(aad_m, mad_m, stdev_m, atr_m)
Determining Trend
The indicator generates trend signals by assessing where price stands relative to these deviation-based lines. It assigns a trend score by summing individual signals from each deviation measure. For instance, if price crosses above the MAD-based upper line, it contributes a bullish point; crossing below an ATR-based lower line contributes a bearish point.
When the aggregated trend score crosses above zero, it suggests a shift towards a bullish environment; crossing below zero indicates a bearish bias.
// Define Trend scores
var int aad_t = 0
if ta.crossover(src, aad_p)
aad_t := 1
if ta.crossunder(src, aad_m)
aad_t := -1
var int mad_t = 0
if ta.crossover(src, mad_p)
mad_t := 1
if ta.crossunder(src, mad_m)
mad_t := -1
var int stdev_t = 0
if ta.crossover(src, stdev_p)
stdev_t := 1
if ta.crossunder(src, stdev_m)
stdev_t := -1
var int atr_t = 0
if ta.crossover(src, atr_p)
atr_t := 1
if ta.crossunder(src, atr_m)
atr_t := -1
var int adev_t = 0
if ta.crossover(src, adev_p)
adev_t := 1
if ta.crossunder(src, adev_m)
adev_t := -1
int upper_t = src > upper ? 3 : 0
int lower_t = src < lower ? 0 : -3
int upper2_t = src > upper2 ? 1 : 0
int lower2_t = src < lower2 ? 0 : -1
float trend = aad_t + mad_t + stdev_t + atr_t + adev_t + upper_t + lower_t + upper2_t + lower2_t
var float sig = 0
if ta.crossover(trend, 0)
sig := 1
else if ta.crossunder(trend, 0)
sig := -1
Backtesting and Performance Metrics
The code integrates with a backtesting library that allows traders to:
Evaluate the strategy historically
Compare the indicator’s signals with a simple buy-and-hold approach
Generate performance metrics (e.g., mean returns, Sharpe Ratio, Sortino Ratio) to assess historical effectiveness.
Practical Usage and Calibration
Default settings are not optimized: The given parameters serve as a starting point for demonstration. Users should adjust:
len: Affects how smooth and lagging the moving average is.
dev_len and dev_mul: Influence the sensitivity of the deviation measures. Larger multipliers widen the bands, potentially reducing false signals but introducing more lag. Smaller multipliers tighten the bands, producing quicker signals but potentially more whipsaws.
This flexibility allows the trader to tailor the indicator for various markets (stocks, forex, crypto) and time frames.
Disclaimer
No guaranteed results: Historical performance does not guarantee future outcomes. Market conditions can vary widely.
User responsibility: Traders should combine this indicator with other forms of analysis, appropriate risk management, and careful calibration of parameters.
RSI Divergence + Sweep + Signal + Alerts Toolkit [TrendX_]The RSI Toolkit is a powerful set of tools designed to enhance the functionality of the traditional Relative Strength Index (RSI) indicator. By integrating advanced features such as Moving Averages, Divergences, and Sweeps, it helps traders identify key market dynamics, potential reversals, and newly-approach trading stragies.
The toolkit expands on standard RSI usage by incorporating features from smart money concepts (Just try to be creative 🤣 Hope you like it), providing a deeper understanding of momentum, liquidity sweeps, and trend reversals. It is suitable for RSI traders who want to make more informed and effective trading decisions.
💎 FEATURES
RSI Moving Average
The RSI Moving Average (RSI MA) is the moving average of the RSI itself. It can be customized to use various types of moving averages, including Simple Moving Average (SMA), Exponential Moving Average (EMA), Relative Moving Average (RMA), and Volume-Weighted Moving Average (VWMA).
The RSI MA smooths out the RSI fluctuations, making it easier to identify trends and crossovers. It helps traders spot momentum shifts and potential entry/exit points by observing when the RSI crosses above or below its moving average.
RSI Divergence
RSI Divergence identifies discrepancies between price action and RSI momentum. There are two types of divergences: Regular Divergence - Indicates a potential trend reversal; Hidden Divergence - Suggests the continuation of the current trend.
Divergence is a critical signal for spotting weakness or strength in a trend. Regular divergence highlights potential trend reversals, while hidden divergence confirms trend continuation, offering traders valuable insights into market momentum and possible trade setups.
RSI Sweep
RSI Sweep detects moments when the RSI removes liquidity from a trend structure by sweeping above or below the price at key momentum level crossing. These sweeps are overlaid on the RSI chart for easier visualized.
RSI Sweeps are significant because they indicate potential turning points in the market. When RSI sweeps occur: In an uptrend - they suggest buyers' momentum has peaked, possibly leading to a reversal; In a downtrend - they indicate sellers’ momentum has peaked, also hinting at a reversal.
(Note: This feature incorporates Liquidity Sweep concepts from Smart Money Concepts into RSI analysis, helping RSI traders identify areas where liquidity has been removed, which often precedes a trend reversal)
🔎 BREAKDOWN
RSI Moving Average
How MA created: The RSI value is calculated first using the standard RSI formula. The MA is then applied to the RSI values using the trader’s chosen type of MA (SMA, EMA, RMA, or VWMA). The flexibility to choose the type of MA allows traders to adjust the smoothing effect based on their trading style.
Why use MA: RSI by itself can be noisy and difficult to interpret in volatile markets. Applying moving average would provide a smoother, more reliable view of RSI trends.
RSI Divergence
How Regular Divergence created: Regular Divergence is detected when price forms HIGHER highs while RSI forms LOWER highs (bearish divergence) or when price forms LOWER lows while RSI forms HIGHER lows (bullish divergence).
How Hidden Divergence created: Hidden Divergence is identified when price forms HIGHER lows while RSI forms LOWER lows (bullish hidden divergence) or when price forms LOWER highs while RSI forms HIGHER highs (bearish hidden divergence).
Why use Divergence: Divergences provide early warning signals of a potential trend change. Regular divergence helps traders anticipate reversals, while hidden divergence supports trend continuation, enabling traders to align their trades with market momentum.
RSI Sweep
How Sweep created: Trend Structure Shift are identified based on the RSI crossing key momentum level of 50. To track these sweeps, the indicator pinpoints moments when liquidity is removed from the Trend Structure Shift. This is a direct application of Liquidity Sweep concepts used in Smart Money theories, adapted to RSI.
Why use Sweep: RSI Sweeps are created to help traders detect potential trend reversals. By identifying areas where momentum has exhausted during a certain trend direction, the indicator highlights opportunities for traders to enter trades early in a reversal or continuation phase.
⚙️ USAGES
Divergence + Sweep
This is an example of combining Devergence & Sweep in BTCUSDT (1 hour)
Wait for a divergence (regular or hidden) to form on the RSI. After the divergence is complete, look for a sweep to occur. A potential entry might be formed at the end of the sweep.
Divergences indicate a potential trend change, but confirmation is required to ensure the setup is valid. The RSI Sweep provides that confirmation by signaling a liquidity event, increasing the likelihood of a successful trade.
Sweep + MA Cross
This is an example of combining Devergence & Sweep in BTCUSDT (1 hour)
Wait for an RSI Sweep to form then a potential entry might be formed when the RSI crosses its MA.
The RSI Sweep highlights a potential turning point in the market. The MA cross serves as additional confirmation that momentum has shifted, providing a more reliable and more potential entry signal for trend continuations.
DISCLAIMER
This indicator is not financial advice, it can only help traders make better decisions. There are many factors and uncertainties that can affect the outcome of any endeavor, and no one can guarantee or predict with certainty what will occur. Therefore, one should always exercise caution and judgment when making decisions based on past performance.
HPDR Bands IndicatorThe HPDR Bands indicator is a customizable tool designed to help traders visualize dynamic price action zones. By combining historical price ranges with adaptive bands, this script provides clear insights into potential support, resistance, and midline levels. The indicator is well-suited for all trading styles, including trend-following and range-bound strategies.
Features:
Dynamic Price Bands: Calculates price zones based on historical highs and lows, blending long-term and short-term price data for responsive adaptation to current market conditions.
Probability Enhancements: Includes a probability plot derived from the relative position of the closing price within the range, adjusted for volatility to highlight potential price movement scenarios.
Fibonacci-Like Levels: Highlights key levels (100%, 95%, 88%, 78%, 61%, 50%, and 38%) for intuitive visualization of price zones, aiding in identifying high-probability trading opportunities.
Midline Visualization: Displays a midline that serves as a reference for price mean reversion or breakout analysis.
How to Use:
Trending Markets: Use the adaptive upper and lower bands to gauge potential breakout or retracement zones.
Range-Bound Markets: Identify support and resistance levels within the defined price range.
Volatility Analysis: Observe the probability plot and its sensitivity to volatility for informed decision-making.
Important Notes:
This script is not intended as investment advice. It is a tool to assist with market analysis and should be used alongside proper risk management and other trading tools.
The script is provided as-is and without warranty. Users are encouraged to backtest and validate its suitability for their specific trading needs.
Happy Trading!
If you find this script helpful, consider sharing your feedback or suggestions for improvement. Collaboration strengthens the TradingView community, and your input is always appreciated!
Awesome Oscillator Twin Peaks Strategy
1. The indicator identifies both bullish and bearish twin peaks:
- Bullish: Two consecutive valleys below zero, where the second valley is higher than the first
- Bearish: Two consecutive peaks above zero, where the second peak is lower than the first
2. Visual elements:
- AO histogram with color-coding for increasing/decreasing values
- Triangle markers for confirmed twin peak signals
- Zero line for reference
- Customizable colors through inputs
3. Built-in safeguards:
- Minimum separation between peaks to avoid false signals
- Maximum time window for pattern completion
- Clear signal reset conditions
4. Alert conditions for both bullish and bearish signals
To use this indicator:
1. Add it to your TradingView chart
2. Customize the input parameters if needed
3. Look for triangle markers that indicate confirmed twin peak patterns
4. Optional: Set up alerts based on the signal conditions
Ichimoku ACE ClubA. Overview:
This script is a custom implementation of the Ichimoku Cloud indicator for the TradingView platform, built using Pine Script version 4. It adds additional features like custom "Knife" lines and circle markers for specific data points. The indicator overlays on the chart and plots various elements of the Ichimoku system, including the Tenkan, Kijun, Chikou, and Kumo Cloud.
B. Inputs:
1. Tenkan (TS): This is the short-term moving average line (default period: 9).
2. Kijun (KJ): This is the medium-term moving average line (default period: 17).
3. Knife1 (K1): This line is based on a longer-term moving average (default period: 65).
4. Knife2 (K2): Another long-term moving average line (default period: 129).
5. Chikou Displacement (Chikou_Disp): The Chikou Span is plotted with a delay of 26 periods by default.
6. Displacement (disp): Determines the horizontal shift of the Kumo cloud.
C. Functions:
- `donchian(len)`: This function calculates the Donchian channel, which is the average of the highest high and the lowest low over the given period (len).
- `mf(len, offset)`: This function calculates the highest high and the lowest low over the given period, with an offset applied.
D. Plots:
1. Tenkan, Kijun, Knife1, and Knife2: These are plotted as lines with different colors and thicknesses.
- Tenkan is blue.
- Kijun is red.
- Knife1 is yellow.
- Knife2 is orange.
2. Chikou Span: This is plotted with a displacement and shown in purple.
3. Kumo Cloud: The cloud is formed by plotting two lines, Span A (green) and Span B (magenta), which represent the top and bottom of the cloud, respectively. The space between these lines is filled with a semi-transparent color, either green or magenta, depending on the relative position of the two spans.
E. Circle Markers:
- Additional circle markers are plotted for each of the Tenkan, Kijun, Knife1, and Knife2 lines at various offsets, helping to visualize the historical data points for each of these indicators. These circles are color-coded according to the line they correspond to.
F. Customization:
- The indicator allows customization of the lengths (periods) for Tenkan, Kijun, Knife1, Knife2, and other components via the script's input fields.
G. Conclusion:
This Ichimoku-based indicator provides a detailed view of the market's trend strength and direction. It offers a unique addition with the Knife lines and visual aids like circle markers for specific periods, which helps traders make better-informed decisions based on Ichimoku analysis.
---
You can modify the parameters such as `TS`, `KJ`, `K1`, `K2`, and `disp` according to your trading preferences. The colors and line thicknesses can also be adjusted for better visual representation.
Trend Battery [Phantom]Trend Battery
Visualize Trend Strength with a Dynamic EMA Power Gauge
OVERVIEW
The Trend Battery indicator offers a clear, visual representation of trend strength based on the alignment of multiple Exponential Moving Averages (EMAs). It assigns a color-coded score to each bar, helping traders quickly assess the prevailing trend's power and direction.
CONCEPT
• Trend Strength Using EMAs: The indicator analyzes the alignment of 20 EMAs (8 to 200 periods) to gauge trend strength. The more EMAs align, the stronger the trend.
• Gradient-Based Visualization: Scores are mapped to a color gradient, transitioning from green (bullish) to purple (bearish), providing an intuitive visual representation of trend momentum.
HOW IT WORKS
Trend Battery calculates 20 EMAs and evaluates their alignment. When EMAs align in a strong trend, the bar colors change (as displayed in battery color key on chart) displaying a spectrum of colors from bright green (strong uptrend) to deep purple (strong downtrend).
• Dynamic Bar Colors:
o Green hues: Strong bullish trends.
o Purple hues: Strong bearish trends.
o Red hues: Weaker trends or potential transitions.
FEATURES
• Dynamic Color Coding: Easy-to-read and instantly assess trend.
• Customizable Transparency: Adjust bar color opacity to your preference.
• Optional EMA Display: Toggle individual EMA lines on/off for additional context.
• Compact Battery View: Quick reference table displaying the gradient color mapping.
SETTINGS
• Transparency: Controls the opacity of bar colors.
• Show EMAs on Chart: Enables/disables plotting of EMA lines.
USAGE
• Identify trend strength and direction.
• Confirm trend reversals or continuations.
• Complement other indicators and strategies.
• Monitor multi-timeframe trends.
TRADE IDEAS:
• For larger timeframes purple hues can be used for accumulating and green hues for distribution.
• For smaller timeframes, color transitions could be a signal for trend reversal, or corrections.
• It is a good idea to use larger timeframes for overall trend directions, and smaller timeframes for entries.
LIMITATIONS
• Lagging Indicator: As the Trend Battery relies on Exponential Moving Averages (EMAs), it is inherently a lagging indicator. This means it reflects past price action and may not always provide timely signals for rapid market changes or sudden reversals.
• False Signals in Sideways Markets: In ranging or consolidating markets, the indicator may produce mixed signals (frequent color changes) as EMAs intertwine without a clear trend. This can lead to false interpretations if not considered alongside other market context indicators.
• Not a Standalone System: The Trend Battery is designed to be a visual aid and should not be used as the sole basis for trading decisions. It's most effective when combined with other technical analysis tools, such as oscillators, support/resistance levels, and fundamental analysis.
DISCLAIMER
Use the Trend Battery indicator in conjunction with other forms of analysis and risk management. Past performance is not indicative of future results.
Bitcoin Premium [SAKANE]Overview
"Bitcoin Premium " is an indicator designed to analyze the price differences (premiums) of Bitcoin between major exchanges. By using this tool, you can visualize these differences and trends across exchanges, helping you make more informed trading decisions.
Features
1. Premium Calculation and Display
- Calculates and visualizes the price differences between major exchanges like Coinbase, Bitfinex, Upbit, and Binance.
- Premiums are displayed in a histogram format for intuitive analysis.
2. Forex Rate Adjustment
- Prices quoted in KRW (e.g., from Upbit) are converted to USD using real-time KRW/USD forex rates.
3. Moving Average Option
- Displays moving averages (SMA or EMA) of premiums for a clearer view of long-term trends.
4. Customizable Settings
- Toggle the premium display for each exchange on or off.
- Includes label displays to support visual analysis.
What Can It Do for You?
1. Identify Arbitrage Opportunities
By observing price differences (premiums) between exchanges, you can identify arbitrage opportunities.
Example: If Bitcoin is cheaper on Binance and more expensive on Coinbase, you could buy on Binance and sell on Coinbase to capture the price difference.
2. Understand Regional Supply and Demand Trends
Each exchange's premium reflects the supply and demand dynamics of its respective region.
Example: A high premium on Upbit may indicate excess demand or regulatory impacts in the South Korean market.
3. Analyze Liquidity
Price differences often highlight liquidity disparities between exchanges. Markets with lower trading volumes tend to have larger premiums due to price distortions.
4. Evaluate Macroeconomic Impacts
Premium movements may reflect changes in macroeconomic factors, such as exchange rates, regulations, or financial conditions specific to each region.
5. Analyze Trends and Market Sentiment
By tracking premium trends, you can gauge market sentiment and understand regional or exchange-specific behaviors to inform your investment decisions.
6. Support Strategic Trading
This tool is useful for short-term arbitrage strategies as well as long-term evaluations of market health.
Exchange Characteristics and Premium Implications
The meaning of premiums varies by exchange.
- Coinbase (US Market)
Primarily used by investors buying directly with fiat currency (USD). A higher premium often signals bullish sentiment among institutional and retail investors.
- Bitfinex (Global Market)
A trader-focused exchange with active large-scale and leveraged trading. Premiums may reflect liquidity and risk appetite.
- Upbit (South Korean Market)
Priced in KRW, making it subject to forex rates and local market dynamics. High premiums may indicate strong demand or regulatory influences in South Korea.
- Binance (Global Market)
The largest exchange by trading volume. Premiums here are often a reflection of the overall market balance.
Notes
- This indicator is for reference only and does not guarantee trading decisions.
- Please consider the characteristics and conditions of each exchange when using this tool.