Indicators and strategies
Time-Based High and Low Marker//@version=5
indicator("Time-Based Candle High & Low", overlay=true)
// Input: Specify the time for the 5-minute candle
input_time = input.time(timestamp("2025-01-01 09:00:00"), title="Select Candle Time")
// Variables to store the high and low of the specified candle
var float selected_high = na
var float selected_low = na
// Check if the current candle matches the input time
if (time == input_time)
selected_high := high
selected_low := low
// Plot the high and low values as horizontal lines
if not na(selected_high)
line.new(bar_index, selected_high, bar_index + 1, selected_high, color=color.green, width=2, extend=extend.right)
if not na(selected_low)
line.new(bar_index, selected_low, bar_index + 1, selected_low, color=color.red, width=2, extend=extend.right)
// Plot labels for better visibility
if not na(selected_high)
label.new(bar_index, selected_high, str.tostring(selected_high), style=label.style_label_up, color=color.green, textcolor=color.white)
if not na(selected_low)
label.new(bar_index, selected_low, str.tostring(selected_low), style=label.style_label_down, color=color.red, textcolor=color.white)
Custom Moving Average//@version=5
indicator("Custom Moving Average", overlay=true)
// Input parameters
length = input.int(14, title="SMA Length")
source = input.source(close, title="Source")
// Calculation
sma = ta.sma(source, length)
// Plot the SMA
plot(sma, color=color.blue, linewidth=2, title="SMA")
Renko Boxes [by dawoud]This indicator combines the strength of Renko channels with traditional price action charts, offering a unique perspective on market trends and reversals. Unlike standalone Renko charts, which obscure time, this indicator overlays Renko-based channels directly onto your standard price action chart, precisely showing trends over time.
Key Features:
Renko Channel Visualization: Clearly defined channels help identify trends, support, and resistance levels.
Seamless Integration: The Renko channels are plotted directly on your regular candlestick or bar charts, preserving the context of price and time.
Enhanced Trend Clarity: Smooth out market noise and focus on significant price movements.
Customizable Settings: Adjust brick size and channel parameters to fit your trading strategy.
I haven't yet figured out a strategy for this indicator. If you have an idea, please contact me and we will build that together.
CRT TBSThe CRT Candle Marker is a custom indicator designed to identify and highlight specific candlestick patterns on a chart. This indicator focuses on detecting candles where the body of the candlestick is larger than the combined size of its wicks (upper and lower). Such candles often indicate strong momentum in the market, making them valuable for traders who rely on price action analysis.
Features
Automatic Detection: The indicator automatically scans all candlesticks on the chart to identify CRT candles.
Visual Marking: Once a CRT candle is detected, it places a label with the text "CRT" above the candlestick for easy identification.
Customizable Design: The label is styled with a blue background and white text, ensuring it stands out clearly on the chart.
Use Case
The CRT Candle Marker is particularly useful for traders who:
Want to identify strong momentum candles that could signal potential trend continuation or reversal points.
Rely on price action strategies and need visual cues to spot significant patterns quickly.
Analyze candlestick behavior to confirm entry or exit points in their trading strategies.
How to Use
Copy the Pine Script code and paste it into the Pine Editor in TradingView.
Click Add to Chart to apply the indicator.
Look for candles marked with the "CRT" label to identify strong momentum candles.
Example Scenario
Imagine you're analyzing a chart and looking for strong bullish momentum. With the CRT Candle Marker, you can easily spot candles where the buyers dominated the session, as indicated by a large body relative to the wicks. Similarly, bearish CRT candles could indicate strong selling pressure.
Conclusion
The CRT Candle Marker is a simple yet powerful tool for traders who want to enhance their candlestick analysis. By highlighting significant momentum candles, this indicator helps traders make more informed decisions and improve their overall trading performance.
Enhanced SMA Signal Box With TargetsEnhanced SMA Signal Box With Targets
The Enhanced SMA Signal Box With Targets indicator is a versatile tool designed to help traders identify buy and sell signals based on various technical analysis methods, including Simple Moving Averages (SMA), Exponential Moving Averages (EMA), and Average True Range (ATR). This indicator provides clear visual signals and target levels to assist traders in making informed decisions.
Key Features
Simple Moving Averages (SMA):
20 SMA: Represents short-term price trends.
50 SMA: Represents long-term price trends.
Exponential Moving Average (EMA):
50 EMA: Adds additional trend confirmation to the SMA.
Signal Visualization:
Buy Signals: Displayed with a green "🚀" emoji below the candle when the closing price crosses above the 20 SMA.
Sell Signals: Displayed with a red "💣" emoji above the candle when the closing price crosses below the 20 SMA.
Yellow Box: Highlights the signal candle, making it easy to identify the most recent and historical signals.
Target Prices:
First Target: Based on the size of the signal candle.
Second and Third Targets: Calculated using the ATR multiplied by a user-defined factor to help set profit-taking levels.
Customizable Filters:
MACD Filter: Users can enable this filter to use MACD line crossings for signal confirmation.
Higher Timeframe SMA Filter: Users can set a higher timeframe SMA to filter signals based on the long-term trend.
Volume Filter: Users can set a minimum volume threshold for signals.
Alerts:
Users can enable alerts for buy and sell signals, ensuring they never miss a trading opportunity.
Customizable Settings:
Line Colors and Thickness: Users can adjust the colors and thickness of the SMAs, EMA, and signal boxes.
Signal Emojis: Users can choose custom emojis for buy and sell signals.
How It Works
Trend Calculation: The indicator calculates short-term and long-term trends using the 20 SMA, 50 SMA, and 50 EMA.
Signal Generation: Buy and sell signals are generated when the price crosses the 20 SMA, with optional confirmation from MACD and volume filters.
Target Calculation: Profit targets are based on the size of the signal candle and ATR, helping traders set realistic profit-taking levels.
Important Notice
This indicator is designed for educational purposes and should not be considered as financial advice. Past performance does not guarantee future results. Users should conduct their own research and analysis before making any trading decisions. Trading involves substantial risk and is not suitable for every investor. Always consider your financial situation, investment objectives, and risk tolerance before trading. Please ensure you comply with all the relevant regulations and TradingView's house rules while using this indicator.
Arrow-SimplyTrade vol1.5-FinalTitle: Arrow-SimplyTrade vol1.5-Final
Description:
This advanced trading indicator is designed to assist traders in analyzing market trends and identifying optimal entry signals. It combines several popular technical analysis tools and strategies, including EMA (Exponential Moving Average), MA (Simple Moving Averages), Bollinger Bands, and candlestick patterns. This indicator provides both trend-following and counter-trend signals, making it suitable for various trading styles, such as scalping and swing trading.
Main Features:
EMA (Exponential Moving Average):
EMA200 is the main trend line that helps determine the overall market direction. When the price is above EMA200, the trend is considered bullish, and when the price is below EMA200, the trend is considered bearish.
It helps filter out signals that go against the prevailing market trend.
Simple Moving Averages (MA5 and MA15):
This indicator uses two Simple Moving Averages: MA5 (Fast) and MA15 (Slow). Their crossovers create buy or sell signals:
Buy Signal: When MA5 crosses above MA15, signaling a potential upward trend.
Sell Signal: When MA5 crosses below MA15, signaling a potential downward trend.
Bollinger Bands:
Bollinger Bands measure market volatility and can identify periods of overbought or oversold conditions. The Upper and Lower Bands help detect potential breakout points, while the Middle Line (Basis) serves as dynamic support or resistance.
This tool is particularly useful for identifying volatile conditions and potential reversals.
Arrows:
The indicator plots arrows on the chart to signal entry opportunities:
Green Arrows signal buy opportunities (when MA5 crosses above MA15 and price is above EMA200).
Red Arrows signal sell opportunities (when MA5 crosses below MA15 and price is below EMA200).
Opposite Arrows: Optionally, the indicator can also display arrows for counter-trend signals, triggered by MA5 and MA15 crossovers, regardless of the price's position relative to EMA200.
Candlestick Patterns:
The indicator detects popular candlestick patterns such as Bullish Engulfing, Bearish Engulfing, Hammer, and Doji.
These patterns are important for confirming entry points or anticipating trend reversals.
How to Use:
EMA200: The main trend line. If the price is above EMA200, consider long positions. If the price is below EMA200, consider short positions.
MA5 and MA15: Short-term trend indicators. The crossover of these averages generates buy or sell signals.
Bollinger Bands: Use these bands to spot overbought/oversold conditions. Breakouts from the bands may signal potential entry points.
Arrows: Green arrows represent buy signals, and red arrows represent sell signals. Opposite direction arrows can be used for counter-trend strategies.
Candlestick Patterns: Patterns like Bullish Engulfing or Doji can help confirm the signals.
Customizable Settings:
Fully customizable colors, line styles, and display settings for EMA, MAs, Bollinger Bands, and arrows.
The Candlestick Patterns feature can be toggled on or off based on user preference.
Important Notes:
This indicator is intended to be used in conjunction with other analysis tools.
Past performance does not guarantee future results.
Polish:
Tytuł: Arrow-SimplyTrade vol1.5-Final
Opis:
Ten zaawansowany wskaźnik handlowy jest zaprojektowany, aby pomóc traderom w analizie trendów rynkowych oraz identyfikowaniu optymalnych sygnałów wejścia. Łączy w sobie kilka popularnych narzędzi analizy technicznej i strategii, w tym EMA (Wykładnicza Średnia Ruchoma), MA (Prosta Średnia Ruchoma), Bollinger Bands oraz formacje świecowe. Wskaźnik generuje zarówno sygnały podążające za trendem, jak i przeciwnym trendowi, co sprawia, że jest odpowiedni do różnych stylów handlu, takich jak scalping oraz swing trading.
Główne Funkcje:
EMA (Wykładnicza Średnia Ruchoma):
EMA200 to główna linia trendu, która pomaga określić ogólny kierunek rynku. Gdy cena znajduje się powyżej EMA200, trend jest uznawany za wzrostowy, a gdy poniżej EMA200, za spadkowy.
Pomaga to filtrować sygnały, które są niezgodne z głównym trendem rynkowym.
Proste Średnie Ruchome (MA5 i MA15):
Wskaźnik używa dwóch Prostych Średnich Ruchomych: MA5 (szybka) oraz MA15 (wolna). Ich przecięcia generują sygnały kupna lub sprzedaży:
Sygnał Kupna: Kiedy MA5 przecina MA15 od dołu, sygnalizując potencjalny wzrost.
Sygnał Sprzedaży: Kiedy MA5 przecina MA15 od góry, sygnalizując potencjalny spadek.
Bollinger Bands:
Bollinger Bands mierzą zmienność rynku i mogą pomóc w identyfikowaniu okresów wykupienia lub wyprzedania rynku. Górna i dolna linia pomagają wykrywać punkty wybicia, a Środkowa Linia (Basis) działa jako dynamiczny poziom wsparcia lub oporu.
Narzędzie to jest szczególnie przydatne w wykrywaniu warunków zmienności i potencjalnych odwróceń trendu.
Strzałki:
Wskaźnik wyświetla strzałki na wykresie, które wskazują sygnały kupna i sprzedaży:
Zielona strzałka wskazuje sygnał kupna (gdy MA5 przecina MA15 i cena jest powyżej EMA200).
Czerwona strzałka wskazuje sygnał sprzedaży (gdy MA5 przecina MA15 i cena jest poniżej EMA200).
Strzałki w przeciwnym kierunku: Opcjonalna funkcja, która pokazuje strzałki w przeciwnym kierunku, uruchamiane przez przecięcia MA5 i MA15, niezależnie od pozycji ceny względem EMA200.
Formacje Świecowe:
Wskaźnik wykrywa popularne formacje świecowe, takie jak Bullish Engulfing, Bearish Engulfing, Hammer oraz Doji.
Formacje te pomagają traderom potwierdzić punkty wejścia i przewidzieć możliwe odwrócenia trendu.
Jak Używać:
EMA200: Główna linia trendu. Jeśli cena jest powyżej EMA200, rozważaj pozycje długie. Jeśli cena jest poniżej EMA200, rozważaj pozycje krótkie.
MA5 i MA15: Śledzą krótkoterminowe zmiany trendu. Przecięcia tych średnich generują sygnały kupna lub sprzedaży.
Bollinger Bands: Używaj tych pasm do wykrywania wykupionych lub wyprzedanych warunków. Wybicia z pasm mogą wskazywać potencjalne punkty wejścia.
Strzałki: Zielona strzałka wskazuje sygnał kupna, a czerwona strzałka sygnał sprzedaży. Strzałki w przeciwnym kierunku mogą być używane do strategii przeciwtrendowych.
Formacje Świecowe: Formacje takie jak Bullish Engulfing czy Doji mogą pomóc w potwierdzaniu sygnałów.
Ustawienia Personalizacji:
W pełni personalizowalne kolory, style linii i ustawienia wyświetlania dla EMA, MAs, Bollinger Bands oraz strzałek.
Funkcja Formacji Świecowych może być włączana lub wyłączana według preferencji użytkownika.
Ważne Uwagi:
Ten wskaźnik powinien być używany w połączeniu z innymi narzędziami analizy rynku.
Wyniki z przeszłości nie gwarantują wyników w przyszłości.
Enigma Unlocked 2.0Description for "Enigma Unlocked 2.0" Pine Script Indicator
Overview
Enigma Unlocked 2.0 is an advanced and highly customizable indicator designed to deliver actionable buy and sell signals by leveraging precise candlestick logic during specific market transitions. This indicator is built for flexibility, helping traders identify high-probability trade setups during key trading periods, specifically the transitions between the Asian Kill Zone and London Kill Zone as well as the London Kill Zone and New York Kill Zone on the 30-minute timeframe.
By combining Enigma Unlocked 2.0 with the ICT Killzones & Pivots indicator, traders can gain a deeper understanding of the timing and location of these transitions. Waiting for signals during these defined kill zones increases the likelihood of finding high-probability trade setups.
How to Use
Follow the Kill Zone Transitions:
Use the ICT Killzones & Pivots indicator to clearly visualize the boundaries of the Asian, London, and New York kill zones.
Focus on the signals generated by Enigma Unlocked 2.0 that align with these kill zone transitions.
Plotting Entries and Targets with Gann Box:
For Buy Signals:
Use the Gann Box tool to mark the high and low of the signal candle.
Ensure your Gann Box settings include only the 50%, 0%, and 100% levels.
Your entry zone lies between the 50% and 100% levels (discount zone). This is where buy trades are expected to offer an optimal risk-reward ratio.
For Sell Signals:
Similarly, plot the Gann Box on the high and low of the signal candle.
The 50% to 100% zone acts as the premium area for sell trades.
Setting Stop Loss and Targets:
To identify a safe stop loss, split the 50% zone of the Gann Box using another Gann Box.
Draw the secondary Gann Box from 50% to 100% of the initial box, then extend it to double the height.
For sell trades, place the stop loss above the extended 100% level.
For buy trades, place the stop loss below the extended 100% level.
Aim for a minimum of 1:1 risk-to-reward to ensure optimal trade management.
How It Works
Buy Logic:
Buy Logic 1: Detects a bullish candle (close > open) that:
Closes above its midpoint (50% of the candle body).
Has a low lower than the previous candle's low.
Buy Logic 2: Identifies a bearish candle (close < open) that:
Closes above its midpoint (50% of the candle body).
Has a low lower than the previous candle's low.
Sell Logic:
Sell Logic 1: Detects a bearish candle (close < open) that:
Closes below its midpoint (50% of the candle body).
Has a high higher than the previous candle's high.
Sell Logic 2: Identifies a bullish candle (close > open) that:
Closes below its midpoint (50% of the candle body).
Has a high higher than the previous candle's high.
Real-Time Alerts and Visual Cues:
Green triangles below candles indicate buy opportunities.
Red triangles above candles indicate sell opportunities.
Built-in alert conditions notify you of signals in real-time, so you never miss a trading opportunity.
Why Use Enigma Unlocked 2.0?
Precision: Advanced candlestick logic ensures that signals are generated only under optimal conditions.
Session-Based Filtering: Signals occur exclusively during the most active market sessions (kill zones), improving trade quality.
Visualization: Simple yet effective tools like Gann Box integration and clear visual signals make this indicator easy to use and highly effective.
Real-Time Alerts: Stay informed of potential trades even when you're away from your screen.
Enigma Unlocked 2.0 empowers traders to harness the power of candlestick analysis and session-based strategies for disciplined and effective trading. Pair this with a solid understanding of risk management and kill zones to achieve consistent results in your trading journey.
Adaptive Range Scalper - KetBotAIThe Adaptive Scalper is designed to dynamically adjust entry, take-profit (TP), and stop-loss (SL) levels based on the latest market price. It combines multiple tools to provide traders with actionable insights, suitable for a range of trading styles and timeframes.
How the Indicator Works
Dynamic Levels:
- Yellow Dotted Line: Represents the entry level, following the latest price dynamically.
- Green Line: The Take Profit (TP) level, calculated as a multiple of the current price, adapts in real-time.
- Red Line: The Stop Loss (SL) level, placed below the price and also dynamically adjusts.
Bollinger Bands:
Provides context for market volatility and potential overbought/oversold zones.
Narrowing bands signal consolidation, while expanding bands indicate increased volatility.
Buy and Sell Signals:
Buy Signal: Triggered when the price crosses above the lower Bollinger Band.
Sell Signal: Triggered when the price crosses below the upper Bollinger Band.
These signals help traders time entries and exits based on momentum shifts.
Risk/Reward Analysis:
Visual shading shows the favorable risk/reward zone between the stop loss and take profit levels.
Timeframe Suggestions
Short-Term Traders (Scalping):
Use on 5-minute to 15-minute charts.
Focus on high-volatility periods for quick entries and exits.
Intraday Traders:
Ideal for 30-minute to 1-hour charts.
Provides more stable signals and less noise.
Swing Traders:
Best suited for 4-hour or daily charts.
Captures broader trends with fewer signals, allowing for larger moves.
Tool Combination
Volume Profile:
Combine with volume-based tools to confirm key support/resistance zones around TP and SL levels.
Trend Indicators:
Use with Moving Averages (e.g., 20-period or 50-period) to identify the broader trend direction.
Example: Only take buy signals in an uptrend and sell signals in a downtrend.
Momentum Oscillators:
Pair with tools like RSI or MACD to avoid entering overbought/oversold conditions.
Support/Resistance Lines:
Manually mark significant levels to confirm alignment with the indicator’s TP and SL zones.
Useful Advice for Traders
Risk Management:
- Always assess the risk/reward ratio; aim for at least 1:2 (risking 1 to gain 2).
- Adjust the multiplier to match your trading style (e.g., higher multiplier for swing trades, lower for scalping).
Avoid Overtrading:
Use the indicator in conjunction with clear rules to avoid false signals during low-volatility periods.
Monitor market volatility:
Pay attention to narrowing Bollinger Bands, which signal consolidations. Avoid trading until a breakout occurs.
Test on Demo Accounts:
Practice using the indicator on a demo account to understand its behavior across different assets and timeframes.
Focus on High-Liquidity Markets:
For the best results, trade highly liquid instruments like major currency pairs, gold, or stock indices.
Summary
The Adaptive Range Indicator dynamically adjusts to market conditions, offering clear entry and exit levels. By combining it with Bollinger Bands and other tools, traders can better navigate market trends and avoid noise. It’s versatile across multiple timeframes and assets, making it a valuable addition to any trader’s toolkit.
XXX//@version=6
indicator("XXX", overlay=true)
// Binance ve Bitmex fiyatlarını almak
binance_price = request.security("BINANCE:BTCUSDT.P", "1", close)
bitmex_price = request.security("BITMEX:BTCUSD.P", "1", close)
// Al ve Sat sinyallerini belirlemek
buy_signal = bitmex_price > binance_price + 100
sell_signal = bitmex_price < binance_price - 100
// Grafik üzerine sinyalleri çizmek
plotshape(series=buy_signal, location=location.bottom, color=color.green, title="Al Sinyali", text="AL")
plotshape(series=sell_signal, location=location.top ,color=color.red, title="Sat Sinyali", text="SAT")
// Sinyal durumlarını tablolara yazmak
var table tbl = table.new(position.top_right, 2, 2, border_color=color.black, frame_color=color.black, frame_width=1)
if (buy_signal)
table.cell(tbl, 0, 0, text="Al Sinyali", bgcolor=color.green)
if (sell_signal)
table.cell(tbl, 0, 1, text="Sat Sinyali", bgcolor=color.red)
// Sinyal durumlarını görüntülemek
plotchar(series=buy_signal, char="B", location=location.bottom, color=color.green, title="Al Sinyali")
plotchar(series=sell_signal, char="S", location=location.top, color=color.red, title="Sat Sinyali")
Directional Volume Profile - KetBotAIDirectional Volume Profile: User Guide
The Directional Volume Profile indicator is a powerful tool designed to provide traders with insights into potential market movements by analyzing volume imbalances and visualizing key bid and ask levels. Here's a comprehensive guide to using it effectively:
How the Indicator Works
Volume Profile:
The indicator identifies significant buy (bids) and sell (asks) volume levels, highlighting areas of support and resistance.
These levels are represented with horizontal green (buy) and red (sell) lines.
Directional Forecast:
Based on the comparison of buy and sell volumes, the indicator dynamically forecasts the most probable direction for the next price move.
If sell volume (resistance) is stronger than buy volume, it displays a Down signal.
If buy volume (support) is stronger than sell volume, it displays an Up signal.
Signal Visualization:
The forecast is shown as dotted arrows pointing up or down, with a "Up" or "Down" label for clarity.
Only the most recent candle’s forecast is shown, reducing chart clutter.
Time Frame Suggestions
The recommended time frames depend on your trading style:
Short-Term Traders (Scalpers or Day Traders):
Use 5-minute to 15-minute charts.
These time frames allow quick decisions based on real-time volume shifts.
Swing Traders:
Use 30-minute to 4-hour charts.
Larger time frames smooth out noise and help identify significant support and resistance zones.
Position Traders:
Use daily charts.
This helps identify broader trends and long-term volume imbalances.
How to Use the Indicator
Identify Key Levels:
Look at the green and red lines to find areas of strong support (bids) and resistance (asks).
Use these levels to plan your entry and exit points.
Follow the Directional Signal:
When the signal is Up, consider looking for long positions if other factors align.
When the signal is Down, consider short positions under similar conditions.
Combine with Other Tools:
- Momentum Indicators (e.g., RSI, MACD): Confirm overbought or oversold conditions.
Candlestick Patterns: Look for patterns (e.g., pin bars, engulfing candles) at volume levels to validate entries.
- Trend Analysis: Ensure the signal aligns with the broader market trend for higher probability trades.
Risk Management:
Place stop-loss orders just outside the key volume levels.
For example, if taking a long position, place your stop-loss slightly below the nearest green line (support).
Practical Advice
Volume Adjustments:
If market conditions change (e.g., news releases or economic data), the volume profile may shift quickly. Always reevaluate the forecast during high-impact events.
Avoid Overtrading:
Use the indicator as a confirmation tool, not the sole basis for entering trades.
Patience at Key Levels:
Wait for price action to interact with high-volume levels before making decisions.
Demo First:
Practice with the indicator on a demo account to understand its behavior and how it fits your strategy.
Advantages of the Indicator
- Clarity: Simple up or down signals based on objective volume data.
- Flexibility: Works on multiple time frames and trading styles.
- Dynamic Updates: Automatically adjusts to real-time volume changes.
EMA 200/50/20 CrossThis indicator shows with the crosses which EMA line is crossing to give a kind of indication wether the stock is likely to go down or up -> this might help at the beginning when to open or close a position
EMA 20,50,200 mit Supertrend to get the supertrends for up and downs focusing on the EMA 20/50/200 ->this might be helpful at the beginning when getting familiar with stocks to get a first impression if the stock is in a stable upward trend , downward trend or just consolidating
Gap EMA и SMA//@version=6
indicator(title="Разрыв между EMA и SMA", shorttitle="EMA-SMA Разрыв", format=format.percent, precision=2, timeframe="", timeframe_gaps=true, overlay=false)
// Входные параметры
fast_length = input.int(1, title="Период EMA")
slow_length = input.int(2, title="Период SMA")
// Вычисление EMA и SMA
ema_value = ta.ema(close, fast_length)
sma_value = ta.sma(close, slow_length)
// Расчет разрыва в процентах
gap_percent = 100 * (ema_value - sma_value) / sma_value
// Отображение разрыва в процентах в виде столбиков в отдельном окне
plot(gap_percent, color=(gap_percent >= 0 ? color.green : color.red), style=plot.style_histogram, title="Разрыв EMA и SMA")
// Нулевая линия
hline(0, color=color.gray, title="Нулевая линия")
Link Short Strategy - ShortHello everyone.
My strategy is only for LINK/USDT based on a grid bot strategy that can be found on a traditional exchange such as: Bitget, Bybit, Bingx...
I've customized it.
### Pine Script strategy summary:
1. **General description:**
- The strategy uses crosses between an **EMA (exponential moving average)** and a **SMA (simple moving average)** to identify short trading opportunities.
- It is active between specific price ranges defined for each segment (LongRange and ShortRange).
2. **Indicators:**
- **EMA9**: Exponential moving average over 13 periods (configurable).
- SMA6**: Simple moving average over 5 periods (configurable).
3. Position logic:** **Short Entry
- Short Entry** :
- Condition: EMA crossing under SMA (**emaCrossSmaDown**) when price is between `ShortRangeLow` and `ShortRangeHigh`.
- A **short** position is opened with `strategy.entry(“Short”, strategy.short)`.
- Long Exit**:
- Inverse condition (EMA crossing above SMA) when price is between `LongRangeLow` and `LongRangeHigh`.
- Long positions are closed if in profit.
4. **Stop Loss (SL) management:**
- Each segment (1 to 5) has a **Stop Loss (SL)** level defined by adding a fixed margin of 0.5 to the `LongRangeLow` level:
- Example: `slLevel = LongRangeLow + 0.5`.
- The **SL** applies only if the position has been opened between the defined ranges (`ShortRangeLow` and `ShortRangeHigh`).
5. **Display:**
- The EMA9 and SMA6 indicators are plotted on the chart for clear visualization.
- Price ranges (ShortRange and LongRange) are also plotted, with distinct colors for each segment.
6. **Multiple segments:**
- The strategy is repeated for 5 distinct price ranges (segmented into ShortRange and LongRange):
- Segment 1: LongRangeHigh = 11.13, ShortRangeHigh = 12.00.
- Segment 2: LongRangeHigh = 13.70, ShortRangeHigh = 14.85.
- Segment 3 : LongRangeHigh = 17.38, ShortRangeHigh = 19.10.
- Segment 4 : LongRangeHigh = 23.70, ShortRangeHigh = 25.75.
- Segment 5 : LongRangeHigh = 28.50, ShortRangeHigh = 30.40.
7. **Activation dates:**
- The strategy is active only between August 5, 2024 and September 1, 2026.
---
### Highlights :
- Well-integrated **Stop Loss** management to minimize losses.
- Visualization of price ranges facilitates analysis.
- The logic is replicable for several segments, making the strategy adaptable to different market ranges.
### Suggested improvements:
- **Take Profit (TP)**: Add TP levels to automate profit-taking.
- Additional filtering**: Use other indicators to confirm signals (e.g. RSI or MACD).
- Optimization**: Test different lengths for EMAs and SMAs to maximize performance.
HV-RV Oscillator by DINVESTORQ(PRABIR DAS)Description:
The HV-RV Oscillator is a powerful tool designed to help traders track and compare two types of volatility measures: Historical Volatility (HV) and Realized Volatility (RV). This indicator is useful for identifying periods of market volatility and can be employed in various trading strategies. It plots both volatility measures on a normalized scale (0 to 100) to allow easy comparison and analysis.
How It Works:
Historical Volatility (HV):
HV is calculated by taking the log returns of the closing prices and finding the standard deviation over a specified period (default is 14 periods).
The value is then annualized assuming 252 trading days in a year.
Realized Volatility (RV):
RV is based on the True Range, which is the maximum of the current high-low range, the difference between the high and the previous close, and the difference between the low and the previous close.
Like HV, the standard deviation of the True Range over a specified period is calculated and annualized.
Normalization:
Both HV and RV values are normalized to a 0-100 scale, making it easy to see their relative magnitude over time.
The highest and lowest values within the period are used to normalize the data, which smooths out short-term volatility spikes.
Smoothing:
The normalized values of both HV and RV are then smoothed using a Simple Moving Average (SMA) to reduce noise and provide a clearer trend.
Crossover Signals:
Buy Signal : When the Normalized HV crosses above the Normalized RV, it indicates that the historical volatility is increasing relative to the realized volatility, which could be interpreted as a buy signal.
Sell Signal : When the Normalized HV crosses below the Normalized RV, it suggests that the historical volatility is decreasing relative to the realized volatility, which could be seen as a sell signal.
Features:
Two Volatility Lines: The blue line represents Normalized HV, and the orange line represents Normalized RV.
Neutral Line: A gray dashed line at the 50 level indicates a neutral state between the two volatility measures.
Buy/Sell Markers: Green upward arrows are shown when the Normalized HV crosses above the Normalized RV, and red downward arrows appear when the Normalized HV crosses below the Normalized RV.
Inputs:
HV Period: The number of periods used to calculate Historical Volatility (default = 14).
RV Period: The number of periods used to calculate Realized Volatility (default = 14).
Smoothing Period: The number of periods used for smoothing the normalized values (default = 3).
How to Use:
This oscillator is designed for traders who want to track the relationship between Historical Volatility and Realized Volatility.
Buy signals occur when HV increases relative to RV, which can indicate increased market movement or potential breakout conditions.
Sell signals occur when RV is greater than HV, signaling reduced volatility or potential trend exhaustion.
Example Use Cases:
Breakout/Trend Strategy: Use the oscillator to identify potential periods of increased volatility (when HV crosses above RV) for breakout trades.
Mean Reversion: Use the oscillator to detect periods of low volatility (when RV crosses above HV) that might signal a return to the mean or consolidation.
This tool can be used on any asset class such as stocks, forex, commodities, or indices to help you make informed decisions based on the comparison of volatility measures.
NOTE: FOR INTRDAY PURPOSE USE 30/7/9 AS SETTING AND FOR DAY TRADE USE 14/7/9
50 EMA Proximity & Crossover Alert50 EMA Proximity & Crossover Alert
This script provides traders with a powerful tool for monitoring interactions with the 50-period Exponential Moving Average (EMA). It offers two key features:
Proximity Alerts: The script detects when the price is approaching the 50 EMA within a customizable proximity threshold (default: 0.1%).
Crossover Alerts: Notifications are triggered when the price crosses the 50 EMA, either from above or below.
Key Features:
50 EMA Calculation: The 50-period Exponential Moving Average is plotted as a blue line for trend analysis.
Dynamic Proximity Detection: Alerts are triggered only when the price dynamically moves into the defined proximity range of the 50 EMA. This prevents constant notifications in choppy conditions.
Visual Highlighting: The chart background turns green when the price enters the proximity zone, making it easy to identify areas of interest visually.
Customizable Threshold: The proximity threshold is set to 0.1% of the EMA value by default but can be adjusted directly in the script for tighter or wider zones.
Two Alert Types:
Proximity Alert: When the price nears the EMA.
Crossover Alert: When the price crosses the EMA.
How It Works:
EMA Calculation: The 50 EMA is calculated using the ta.ema() function in Pine Script.
Proximity Threshold: The script uses a threshold defined as a percentage of the EMA value (0.001 * ema50 by default).
Dynamic Conditions: Alerts are only triggered when the price enters the proximity zone dynamically, avoiding constant signals when the price lingers near the EMA.
Visual Representation: The green background highlights proximity areas, while the alert system notifies you of key events.
Usage Instructions:
Add the script to your chart.
Adjust the proximity threshold (schwelle) in the script if needed.
Set up alerts in TradingView:
Proximity Alert: Notify when the price is close to the EMA.
Crossover Alert: Notify when the price crosses the EMA.
Use the visual green background as a quick reference for areas of interest.
Ideal For:
Traders who rely on EMA-based strategies for scalping, swing trading, or trend-following.
Those looking for a tool to notify them of key EMA interactions without constant chart monitoring.
Chart Example:
The script is designed to work cleanly on any time frame (5m, 15m, 1h, etc.). A sample chart shows:
the 50 EMA is plotted as a blue line by default. Users can customize the line color in their own chart settings if they prefer a different visual style (e.g., yellow, green, etc.) in my case its yellow.
A green background indicating proximity zones.
Alerts set for proximity and crossover.
"50 EMA Proximity & Crossover Alert"This script provides traders with a powerful tool for monitoring interactions with the 50-period Exponential Moving Average (EMA). It offers two key features:
Proximity Alerts: The script detects when the price is approaching the 50 EMA within a customizable proximity threshold (default: 0.1%).
Crossover Alerts: Notifications are triggered when the price crosses the 50 EMA, either from above or below.
Key Features:
50 EMA Calculation: The 50-period Exponential Moving Average is plotted as a blue line for trend analysis.
Dynamic Proximity Detection: Alerts are triggered only when the price dynamically moves into the defined proximity range of the 50 EMA. This prevents constant notifications in choppy conditions.
Visual Highlighting: The chart background turns green when the price enters the proximity zone, making it easy to identify areas of interest visually.
Customizable Threshold: The proximity threshold is set to 0.1% of the EMA value by default but can be adjusted directly in the script for tighter or wider zones.
Two Alert Types:
Proximity Alert: When the price nears the EMA.
Crossover Alert: When the price crosses the EMA.
How It Works:
EMA Calculation: The 50 EMA is calculated using the ta.ema() function in Pine Script.
Proximity Threshold: The script uses a threshold defined as a percentage of the EMA value (0.001 * ema50 by default).
Dynamic Conditions: Alerts are only triggered when the price enters the proximity zone dynamically, avoiding constant signals when the price lingers near the EMA.
Visual Representation: The green background highlights proximity areas, while the alert system notifies you of key events.
Usage Instructions:
Add the script to your chart.
Adjust the proximity threshold (schwelle) in the script if needed.
Set up alerts in TradingView:
Proximity Alert: Notify when the price is close to the EMA.
Crossover Alert: Notify when the price crosses the EMA.
Use the visual green background as a quick reference for areas of interest.
Ideal For:
Traders who rely on EMA-based strategies for scalping, swing trading, or trend-following.
Those looking for a tool to notify them of key EMA interactions without constant chart monitoring.
Chart Example:
The script is designed to work cleanly on any time frame (5m, 15m, 1h, etc.). A sample chart shows:
The 50 EMA as a blue line.
A green background indicating proximity zones.
Alerts set for proximity and crossover.
EMA 7/20/50/100/200This script provides a clean and efficient way to plot multiple Exponential Moving Averages (EMAs) directly on the price chart. It includes the following EMAs for enhanced trend analysis: EMA 7, EMA 20, EMA 50, EMA 100, and EMA 200. Each EMA is color-coded for easy differentiation and labeled in the legend for quick reference.
Use Case:
Short-Term Trends: Use EMA 7 and EMA 20 for analyzing short-term price movements.
Medium-Term Trends: EMA 50 helps to identify medium-term trends.
Long-Term Trends: EMA 100 and EMA 200 are essential for observing long-term market trends and significant support/resistance levels.
Features:
Overlay on the price chart for a seamless view.
Distinct color coding for each EMA:
Green (EMA 7) for very short-term trends.
Red (EMA 20) for short-term trends.
Orange (EMA 50) for medium-term trends.
Aqua (EMA 100) for long-term trends.
Blue (EMA 200) for very long-term trends.
Fully adjustable to suit your trading style.
This tool is ideal for traders and analysts looking for a quick and clear visualization of key moving averages on the chart. It aids in identifying market momentum, trend reversals, and dynamic support/resistance zones.
Dual Bayesian For Loop [QuantAlgo]Discover the power of probabilistic investing and trading with Dual Bayesian For Loop by QuantAlgo , a cutting-edge technical indicator that brings statistical rigor to trend analysis. By merging advanced Bayesian statistics with adaptive market scanning, this tool transforms complex probability calculations into clear, actionable signals—perfect for both data-driven traders seeking statistical edge and investors who value probability-based confirmation!
🟢 Core Architecture
At its heart, this indicator employs an adaptive dual-timeframe Bayesian framework with flexible scanning capabilities. It utilizes a configurable loop start parameter that lets you fine-tune how recent price action influences probability calculations. By combining adaptive scanning with short-term and long-term Bayesian probabilities, the indicator creates a sophisticated yet clear framework for trend identification that dynamically adjusts to market conditions.
🟢 Technical Foundation
The indicator builds on three innovative components:
Adaptive Loop Scanner: Dynamically evaluates price relationships with adjustable start points for precise control over historical analysis
Bayesian Probability Engine: Transforms market movements into probability scores through statistical modeling
Dual Timeframe Integration: Merges immediate market reactions with broader probability trends through custom smoothing
🟢 Key Features & Signals
The Adaptive Dual Bayesian For Loop transforms complex calculations into clear visual signals:
Binary probability signal displaying definitive trend direction
Dynamic color-coding system for instant trend recognition
Strategic L/S markers at key probability reversals
Customizable bar coloring based on probability trends
Comprehensive alert system for probability-based shifts
🟢 Practical Usage Tips
Here's how you can get the most out of the Dual Bayesian For Loop :
1/ Setup:
Add the indicator to your TradingView chart by clicking on the star icon to add it to your favorites ⭐️
Start with default source for balanced price representation
Use standard length for probability calculations
Begin with Loop Start at 1 for complete price analysis
Start with default Loop Lookback at 70 for reliable sampling size
2/ Signal Interpretation:
Monitor probability transitions across the 50% threshold (0 line)
Watch for convergence of short and long-term probabilities
Use L/S markers for potential trade signals
Monitor bar colors for additional trend confirmation
Configure alerts for significant trend crossovers and reversals, ensuring you can act on market movements promptly, even when you’re not actively monitoring the charts
🟢 Pro Tips
Fine-tune loop parameters for optimal sensitivity:
→ Lower Loop Start (1-5) for more reactive analysis
→ Higher Loop Start (5-10) to filter out noise
Adjust probability calculation period:
→ Shorter lengths (5-10) for aggressive signals
→ Longer lengths (15-30) for trend confirmation
Strategy Enhancement:
→ Compare signals across multiple timeframes
→ Combine with volume for trade validation
→ Use with support/resistance levels for entry timing
→ Integrate other technical tools for even more comprehensive analysis
Custom RSI Buy and Sell StrategyWhile Pine Script allows you to create visual signals, it does not currently support interactive buttons that you can click on directly in the chart. However, these visual cues can be a helpful alternative.
Custom RSI Buy and Sell StrategyCopy and paste this script into the Pine Script Editor on TradingView.
Save and click "Add to Chart".
When the conditions are met (price near 250 and RSI condition as specified), Buy and Sell labels will appear on the chart.
50 EMA Alarm with Proximity NotificationThis script calculates the 50-period Exponential Moving Average (EMA) and provides alerts for two conditions:
EMA Cross: When the price crosses the 50 EMA from above or below.
Proximity Alert: When the price approaches the 50 EMA within a customizable threshold (e.g., 0.5% of the EMA value).
Features:
50 EMA Calculation: Displays the 50 EMA as a blue line on the chart for trend analysis.
Proximity Highlight: Changes the chart's background color to green when the price is within the defined proximity threshold
.
Alerts for Both Conditions:
"EMA Cross" alert is triggered when the price crosses the EMA.
"Proximity Alert" is triggered when the price approaches the EMA.
How It Works:
The EMA is calculated using TradingView's ta.ema() function.
A proximity threshold is defined as a percentage of the EMA value (default: 0.5%).
The script checks if the price is within the proximity range using math.abs(close - ema50) < threshold.
Alerts are sent for both conditions using the alert() function, ensuring traders never miss a key event.
Usage:
Add the script to your chart.
Customize the proximity threshold in the code if necessary.
Set up alerts for the two conditions (EMA Cross and Proximity Alert).
Use the visual background color change as a quick indicator for proximity.
Ideal For:
Traders who rely on EMA-based strategies for scalping or trend-following.
Those looking for a tool to notify them of key EMA interactions without constantly monitoring the chart.