kurd fx Dynamic EMA StrategyDynamic EMA Strategy Explanation
This TradingView Pine Script indicator, "Dynamic EMA Strategy," is designed to plot Exponential Moving Averages (EMAs) dynamically based on the selected timeframe. It adjusts the EMA periods depending on whether the trader is scalping, swing trading, or position trading.
Functionality
1. Defining EMA Periods Based on Timeframe
The script determines appropriate EMA values based on the selected chart timeframe:
Scalping (1m, 3m, 5m)
Uses EMA 9, EMA 21, and EMA 50 for fast-moving market conditions.
Swing Trading (15m, 30m, 45m)
Uses EMA 50 and EMA 100, suitable for medium-term trend identification.
EMA 3 is disabled (na) in this mode.
Position Trading (1H and higher)
Uses EMA 100 and EMA 200 to identify long-term trends.
EMA 3 is disabled (na) in this mode.
2. EMA Calculation
The script calculates EMA values dynamically:
emaLine1 = ta.ema(close, ema1): Computes the first EMA.
emaLine2 = ta.ema(close, ema2): Computes the second EMA.
emaLine3 = not na(ema3) ? ta.ema(close, ema3) : na: Computes the third EMA only if applicable.
3. Plotting the EMAs
The script overlays the EMAs on the chart:
Blue Line (EMA 1) → Represents the fastest EMA.
Orange Line (EMA 2) → Represents the medium EMA.
Red Line (EMA 3) → Represents the slowest EMA (if applicable).
Each EMA is plotted using plot() with a specific color, linewidth of 2, and plot.style_line for a clean visualization.
Use Case
Scalpers can identify short-term momentum changes.
Swing traders can detect medium-term trends.
Position traders can spot long-term market trends.
This strategy helps traders adjust their EMA settings dynamically without manually changing them for different timeframes.
Scalping
Multi-Indicator Signals with Selectable Options by DiGetMulti-Indicator Signals with Selectable Options
Script Overview
This Pine Script is a multi-indicator trading strategy designed to generate buy/sell signals based on combinations of popular technical indicators: RSI (Relative Strength Index) , CCI (Commodity Channel Index) , and Stochastic Oscillator . The script allows you to select which combination of signals to display, making it highly customizable and adaptable to different trading styles.
The primary goal of this script is to provide clear and actionable entry/exit points by visualizing buy/sell signals with arrows , labels , and vertical lines directly on the chart. It also includes input validation, dynamic signal plotting, and clutter-free line management to ensure a clean and professional user experience.
Key Features
1. Customizable Signal Types
You can choose from five signal types:
RSI & CCI : Combines RSI and CCI signals for confirmation.
RSI & Stochastic : Combines RSI and Stochastic signals.
CCI & Stochastic : Combines CCI and Stochastic signals.
RSI & CCI & Stochastic : Requires all three indicators to align for a signal.
All Signals : Displays individual signals from each indicator separately.
This flexibility allows you to test and use the combination that works best for your trading strategy.
2. Clear Buy/Sell Indicators
Arrows : Buy signals are marked with upward arrows (green/lime/yellow) below the candles, while sell signals are marked with downward arrows (red/fuchsia/gray) above the candles.
Labels : Each signal is accompanied by a label ("BUY" or "SELL") near the arrow for clarity.
Vertical Lines : A vertical line is drawn at the exact bar where the signal occurs, extending from the low to the high of the candle. This ensures you can pinpoint the exact entry point without ambiguity.
3. Dynamic Overbought/Oversold Levels
You can customize the overbought and oversold levels for each indicator:
RSI: Default values are 70 (overbought) and 30 (oversold).
CCI: Default values are +100 (overbought) and -100 (oversold).
Stochastic: Default values are 80 (overbought) and 20 (oversold).
These levels can be adjusted to suit your trading preferences or market conditions.
4. Input Validation
The script includes built-in validation to ensure that oversold levels are always lower than overbought levels for each indicator. If the inputs are invalid, an error message will appear, preventing incorrect configurations.
5. Clean Chart Design
To avoid clutter, the script dynamically manages vertical lines:
Only the most recent 50 buy/sell lines are displayed. Older lines are automatically deleted to keep the chart clean.
Labels and arrows are placed strategically to avoid overlapping with candles.
6. ATR-Based Offset
The vertical lines and labels are offset using the Average True Range (ATR) to ensure they don’t overlap with the price action. This makes the signals easier to see, especially during volatile market conditions.
7. Scalable and Professional
The script uses arrays to manage multiple vertical lines, ensuring scalability and performance even when many signals are generated.
It adheres to Pine Script v6 standards, ensuring compatibility and reliability.
How It Works
Indicator Calculations :
The script calculates the values of RSI, CCI, and Stochastic Oscillator based on user-defined lengths and smoothing parameters.
It then checks for crossover/crossunder conditions relative to the overbought/oversold levels to generate individual signals.
Combined Signals :
Depending on the selected signal type, the script combines the individual signals logically:
For example, a "RSI & CCI" buy signal requires both RSI and CCI to cross into their respective oversold zones simultaneously.
Signal Plotting :
When a signal is generated, the script:
Plots an arrow (upward for buy, downward for sell) at the corresponding bar.
Adds a label ("BUY" or "SELL") near the arrow for clarity.
Draws a vertical line extending from the low to the high of the candle to mark the exact entry point.
Line Management :
To prevent clutter, the script stores up to 50 vertical lines in arrays (buy_lines and sell_lines). Older lines are automatically deleted when the limit is exceeded.
Why Use This Script?
Versatility : Whether you're a scalper, swing trader, or long-term investor, this script can be tailored to your needs by selecting the appropriate signal type and adjusting the indicator parameters.
Clarity : The combination of arrows, labels, and vertical lines ensures that signals are easy to spot and interpret, even in fast-moving markets.
Customization : With adjustable overbought/oversold levels and multiple signal options, you can fine-tune the script to match your trading strategy.
Professional Design : The script avoids clutter by limiting the number of lines displayed and using ATR-based offsets for better visibility.
How to Use This Script
Add the Script to Your Chart :
Copy and paste the script into the Pine Editor in TradingView.
Save and add it to your chart.
Select Signal Type :
Use the "Signal Type" dropdown menu to choose the combination of indicators you want to use.
Adjust Parameters :
Customize the lengths of RSI, CCI, and Stochastic, as well as their overbought/oversold levels, to match your trading preferences.
Interpret Signals :
Look for green arrows and "BUY" labels for buy signals, and red arrows and "SELL" labels for sell signals.
Vertical lines will help you identify the exact bar where the signal occurred.
Tips for Traders
Backtest Thoroughly : Before using this script in live trading, backtest it on historical data to ensure it aligns with your strategy.
Combine with Other Tools : While this script provides reliable signals, consider combining it with other tools like support/resistance levels or volume analysis for additional confirmation.
Avoid Overloading the Chart : If you notice too many signals, try tightening the overbought/oversold levels or switching to a combined signal type (e.g., "RSI & CCI & Stochastic") for fewer but higher-confidence signals.
Static price-range projection by symbolThis indicator shows you a predefined range to the right of the last candle of your chart. This range is custom and can be changed for a handful of symbols that you can choose. This scale will help you determining if the market is providing a reasonable range before you enter a trade or if the market isn't actually moving as much as you might think. This is particularly useful if you are into scalping and have to consider commission or spread in your trades.
Since all symbols have different price ranges in which they move this indicator doesn't make sense to just have "a one size fits all" approach. That's why you can choose up to 6 symbols and set the range that you want to have shown for each when you pull it up on the chart. Using my default values that means for when the NQ (Nasdaq future) is on the chart you will see a range of 20 handles projected. When you change the the ES (S&P500 future) you will instead see 5 handles. While the number is different that is somewhat of an equal move in both symbols.
There also is an option to set a default price range for all other symbols that are not selected if it is needed. However the display of the scale on anything else than the 6 selected symbols can also be turned off.
There are options provided on how exactly you want to indicator to determine if the chart symbol matches one of the selected symbols.
You can enable it to make sure the exchange/broker is the exact same as selected.
It can check for only the symbol root to match the selection. Specifically for futures this means that while ES1! might be selected, anything ES (ES1!, ES2!, ESH2025, ESM2025, ESM2022, ...) will be a match to the selection)
On the painted scale it is possible to not just show this range extended into each direction once. Per default you will have 3 segments of it in each direction. This can be reduced to just 1 or increased.
If you chose a high number of segments or a large range make sure to use the "Scale price chart only" option on your chart scale to not have the symbols price candles squished together by the charts auto scaling.
And last but not least the indicator options provide some possibilities to change the appearance of the printed price range scale in case you disagree with my design.
Price Action Trend and Margin EquityThe Price Action Trend and Margin Equity indicator is a multifunctional market analysis tool that combines elements of money management and price pattern analysis. The indicator helps traders identify key price action patterns and determine optimal entry, exit and stop loss levels based on the current trend.
The main components of the indicator:
Money Management:
Allows the trader to set risk management parameters such as the percentage of possible loss on the position, the use of fixed leverage and the total capital.
Calculates the required leverage level to achieve a specified percentage of loss.
Price Action:
Correctly identifies various price patterns such as Pin Bar, Engulfing Bar, PPR Bar and Inside Bar.
Displays these patterns on the chart with the ability to customize candle colors and display styles.
Allows the trader to customize take profit and stop loss points to display them on the chart.
The ability to display patterns only in the direction of the trend.
Trend: (some code taken from ChartPrime)
Uses a trend cloud to visualize the current market direction.
The trend cloud is displayed on the chart and helps traders determine whether the market is in an uptrend or a downtrend.
Alert:
Allows you to set an alert that will be triggered when the pattern is formed.
Example of use:
Let's say a trader uses the indicator to trade the crypto market. He sets the money management parameters, setting the maximum loss per position to 5% and using a fixed leverage of 1:100. The indicator automatically calculates the required position size to meet these parameters ($: on the label). Or displays the leverage (X: on the label) to achieve the required risk.
The trader receives an alert when a Pin Bar is formed. The indicator displays the entry, exit, and stop loss levels based on this pattern. The trader opens a position for the recommended amount in the direction indicated by the indicator and sets the stop loss and take profit at the recommended levels.
General Settings:
Position Loss Percentage: Sets the maximum loss percentage you are willing to take on a single position.
Use Fixed Leverage: Enables or disables the use of fixed leverage.
Fixed Leverage: Sets the fixed leverage level.
Total Equity: Specifies the total equity you are using for trading. (Required for calculation when using fixed leverage)
Turn Patterns On/Off: You can turn on or off the display of various price patterns such as Pin Bar, Outside Bar (Engulfing), Inside Bar, and PPR Bar.
Pattern Colors: Sets the colors for displaying each pattern on the chart.
Candle Color: Allows you to set a neutral color for candles that do not match the price action.
Show Lines: Allows you to turn on or off the display of labels and lines.
Line Length: Sets the length of the stop, entry, and take profit lines.
Label color: One color for all labels (configured below) or the color of the labels in the color of the candle pattern.
Pin entry: Select the entry point for the pin bar: candle head, bar close, or 50% of the candle.
Coefficients for stop and take lines.
Use trend for price action: When enabled, will show price action signals only in the direction of the trend.
Display trend cloud: Enables or disables the display of the trend cloud.
Cloud calculation period: Sets the period for which the maximum and minimum values for the cloud are calculated. The longer the period, the smoother the cloud will be.
Cloud colors: Sets the colors for uptrends and downtrends, as well as the transparency of the cloud.
The logic of the indicator:
Pin Bar is a candle with a long upper or lower shadow and a short body.
Logic: If the length of one shadow is twice the body and the opposite shadow of the candle, it is considered a Pin Bar.
An Inside Bar is a candle that is completely engulfed by the previous candle.
Logic: If the high and low of the current candle are inside the previous candle, it is an Inside Bar.
An Outside Bar or Engulfing is a candle that completely engulfs the previous candle.
Logic: If the high and low of the current candle are outside the previous candle and close outside the previous candle, it is an Outside Bar.
A PPR Bar is a candle that closes above or below the previous candle.
Logic: If the current candle closes above the high of the previous candle or below its low, it is a PPR Bar.
Stop Loss Levels: Calculated based on the specified ratios. If set to 1.0, it shows the correct stop for the pattern by pushing away from the entry point.
Take Profit Levels: Calculated based on the specified ratios.
Create a Label: The label is created at the stop loss level and contains information about the potential leverage and loss.
The formula for calculating the $ value is:
=(Total Capital x (Maximum Loss Percentage on Position/100)) / (Difference between Entry Level and Stop Loss Level × Ratio that sets the stop loss level relative to the length of the candlestick shadow × Fixed Leverage Value) .
Labels contain the following information:
The percentage of price change from the recommended entry point to the stop loss level.
Required Leverage (X: ): The amount of leverage required to achieve the specified loss percentage. (Or a fixed value if selected).
Required Capital ($: ): The amount of capital required to open a position with the specified leverage and loss percentage (only displayed when using fixed leverage).
The trend cloud identifies the maximum and minimum price values for the specified period.
The cloud value is set depending on whether the current price is equal to the high or low values.
If the current closing price is equal to the high value, the cloud is set at the low value, and vice versa.
RU
Индикатор "Price Action Trend and Margin Equity" представляет собой многофункциональный инструмент для анализа рынка, объединяющий в себе элементы управления капиталом и анализа ценовых паттернов. Индикатор помогает трейдерам идентифицировать ключевые прайс экшн паттерны и определять оптимальные уровни входа, выхода и стоп-лосс на основе текущего тренда.
Основные компоненты индикатора:
Управление капиталом:
Позволяет трейдеру задавать параметры управления рисками, такие как процент возможного убытка по позиции, использование фиксированного плеча и общий капитал.
Рассчитывает необходимый уровень плеча для достижения заданного процента убытка.
Price Action:
Правильно идентифицирует различные ценовые паттерны, такие как Pin Bar, Поглащение Бар, PPR Bar и Внутренний Бар.
Отображает эти паттерны на графике с возможностью настройки цветов свечей и стилей отображения.
Позволяет трейдеру настраивать точки тейк профита и стоп лосса для отображения их на графике.
Возможность отображения паттернов только в натправлении тренда.
Trend: (часть кода взята у ChartPrime)
Использует облако тренда для визуализации текущего направления рынка.
Облако тренда отображается на графике и помогает трейдерам определить, находится ли рынок в восходящем или нисходящем тренде.
Оповещение:
Дает возможность установить оповещение которое будет срабатывать при формировании паттерна.
Пример применения:
Предположим, трейдер использует индикатор для торговли на крипто рынке. Он настраивает параметры управления капиталом, устанавливая максимальный убыток по позиции в 5% и используя фиксированное плечо 1:100. Индикатор автоматически рассчитывает необходимый объем позиции для соблюдения этих параметров ($: на лейбле). Или отображает плечо (Х: на лейбле) для достижения необходимого риска.
Трейдер получает оповещение о формировании Pin Bar. Индикатор отображает уровни входа, выхода и стоп-лосс, основанные на этом паттерне. Трейдер открывает позицию на рекомендуемую сумму в направлении, указанном индикатором, и устанавливает стоп-лосс и тейк-профит на рекомендованных уровнях.
Общие настройки:
Процент убытка по позиции: Устанавливает максимальный процент убытка, который вы готовы понести по одной позиции.
Использовать фиксированное плечо: Включает или отключает использование фиксированного плеча.
Уровень фиксированного плеча: Задает уровень фиксированного плеча.
Общий капитал: Указывает общий капитал, который вы используете для торговли. (Необходим для расчета при использовании фиксированного плеча)
Включение/отключение паттернов: Вы можете включить или отключить отображение различных ценовых паттернов, таких как Pin Bar, Outside Bar (Поглощение), Inside Bar и PPR Bar.
Цвета паттернов: Задает цвета для отображения каждого паттерна на графике.
Цвет свечей: Позволяет задать нейтральный цвет для свечей неподходящих под прйс экшн.
Показывать линии: Позволяет включить или отключить отображение лейблов и линий.
Длинна линий: Настройка длинны линий стопа, линии входа и тейк профита.
Цвет лейбла: Один цвет для всех лейблов (настраивается ниже) или цвет лейблов в цвет паттерна свечи.
Вход в пин: Выбор точки входа для пин бара: голова свечи, точка закрытия бара или 50% свечи.
Коэффиценты для стоп и тейк линий.
Использовать тренд для прайс экшна: При включении будет показывать прайс экшн сигналы только в направлении тренда.
Отображение облака тренда: Включает или отключает отображение облака тренда.
Период расчета облака: Устанавливает период, за который рассчитываются максимальные и минимальные значения для облака. Чем больше период, тем более сглаженным будет облако.
Цвета облака: Задает цвета для восходящего и нисходящего трендов, а также прозрачность облака.
Логика работы индикатора:
Pin Bar — это свеча с длинной верхней или нижней тенью и коротким телом.
Логика: Если длина одной тени вдвое больше тела и противоположной тени свечи, считается, что это Pin Bar.
Inside Bar — это свеча, полностью поглощенная предыдущей свечой.
Логика: Если максимум и минимум текущей свечи находятся внутри предыдущей свечи, это Inside Bar.
Outside Bar или Поглощение — это свеча, которая полностью поглощает предыдущую свечу.
Логика: Если максимум и минимум текущей свечи выходят за пределы предыдущей свечи и закрывается за пределами предыдущей свечи, это Outside Bar.
PPR Bar — это свеча, которая закрывается выше или ниже предыдущей свечи.
Логика: Если текущая свеча закрывается выше максимума предыдущей свечи или ниже ее минимума, это PPR Bar.
Уровни стоп-лосс: Рассчитываются на основе заданных коэффициентов. При значении 1.0 показывает правильный стоп для паттерна отталкиваясь от точки входа.
Уровки тейк-профита: Рассчитываются на основе заданных коэффициентов.
Создание метки: Метка создается на уровне стоп-лосс и содержит информацию о потенциальном плече и убытке.
Формула для вычисления значения $:
=(Общий капитал x (Максимальный процент убытка по позиции/100)) / (Разница между уровнем входа и уровнем стоп-лосс × Коэффициент, задающий уровень стоп-лосс относительно длины тени свечи × Значение фиксированного плеча).
Метки содержат следующую информацию:
Процент изменения цены от рекомендованной точки входа до уровня стоп-лосс.
Необходимое плечо (Х: ): Уровень плеча, необходимый для достижения заданного процента убытка. (Или фиксированное значение если оно выбрано).
Необходимый капитал ($: ): Сумма капитала, необходимая для открытия позиции с заданным плечом и процентом убытка (отображается только при использовании фиксированного плеча).
Облако тренда определяет максимальные и минимальные значения цены за указанный период.
Значение облака устанавливается в зависимости от того, совпадает ли текущая цена с максимальными или минимальными значениями.
Если текущая цена закрытия равна максимальному значению, облако устанавливается на уровне минимального значения, и наоборот.
Sideways Scalper Peak and BottomUnderstanding the Indicator
This indicator is designed to identify potential peaks (tops) and bottoms (bottoms) within a market, which can be particularly useful in a sideways or range-bound market where price oscillates between support and resistance levels without a clear trend. Here's how it works:
RSI (Relative Strength Index): Measures the speed and change of price movements to identify overbought (above 70) and oversold (below 30) conditions. In a sideways market, RSI can help signal when the price might be due for a reversal within its range.
Moving Averages (MAs): The Fast MA and Slow MA provide a sense of the short-term and longer-term average price movements. In a sideways market, these can help confirm if the price is at the upper or lower extremes of its range.
Volume Spike: Looks for significant increases in trading volume, which might indicate a stronger move or a potential reversal point when combined with other conditions.
Divergence: RSI divergence occurs when the price makes a new high or low, but the RSI does not, suggesting momentum is weakening, which can be a precursor to a reversal.
How to Use in a Sideways Market
Identify the Range: First, visually identify the upper resistance and lower support levels of the sideways market on your chart. This indicator can help you spot these levels more precisely by signaling potential peaks and bottoms.
Peak Signal :
When to Look: When the price approaches the upper part of the range.
Conditions: The indicator will give a 'Peak' signal when:
RSI is over 70, indicating overbought conditions.
There's bearish divergence (price makes a higher high, but RSI doesn't).
Volume spikes, suggesting strong selling interest.
Price is above both Fast MA and Slow MA, indicating it's at a potentially high point in the range.
Action: This signal suggests that the price might be at or near the top of its range and could reverse downwards. A trader might consider selling or shorting here, expecting the price to move towards the lower part of the range.
Bottom Signal:
When to Look: When the price approaches the lower part of the range.
Conditions: The indicator will give a 'Bottom' signal when:
RSI is below 30, indicating oversold conditions.
There's bullish divergence (price makes a lower low, but RSI doesn't).
Volume spikes, suggesting strong buying interest.
Price is below both Fast MA and Slow MA, indicating it's at a potentially low point in the range.
Action: This signal suggests that the price might be at or near the bottom of its range and could reverse upwards. A trader might consider buying here, expecting the price to move towards the upper part of the range.
Confirmation: In a sideways market, false signals can occur due to the lack of a strong trend. Always look for confirmation:
Volume Confirmation: A significant volume spike can add confidence to the signal.
Price Action: Look for price action like candlestick patterns (e.g., doji, engulfing patterns) that confirm the reversal.
Time Frame: Consider using this indicator on multiple time frames. A signal on a shorter time frame (like 15m or 1h) might be confirmed by similar conditions on a longer time frame (4h or daily).
Risk Management: Since this is designed for scalping in a sideways market:
Set Tight Stop-Losses: Due to the quick nature of reversals in range-bound markets, place stop-losses close to your entry to minimize loss.
Take Profit Levels: Set profit targets near the opposite end of the range or use a trailing stop to capture as much of the move as possible before it reverses again.
Practice: Before trading with real money, practice with this indicator on historical data or in a paper trading environment to understand how it behaves in different sideways market scenarios.
Key Points for New Traders
Patience: Wait for all conditions to align before taking a trade. Sideways markets require patience as the price might hover around these levels for a while.
Not All Signals Are Equal: Sometimes, even with all conditions met, the market might not reverse immediately. Look for additional context or confirmation.
Continuous Learning: Understand that this indicator, like any tool, isn't foolproof. Learn from each trade, whether it's a win or a loss, and adjust your strategy accordingly.
By following these guidelines
Ultimate T3 Fibonacci for BTC Scalping. Look at backtest report!Hey Everyone!
I created another script to add to my growing library of strategies and indicators that I use for automated crypto trading! This strategy is for BITCOIN on the 30 minute chart since I designed it to be a scalping strategy. I calculated for trading fees, and use a small amount of capital in the backtest report. But feel free to modify the capital and how much per order to see how it changes the results:)
It is called the "Ultimate T3 Fibonacci Indicator by NHBprod" that computes and displays two T3-based moving averages derived from price data. The t3_function calculates the Tilson T3 indicator by applying a series of exponential moving averages to a combined price metric and then blending these results with specific coefficients derived from an input factor.
The script accepts several user inputs that toggle the use of the T3 filter, select the buy signal method, and set parameters like lengths and volume factors for two variations of the T3 calculation. Two T3 lines, T3 and T32, are computed with different parameters, and their colors change dynamically (green/red for T3 and blue/purple for T32) based on whether the lines are trending upward or downward. Depending on the selected signal method, the script generates buy signals either when T32 crosses over T3 or when the closing price is above T3, and similarly, sell signals are generated on the respective conditions for crossing under or closing below. Finally, the indicator plots the T3 lines on the chart, adds visual buy/sell markers, and sets alert conditions to notify users when the respective trading signals occur.
The user has the ability to tune the parameters using TP/SL, date timerames for analyses, and the actual parameters of the T3 function including the buy/sell signal! Lastly, the user has the option of trading this long, short, or both!
Let me know your thoughts and check out the backtest report!
AI Volume Breakout for scalpingPurpose of the Indicator
This script is designed for trading, specifically for scalping, which involves making numerous trades within a very short time frame to take advantage of small price movements. The indicator looks for volume breakouts, which are moments when trading volume significantly increases, potentially signaling the start of a new price movement.
Key Components:
Parameters:
Volume Threshold (volumeThreshold): Determines how much volume must increase from one bar to the next for it to be considered significant. Set at 4.0, meaning volume must quadruplicate for a breakout signal.
Price Change Threshold (priceChangeThreshold): Defines the minimum price change required for a breakout signal. Here, it's 1.5% of the bar's opening price.
SMA Length (smaLength): The period for the Simple Moving Average, which helps confirm the trend direction. Here, it's set to 20.
Cooldown Period (cooldownPeriod): Prevents signals from being too close together, set to 10 bars.
ATR Period (atrPeriod): The period for calculating Average True Range (ATR), used to measure market volatility.
Volatility Threshold (volatilityThreshold): If ATR divided by the close price exceeds this, the market is considered too volatile for trading according to this strategy.
Calculations:
SMA (Simple Moving Average): Used for trend confirmation. A bullish signal is more likely if the price is above this average.
ATR (Average True Range): Measures market volatility. Lower volatility (below the threshold) is preferred for this strategy.
Signal Generation:
The indicator checks if:
Volume has increased significantly (volumeDelta > 0 and volume / volume >= volumeThreshold).
There's enough price change (math.abs(priceDelta / open) >= priceChangeThreshold).
The market isn't too volatile (lowVolatility).
The trend supports the direction of the price change (trendUp for bullish, trendDown for bearish).
If all these conditions are met, it predicts:
1 (Bullish) if conditions suggest buying.
0 (Bearish) if conditions suggest selling.
Cooldown Mechanism:
After a signal, the script waits for a number of bars (cooldownPeriod) before considering another signal to avoid over-trading.
Visual Feedback:
Labels are placed on the chart:
Green label for bullish breakouts below the low price.
Red label for bearish breakouts above the high price.
How to Use:
Entry Points: Look for the labels on your chart to decide when to enter trades.
Risk Management: Since this is for scalping, ensure each trade has tight stop-losses to manage risk due to the quick, small movements.
Market Conditions: This strategy might work best in markets with consistent volume and price changes but not extreme volatility.
Caveats:
This isn't real AI; it's a heuristic based on volume and price. Actual AI would involve machine learning algorithms trained on historical data.
Always backtest any strategy, and consider how it behaves in different market conditions, not just the ones it was designed for.
Ultimate Stochastics Strategy by NHBprod Use to Day Trade BTCHey All!
Here's a new script I worked on that's super simple but at the same time useful. Check out the backtest results. The backtest results include slippage and fees/commission, and is still quite profitable. Obviously the profitability magnitude depends on how much capital you begin with, and how much the user utilizes per order, but in any event it seems to be profitable according to backtests.
This is different because it allows you full functionality over the stochastics calculations which is designed for random datasets. This script allows you to:
Designate ANY period of time to analyze and study
Choose between Long trading, short trading, and Long & Short trading
It allows you to enter trades based on the stochastics calculations
It allows you to EXIT trades using the stochastics calculations or take profit, or stop loss, Or any combination of those, which is nice because then the user can see how one variable effects the overall performance.
As for the actual stochastics formula, you get control, and get to SEE the plot lines for slow K, slow D, and fast K, which is usually not considered.
You also get the chance to modify the smoothing method, which has not been done with regular stochastics indicators. You get to choose the standard simple moving average (SMA) method, but I also allow you to choose other MA's such as the HMA and WMA.
Lastly, the user gets the option of using a custom trade extender, which essentially allows a buy or sell signal to exist for X amount of candles after the initial signal. For example, you can use "max bars since signal" to 1, and this will allow the indicator to produce an extra sequential buy signal when a buy signal is generated. This can be useful because it is possible that you use a small take profit (TP) and quickly exit a profitable trade. With the max bars since signal variable, you're able to reenter on the next candle and allow for another opportunity.
Let me know if you have any questions! Please take a look at the performance report and let me know your thoughts! :)
Multi Stochastic AlertHello Everyone,
I have created a Multi Stochastic Alert based on Scalping Strategy
The Strategy uses below 4 Stochastic indicator:
1. Stochastic (9,3)
2. Stochastic (14,3)
3. Stochastic (40,4)
4. Stochastic (60,10)
Trade entry become active when all of these goes below 20 or above 80, In this indicator you don't need to use all 4, this will show red and green background whenever all of them goes below 20 or above 80.
As shown in picture below, it works better when script is making a channel, Our indicator shows green or red signal, we wait for RSI Divergence and we enter. We book when blue line (9,3) goes above 80, as shown by arrow, and trail rest at breakeven or your own trailing method
Same Situation shown for Short side. We book 50% when Blue line (9,3) Goes below 20 and trail rest at breakeven or your own trailing method
Happy trading, Let me know if any improvements required.
Scalping trading system based on 4 ema linesScalping Trading System Based on 4 EMA Lines
Overview:
This is a scalping trading strategy built on signals from 4 EMA moving averages: EMA(8), EMA(12), EMA(24) and EMA(72).
Conditions:
- Time frame: H1 (1 hour).
- Trading assets: Applicable to major currency pairs with high volatility
- Risk management: Use a maximum of 1-2% of capital for each transaction. The order holding time can be from a few hours to a few days, depending on the price fluctuation amplitude.
Trading rules:
Determine the main trend:
Uptrend: EMA(8), EMA(12) and EMA(24) are above EMA(72).
Downtrend: EMA(8), EMA(12) and EMA(24) are below EMA(72).
Trade in the direction of the main trend** (buy in an uptrend and sell in a downtrend).
Entry conditions:
- Only trade in a clearly trending market.
Uptrend:
- Wait for the price to correct to the EMA(24).
- Enter a buy order when the price closes above the EMA(24).
- Place a stop loss below the bottom of the EMA(24) candle that has just been swept.
Downtrend:
- Wait for the price to correct to the EMA(24).
- Enter a sell order when the price closes below the EMA(24).
- Place a stop loss above the top of the EMA(24) candle that has just been swept.
Take profit and order management:
- Take profit when the price moves 20 to 40 pips in the direction of the trade.
Use Trailing Stop to optimize profits instead of setting a fixed Take Profit.
Note:
- Do not trade within 30 minutes before and after the announcement of important economic news, as the price may fluctuate abnormally.
Additional filters:
To increase the success rate and reduce noise, this strategy uses additional conditions:
1. The price is calculated only when the candle closes (no repaint).
2. When sweeping through EMA(24), the price needs to close above EMA(24).
3. The closing price must be higher than 50% of the candle's length.
4. **The bottom of the candle sweeping through EMA(24) must be lower than the bottom of the previous candle (liquidity sweep).
---
Alert function:
When the EMA(24) sweep conditions are met, the system will trigger an alert if you have set it up.
- Entry point: The closing price of the candle sweeping through EMA(24).
- Stop Loss:
- Buy Order: Place at the bottom of the sweep candle.
- Sell Order: Place at the top of the sweep candle.
---
Note:
This strategy is designed to help traders identify profitable trading opportunities based on trends. However, no strategy is 100% guaranteed to be successful. Please test it thoroughly on a demo account before using it.
[COG] Advanced School Run StrategyAdvanced School Run Strategy (ASRS) – Explanation
Overview: The Advanced School Run Strategy (ASRS) is an intraday trading approach designed to identify breakout opportunities based on specific time and price patterns. This script applies the concepts of the Advanced School Run Strategy as outlined in Tom Hougaard's research, adapted to work seamlessly on TradingView charts. It leverages 5-minute candlestick data to set actionable breakout levels and provides traders with visual cues and alerts to make informed decisions.
Features:
Dynamic Breakout Levels: Automatically calculates high and low levels based on the market's behavior during the initial trading minutes.
Custom Visualization: Highlights breakout zones with customizable colors and transparency, providing clear visual feedback for bullish and bearish breakouts.
Configurable Alerts: Includes alert conditions for both bullish and bearish breakouts, ensuring traders never miss a trading opportunity.
Reset Logic: Resets breakout levels daily at the market open to ensure accurate signal generation for each session.
How It Works:
The script identifies key levels (high and low) after a configurable number of minutes from the market open (default: 25 minutes).
If the price breaks above the high level or below the low level, a corresponding breakout is detected.
The script draws breakout zones on the chart and triggers alerts based on the breakout direction.
All levels and signals reset at the start of each new trading session, maintaining relevance to current market conditions.
Customization Options:
Line and box colors for bullish and bearish breakouts.
Transparency levels for breakout visualizations.
Alert settings to receive notifications for detected breakouts.
Acknowledgment: This script is inspired by Tom Hougaard's Advanced School Run Strategy. The methodology has been translated into Pine Script for TradingView users, adhering to TradingView’s policies and community guidelines. This script does not redistribute proprietary content from the original research but implements the principles for educational and analytical purposes.
Adaptive Fractal Grid Scalping StrategyThis Pine Script v6 component implements an "Adaptive Fractal Grid Scalping Strategy" with an added volatility threshold feature.
Here's how it works:
Fractal Break Detection: Uses ta.pivothigh and ta.pivotlow to identify local highs and lows.
Volatility Clustering: Measures volatility using the Average True Range (ATR).
Adaptive Grid Levels: Dynamically adjusts grid levels based on ATR and user-defined multipliers.
Directional Bias Filter: Uses a Simple Moving Average (SMA) to determine trend direction.
Volatility Threshold: Introduces a new input to specify a minimum ATR value required to activate the strategy.
Trade Execution Logic: Places limit orders at grid levels based on trend direction and fractal levels, but only when ATR exceeds the volatility threshold.
Profit-Taking and Stop-Loss: Implements profit-taking at grid levels and a trailing stop-loss based on ATR.
How to Use
Inputs: Customize the ATR length, SMA length, grid multipliers, trailing stop multiplier, and volatility threshold through the input settings.
Visuals: The script plots fractal points and grid levels on the chart for easy visualization.
Trade Signals: The strategy automatically places buy/sell orders based on the detected fractals, trend direction, and volatility threshold.
Profit and Risk Management: The script includes logic for taking profits and setting stop-loss levels to manage trades effectively.
This strategy is designed to capitalize on micro-movements during high volatility and avoid overtrading during low-volatility trends. Adjust the input parameters to suit your trading style and market conditions.
Bondar Drive v2.1Title: Bondar Drive v2.1 — Real-time print and delta tick volume visualization
Description:
Bondar Drive v2.1 is a tool for visualizing real-time order flow data. It highlights price movements and volume deltas in an intuitive, easy-to-read format. Indicator can be used in conjunction with the Anchored Volume Profile and Volume Footprint (Type: Total).
Features:
Real-Time Print Visualization:
Displays order flow prints with delta colors for buy/sell dominance.
Adjustable size and transparency for varying order thresholds.
Volume Delta Analysis:
Categorizes orders into Tiny, Small, Session, Large, and Huge based on user-defined thresholds.
Provides a tooltip showing order time and price.
Customizable Time Range:
Keeps prints visible for a specified duration (in seconds).
Flexible User Inputs:
Adjustable time zones, print sizes, starting bar index, and volume thresholds.
Visual Enhancements:
Line connections between prints show progression of orders and market direction.
How It Works:
The indicator gathers volume delta and price data in real time.
It dynamically displays circular labels with varying sizes and colors, reflecting the size and type of orders. Labels and lines are automatically removed after the specified time range, ensuring a clean and uncluttered chart.
Customization Options:
Number of Prints: Control how many prints are displayed.
Order Size Filters: Exclude small trades to highlight significant orders.
Color Options: Customize print colors, text, and connecting lines.
Time Offset: Adjust for your local time zone.
Use Cases:
Identify order flow imbalances and price levels dominated by buyers or sellers.
Track the progression of large orders for better trade execution.
Spot market reversals and momentum shifts using real-time prints and delta.
Precision Trading Strategy: Golden EdgeThe PTS: Golden Edge strategy is designed for scalping Gold (XAU/USD) on lower timeframes, such as the 1-minute chart. It captures high-probability trade setups by aligning with strong trends and momentum, while filtering out low-quality trades during consolidation or low-volatility periods.
The strategy uses a combination of technical indicators to identify optimal entry points:
1. Exponential Moving Averages (EMAs): A fast EMA (3-period) and a slow EMA (33-period) are used to detect short-term trend reversals via crossover signals.
2. Hull Moving Average (HMA): A 66-period HMA acts as a higher-timeframe trend filter to ensure trades align with the overall market direction.
3. Relative Strength Index (RSI): A 12-period RSI identifies momentum. The strategy requires RSI > 55 for long trades and RSI < 45 for short trades, ensuring entries are backed by strong buying or selling pressure.
4. Average True Range (ATR): A 14-period ATR ensures trades occur only during volatile conditions, avoiding choppy or low-movement markets.
By combining these tools, the PTS: Golden Edge strategy creates a precise framework for scalping and offers a systematic approach to capitalize on Gold’s price movements efficiently.
Dynamic Buy/Sell VisualizationDynamic Trend Visualization Indicator
Description:
This simple and easy to use indicator has helped me stay in trades longer.
This indicator is designed to visually represent potential buy and sell signals based on the crossover of two Simple Moving Averages (SMA). It's crafted to assist traders in identifying trend directions in a straightforward manner, making it an excellent tool for both beginners and experienced traders.
Features:
Customizable Moving Averages: Users can adjust the period length for both short-term (default: 10) and long-term (default: 50) SMAs to suit their trading strategy.
Visual Signals: Dynamic lines appear at the points of SMA crossover, with labels to indicate 'BUY' or 'SELL' opportunities.
Color and Style Customization: Customize the appearance of the buy and sell lines for better chart readability.
Alert Functionality: Alerts are set up to notify users when a crossover indicating a buy or sell condition occurs.
How It Works:
A 'BUY' signal is generated when the short-term SMA crosses above the long-term SMA, suggesting an upward trend.
A 'SELL' signal is indicated when the short-term SMA crosses below the long-term SMA, pointing to a potential downward trend.
Use Cases:
Trend Following: Ideal for markets with clear trends. For example, if trading EUR/USD on a daily chart, setting the short SMA to 10 days and the long SMA to 50 days might help in capturing longer-term trends.
Scalping: In a volatile market, setting shorter periods (e.g., 5 for short SMA and 20 for long SMA) might catch quicker trend changes, suitable for scalping.
Examples of how to use
* Short-term for Quick Trades:
SMA 5 and SMA 21:
Purpose: This combination is tailored for day traders or those looking to engage in scalping. The 5 SMA will react rapidly to price changes, providing early signals for buy or sell opportunities. The 21 SMA, being a Fibonacci number, offers a slightly longer-term view to confirm the short-term trend, helping to filter out minor fluctuations that might lead to false signals.
* Middle-term for Swing Trading:
SMA 10 and SMA 50:
Purpose: Suited for swing traders who aim to capitalize on medium-term trends. The 10 SMA picks up on immediate market movements, while the 50 SMA gives insight into the medium-term direction. This setup helps in identifying when a short-term trend aligns with a longer-term trend, providing a good balance for trades that might last several days to a couple of weeks.
* Long-term Trading:
SMA 50 and SMA 200:
Purpose: Investors focusing on long-term trends would benefit from this pair. The crossover of the 50 SMA over the 200 SMA can indicate the beginning or end of major market trends, ideal for making decisions about long-term holdings that might span months or years.
Example Strategy if not using the Buy / Sell Label Alerts:
Entry Signal: Enter a long position when the shorter SMA crosses above the longer SMA. For example:
SMA 10 crosses above SMA 50 for a medium-term bullish signal.
Exit Signal: Consider exiting or initiating a short position when:
SMA 10 crosses below SMA 50, suggesting a bearish turn in the medium-term trend.
Confirmation: Use these crossovers in conjunction with other indicators like volume or momentum indicators for better confirmation. For instance, if you're using the 5/21 combination, look for volume spikes on crossovers to confirm the move's strength.
When Not to Use:
Sideways or Range-Bound Markets: The indicator might generate many false signals in a non-trending market, leading to potential losses.
High Volatility Without Clear Trends: Rapid price movements without a consistent direction can result in misleading crossovers.
As a Standalone Tool: It should not be used in isolation. Combining with other indicators like RSI or MACD for confirmation can enhance trading decisions.
Practical Example:
Buy Signal: If you're watching Apple Inc. (AAPL) on a weekly chart, a crossover where the 10-week SMA moves above the 50-week SMA could suggest a buying opportunity, especially if confirmed by volume increase or other technical indicators.
Sell Signal: Conversely, if the 10-week SMA dips below the 50-week SMA, it might be time to consider selling, particularly if other bearish signals are present.
Conclusion:
The "Dynamic Trend Visualization" indicator provides a visual aid for trend-following strategies, offering customization and alert features to streamline the trading process. However, it's crucial to use this in conjunction with other analysis methods to mitigate the risks of false signals or market anomalies.
Legal Disclaimer:
This indicator is for educational purposes only. It does not guarantee profits or provide investment advice. Trading involves risk; please conduct thorough or consult with a financial advisor. The creator is not responsible for any losses incurred. By using this indicator, you agree to these terms.
First Candle High Low LevelsDescription
The "First Candle High Low Levels" Pine Script indicator is designed to highlight the high and low levels of the first candle of the day on your TradingView chart. It works across different timeframes and specifically handles the Indian stock market trading hours (9:15 AM to 3:30 PM IST). The script draws a box from the start to the end of the trading session, visually marking the price range defined by the first candle of the day. Traders can customize the box's border color, fill color, and line width.
Features
Customizable Timeframe: Users can select the desired timeframe for the first candle (e.g., 5-minute, 15-minute, etc.).
Custom Box Appearance: Options to adjust the border color, fill color, and line width of the drawn box.
Auto Reset for Each New Day: The high and low of the first candle are reset daily to mark the start of the next trading day.
Accurate Market Session Handling: The box is drawn from the start of the first candle to the end of the trading session (3:30 PM IST).
Usage
Adding to Chart: Apply the script by copying it into the Pine Script editor in TradingView. Once added, the script will automatically draw a box representing the high and low of the first candle of the day.
Select Timeframe: You can adjust the First Candle Timeframe input to define which timeframe candle will be used for marking the high and low. For example, if you choose a 5-minute timeframe, the high and low of the first 5-minute candle will be used.
Customization:
Adjust the Border Color and Box Fill Color through the input settings to match your chart's style.
Modify the Box Line Width to make the box lines more or less prominent.
Scalping with Williams %R, MACD, and SMA (1m)Overview:
This trading strategy is designed for scalping in the 1-minute timeframe. It uses a combination of the Williams %R, MACD, and SMA indicators to generate buy and sell signals. It also includes alert functionalities to notify users when trades are executed or closed.
Indicators Used:
Williams %R : A momentum indicator that measures overbought and oversold conditions. The Williams %R values range from -100 to 0.
Length: 140 bars (i.e., 140-period).
MACD (Moving Average Convergence Divergence) : A trend-following momentum indicator that shows the relationship between two moving averages of a security's price.
Fast Length: 24 bars
Slow Length: 52 bars
MACD Length: 9 bars (signal line)
SMA (Simple Moving Average) : A trend-following indicator that smooths out price data to create a trend-following indicator.
Length: 7 bars
Conditions and Logic:
Timeframe Check :
The strategy is designed specifically for the 1-minute timeframe. If the current chart is not on the 1-minute timeframe, a warning label is displayed on the chart instructing the user to switch to the 1-minute timeframe.
Williams %R Conditions :
Buy Condition: The strategy looks for a crossover of Williams %R from below -94 to above -94. This indicates a potential buying opportunity when the market is moving out of an oversold condition.
Sell Condition: The strategy looks for a crossunder of Williams %R from above -6 to below -6. This indicates a potential selling opportunity when the market is moving out of an overbought condition.
Deactivate Buy: If Williams %R crosses above -40, the buy signal is deactivated, suggesting that the buying condition is no longer valid.
Deactivate Sell: If Williams %R crosses below -60, the sell signal is deactivated, suggesting that the selling condition is no longer valid.
MACD Conditions :
MACD Histogram: Used to identify the momentum and the direction of the trend.
Long Entry: The strategy initiates a buy order if the MACD histogram shows a positive bar after a negative bar while a buy condition is active and Williams %R is above -94.
Long Exit: The strategy exits the buy position if the MACD histogram turns negative and is below the previous histogram bar.
Short Entry: The strategy initiates a sell order if the MACD histogram shows a negative bar after a positive bar while a sell condition is active and Williams %R is below -6.
Short Exit: The strategy exits the sell position if the MACD histogram turns positive and is above the previous histogram bar.
Trend Confirmation (Using SMA) :
Bullish Trend: The strategy considers a bullish trend if the current price is above the 7-bar SMA. A buy signal is only considered if this condition is met.
Bearish Trend: The strategy considers a bearish trend if the current price is below the 7-bar SMA. A sell signal is only considered if this condition is met.
Alerts:
Long Entry Alert: An alert is triggered when a buy order is executed.
Long Exit Alert: An alert is triggered when the buy order is closed.
Short Entry Alert: An alert is triggered when a sell order is executed.
Short Exit Alert: An alert is triggered when the sell order is closed.
Summary:
Buy Signal: Activated when Williams %R crosses above -94 and the price is above the 7-bar SMA. A buy order is placed if the MACD histogram shows a positive bar after a negative bar. The buy order is closed when the MACD histogram turns negative and is below the previous histogram bar.
Sell Signal: Activated when Williams %R crosses below -6 and the price is below the 7-bar SMA. A sell order is placed if the MACD histogram shows a negative bar after a positive bar. The sell order is closed when the MACD histogram turns positive and is above the previous histogram bar.
This strategy combines momentum (Williams %R), trend-following (MACD), and trend confirmation (SMA) to identify trading opportunities in the 1-minute timeframe. It is designed for short-term trading or scalping.
Thrax - QuickStrike 5-Mins Scalping** Indicator Description **
1. Price Change Threshold (%) – The minimum price change required for a candle to be recognized as significant. Candles exceeding this threshold are considered potential candidates for zone creation. Default value for 5 min is 0.5%. As you move on higher timeframe the threshold should increase
2. Percentage Change for Zones (%) – The amount of price movement needed to form a dynamic support or resistance zone. Tweak this to control how sensitive the indicator is to price fluctuations. 5 min default value is 1%. For 15 min suggested is 2-3%.
3. Break Threshold for Zones (%) – Defines how much price must break above or below a zone for it to be removed from the chart/mitigated. Keeps the chart clean by removing invalidated zones. Default value is 0.1% in 5 min, for 15 min it is 0.5%.
4. Buy Zone Retracement Level (%) – The percentage retracement level for defining the inner buy zone within a broader bullish zone. Ideal for timing precision entries. Ideal value is 75%
5. Sell Zone Retracement Level (%) – The percentage retracement level used to determine the inner sell zone within a larger bearish zone. Helps in identifying potential reversal areas or exits. Ideal value is 25%
By tailoring these inputs, traders can fully customize the indicator to suit their scalping strategies, enhancing their ability to navigate fast-moving markets with confidence.
---------------------------------------------------------------------------
There are two primary approaches for scalping using this indicator:
1. Candle-Based Scalping:
a. Bullish Signal: When you observe a bullish candle highlighted in blue (by default), you can consider entering a long position at the close of this candle. It’s advisable to wait for the candle to close before taking action. For a more aggressive scalp, you might take profits based on your scalp target after a few subsequent candles. If the price remains stagnant or moves unfavorably in the next few candles, you can exit with a small loss. Alternatively, if you have a higher risk tolerance, you may hold the position even if the price initially declines within a set percentage.
b. Bearish Signal: For a bearish candle highlighted in yellow, you can enter a short trade at the close of the candle. Similar to the bullish setup, you have the option to exit after a few candles if the price doesn’t move as expected or hold the position with a higher risk tolerance if the price goes up initially.
2. Zone-Based Scalping:
Entering Zones: Monitor the price as it enters a defined support or resistance zone. If you are open to higher risk, you can enter a trade immediately upon the price entering the zone. For a more cautious approach with a smaller stop loss, wait for the price to reach a retracement level within the zone before initiating your trade. This approach allows for a more precise entry but may result in missing out on trades if the price reverses before hitting the retracement level. Conversely, entering at the zone’s boundary offers the potential for early trade capture but comes with a higher stop loss risk.
Adjust these strategies based on your risk tolerance and trading preferences to optimize your scalping opportunities.
Heikin Ashi Price DetectionThis script performs custom calculations for both bullish and bearish bars, providing a numerical result that can be used to gauge price movements and potential trading signals.
How It Works
Bullish Bars:
Calculates the absolute difference between the open and low prices (BullOpenLow).
Calculates the absolute difference between the high and close prices (BullHighClose).
Compares BullOpenLow and BullHighClose:
If BullOpenLow is greater, the difference is divided by BullOpenLow.
If BullHighClose is greater, the difference is divided by BullHighClose.
The result is normalized to a percentage and subtracted from 100 to produce a final value.
Bearish Bars:
Calculates the absolute difference between the close and low prices (BearCloseLow).
Calculates the absolute difference between the high and open prices (BearHighOpen).
Compares BearCloseLow and BearHighOpen:
If BearCloseLow is greater, the difference is divided by BearCloseLow.
If BearHighOpen is greater, the difference is divided by BearHighOpen.
The result is normalized to a percentage and subtracted from 100 to produce a final value.
Key Features
Bullish and Bearish Calculations: The script identifies bullish and bearish bars and applies separate calculations to each.
Normalized Results: The calculations provide a normalized result that can be easily interpreted.
Visual Representation: Results are plotted on the chart for quick visual reference.
Advanced Gold Scalping Strategy with RSI Divergence# Advanced Gold Scalping Strategy with RSI Divergence
## Overview
This Pine Script implements an advanced scalping strategy for gold (XAUUSD) trading, primarily designed for the 1-minute timeframe. The strategy utilizes the Relative Strength Index (RSI) indicator along with its moving average to identify potential trade setups based on divergences between price action and RSI movements.
## Key Components
### 1. RSI Calculation
- Uses a customizable RSI length (default: 60)
- Allows selection of the source for RSI calculation (default: close price)
### 2. Moving Average of RSI
- Supports multiple MA types: SMA, EMA, SMMA (RMA), WMA, VWMA, and Bollinger Bands
- Customizable MA length (default: 3)
- Option to display Bollinger Bands with adjustable standard deviation multiplier
### 3. Divergence Detection
- Implements both bullish and bearish divergence identification
- Uses pivot high and pivot low points to detect divergences
- Allows for customization of lookback periods and range for divergence detection
### 4. Entry Conditions
- Long Entry: Bullish divergence when RSI is below 40
- Short Entry: Bearish divergence when RSI is above 60
### 5. Trade Management
- Stop Loss: Customizable, default set to 11 pips
- Take Profit: Customizable, default set to 33 pips
### 6. Visualization
- Plots RSI line and its moving average
- Displays horizontal lines at 30, 50, and 70 RSI levels
- Shows Bollinger Bands when selected
- Highlights divergences with "Bull" and "Bear" labels on the chart
## Input Parameters
- RSI Length: Adjusts the period for RSI calculation
- RSI Source: Selects the price source for RSI (close, open, high, low, hl2, hlc3, ohlc4)
- MA Type: Chooses the type of moving average applied to RSI
- MA Length: Sets the period for the moving average
- BB StdDev: Adjusts the standard deviation multiplier for Bollinger Bands
- Show Divergence: Toggles the display of divergence labels
- Stop Loss: Sets the stop loss distance in pips
- Take Profit: Sets the take profit distance in pips
## Strategy Logic
1. **RSI Calculation**:
- Computes RSI using the specified length and source
- Calculates the chosen type of moving average on the RSI
2. **Divergence Detection**:
- Identifies pivot points in both price and RSI
- Checks for higher lows in RSI with lower lows in price (bullish divergence)
- Checks for lower highs in RSI with higher highs in price (bearish divergence)
3. **Trade Entry**:
- Enters a long position when a bullish divergence is detected and RSI is below 40
- Enters a short position when a bearish divergence is detected and RSI is above 60
4. **Position Management**:
- Places a stop loss order at the entry price ± stop loss pips (depending on the direction)
- Sets a take profit order at the entry price ± take profit pips (depending on the direction)
5. **Visualization**:
- Plots the RSI and its moving average
- Draws horizontal lines for overbought/oversold levels
- Displays Bollinger Bands if selected
- Shows divergence labels on the chart for identified setups
## Usage Instructions
1. Apply the script to a 1-minute XAUUSD (Gold) chart in TradingView
2. Adjust the input parameters as needed:
- Increase RSI Length for less frequent but potentially more reliable signals
- Modify MA Type and Length to change the sensitivity of the RSI moving average
- Adjust Stop Loss and Take Profit levels based on current market volatility
3. Monitor the chart for Bull (long) and Bear (short) labels indicating potential trade setups
4. Use in conjunction with other analysis and risk management techniques
## Considerations
- This strategy is designed for short-term scalping and may not be suitable for all market conditions
- Always backtest and forward test the strategy before using it with real capital
- The effectiveness of divergence-based strategies can vary depending on market trends and volatility
- Consider using additional confirmation signals or filters to improve the strategy's performance
Remember to adapt the strategy parameters to your risk tolerance and trading style, and always practice proper risk management.
Buy-Sell Volume Bar Gauge [By MUQWISHI]▋ INTRODUCTION :
The Buy-Sell Volume Bar Gauge is developed to provide traders with a detailed analysis of volume in bars using a low timeframe, such as a 1-second interval, to measure the dominance of buy and sell for each bar. By highlighting the balance between buying and selling activities, the Buy-Sell Volume Bar Gauge helps traders identify potential volume momentum of a bar; aimed at being a useful tool for day traders and scalpers.
_______________________
▋ OVERVIEW:
_______________________
▋ METHODOLOGY:
The concept is based on bars from a lower timeframe within the current chart timeframe bar, where volume is categorized into Up, Down, and Neutral Volume, with each one displayed as a portion of a column plot. Up Volume is recorded when the price experiences a positive change, Down Volume occurs when the price experiences a negative change, and Neutral Volume is observed when the price shows no significant change.
_______________________
▋ INDICATOR SETTINGS:
(1) Fetch data from the selected lower timeframe. Note: If the selected timeframe is invalid (higher than chart), the indicator will automatically switch to 1 second.
(2) Price Source.
(3) Treating Neutral Data (Price Source) as
Neutral: In a lower timeframe, when the bar has no change in its price, the volume is counted as Neutral Volume.
Previous Move: In a lower timeframe, when the bar has no change in its price, the volume is counted as the previous change; “Up Volume” if the previous change was positive, and “Down Volume” if the previous change was negative.
Opposite Previous Move: In a lower timeframe, when the bar has no change in its price, the volume is counted as the opposite previous change; “Up Volume” if the previous change was negative, and “Down Volume” if the previous change was positive.
(4) Average Volume Length, it's used for lighting/darkening columns in a plot.
(5) Enable Alert.
(7) Total bought (%) Level.
(8) Total Sold (%) Level.
_____________________
▋ COMMENT:
The Buy-Sell Volume Bar Gauge can be taken as confirmation for predicting the next move, but it should not be considered a major factor in making a trading decision.
ORB Heikin Ashi SPY 5min Correlation StrategyOverview:
The ORB (Opening Range Breakout) strategy combined with Heikin Ashi candles and Relative Volume (RVOL) indicator aims to capitalize on significant price movements that occur shortly after the market opens. This strategy identifies breakouts above or below the opening range, using Heikin Ashi candles for smoother price visualization and RVOL to gauge the strength of the breakout.
Components:
Opening Range Breakout (ORB): The strategy starts by defining the opening range, typically the first few minutes of the trading session. It then identifies breakouts above the high or below the low of this range as potential entry points.
Heikin Ashi Candles: Heikin Ashi candles are used to provide a smoother representation of price movements compared to traditional candlesticks. By averaging open, close, high, and low prices of the previous candle, Heikin Ashi candles reduce noise and highlight trends more effectively.
Relative Volume (RVOL): RVOL compares the current volume of a stock to its average volume over a specified period. It helps traders identify abnormal trading activity, which can signal potential price movements.
Candle for correlation : In this case we are using SPY candles. It can also use different asset
Strategy Execution:
Initialization: The strategy initializes by setting up variables and parameters, including the ORB period, session timings, and Heikin Ashi candle settings.
ORB Calculation: It calculates the opening range by identifying the high and low prices during the specified session time. These values serve as the initial reference points for potential breakouts. For this we are looking for the first 30 min of the US opening session.
After that we are going to use the next 2 hours to check for breakout opportunities.
Heikin Ashi Transformation: Optionally, the strategy transforms traditional candlestick data into Heikin Ashi format for smoother visualization and trend identification.
Breakout Identification: It continuously monitors price movements within the session and checks if the current high breaches the ORB high or if the current low breaches the ORB low. These events trigger potential long or short entry signals, respectively.
RVOL Analysis: Simultaneously, the strategy evaluates the relative volume of the asset to gauge the strength of the breakout. A surge in volume accompanying the breakout confirms the validity of the signal. In this case we are looking for at least a 1 value of the division between currentVolume and pastVolume
Entry and Exit Conditions: When a breakout occurs and is confirmed by RVOL and is within our session time, the strategy enters a long or short position accordingly. It does not have a stop loss or a takie profit level, instead it will always exit at the end of the trading session, 5 minutes before
Position Sizing and Commissions: For the purpose of this backtest, the strategy allocated 10% of the capital for each trade and assumes a trading commission of 0.01$ per share ( twice the IBKR broker values)
Session End: At the end of the trading session, the strategy closes all open positions to avoid overnight exposure.
Conclusion:
The combination of ORB breakout strategy, Heikin Ashi candles, and RVOL provides traders with a robust framework for identifying and capitalizing on early trends in the market. By leveraging these technical indicators together, traders can make more informed decisions and improve the overall performance of their trading strategies. However, like any trading strategy, it's essential to backtest thoroughly and adapt the strategy to different market conditions to ensure its effectiveness over time.
BINANCE-BYBIT Cross Chart: Spot-Perpetual CorrelationName: "Binance-Bybit Cross Chart: Spot-Perpetual Correlation"
Category: Scalping, Trend Analysis
Timeframe: 1M, 5M, 30M, 1D (depending on the specific technique)
Technical analysis: This indicator facilitates a comparison between the price movements shown on the Binance spot chart and the Bybit perpetual chart, with the aim of discerning the correlation between the two charts and identifying the dominant market trends. It automatically generates the corresponding chart based on the ticker selected in the primary chart. When a Binance pair is selected in the main chart, the indicator replicates the Bybit perpetual chart for the same pair and timeframe, and vice versa, selecting the Bybit perpetual chart as the primary chart generates the Binance spot chart.
Suggested use: You can utilize this tool to conduct altcoin trading on Binance or Bybit, facilitating the comparison of price actions and real-time monitoring of trigger point sensitivity across both exchanges. We recommend prioritizing the Binance Spot chart in the main panel due to its typically longer historical data availability compared to Bybit.
The primary objective is to efficiently and automatically manage the following three aspects:
- Data history analysis for higher timeframes, leveraging the extensive historical data of the Binance spot market. Variations in indicators such as slow moving averages may arise due to differences in historical data between exchanges.
- Assessment of coin liquidity on both exchanges by observing candlestick consistency on smaller timeframes or the absence of gaps. In the crypto market, clean charts devoid of gaps indicate dominance and offer enhanced reliability.
- Identification of precise trigger point levels, including daily, previous day, or previous week highs and lows, which serve as sensitive areas for breakout or reversal operations.
All-Time High (ATH) and All-Time Low (ATL) levels may vary significantly across exchanges due to disparities in historical data series.
This tool empowers traders to make informed decisions by leveraging historical data, liquidity insights, and precise trigger point identification across Binance Spot and Bybit Perpetual market.
Configuration:
EMA length:
- EMA 1: Default 5, user configurable
- EMA 2: Default 10, user configurable
- EMA 3: Default 60, user configurable
- EMA 4: Default 223, user configurable
- Additional Average: Optional display of an additional average, such as a 20-period average.
Chart Elements:
- Session separator: Indicates the beginning of the current session (in blue)
- Background: Indicates an uptrend (60 > 223) with a green background and a downtrend (60 < 223) with a red background.
Instruments:
- EMA Daily: Shows daily averages on an intraday timeframe.
- EMA levels 1h - 30m: Shows the levels of the 1g-30m EMAs.
- EMA Levels Highest TF: Provides the option to select additional EMA levels from the major timeframes, customizable via the drop-down menu.
- "Hammer Detector: Marks hammers with a green triangle and inverted hammers with a red triangle on the chart
- "Azzeramento" signal on TF > 30m: Indicates a small candlestick on the EMA after a dump.
- "No Fomo" signal on TF < 30m: Indicates a hyperextended movement.
Trigger Points:
- Today's highs and lows: Shows the opening price of the day's candlestick, along with the day's highs and lows (high in purple, low in red, open in green).
- Yesterday's highs and lows: Displays the opening price of the daily candlestick, along with the previous day's highs and lows (high in yellow, low in red).
You can customize the colors in "Settings" > "Style".
It is best used with the Scalping The Bull indicator on the main panel.
Credits:
@tumiza999: for tests and suggestions.
Thanks for your attention, happy to support the TradingView community.