[ADB] Patternsshow Most profitable pattern on chart. it is very useful for xauusd and session analysis
Forecasting
Signal buy and sell (Simple Signals)إعدادات المؤشرات
ema_length = input.int(50, title="EMA Length"):
يسمح للمستخدم بتحديد طول المتوسط المتحرك الأسي (EMA) الافتراضي (القيمة الافتراضية هي 50).
هذه القيمة تمثل عدد الشموع المستخدمة لحساب المتوسط المتحرك الأسي.
حساب المتوسط المتحرك الأسي (EMA)
ema_value = ta.ema(close, ema_length):
ta.ema: دالة من مكتبة TradingView تحسب المتوسط المتحرك الأسي.
close: السعر الإغلاق لكل شمعة.
ema_length: طول المتوسط المتحرك (عدد الشموع المستخدم).
إشارات الشراء والبيع
buy_signal = ta.crossover(close, ema_value):
ta.crossover: يتحقق مما إذا كان السعر (close) قد اخترق خط EMA صعودًا.
إذا تحقق الشرط، يتم توليد إشارة شراء (buy_signal).
sell_signal = ta.crossunder(close, ema_value):
ta.crossunder: يتحقق مما إذا كان السعر (close) قد اخترق خط EMA هبوطًا.
إذا تحقق الشرط، يتم توليد إشارة بيع (sell_signal).
رسم المتوسط المتحرك الأسي
plot(ema_value, color=color.yellow, linewidth=2, title="EMA"):
يرسم خط المتوسط المتحرك الأسي (EMA) على الرسم البياني.
color=color.yellow: يحدد اللون الأصفر للخط.
linewidth=2: يحدد سمك الخط ليكون أكثر وضوحًا.
title="EMA": يظهر كاسم للخط عند عرض تفاصيل المؤشر.
رسم إشارات الشراء والبيع
plotshape(series=buy_signal, location=location.belowbar, color=color.green, style=shape.triangleup, title="Buy Signal", text="BUY"):
يظهر سهم أخضر (شكل مثلث) أسفل الشمعة التي تولدت عندها إشارة الشراء.
plotshape(series=sell_signal, location=location.abovebar, color=color.red, style=shape.triangledown, title="Sell Signal", text="SELL"):
يظهر سهم أحمر (شكل مثلث مقلوب) أعلى الشمعة التي تولدت عندها إشارة البيع.
إشعارات التنبيه
if (buy_signal) alert("Buy Signal detected on Gold!", alert.freq_once_per_bar):
عند ظهور إشارة شراء، يتم إرسال تنبيه مكتوب: "Buy Signal detected on Gold!".
alert.freq_once_per_bar: يضمن إرسال التنبيه مرة واحدة لكل شمعة.
if (sell_signal) alert("Sell Signal detected on Gold!", alert.freq_once_per_bar):
عند ظهور إشارة بيع، يتم إرسال تنبيه مكتوب: "Sell Signal detected on Gold!".
الهدف من المؤشر:
المؤشر يساعد المتداولين في تحديد نقاط الشراء والبيع استنادًا إلى تقاطع السعر مع المتوسط المتحرك الأسي (EMA).
يوفر رؤية بصرية واضحة بفضل الأسهم الملونة، ويتيح إشعارات تنبيه لتجنب تفويت الإشارات أثناء التداول.
كيفية تحسين المؤشر:
إضافة فلاتر إضافية مثل RSI أو تحليل الاتجاه العام لتحسين دقة الإشارات.
استخدام أطوال متعددة للـ EMA لتأكيد الاتجاه.
تعديل التنبيهات لتشمل المزيد من التفاصيل مثل السعر الحالي.
Daily Ichimoku Cloud Breakout Signalsoffre des signaux d'achats et de vente grace a l'ichimoku (prendre en compte que les signaux daily)
"Phát Hiện Trạng Thái Thị Trường - TUNGDUBAI|LTC CapitalĐây là một chỉ báo kết hợp nhiều công cụ phân tích kỹ thuật để xác định trạng thái của thị trường, giúp bạn nhận biết liệu thị trường đang đi ngang (sideway) hay đang có sóng mạnh (strong wave). Dưới đây là giải thích từng phần cơ bản của chỉ báo này:
### 1. **Chỉ báo ADX (Average Directional Index):**
- **Mục đích:** Đo lường sức mạnh của xu hướng.
- **Điều kiện:**
- **ADX < 20:** Thị trường có xu hướng yếu hoặc đi ngang (sideway).
- **ADX > 25:** Thị trường có xu hướng mạnh.
- **Cách sử dụng:** ADX không xác định hướng (tăng hay giảm), chỉ đo lường độ mạnh của xu hướng.
### 2. **Bollinger Bands (BB):**
- **Mục đích:** Xác định phạm vi giá thông qua độ lệch chuẩn.
- **Cấu trúc:**
- **UpperBB:** Đường biên trên, đại diện cho giá cao.
- **LowerBB:** Đường biên dưới, đại diện cho giá thấp.
- **Basis:** Đường trung tâm (moving average) của BB.
- **Điều kiện:** Giá nằm trong hoặc vượt ngoài các dải BB:
- Giá trong dải BB: Thị trường sideway.
- Giá vượt khỏi dải BB: Có khả năng sóng mạnh.
### 3. **RSI (Relative Strength Index):**
- **Mục đích:** Đo lường động lượng và xác định vùng quá mua/quá bán.
- **Điều kiện:**
- **45 < RSI < 55:** Thị trường trung lập, thường xảy ra trong sideway.
- **RSI > 70 hoặc RSI < 30:** Thị trường có động lượng mạnh, gợi ý sóng mạnh.
### 4. **Điều kiện thị trường:**
- **Thị trường đi ngang (Sideway):**
- **ADX < 20**
- Giá nằm trong dải Bollinger Bands.
- RSI nằm trong khoảng 45 - 55.
- Hiển thị nền màu vàng trên biểu đồ.
- **Thị trường có sóng mạnh (Strong Wave):**
- **ADX > 25**
- Giá vượt khỏi dải Bollinger Bands **hoặc** RSI nằm ngoài vùng 30 - 70.
- Hiển thị nền màu xanh trên biểu đồ.
### 5. **Tín hiệu cảnh báo:**
- Khi thị trường đi ngang hoặc xuất hiện sóng mạnh, chỉ báo gửi thông báo cảnh báo để bạn kịp thời đưa ra quyết định giao dịch.
### 6. **Hiển thị trên biểu đồ:**
- **ADX và RSI:** Giúp bạn dễ dàng theo dõi chỉ số sức mạnh và động lượng.
- **Bollinger Bands:** Cho thấy các mức hỗ trợ và kháng cự động dựa trên dải giá.
- **Màu nền:** Phân biệt trạng thái thị trường trực quan hơn.
Chỉ báo này hữu ích cho cả việc xác định vùng tích lũy (sideway) để chờ đợi cơ hội giao dịch, và vùng sóng mạnh (breakout) để tận dụng xu hướng. Nếu có thêm câu hỏi hoặc cần tùy chỉnh, hãy cho mình biết nhé! 😊
Bitcoin Halving Cycle Profit with Background ColourThis indicator is a Minor Modification from @KevinSvenson_ indicator, i am just add some background colour
BTC Tradingمرحبا يا متداولين
هو مؤشر لتداول البيتكوين باستخدام المتوسطات المتحركة (Moving Averages). إليك شرحًا للمؤشر وطريقة استخدامه:
1. إعداد المتوسطات المتحركة:
المتوسط المتحرك القصير (Short MA): هو متوسط متحرك يستخدم فترة زمنية قصيرة (9 أيام في هذا السكربت).
المتوسط المتحرك الطويل (Long MA): هو متوسط متحرك يستخدم فترة زمنية أطول (21 يومًا في هذا السكربت).
يتم حساب المتوسطات المتحركة باستخدام الدالة ta.sma(close, length), حيث يتم حساب المتوسط على أساس أسعار الإغلاق.
2. إشارات الشراء والبيع:
إشارة الشراء (Buy Signal): تحدث عندما يتقاطع المتوسط المتحرك القصير (Short MA) إلى الأعلى فوق المتوسط المتحرك الطويل (Long MA). هذا يعكس إشارة شراء.
يتم تحديد هذه الإشارة باستخدام الدالة ta.crossover(shortMA, longMA).
إشارة البيع (Sell Signal): تحدث عندما يتقاطع المتوسط المتحرك القصير (Short MA) إلى الأسفل تحت المتوسط المتحرك الطويل (Long MA). هذا يعكس إشارة بيع.
يتم تحديد هذه الإشارة باستخدام الدالة ta.crossunder(shortMA, longMA).
3. رسم المتوسطات المتحركة على الرسم البياني:
يتم رسم المتوسط المتحرك القصير باللون الأخضر باستخدام الدالة plot(shortMA).
يتم رسم المتوسط المتحرك الطويل باللون الأحمر باستخدام الدالة plot(longMA).
4. رسم علامات الشراء والبيع:
عند ظهور إشارة شراء، يتم رسم شكل تحت الشمعة يظهر كلمة "BUY" باللون الأخضر باستخدام الدالة plotshape(series=buySignal).
عند ظهور إشارة بيع، يتم رسم شكل فوق الشمعة يظهر كلمة "SELL" باللون الأحمر باستخدام الدالة plotshape(series=sellSignal).
طريقة استخدامه:
عندما يظهر الخط الأخضر (المتوسط المتحرك القصير) فوق الخط الأحمر (المتوسط المتحرك الطويل)، ستظهر إشارة شراء (BUY).
عندما يظهر الخط الأخضر تحت الخط الأحمر، ستظهر إشارة بيع (SELL).
هذه الإشارات قد تساعد في اتخاذ قرارات شراء وبيع بناءً على تقاطع المتوسطات المتحركة.
التفسير الفني:
إشارة الشراء تعني أن السوق قد يبدأ في الاتجاه الصاعد، حيث يتجاوز المتوسط المتحرك القصير (الذي يعكس تحركات الأسعار على المدى القصير) المتوسط المتحرك الطويل (الذي يعكس الاتجاه العام).
إشارة البيع تعني أن السوق قد يبدأ في الاتجاه الهابط، حيث يبدأ المتوسط المتحرك القصير في الهبوط تحت المتوسط المتحرك الطويل.
ملحوظة: يمكن تعديل الفترات الزمنية للمتوسطات المتحركة حسب التفضيلات الشخصية أو استراتيجية التداول التي تستخدمها.
Bitcoin Halving Cycle Profit with Background ColourThis indicator is a Minor Modification from @KevinSvenson_ indicator, i am just add some background colour
Position Size with Commission (Long & Short)Объем позиции на бар с тейком и выбором ratio. При вхождении в сделку стоп ордером при пробитии хай/лоу бара сразу на баре видно объем входа.
US and Asia Trading Hoursadds vertical lines to your chart that show US trading hours 9-4 and NY trading hours based off of EST
AI Trend | EcoX TradingPurpose
This indicator is a versatile trend oscillator designed to work on any timeframe and asset. It extracts and processes market data to adaptively predict trend directions while visualizing momentum and trend extremes. The indicator provides clear visual cues using a combination of signal line, histogram and a trend cloud, making it an excellent confirmation tool when paired with SupportAnd Resistance or Order Block indicators.
Calculation Overview
Raw Signal Line:
Derived from market data using ten unique methods, each creating a data point with a fixed weight.
These weights are carefully optimized to ensure the indicator adapts to changing market conditions.
The Raw Signal Line color reflects trend direction:
Green: Uptrend
Red: Downtrend
Blue: Overbought/Oversold
Histogram:
A smoothed representation of the Raw Signal Line.
Colors indicate trend strength:
Cyan: Strong uptrend.
Orange: Strong downtrend.
Dark Cyan/Orange: Weakening trend.
Gray: Trend reversal.
Thin gray histogram overlays mark the peak or trough of current trend.
Trend Cloud:
Displays the projected range of the histogram based on highest and lowest values from the data points.
Purple: Normal trend range.
Blue: Oversold/Overbought range (dynamic color transition when approaching extremes).
Overbought/Oversold Levels:
Horizontal plus sign lines at 8 and -8 levels mark critical trend extremes.
Usage / Example Scenario
1. Long Positions
Identify an Oversold Market:
Check if the Raw Signal Line is green and rising and the Trend Cloud is below the oversold level with a blue color.
Histogram Confirmation:
Look for the histogram to be gray or dark orange, indicating a weakening downtrend.
Entry Strategy:
Enter a long position when all conditions align, ensuring other indicators (e.g., Support And Resistance) also support the trade.
Exit Strategy:
Exit when the histogram shifts from cyan do dark cyan or gray, signaling weakening uptrend momentum.
2. Short Positions
Identify an Overbought Market:
Check if the Raw Signal Line is red and falling and the Trend Cloud is above the overbought level with a blue color.
Histogram Confirmation:
Look for the histogram to be gray or dark cyan, indicating a weakening uptrend.
Entry Strategy:
Enter a short position when all conditions align, ensuring other indicators (e.g., Support And Resistance) also support the trade.
Exit Strategy:
Exit when the histogram shifts from orange to dark orange or gray, signaling weakening downtrend momentum.
Data Point Obtaining
Data Point 1 -> ta.ema(ta.ema()-ta.ema()) | Weight 1
Data Point 2 -> ta.ema(ta.ema()) | Weight 1
Data Point 3 -> ta.sma(ta.rma(ta.change())) | Weight 1
Data Point 4 -> ta.vwma()±ta.stdev() | Weight 5/1
Data Point 5 -> ta.supertrend | Weight 1~2
Data Point 6 -> 100*(ta.ema()-ta.ema())/ta.ema() | Weight 1
Data Point 7 -> ta.requestUpAndDownVolume() | Weight 1
Data Point 8 -> donchian((ta.lowest()+ta.highest())/2) | Weight 1
Data Point 9 -> ta.ema(ta.ema(ta.ema())) | Weight 1
Data Point 10 -> ta.sma(ta.cross(ta.ema(),ta.ema())) | Weight 0.25
Disclaimer
This indicator is intended as a confirmation tool and should not be used in isolation for trade entries or exits. Combine it with other technical tools to improve overall strategy accuracy. Always exercise proper risk management.
Entry Signal LinesShows entry signal lines. enter a long position after seeing 4 green lines in a row and enter a short when seeing 4 red lines in a row
Deshmukh DivergenceRSI Divergence with Moving Average Indicator
Description:
This indicator combines RSI divergence signals with a moving average (MA) on the RSI for enhanced trend analysis and signal confirmation. It identifies regular and hidden divergences between the price and RSI values, generating buy/sell signals based on these patterns. The added RSI moving average allows users to spot smoother trends and potential reversals.
How It Works:
RSI Calculation:
The Relative Strength Index (RSI) is calculated using the user-defined length.
Helps identify overbought and oversold conditions.
RSI Moving Average:
A simple moving average (SMA) is applied to the RSI to smooth its fluctuations.
Provides a clearer view of RSI trends.
Divergence Detection:
Regular Divergence:
Buy Signal: Price makes a lower low, but RSI makes a higher low.
Sell Signal: Price makes a higher high, but RSI makes a lower high.
Hidden Divergence:
Buy Signal: Price makes a higher low, but RSI makes a lower low.
Sell Signal: Price makes a lower high, but RSI makes a higher high.
Signal Visualization:
Signals are displayed as labeled shapes on the chart:
Green Up Arrow: Regular Buy.
Red Down Arrow: Regular Sell.
Blue Up Arrow: Hidden Buy.
Orange Down Arrow: Hidden Sell.
Overbought/Oversold Levels:
Horizontal lines mark overbought (70) and oversold (30) zones for quick reference.
This indicator is suitable for traders looking to identify potential trend reversals or continuations with the help of divergence patterns and RSI smoothing
Ignition Crystal BallIgnition Crystal Ball (ICB) Indicator
Inspired by the John Carter TTM Squeeze concept
1. Introduction
This “Ignition Crystal Ball” indicator combines Bollinger Bands (referred to here as “Ignition Bollinger Bands”) with one or two Keltner Channels to help traders visualize periods of potential “squeeze.” In John Carter’s TTM Squeeze logic, market volatility often shrinks when Bollinger Bands move inside Keltner Channels, and it expands when prices “fire” out of that squeeze.
This script also calculates custom angles on the Bollinger Bands, computes pip differences, and generates buy/sell alerts based on changing conditions. Below is a high-level overview of the indicator’s components, features, and how a trader might use it.
2. Ignition Bollinger Bands (IBB)
2.1 Inputs
• Length (default 20)
• StdDev (default 2.0)
• Threshold Angle (x10)
• Pip Differential Threshold
2.2 Calculation
1. Basis (Center Line)
Uses a simple moving average of close over length_ibb bars.
2. Upper & Lower Bands
Calculated by adding/subtracting (StdDev × standard deviation) from the basis.
2.3 Angle Detection
A custom function angle(_src, _lookback) approximates the slope of the Bollinger Bands in degrees by comparing _src vs. _src and applying an arctangent. The script colors table outputs when these angles exceed the user-defined threshold.
3. Keltner Channels
3.1 Inputs
• Length K1 / K2
• Multiplier K1 / K2
• Source K1 / K2
• Bands Style: Choice among “Average True Range,” “True Range,” or “Range.”
• Use Exponential MA: Toggle between EMA or SMA for the baseline.
3.2 Calculation
The script’s keltnerChannel function:
1. Calculates a moving average (EMA or SMA).
2. Computes a range using either ATR, True Range, or the plain bar range (high - low).
3. Returns the upper, middle, and lower lines.
Two sets of Keltner Channels (K1 and K2) are plotted by default.
4. Bollinger vs. Keltner: Identifying the “Squeeze”
A key part of many TTM Squeeze–style strategies involves looking for when Bollinger Bands move inside narrower Keltner Channels. This script calculates:
upper_pip_diff = (upperIBB - keltner1_upper) * 10000
lower_pip_diff = (keltner1_lower - lowerIBB) * 10000
• If these differences are small, it suggests a “squeeze” is in effect.
• The script also calculates a new_label_pip_diff (the difference between upper_pip_diff and lower_pip_diff) and displays that on the chart as a floating label.
5. Labels, Tables, and Visual Elements
5.1 Floating Labels
The script uses a custom floatingLabel() function to place real-time text boxes near the Bollinger Bands showing:
• upper_pip_diff
• lower_pip_diff
• new_label_pip_diff
• A percentage label that compares the current difference to a previous one.
Colors vary to reflect bullish (green), bearish (red), or neutral (yellow/gray) indications.
5.2 Table Displays
• PipD Table: Shows the absolute distance (in pips) between upper and lower Bollinger Bands.
• Angle Table: Located on the right side of the chart, displays the angles of the upper/lower IBB lines and the basis. If an angle exceeds the threshold, it turns bright (lime or red).
5.3 Plotting & Filling
• IBB: The basis and its upper/lower bands are plotted. The background between them can be filled with a semi-transparent color.
• Keltner Channels: Up to two sets (K1 and K2), each with its own color shading.
6. Alerts
There are two alert conditions, based on a color shift in the script’s logic:
buy_alert_condition = text_color_upper != color.green and text_color_upper == color.green
sell_alert_condition = text_color_upper != color.red and text_color_upper == color.red
• Buy Alert: When the script detects an upper color transition from non-green to green.
• Sell Alert: When the script detects an upper color transition from non-red to red.
7. Usage Tips
1. Spotting Squeezes
Look for times when Bollinger Bands contract inside Keltner Channels, suggesting low volatility.
2. Angle Threshold
The angle table on the right can reveal whether the bands are sloping sharply up or down.
3. Pip Differences (Forex)
For currency traders, tracking pip differences can highlight volatility changes.
4. Multi-Timeframe Analysis
Works on intraday or higher timeframes to detect expansions and contractions in volatility.
5. Alerts
The built-in alerts can notify you as soon as the script’s color logic changes to bullish or bearish.
Ignition Crystal BallIgnition Crystal Ball (ICB) Indicator
Inspired by the John Carter TTM Squeeze concept
1. Introduction
This “Ignition Crystal Ball” indicator combines Bollinger Bands (referred to here as “Ignition Bollinger Bands”) with one or two Keltner Channels to help traders visualize periods of potential “squeeze.” In John Carter’s TTM Squeeze logic, market volatility often shrinks when Bollinger Bands move inside Keltner Channels, and it expands when prices “fire” out of that squeeze.
This script also calculates custom angles on the Bollinger Bands, computes pip differences, and generates buy/sell alerts based on changing conditions. Below is a high-level overview of the indicator’s components, features, and how a trader might use it.
2. Ignition Bollinger Bands (IBB)
2.1 Inputs
• Length (default 20)
• StdDev (default 2.0)
• Threshold Angle (x10)
• Pip Differential Threshold
2.2 Calculation
1. Basis (Center Line)
Uses a simple moving average of close over length_ibb bars.
2. Upper & Lower Bands
Calculated by adding/subtracting (StdDev × standard deviation) from the basis.
2.3 Angle Detection
A custom function angle(_src, _lookback) approximates the slope of the Bollinger Bands in degrees by comparing _src vs. _src and applying an arctangent. The script colors table outputs when these angles exceed the user-defined threshold.
3. Keltner Channels
3.1 Inputs
• Length K1 / K2
• Multiplier K1 / K2
• Source K1 / K2
• Bands Style: Choice among “Average True Range,” “True Range,” or “Range.”
• Use Exponential MA: Toggle between EMA or SMA for the baseline.
3.2 Calculation
The script’s keltnerChannel function:
1. Calculates a moving average (EMA or SMA).
2. Computes a range using either ATR, True Range, or the plain bar range (high - low).
3. Returns the upper, middle, and lower lines.
Two sets of Keltner Channels (K1 and K2) are plotted by default.
4. Bollinger vs. Keltner: Identifying the “Squeeze”
A key part of many TTM Squeeze–style strategies involves looking for when Bollinger Bands move inside narrower Keltner Channels. This script calculates:
upper_pip_diff = (upperIBB - keltner1_upper) * 10000
lower_pip_diff = (keltner1_lower - lowerIBB) * 10000
• If these differences are small, it suggests a “squeeze” is in effect.
• The script also calculates a new_label_pip_diff (the difference between upper_pip_diff and lower_pip_diff) and displays that on the chart as a floating label.
5. Labels, Tables, and Visual Elements
5.1 Floating Labels
The script uses a custom floatingLabel() function to place real-time text boxes near the Bollinger Bands showing:
• upper_pip_diff
• lower_pip_diff
• new_label_pip_diff
• A percentage label that compares the current difference to a previous one.
Colors vary to reflect bullish (green), bearish (red), or neutral (yellow/gray) indications.
5.2 Table Displays
• PipD Table: Shows the absolute distance (in pips) between upper and lower Bollinger Bands.
• Angle Table: Located on the right side of the chart, displays the angles of the upper/lower IBB lines and the basis. If an angle exceeds the threshold, it turns bright (lime or red).
5.3 Plotting & Filling
• IBB: The basis and its upper/lower bands are plotted. The background between them can be filled with a semi-transparent color.
• Keltner Channels: Up to two sets (K1 and K2), each with its own color shading.
6. Alerts
There are two alert conditions, based on a color shift in the script’s logic:
buy_alert_condition = text_color_upper != color.green and text_color_upper == color.green
sell_alert_condition = text_color_upper != color.red and text_color_upper == color.red
• Buy Alert: When the script detects an upper color transition from non-green to green.
• Sell Alert: When the script detects an upper color transition from non-red to red.
7. Usage Tips
1. Spotting Squeezes
Look for times when Bollinger Bands contract inside Keltner Channels, suggesting low volatility.
2. Angle Threshold
The angle table on the right can reveal whether the bands are sloping sharply up or down.
3. Pip Differences (Forex)
For currency traders, tracking pip differences can highlight volatility changes.
4. Multi-Timeframe Analysis
Works on intraday or higher timeframes to detect expansions and contractions in volatility.
5. Alerts
The built-in alerts can notify you as soon as the script’s color logic changes to bullish or bearish.
(BUY-SELL)RSI with Bollinger BandsThis script for TradingView combines two popular technical analysis indicators - the Relative Strength Index (RSI) and Bollinger Bands - to identify when an asset's price may be overbought or oversold.
Here's how it works:
Input parameters:
rsiLength: the RSI calculation period (default is 14).
rsiOverbought: the overbought level of the RSI (default is 70).
rsiOversold: RSI oversold level (default is 30).
bbLength: Bollinger Bands calculation period (default is 20).
bbMult: standard deviation multiplier for Bollinger Bands (default is 2.0).
reducePyramiding: option to reduce pyramiding (off by default).
Indicator Calculation:
The script calculates RSI and Bollinger Bands using the built-in functions ta.rsi() and ta.bb().
Signal conditions:
Buy signal: generated when the RSI falls below the rsiOversold level and the closing price is below the lower Bollinger Band.
Sell signal: generated when the RSI rises above the rsiOverbought level and the closing price is above the upper Bollinger Band.
Pyramiding:
The script uses the buyCount and sellCount counters to track the number of consecutive buy and sell signals.
The maxTrades parameter defines the maximum number of trades in one direction (1 if reducePyramiding is enabled, and 3 otherwise).
Eroina Trend Reversal Indicator with ConfirmationsEroina Trend Reversal Indicator with Confirmations
Overview (English):
The Trend Reversal Indicator with Confirmations is designed to identify potential trend reversals by analyzing dynamic resistance and support levels. This script uses a robust confirmation system to reduce false signals, making it ideal for traders who seek disciplined, data-driven decisions.
Key Features:
• Dynamic Levels: Calculates resistance and support levels based on user-defined lengths.
• Breakout Confirmation: Confirms trend reversals by validating price action over a specified number of candles.
• Visual Cues: Displays “LONG” and “SHORT” signals directly on the chart, alongside resistance/support levels.
• Customizable Parameters: Adaptable to different timeframes and market conditions.
How It Works:
1. Resistance & Support Levels:
• Resistance: Calculated as the highest high over the last N bars.
• Support: Calculated as the lowest low over the last N bars.
2. Breakout Detection:
• A resistance breakout occurs when the price closes above the resistance level.
• A support breakout occurs when the price closes below the support level.
3. Confirmation Logic:
• Signals are validated only if the price remains above/below the levels for a user-defined number of candles.
4. Entry Signals:
• “LONG” signals indicate a confirmed breakout above resistance.
• “SHORT” signals indicate a confirmed breakdown below support.
Settings:
• Resistance Length: Defines the number of candles used to calculate resistance levels.
• Support Length: Defines the number of candles used to calculate support levels.
• Confirmation Candles: Specifies how many candles are required to confirm breakouts.
Usage:
This indicator is ideal for identifying trend reversals and optimizing entry points. Combine it with volume analysis or other technical indicators to enhance accuracy. For example:
• Use in conjunction with RSI to avoid overbought/oversold conditions.
• Combine with moving averages to confirm the trend direction.
Overview (Additional Language):
(Your additional language description can go here after English, e.g., Russian, Spanish, etc.)
Line Break Chart StrategyHello All!
We should not pass this year without a gift!
My last publication in 2024 is Complete Line Break Chart Strategy with many features!
What is Line Break Chart?
" Line Break is a Japanese chart style that disregards time intervals and only focuses on price movements, similar to the Kagi and Renko chart styles. Line Break charts form a series of up and down bars (referred to as lines). Up lines represent rising prices, and down lines represent falling prices. New confirmed lines only form on the chart when closing prices break the range covered by previous lines. Users can control the number of past lines used in the calculation via the "Number of Lines" input in the chart settings. The typical "Number of Lines" setting is 3, meaning the chart forms a new up line when the closing price is above the high prices of the last three lines, and it forms a new down line when the closing price is below the past three lines' low prices. If the current price is higher, it is an up line and if it is lower, it is a down line. If the current closing price is the same or the move in the opposite direction is not large enough to warrant a reversal, l then no new line is draw n" by Tradingview. You can find it here
Now let's start examining the features of the indicator:
By using Line break reversals it shows trend on the main chart. You can create alert .
Moreover, you can decide which trade should be taken by using Risk Management in the indicator. You can set the " Maximum Risk " and then if the risk is more than you set then the trade is not taken. When trend changed it checks the distance between reversal level and open price and compare it with the Maximum Risk
Breakout:
It can find breakouts and shows on the chart. You can create alert for breakouts
It can show breakouts on the main chart:
Flip-Flops:
Upon looking at set of price break charts, the trader will notice that there are instances when uptrend blocks is followed by one reversal block, and then by a reversal to a series of uptrend blocks. The opposite is also possible: a series of downtrend blocks is followed by one reversal box and then by an immediate reversal to downtrend. This price action is called a " Flip-Flop ". This structure usually produces trend continuation signal. when we see this then we better use Buy/Sell stop order. lets see this on the chart:
Temporal Sequence Table:
Sequence frequency shows the frequency distribution of the number of sequential highs and the number of sequential lows that have been generated. This is quite important to the trader who is seeking to join a trend or put on a trade when the price break reverses into a new trend direction. For example, if the pattern over the past year has been that there never were more than nine consecutive high closes, it would make sense not to enter a position late into the sequence of new high closes.
also you can see market structure. I have tried to formalize it and show it under the table. so you can understand if it's choppy market.
"Number of Lines" has very important role. While using low time frames such seconds/minutes time frame you may want to choose higher number of lines such 5,6. ( this may minimize the risk of a whipsaw )
Gaps feature:
You can set Gaps on/off. if Gaps on then you can see how long it takes for each box
Reversal and Continuation Probability:
The script calculated Reversal level and Continuation probability of the trend by using Sequence frequency.
It also shows unconfirmed box and current closing price level:
Last but not least it has Overlay option for all items, and can show all items in the main chart!
P.S. I added alerts :)
Wish you all a happy new year!
Enjoy!
Longest Candles HighlighterDescription:
The Longest Candles Highlighter is a simple yet effective tool that identifies and highlights candles with significant price ranges. By visually marking candles that meet specific size criteria, this indicator helps traders quickly spot high-volatility moments or significant market moves on the chart.
Features:
1. Customizable Candle Range:
- Define the minimum and maximum candle size in pips using input fields.
- Tailor the indicator to highlight candles that are most relevant to your trading strategy.
2. Flexible for Different Markets:
- Automatically adjusts pip calculation based on the instrument type (Forex or non-Forex).
- Accounts for differences in pip values, such as the 0.01 pip for JPY pairs in Forex.
3. Visual Highlighting:
- Highlights qualifying candles with a customizable background color for easy identification.
- The default color is red, but you can choose any color to match your chart theme.
4. Precision and Efficiency:
- Quickly scans and identifies candles that meet your criteria, saving you time in analyzing charts.
- Works seamlessly across all timeframes and asset classes.
How It Works:
- The indicator calculates the range of each candle in pips by subtracting the low from the high and dividing by the appropriate pip value.
- It checks whether the candle's size falls within the user-defined minimum and maximum pip range.
- If the conditions are met, the background of the candle is highlighted with the specified color, drawing your attention to significant price movements.
Use Case:
- This indicator is ideal for identifying key market moments, such as breakouts, volatility spikes, or significant price movements.
- Traders can use it to quickly locate large candles on any chart, aiding in technical analysis and strategy development.
This tool simplifies the process of spotting important candles, empowering traders to make faster and more informed trading decisions.
JCM_MadridThis indicator provides dynamic bar coloring and buy/sell signals based on EMA relationships and price momentum. It allows traders to visually identify trend changes and potential trade opportunities directly on the chart.
Indicator Basics:
Name: The script is titled "JCM_Madrid".
Overlay: It overlays its calculations and outputs directly on the price chart.
User Inputs:
-Range: Defines the length of the EMA (Exponential Moving Average).
-Ref-1 and Ref-2: Set reference lengths for secondary EMAs used in the calculations.
-Source: The price data source for EMA calculations (e.g., close, open, high, low).
-Enable Buy/Sell: Boolean toggles to activate or deactivate buy and sell signals.
Calculations:
EMA Value: Computes the main EMA based on the source and Range.
CloseMA: The difference between the close price and the EMA.
SqzMA: The difference between a secondary EMA (Ref-1) and the main EMA.
RefMA: The difference between another secondary EMA (Ref-2) and the main EMA.
Bar Coloring:
Bars are colored based on the relationship between SqzMA and CloseMA:
Purple: When SqzMA > CloseMA.
Blue: When SqzMA < CloseMA.
Buy/Sell Signals:
A Buy Signal is generated when:
CloseMA crosses from below to above 0.
The close price is higher than the previous close.
Buy signals are enabled.
A Sell Signal is generated when:
CloseMA crosses from above to below 0.
The close price is lower than the previous close.
Sell signals are enabled.
Signals are displayed as labels on the chart:
"Buy": Green label below the candle.
"Sell": Yellow label below the candle
Compare TOTAL, TOTAL2, TOTAL3, and OTHERSCompare TOTAL, TOTAL2, TOTAL3, and OTHERS
This indicator compares the performance of major cryptocurrency market cap indices: TOTAL, TOTAL2, TOTAL3, and OTHERS. It normalizes each index's performance relative to its starting value and visualizes their relative changes over time.
Features
- Normalized Performance: Tracks the percentage change of each index from its initial value.
- Customizable Timeframe: Allows users to select a base timeframe for the data (e.g., daily, weekly).
- Dynamic Labels: Displays the latest performance of each index as a label on the chart, aligned to the right of the corresponding line for easy comparison.
- Color-Coded Lines: Each index is assigned a distinct color for clear differentiation:
-- TOTAL (Blue): Represents the total cryptocurrency market cap.
-- TOTAL2 (Green): Excludes Bitcoin.
-- TOTAL3 (Orange): Excludes Bitcoin and Ethereum.
-- OTHERS (Red): Represents all cryptocurrencies excluding the top 10 by market cap.
- Baseline Reference: Includes a horizontal line at 0% for reference.
Use Cases:
- Market Trends: Identify which segments of the cryptocurrency market are outperforming or underperforming over time.
- Portfolio Insights: Assess the impact of Bitcoin and Ethereum dominance on the broader market.
- Market Analysis: Compare smaller-cap coins (OTHERS) with broader indices (TOTAL, TOTAL2, and TOTAL3).
This script is ideal for traders and analysts who want a quick, visual way to track how different segments of the cryptocurrency market perform relative to each other over time.
Note: The performance is normalized to highlight percentage changes, not absolute values.
Pi Cycle MACD Inverse OscillatorPi Cycle MACD Inverse Oscillator with Gradient and Days Since Last Top
This indicator is ideal for Bitcoin traders seeking a robust tool to visualize long-term and short-term trends with enhanced clarity and actionable insights.
This script combines the concept of the Pi Cycle indicator with a unique MACD-based inverse oscillator to analyze Bitcoin market trends. It introduces several features to help traders understand market conditions better:
Inverse Oscillator:
- Oscillator ranges between 1 and -1.
- A value of 1 indicates the two moving averages (350 MA and 111 MA) are equal.
- A value of -1 indicates the maximum observed distance between the moving averages during the selected lookback period.
- The oscillator dynamically adjusts to price changes using a configurable scaling factor.
Gradient Visualization:
The oscillator line transitions smoothly from green (closer to -1) to yellow (at 0) and red (closer to 1).
The color gradient provides a quick visual cue for market momentum.
Days Since Last Pi Cycle Top:
Calculates and displays the number of days since the last "Pi Cycle Top" (defined as a crossover between the two moving averages).
The label updates dynamically and appears only on the most recent bar.
Conditional Fill:
Highlights the area between 0 and 1 with a green gradient when the price is above the long moving average.
Enhances visual understanding of the oscillator's position relative to key thresholds.
Inputs:
- Long Moving Average (350 default): Determines the primary trend.
- Short Moving Average (111 default): Measures shorter-term momentum.
- Oscillator Lookback Period (100 default): Defines the range for normalizing the oscillator.
- Price Scaling Factor (0.01 default): Adjusts the normalization to account for large price fluctuations.
How to Use:
- Use the oscillator to identify potential reversal points and trend momentum.
- Look for transitions in the gradient color and the position relative to 0.
- Monitor the "Days Since Last Top" label for insights into the market's cycle timing.
- Utilize the conditional fill to quickly assess when the market is in a favorable position above the long moving average.
ForecastPro by BinhMyco1. Overview:
This Pine Script implements a custom forecasting tool on TradingView, labeled "BinhMyco." It provides a method to predict future price movements based on historical data and a comparison with similar historical patterns. The script supports two types of forecasts: **Prediction** and **Replication**, where the forecasted price can be either based on price peaks/troughs or an average direction. The script also calculates a confidence probability, showing how closely the forecasted data aligns with historical trends.
2. Inputs:
- Source (`src`): The input data source for forecasting, which defaults to `open`.
- Length (`len`): The length of the training data used for analysis (fixed at 200).
- Reference Length (`leng`): A fixed reference length for comparing similar historical patterns (set to 70).
- Forecast Length (`length`): The length of the forecast period (fixed at 60).
- Multiplier (`mult`): A constant multiplier for the forecast confidence cone (set to 4.0).
- Forecast Type (`typ`): Type of forecast, either **Prediction** or **Replication**.
- Direction Type (`dirtyp`): Defines how the forecast is calculated — either based on price **peaks/troughs** or an **average direction**.
- Forecast Divergence Cone (`divcone`): A boolean option to enable the display of a confidence cone around the forecast.
3. Color Constants:
- Green (`#00ffbb`): Color used for upward price movements.
- Red (`#ff0000`): Color used for downward price movements.
- Reference Data Color (`refcol`): Blue color for the reference data.
- Similar Data Color (`simcol`): Orange color for the most similar data.
- Forecast Data Color (`forcol`): Yellow color for forecasted data.
4. Error Checking:
- The script checks if the reference length is greater than half the training data length, and if the forecast length exceeds the reference length, raising errors if either condition is true.
5. Arrays for Calculation:
- Correlation Array (`c`): Holds the correlation values between the data source (`src`) and historical data points.
- Index Array (`index`): Stores the indices of the historical data for comparison.
6. Forecasting Logic:
- Correlation Calculation: The script calculates the correlation between the historical data (`src`) and the reference data over the given reference length. It then identifies the point in history most similar to the current data.
- Forecast Price Calculation: Based on the type of forecast (Prediction or Replication), the script calculates future prices either by predicting based on similar bars or by replicating past data. The forecasted prices are stored in the `forecastPrices` array.
- Forecast Line Drawing: The script draws lines to represent the forecasted price movements. These lines are color-coded based on whether the forecasted price is higher or lower than the current price.
7. Divergence Cone (Optional):
- If the **divcone** option is enabled, the script calculates and draws a confidence cone around the forecasted prices. The upper and lower bounds of the cone are calculated using a standard deviation factor, providing a visual representation of forecast uncertainty.
8. Probability Table:
- A table is displayed on the chart, showing the probability of the forecast being accurate. This probability is calculated using the correlation between the current data and the most similar historical pattern. If the probability is positive, the table background turns green; if negative, it turns red. The probability is presented as a percentage.
9. Key Functions:
- `highest_range` and `lowest_range`: Functions to find the highest and lowest price within a range of bars.
- `ftype`: Determines the forecast type (Prediction or Replication) and adjusts the forecasting logic accordingly.
- `ftypediff`: Computes the difference between the forecasted and actual prices based on the selected forecast type.
- `ftypelim`, `ftypeleft`, `ftyperight`: Additional functions to adjust the calculation of the forecast based on the forecast type.
10. Conclusion:
The "ForecastPro" script is a unique tool for forecasting future price movements on TradingView. It compares historical price data with similar historical trends to generate predictions. The script also offers a customizable confidence cone and displays the probability of the forecast's accuracy. This tool provides traders with valuable insights into future price action, potentially enhancing decision-making in trading strategies.
---
This script provides advanced functionality for traders who wish to explore price forecasting, and can be customized to fit various trading styles.