Visible and Anchored OTE chart [SYNC & TRADE]Thanks for the start @twingall
Visible and Anchored OTE chart
Indicator for visualizing price levels and optimal trading zones (OTE - Optimal Trading Entry) using Fibonacci levels.
Main features
Visualization of price ranges using two OTE zones:
OTE 70% (79-62 Fibonacci levels)
OTE 30% (21-38 Fibonacci levels)
Setting up time periods:
Ability to use a custom date range
Option to work with a higher time frame
Flexible display settings:
Choose between using candle bodies or the full range for binding
Customizable appearance of OTE boxes
Customizable text labels
Additional levels:
Middle line (50.5%)
Optional levels of 29.5%, 70.5% and 88%
Customizable Fibonacci extensions
Indicator settings
Main parameters
Use Custom Dates - enable a custom date range
Start Date/End Date - set a time range
Use Higher Timeframe - use a higher time frame
Higher Timeframe - select a higher timeframe
Setting up OTE zones
Show Fib Box - displaying OTE zones
Enable Fib Box 79-62 - enabling OTE zone 70%
Enable Fib Box 21-38 - enabling OTE zone 30%
Show Text - displaying text labels in zones
Visual design
Text Size - text size (tiny/small/medium/large)
Text Color - text color
Text Alignment - text alignment
Line Thickness - line thickness (1-4)
Line Style - line style (Solid/Dashed/Dotted)
Fibonacci levels
High/Low Lines - displaying extreme levels
Midline - displaying the middle line (50.5%)
Show 29.5 Line - additional level 29.5%
Show 70.5 Line - additional level 70.5%
Show 88 Line - additional level 88%
Extensions Fibonacci
There are 6 customizable extension levels available:
Ext#1 (default 1.0)
Ext#2 (default 1.27)
Ext#3 (default 1.62)
Ext#4 (default 2.0)
Ext#5 (default 2.62)
Ext#6 (default 3.62)
For each level, you can configure:
On/Off
Color
Meaning
Alerts
The indicator provides the following types of alerts:
Entering/Exiting OTE Zones:
Entering 70% OTE Zone
Exiting 70% OTE Zone
Entering 30% OTE Zone
Exiting 30% OTE Zone
Crossing Additional Levels:
Crossing 29.5% Level
Crossing 70.5% Level
Crossing 88% Level
Reaching Extension Levels Fibonacci:
Alerts for each configured extension level
Support for both positive and negative extensions
Usage
Add the indicator to the chart
Configure the required display parameters
Set alerts if necessary
Use OTE zones to identify potential entry points into the market
Notes
The indicator automatically updates when the visible area of the chart changes
When using a custom date range, make sure the selected period contains data
For correct operation with a higher time frame, make sure that historical data is available
Visible and Anchored OTE chart
Индикатор для визуализации ценовых уровней и зон оптимальной торговли (OTE - Optimal Trading Entry) с использованием уровней Фибоначчи.
Основные возможности
Визуализация ценовых диапазонов с помощью двух OTE зон:
OTE 70% (79-62 уровни Фибоначчи)
OTE 30% (21-38 уровни Фибоначчи)
Настройка временных периодов:
Возможность использования пользовательского диапазона дат
Опция работы с высшим таймфреймом
Гибкая настройка отображения:
Выбор между использованием тел свечей или полного диапазона для привязки
Настраиваемый внешний вид боксов OTE
Настраиваемые текстовые метки
Дополнительные уровни:
Средняя линия (50.5%)
Опциональные уровни 29.5%, 70.5% и 88%
Настраиваемые расширения Фибоначчи
Настройка индикатора
Основные параметры
Use Custom Dates - включение пользовательского диапазона дат
Start Date/End Date - установка временного диапазона
Use Higher Timeframe - использование высшего таймфрейма
Higher Timeframe - выбор высшего таймфрейма
Настройка OTE зон
Show Fib Box - отображение зон OTE
Enable Fib Box 79-62 - включение зоны OTE 70%
Enable Fib Box 21-38 - включение зоны OTE 30%
Show Text - отображение текстовых меток в зонах
Визуальное оформление
Text Size - размер текста (tiny/small/medium/large)
Text Color - цвет текста
Text Alignment - выравнивание текста
Line Thickness - толщина линий (1-4)
Line Style - стиль линий (Solid/Dashed/Dotted)
Уровни Фибоначчи
High/Low Lines - отображение крайних уровней
Midline - отображение средней линии (50.5%)
Show 29.5 Line - дополнительный уровень 29.5%
Show 70.5 Line - дополнительный уровень 70.5%
Show 88 Line - дополнительный уровень 88%
Расширения Фибоначчи
Доступно 6 настраиваемых уровней расширения:
Ext#1 (по умолчанию 1.0)
Ext#2 (по умолчанию 1.27)
Ext#3 (по умолчанию 1.62)
Ext#4 (по умолчанию 2.0)
Ext#5 (по умолчанию 2.62)
Ext#6 (по умолчанию 3.62)
Для каждого уровня можно настроить:
Включение/выключение
Цвет
Значение
Оповещения
Индикатор предоставляет следующие типы оповещений:
Вход/выход из зон OTE:
Вход в зону OTE 70%
Выход из зоны OTE 70%
Вход в зону OTE 30%
Выход из зоны OTE 30%
Пересечение дополнительных уровней:
Пересечение уровня 29.5%
Пересечение уровня 70.5%
Пересечение уровня 88%
Достижение уровней расширения Фибоначчи:
Оповещения для каждого настроенного уровня расширения
Поддержка как положительных, так и отрицательных расширений
Использование
Добавьте индикатор на график
Настройте необходимые параметры отображения
При необходимости установите оповещения
Используйте зоны OTE для определения потенциальных точек входа в рынок
Примечания
Индикатор автоматически обновляется при изменении видимой области графика
При использовании пользовательского диапазона дат убедитесь, что выбранный период содержит данные
Для корректной работы с высшим таймфреймом убедитесь в доступности исторических данных
Bandes et canaux
XSRM Support and Resistant LevelXSRMulti is an advanced indicator designed to help traders analyze various price levels and identify potential trading opportunities. This indicator primarily focuses on tracking price movements based on high, low, and mid levels. Users have the flexibility to analyze these levels across different timeframes and price sources (open, close, high, low).
Features and Settings:
General Settings:
Bar Back: Determines how many bars back in time the price movements should be analyzed.
Offset: Defines the offset value used in calculations.
H/L Depth: The depth used for analyzing the highest and lowest price levels.
Mid: The ratio used to calculate the mid-level between the highest and lowest prices.
Optional Settings:
Source: Defines the price source used for calculating high and low levels (open, close, average, etc.).
Use HeikinAshi for range: Option to use HeikinAshi candles for price range analysis.
Logarithmic: Option to apply logarithmic calculations to price levels.
Break at first swing: Determines whether to break at the first price swing.
Visual Features:
Colors: The user can choose three different colors for the analyzed levels.
Extend left/right: Allows the extension of analyzed levels to the past or future.
How It Works:
XSRMulti operates based on three main analysis zones:
Zone 1: The highest, lowest, and mid levels are calculated and plotted.
Zone 2: A second analysis zone is created with similar calculations.
Zone 3: A third analysis zone is formed using the same methods.
Each zone is based on specific bar analysis, which determines the price levels. These levels can be used to make trading decisions. The user can also choose to extend the levels further to the right or left.
Table Information:
The indicator includes a table displaying daily price rate of change. This provides the user with insights into daily price movements.
Usage:
XSRMulti is a powerful analysis tool for traders. It is particularly useful for short-term traders, as it provides detailed insights into price movements. Users can make trading decisions based on the identified levels, especially when the price reaches certain thresholds.
Note:
The indicator uses current timeframe price data for calculations.
HeikinAshi-based analysis presents smoother price movements, making trend-following easier.
4 MAsThe 4 MAs indicator is a moving average crossover tool designed to identify market trends and provide potential entry and exit signals. By plotting four simple moving averages (SMAs) of different periods, this indicator helps traders understand both short-term and long-term market dynamics. It is particularly suited for trend-following strategies and can be applied across various timeframes, such as daily, hourly, or intraday charts.
Features:
1. Moving Average Visualization:
- Short-term Moving Averages (MA 5 and MA 10): Highlight short-term market fluctuations.
- Mid-term Moving Average (MA 15): Serves as a reference for medium-term trends.
- Long-term Moving Average (MA 30): Represents the broader market trend.
2. Trend Signal Detection:
- Bullish Signal: When the 5-period moving average crosses above the 30-period moving average (golden cross), a yellow upward arrow is displayed below the price bar, indicating a potential uptrend.
- Bearish Signal: When the 5-period moving average crosses below the 30-period moving average (death cross), a red downward arrow is displayed above the price bar, signaling a potential downtrend.
Key Advantages:
- Multi-timeframe Versatility: Works well on various timeframes, making it suitable for both short-term scalping and long-term trend analysis.
- Simple Visualization: Clear signals and trend identification through color-coded moving averages and signal arrows.
- Customizable: The SMA periods can be adjusted to align with the trader's preferred strategy or market conditions.
NZX's EMAExponential Moving Averages (EMAs) are widely used tools in technical analysis for identifying trends and potential trading opportunities. EMAs place more weight on recent price data, making them more responsive to price changes compared to simple moving averages (SMAs). Here's a breakdown of different EMA periods and their uses:
### **EMA Descriptions**
1. **EMA 12 (Short-Term)**
- **Purpose**: Captures short-term price trends.
- **Use**: Useful for day traders and scalpers looking for quick entry/exit signals.
- **Behavior**: Reacts quickly to price changes, making it ideal for volatile markets.
2. **EMA 21 (Short to Mid-Term)**
- **Purpose**: Provides a slightly broader view of short-term trends.
- **Use**: Often combined with EMA 12 for crossover strategies. A 12/21 crossover can indicate a potential shift in trend.
- **Behavior**: Less noise than EMA 12 but still responsive.
3. **EMA 50 (Mid-Term)**
- **Purpose**: Identifies medium-term trends and serves as a key support or resistance level.
- **Use**: Often used to confirm trend direction in swing trading.
- **Behavior**: Balances responsiveness with stability, filtering out short-term fluctuations.
4. **EMA 100 (Intermediate)**
- **Purpose**: Highlights longer-term trends compared to EMA 50.
- **Use**: Used by traders to determine stronger levels of support/resistance and trend stability.
- **Behavior**: Smooths out short-term movements, focusing on more stable trends.
5. **EMA 200 (Long-Term)**
- **Purpose**: A critical indicator for long-term trend analysis.
- **Use**: Commonly used by investors and swing traders to identify overall market direction. Price above EMA 200 suggests an uptrend; below it indicates a downtrend.
- **Behavior**: Very stable and reacts slowly, offering a clear view of macro trends.
---
### **Uses and Applications of EMAs**
1. **Trend Identification**
- EMAs help traders identify whether a market is in an uptrend, downtrend, or moving sideways.
2. **Crossover Strategies**
- Common signals include short-term EMA crossing above or below longer-term EMAs, indicating bullish or bearish momentum.
- **Golden Cross**: Short EMA (e.g., 50) crosses above a long EMA (e.g., 200) — bullish signal.
- **Death Cross**: Short EMA crosses below a long EMA — bearish signal.
3. **Dynamic Support and Resistance**
- EMAs act as dynamic levels where price often bounces during trends.
4. **Momentum Strength**
- The slope of an EMA indicates the strength of a trend. A steeper EMA suggests stronger momentum.
5. **Mean Reversion**
- During trends, prices often revert to EMAs before continuing the trend, offering pullback entry points.
6. **Filter for Noise**
- By adjusting the EMA period, traders can filter out noise and focus on significant price movements.
### **Combination Strategy Example**
- Use EMA 12 and 21 for short-term signals.
- Monitor EMA 50 and 100 for trend confirmation.
- EMA 200 can act as a long-term directional guide.
By combining multiple EMAs, traders gain a multi-perspective view of the market, allowing them to adapt strategies to different timeframes and market conditions.
XRP/USD Scalping Strategy with Alerts
The strategy in your script is designed for scalping XRP/USD, utilizing a combination of Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Volume analysis, and N-Bar detection to identify potential buy and sell signals. It aims to make quick, small profits by taking advantage of short-term price movements. Here's a detailed breakdown:
Key Components of the Strategy:
Exponential Moving Averages (EMAs):
Short EMA (8-period) and Long EMA (21-period) are used to identify the trend.
A buy signal is generated when the Short EMA crosses above the Long EMA (bullish crossover).
A sell signal is generated when the Short EMA crosses below the Long EMA (bearish crossunder).
Relative Strength Index (RSI):
The RSI (with a 14-period) is used to assess whether the market is in an overbought or oversold condition.
For a long position, the strategy checks if the RSI is above 50 to ensure that the market is not in an oversold condition.
For a short position, the strategy checks if the RSI is below 50, which signals a weaker or bearish market.
Volume Analysis:
The strategy checks if the current volume is greater than the average volume over a defined period (20 bars in this case).
Higher volume indicates stronger market participation and gives more confidence in the signals.
N-Bar Detection:
The strategy uses a custom function to detect the price action of the last n bars.
Bullish N-bars: If the lowest low of the last n_bars is higher than the lowest low of the previous 2*n_bars (indicating a bullish reversal pattern).
Bearish N-bars: If the highest high of the last n_bars is lower than the highest high of the previous 2*n_bars (indicating a bearish reversal pattern).
Buy (Long) Condition:
EMA Crossover: The Short EMA crosses above the Long EMA, indicating a potential upward trend.
RSI > 50: The market is not in an oversold state (indicating that the market is bullish).
Volume > Average Volume: The current volume is higher than the average volume, signaling increased market activity.
Bullish N-bars: The price action of the last n_bars shows a bullish reversal, providing additional confirmation for a buy.
Sell (Short) Condition:
EMA Crossunder: The Short EMA crosses below the Long EMA, indicating a potential downward trend.
RSI < 50: The market is not in an overbought state (indicating that the market is bearish).
Volume > Average Volume: The current volume is higher than the average volume, signaling increased market activity.
Bearish N-bars: The price action of the last n_bars shows a bearish reversal, providing additional confirmation for a sell.
Take Profit and Stop Loss:
The strategy includes a take profit and stop loss mechanism to limit the risk and secure profits.
Take Profit: Set at 1.5% of the entry price.
Stop Loss: Set at 0.7% of the entry price.
Alerts:
The strategy has alerts for both buy and sell signals.
When the buy or sell conditions are met, it triggers an alert, sending notifications (pop-up, email, etc.) to the user.
Summary of the Strategy:
Trend Following with EMA: The strategy relies on the crossover of short and long EMAs to determine the trend direction.
Momentum Analysis with RSI: The RSI confirms that the market is not overbought or oversold, ensuring that the trade is made in favorable conditions.
Volume Confirmation: Only signals with increased market participation (higher volume than the average) are considered valid.
Reversal Patterns with N-bars: The N-bar detection adds a layer of confirmation for potential reversals, improving the accuracy of entry signals.
Risk Management: The take profit and stop loss levels are designed to capture small, profitable moves while protecting from large losses.
This scalping strategy aims for quick, small profits with controlled risk, making it suitable for highly liquid markets like XRP/USD. The use of EMAs, RSI, volume analysis, and N-bar patterns increases the reliability of the signals and helps minimize false entries.
cá nhân//@version=5
strategy("Demo GPT - Supertrend", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, slippage=3)
// Inputs
Periods = input.int(10, title="ATR Period")
src = input.source(hl2, title="Source")
Multiplier = input.float(3.0, title="ATR Multiplier", step=0.1)
changeATR = input.bool(true, title="Change ATR Calculation Method ?")
showSignals = input.bool(true, title="Show Signals ?")
highlighting = input.bool(true, title="Highlighter On/Off ?")
emaPeriod = input.int(50, title="EMA Period")
bbLength = input.int(20, title="Bollinger Bands Length")
bbMultiplier = input.float(2.0, title="Bollinger Bands Multiplier")
// ATR Calculation
atr2 = ta.sma(ta.tr, Periods)
atr = changeATR ? ta.atr(Periods) : atr2
// Supertrend Calculation
up = src - (Multiplier * atr)
up1 = nz(up , up)
up := close > up1 ? math.max(up, up1) : up
dn = src + (Multiplier * atr)
dn1 = nz(dn , dn)
dn := close < dn1 ? math.min(dn, dn1) : dn
trend = 1
trend := nz(trend , trend)
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
// Bollinger Bands Calculation
basis = ta.sma(close, bbLength)
deviation = ta.stdev(close, bbLength)
upperBand = basis + (bbMultiplier * deviation)
lowerBand = basis - (bbMultiplier * deviation)
// Plot Supertrend and Bollinger Bands
upPlot = plot(trend == 1 ? up : na, title="Up Trend", style=plot.style_line, linewidth=2, color=color.green)
dnPlot = plot(trend == 1 ? na : dn, title="Down Trend", style=plot.style_line, linewidth=2, color=color.red)
plot(upperBand, title="Upper Band", color=color.blue, linewidth=1)
plot(lowerBand, title="Lower Band", color=color.blue, linewidth=1)
plot(basis, title="BB Basis", color=color.gray, linewidth=1)
// Buy and Sell Signals
buySignal = close > upperBand
sellSignal = close < lowerBand
if (buySignal and showSignals)
strategy.entry("Buy", strategy.long)
if (sellSignal and showSignals)
strategy.close("Buy")
// Highlighting
mPlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0)
longFillColor = highlighting ? (trend == 1 ? color.new(color.green, 90) : na) : na
shortFillColor = highlighting ? (trend == -1 ? color.new(color.red, 90) : na) : na
fill(mPlot, upPlot, title="UpTrend Highlighter", color=longFillColor)
fill(mPlot, dnPlot, title="DownTrend Highlighter", color=shortFillColor)
// Date Range Filter
startDate = input.time(timestamp("2018-01-01 00:00"), title="Start Date")
endDate = input.time(timestamp("2069-12-31 23:59"), title="End Date")
inDateRange = (time >= startDate and time <= endDate)
if not inDateRange
strategy.close_all()
EMA Strategy with Price & EMA5 & EMA8 < EMA50 ConditionEMAile al-sat testi gerçekleştirildi.
Stratejiler güncellenmeye devam edecek. vakit olursa tabi
Pi Cycle Top IndicatorThis will help you identify when the top is in for BTC using 1D candles on bitcoin index chart. it has worked flawlessly for previous cycles, lets see if it works going forward.
Altcoin Season Indicator//@version=5
indicator("Altcoin Season Indicator", overlay=false)
// Input for Bitcoin Dominance (BTC.D)
btcDominance = request.security("CRYPTOCAP:BTC.D", "D", close)
altcoinMarketCap = request.security("CRYPTOCAP:TOTAL2", "D", close)
// Moving Averages for Trend Analysis
btcMA = ta.sma(btcDominance, 50)
altMA = ta.sma(altcoinMarketCap, 50)
// RSI for Momentum
btcRSI = ta.rsi(btcDominance, 14)
altRSI = ta.rsi(altcoinMarketCap, 14)
// Altcoin Season Conditions
btcBearish = btcDominance < btcMA and btcRSI < 50
altBullish = altcoinMarketCap > altMA and altRSI > 50
// Signal for Altcoin Season
altcoinSeason = btcBearish and altBullish
// Plotting
bgcolor(altcoinSeason ? color.new(color.green, 90) : na)
plot(btcDominance, color=color.red, title="BTC Dominance")
plot(altcoinMarketCap / 1e12, color=color.blue, title="Altcoin Market Cap (T)")
alertcondition(altcoinSeason, title="Altcoin Season Signal", message="Altcoin Season may be starting!")
Basic systemThis shows breakout in 5 minutes .
This shows breakout in 5 minutes .
This shows breakout in 5 minutes .
This shows breakout in 5 minutes .
This shows breakout in 5 minutes .'
This shows breakout in 5 minutes .
Hold Time With Percentage Drop Catastrophic ExitStrategy Name: Volatile Market Minimum-Hold & Catastrophic Drop Exit Strategy
Description:
This is a strategy designed to operate effectively within volatile trading environments, with specific rules that balance patience with protection from risk. It looks to capitalize on breakout conditions but provides a failsafe in the event of a sudden severe price decline.
Key Features:
Volatility-Based Entry Criteria:
This strategy is based on Bollinger Bands, ATR, VWAP, and MACD in trying to find breakout opportunities with increased volatility in the markets. It demands that the price go over the upper Bollinger Band when ATR indicates increased turbulence and that MACD signals upward momentum. In this way, it selects trades with high follow-through likelihoods, especially under trending conditions.
Minimum Holding Period:
Once a long position is initiated, the strategy imposes a strict "no-sell" period in bars. This means that, under normal circumstances, it will not close the position. This encourages the trade to mature, reducing the likelihood of premature exits caused by minor pullbacks or intraday noise.
Volume Confirmation:
A relative volume filter ensures that breakouts aren't occurring in low-liquidity conditions. In doing so, the strategy is only looking to enter when market participation is well above average, thereby increasing the odds of price moves being legitimate and sustainable.
Catastrophic Drop Exit:
The strategy includes a "catastrophic drop" mechanism to help mitigate severe, unexpected losses. If the price falls below a user-defined percentage of the entry price—sufficiently large to indicate a major market breakdown—it will override the minimum hold rule and immediately close the position. This helps protect capital if the market suddenly turns sharply negative.
User Configuration:
All the key parameters, which include the minimum hold duration, catastrophic drop percentage, Bollinger Band settings, MACD lengths, and ATR-based stop/target multiples, are user-editable. Traders can adjust the aggressiveness, holding time, and risk controls of the strategy to fit their specific risk tolerance, trading style, and the volatility profile of the markets in which they're participating.
Intended Use Case:
This strategy is more suitable for traders operating in more volatile markets, with frequent whipsaws and fast price moves. It tries to capture the upside of a volatile breakout while minimizing the downside from a sudden price collapse by balancing a forced hold period against the flexibility of a catastrophic drop exit.
Note:
This approach is in line with all automated or rules-based approaches: extensive backtesting and parameter optimization, followed by thorough forward-testing on paper, is very strongly advised before going into live market conditions. Also, adjust parameters to better suit your instrument of choice, timeframe, and your criteria of personal risk management.
Volatility Signaling 50SMAOverview of the Script:
The script implements a volatility signaling indicator using a 50-period Simple Moving Average (SMA). It incorporates Bollinger Bands and the Average True Range (ATR) to dynamically adjust the SMA's color based on volatility conditions. Here's a detailed breakdown:
Components of the Script:
1. Inputs:
The script allows the user to customize key parameters for flexibility:
Bollinger Bands Length (length): Determines the period for calculating the Bollinger Bands.
Source (src): The price data to use, defaulting to the closing price.
Standard Deviation Multiplier (mult): Scales the Bollinger Bands' width.
ATR Length (atrLength): Sets the period for calculating the ATR.
The 50-period SMA length (smaLength) is fixed at 50.
2. Bollinger Bands Calculation:
Basis: Calculated as the SMA of the selected price source over the specified length.
Upper and Lower Bands: Determined by adding/subtracting a scaled standard deviation (dev) from the basis.
3. ATR Calculation:
Computes the Average True Range over the user-defined atrLength.
4. Volatility-Based Conditions:
The script establishes thresholds for Bollinger Band width relative to ATR:
Yellow Condition: When the band width (upper - lower) is less than 1.25 times the ATR.
Orange Condition: When the band width is less than 1.5 times the ATR.
Red Condition: When the band width is less than 1.75 times the ATR.
5. Dynamic SMA Coloring:
The 50-period SMA is colored based on the above conditions:
Yellow: Indicates relatively low volatility.
Orange: Indicates moderate volatility.
Red: Indicates higher volatility.
White: Default color when no conditions are met.
6. Plotting the 50-Period SMA:
The script plots the SMA (sma50) with a dynamically assigned color, enabling visual analysis of market conditions.
Use Case:
This script is ideal for traders seeking to assess market volatility and identify changes using Bollinger Bands and ATR. The colored SMA provides an intuitive way to gauge market dynamics directly on the chart.
Example Visualization:
Yellow SMA: The market is in a low-volatility phase.
Orange SMA: Volatility is picking up but remains moderate.
Red SMA: Higher volatility, potentially signaling significant market activity.
White SMA: Neutral/default state.
Directional Volume IndexDirectional Volume Index (DVI) (buying/selling pressure)
This index is adapted from the Directional Movement Index (DMI), but based on volume instead of price movements. The idea is to detect building directional volume indicating a growing amount of orders that will eventually cause the price to follow. (DVI is not displayed by default)
The rough algorithm for the Positive Directional Volume Index (green bar):
calculate the delta to the previous green bar's volume
if the delta is positive (growing buying pressure) add it to an SMA, else add 0 (also for red bars)
divide these average deltas by the average volume
the result is the Positive Directional Volume Index (DVI+) (vice versa for DVI-)
Differential Directional Volume Index (DDVI) (relative pressure)
Creating the difference of both Directional Volume Indexes (DVI+ - DVI-) creates the Differential Directional Volume Index (DDVI) with rising values indicating a growing buying pressure, falling values a growing selling pressure. (DDVI is displayed by default, smoothed by a custom moving average)
Average Directional Volume Index (ADVX) (pressure strength)
Putting the relative pressure (DDVI) in relation to the total pressure (DVI+ + DVI-) we can determine the strength and duration of the currently building volume change / trend. For the DMI/ADX usually 20 is an indicator for a strong trend, values above 50 suggesting exhaustion and approaching reversals. (ADVX is not displayed by default, smoothed by a custom moving average)
Divergences of the Differential Directional Volume Index (DDVI) (imbalances)
By detecting divergences we can detect situations where e.g. bullish volume starts to build while price is in a downtrend, suggesting that there is growing buying pressure indicating an imminent bullish pullback/order block or reversal. (strong and hidden divergences are displayed by default)
Divergences Overview:
strong bull: higher lows on volume, lower lows on price
medium bull: higher lows on volume, equal lows on price
weak bull: equal lows on volume, lower lows on price
hidden bull: lower lows on volume, higher lows on price
strong bear: lower highs on volume, higher highs on price
medium bear: lower highs on volume, equal highs on price
weak bear: equal highs on volume, higher highs on price
hidden bear: higher highs on volume, lower highs on price
DDVI Bands (dynamic overbought/oversold levels)
Using Bollinger Bands with DDVI as source we receive an averaged relative pressure with stdev band offsets. This can be used as dynamic overbought/oversold levels indicating reversals on sharp crossovers.
Alerts
As of now there are no alerts built in, but all internal data is exposed via plot and plotshape functions, so it can be used for custom crossover conditions in the alert dialog. This is still a personal research project, so if you find good setups, please let me know.
Moving Average with Std DeviationsA simple indicator to show a Moving Average with the option to show Standard Deviations of that Moving Average.
When price moves to the outer bands, this can indicate that it is becoming over extended, and may revert back to the mean, have a pull back in a trend, amongst other things.
Created for my own use, but you are welcome to use it if you find it useful.
Thanks!
Institutional Order Flow StrategyLa strategia implementata è denominata "Institutional Order Flow Strategy" e si basa sull'identificazione di Order Blocks e su specifiche condizioni di ingresso e uscita per le posizioni long e short. L'idea è di identificare i livelli dove operano i bot degli istituzionali, poi attraverso degli obbiettivi di profitto individuali, piazzare tre livelli di profitto atteso.
Ecco una spiegazione dettagliata delle varie sezioni del codice:
1. Impostazioni di Input
Input Session: Imposta una sessione di trading dalle 09:30 alle 16:00.
Lookback Period: Periodo di osservazione di 20 barre per identificare gli order blocks.
Target Percentuali: Tre obiettivi di profitto (Target 1, Target 2, Target 3) espressi in percentuale rispetto al prezzo medio di ingresso.
2. Identificazione degli Order Blocks
Il codice calcola i massimi e minimi più alti e più bassi nel periodo di lookback specificato:
Order Block Buy: Viene identificato come il massimo più alto quando la barra precedente è bearish (chiusura < apertura) e la barra corrente è bullish (chiusura > apertura).
Order Block Sell: Viene identificato come il minimo più basso quando la barra precedente è bullish e la barra corrente è bearish.
3. Logica di Ingresso
In Session: Verifica se il tempo attuale è all'interno della sessione di trading specificata.
Condizioni di Ingresso Long e Short:
Long: La chiusura deve essere superiore all'order block di acquisto e deve essere all'interno della sessione.
Short: La chiusura deve essere inferiore all'order block di vendita e deve essere all'interno della sessione.
4. Entrate nella Strategia
Se le condizioni di ingresso sono soddisfatte, vengono aperte posizioni long o short:
strategy.entry("Long", strategy.long) per le posizioni long.
strategy.entry("Short", strategy.short) per le posizioni short.
5. Calcolo degli Obiettivi per Scalare le Uscite
Per ogni posizione aperta, vengono calcolati tre obiettivi di prezzo per il take profit, basati sul prezzo medio di ingresso:
Long Targets: Calcolati aggiungendo le percentuali specificate al prezzo medio di ingresso.
Short Targets: Calcolati sottraendo le percentuali specificate dal prezzo medio di ingresso.
6. Logica di Uscita con Scalabilità
Quando ci sono posizioni aperte, vengono impostate le uscite:
Per le posizioni long, si esce dal 50% della posizione al Target 1, il 30% al Target 2 e il 20% al Target 3.
Per le posizioni short, la logica è simile, ma si esce a target di prezzo calcolati in senso inverso.
7. Visualizzazione degli Order Blocks
Infine, il codice visualizza gli order blocks sul grafico:
L'order block di acquisto viene tracciato in verde.
L'order block di vendita viene tracciato in rosso.
Conclusione
In sintesi, questa strategia di trading cerca di sfruttare i movimenti di mercato basati sugli order blocks, impostando condizioni di ingresso e uscita chiare, insieme a obiettivi di profitto scalabili.
5 EMA / 20 EMA Crossover Strategy5 EMA / 20 EMA Crossover Strategy
shortEMA: The 5-period EMA.
longEMA: The 20-period EMA.
ta.crossover(ema5, ema20): This function checks if the 5-period EMA crosses above the 20-period EMA, generating a buy signal.
ta.crossunder(ema5, ema20): This function checks if the 5-period EMA crosses below the 20-period EMA, generating a sell signal.
strategy.entry("Buy", strategy.long): This function enters a long position when a buy signal is triggered.
strategy.close("Buy"): This closes the long position when a sell signal is triggered.
The strategy also includes visual markers (plotshape) to highlight buy and sell signals on the chart with labels "BUY" and "SELL."
RSI and MACD StrategyMACD >0 + RSI >60 and Candle closing above 50 EMA that will give bullish signal
5PHLM_testing5PHLM_testing
Microsoft Defender SmartScreen helps safeguard your security against phishing and malware sites and software and helps you make informed decisions about downloads.
EMA 20 ve EMA 50 Kesişim EmA kesişimleri
ayı ve boğa oluşumları...
al veren pozisyonlar
sat veren pozisyonlar
ek olarak fisher le takip edilebilir zamanla.
9-15 Ema Strategy by ChartedhighsFeatures:
Threshold Input:
Allows the user to set a customizable threshold for the absolute difference between the two EMAs (default: 5).
Ensures only significant differences are considered for trend identification.
Exponential Moving Averages (EMAs):
Calculates two EMAs:
EMA 9: A faster-moving average for short-term trends.
EMA 15: A slower-moving average for mid-term trends.
Trend Identification:
The absolute difference (ema_diff) between the two EMAs is used to determine trend significance.
Conditions for trends:
Bullish Trend: EMA 9 is above EMA 15, and their difference meets or exceeds the threshold.
Bearish Trend: EMA 9 is below EMA 15, and their difference meets or exceeds the threshold.
Visual Indicators:
Background Color:
Green background for bullish trends.
Red background for bearish trends.
The transparency level is set to 90 for subtle visualization.
If conditions are not met, no background color is applied.
EMA Plots:
EMA 9 is plotted in blue.
EMA 15 is plotted in orange.
Provides a clear visual representation of the EMAs on the chart.
User-Friendly Settings:
Customizable parameters via an input field to adapt the strategy to various market conditions.
Purpose: This script helps traders identify strong bullish or bearish trends based on EMA crossovers and their differences, enabling them to make informed decisions. It is particularly useful for quick visual analysis of market trends on any timeframe.