[AU-Doji & Marubozu Scanner-V1]** : Comprehensive Guide**
### Overview
The ** ** is a versatile tool designed for traders to identify key candlestick patterns such as Doji variations (Dragonfly, Gravestone, and Doji Stars) and Marubozu candles. These patterns provide valuable insights into market sentiment, offering potential reversal or continuation signals.
This guide will explain the indicator's features, functionality, and how it can enhance trading strategies.
---
### Key Features
#### 1. Candlestick Pattern Detection
The indicator identifies the following patterns:
- **Doji Star Up (D-UP)**: Signals a potential bullish reversal.
- **Doji Star Down (D-DN)**: Signals a potential bearish reversal.
- **Gravestone Doji (GRV)**: Indicates bearish rejection at higher prices.
- **Dragonfly Doji (DRG)**: Indicates bullish support at lower prices.
- **Bullish Marubozu (B-MRU)**: A strong bullish candlestick with no wicks.
- **Bearish Marubozu (S-MRU)**: A strong bearish candlestick with no wicks.
#### 2. Customizable Inputs
The script offers configurable parameters to suit different market conditions:
- **EMA Period**: Defines the Exponential Moving Average period for trend detection.
- **Low/High Ratio**: Adjusts the sensitivity of candlestick wick detection.
- **Body Ratio Size**: Customizes the body-to-wick ratio.
- **Marubozu Body Minimum Height**: Sets the minimum body size required for Marubozu detection.
#### 3. Alerts and Visual Cues
- Real-time alerts notify users when patterns are detected.
- Visual markers on the chart with concise labels (e.g., D-UP, B-MRU) help identify patterns easily.
- Background highlights emphasize key zones.
---
### How It Works
#### Detection Logic
1. **Doji Star**:
- Evaluates the relationship between the candlestick body and its wicks.
- Identifies bullish and bearish Doji Stars based on their relative positions to the EMA.
2. **Gravestone and Dragonfly Doji**:
- Gravestone Doji: Detected when there is a long upper shadow and minimal or no lower shadow.
- Dragonfly Doji: Detected when there is a long lower shadow and minimal or no upper shadow.
3. **Marubozu**:
- Bullish Marubozu: A candlestick with no upper or lower shadows, indicating strong upward momentum.
- Bearish Marubozu: A candlestick with no upper or lower shadows, indicating strong downward momentum.
#### Visual Representation
The indicator uses concise text labels and colors to differentiate patterns:
- **D-UP** (green): Doji Star Up.
- **D-DN** (red): Doji Star Down.
- **GRV** (red): Gravestone Doji.
- **DRG** (green): Dragonfly Doji.
- **B-MRU** (green): Bullish Marubozu.
- **S-MRU** (red): Bearish Marubozu.
---
### Practical Applications
#### 1. Trend Reversal Detection
Use Doji and Marubozu patterns to identify potential reversal points in uptrends or downtrends.
#### 2. Continuation Signals
Marubozu patterns can confirm strong momentum, indicating trend continuation.
#### 3. Risk Management
Combine detected patterns with stop-loss or take-profit strategies to manage trades effectively.
#### 4. Multi-Timeframe Analysis
Apply the indicator to different timeframes for a comprehensive market view.
---
### Usage Tips
1. **Customize Inputs**: Adjust the EMA period, ratios, and thresholds based on market conditions.
2. **Combine with Other Indicators**: Use alongside momentum indicators like RSI or MACD for confirmation.
3. **Set Alerts**: Enable alerts to stay informed without actively monitoring the chart.
---
### Turkish Translation
** : Kapsamlı Kılavuz**
### Genel Bakış
** **, yatırımcılar için Doji çeşitleri (Yusufçuk, Mezar Taşı, ve Doji Yıldızları) ve Marubozu mumlarını tespit etmek üzere tasarlanmış çok yönlü bir araçtır. Bu formasyonlar, piyasa duyarlılığı hakkında önemli bilgiler sunarak olası dönüş veya devam sinyalleri sağlar.
Bu kılavuz, göstergenin özelliklerini, işlevlerini ve ticaret stratejilerini nasıl geliştirebileceğini açıklar.
---
### Temel Özellikler
#### 1. Mum Formasyonu Tespiti
Gösterge şu formasyonları tespit eder:
- **Doji Star Up (D-UP)**: Potansiyel boğa dönüş sinyali.
- **Doji Star Down (D-DN)**: Potansiyel ayı dönüş sinyali.
- **Mezar Taşı Doji (GRV)**: Yüksek fiyatlarda ayı reddi.
- **Yusufçuk Doji (DRG)**: Düşük fiyatlarda boğa desteği.
- **Boğa Marubozu (B-MRU)**: Fitilsiz güçlü bir boğa mumu.
- **Ayı Marubozu (S-MRU)**: Fitilsiz güçlü bir ayı mumu.
#### 2. Özelleştirilebilir Girdiler
Gösterge farklı piyasa koşullarına uygun ayarlanabilir parametreler sunar:
- **EMA Periyodu**: Trend tespiti için EMA periyodunu tanımlar.
- **Düşük/Yüksek Oranı**: Mum fitil algılama hassasiyetini ayarlar.
- **Gövde Oranı Boyutu**: Gövde-fitil oranını özelleştirir.
- **Marubozu Gövdesi Minimum Yüksekliği**: Marubozu algılama için gereken minimum gövde boyutunu belirler.
#### 3. Uyarılar ve Görsel İşaretler
- Formasyonlar algılandığında gerçek zamanlı uyarılar sağlar.
- Grafikte kısa etiketler (ör. D-UP, B-MRU) ile formasyonları kolayca ayırt etmenizi sağlar.
- Arka plan renkleri önemli bölgeleri vurgular.
---
### Nasıl Çalışır
#### Tespit Mantığı
1. **Doji Yıldızları**:
- Gövde ve fitiller arasındaki ilişkiyi değerlendirir.
- EMA'ya göre Boğa ve Ayı Doji Yıldızlarını tespit eder.
2. **Mezar Taşı ve Yusufçuk Doji**:
- **Mezar Taşı Doji**: Uzun üst fitil ve az ya da hiç alt fitil olduğunda tespit edilir.
- **Yusufçuk Doji**: Uzun alt fitil ve az ya da hiç üst fitil olduğunda tespit edilir.
3. **Marubozu**:
- **Boğa Marubozu**: Fitilsiz ve güçlü yukarı momentum gösteren bir mum.
- **Ayı Marubozu**: Fitilsiz ve güçlü aşağı momentum gösteren bir mum.
#### Görsel Gösterim
Gösterge kısa metin etiketleri ve renkler kullanarak formasyonları ayırt eder:
- **D-UP** (yeşil): Boğa Doji Yıldızı.
- **D-DN** (kırmızı): Ayı Doji Yıldızı.
- **GRV** (kırmızı): Mezar Taşı Doji.
- **DRG** (yeşil): Yusufçuk Doji.
- **B-MRU** (yeşil): Boğa Marubozu.
- **S-MRU** (kırmızı): Ayı Marubozu.
---
### Pratik Uygulamalar
#### 1. Trend Dönüşlerini Tespit Etme
Doji ve Marubozu formasyonlarını kullanarak trend dönüş noktalarını belirleyin.
#### 2. Devam Sinyalleri
Marubozu formasyonları güçlü momentumun devamını doğrulayabilir.
#### 3. Risk Yönetimi
Algılanan formasyonları stop-loss veya take-profit stratejileri ile birleştirerek işlemleri etkili bir şekilde yönetin.
#### 4. Çoklu Zaman Dilimi Analizi
Farklı zaman dilimlerinde göstergeyi uygulayarak kapsamlı bir piyasa görünümü elde edin.
---
### Kullanım İpuçları
1. **Girdileri Özelleştirin**: EMA periyodunu, oranları ve eşikleri piyasa koşullarına göre ayarlayın.
2. **Diğer Göstergelerle Birleştirin**: Onay için RSI veya MACD gibi momentum göstergeleriyle birlikte kullanın.
3. **Uyarıları Ayarlayın**: Grafiği sürekli izlemeden işlemlerden haberdar olmak için uyarıları etkinleştirin.
---
### Sonuç
** **, önemli mum formasyonlarını tespit etmek ve dinamik piyasalarda işlem kararlarını geliştirmek için çok yönlü ve güvenilir bir araçtır. Özelleştirilebilir ayarları, gerçek zamanlı uyarıları ve görsel işaretleri sayesinde, bu gösterge fiyat hareketlerini etkili bir şekilde analiz etmeyi kolaylaştırır.
Candlestick analysis
Bollinger band + 7SMMA + Heikin AshiThis is an indicator that combines Bollinger Bands, 7 SMMA, and Heikin Ashi into one.
Feel free to use it conveniently.
Note: If the Heikin Ashi overlay feels distracting, you can turn it on/off as needed. 😊
##########
볼린저밴드와 7SMMA와 하이킨아시를 하나로 합친 지표입니다.
편하게 사용하세요.
참고) 하이킨아시 오버레이가 눈에 거슬리면 on/off해서 사용하시면 될거 같습니다.😊
Discounted vs. Premium ZonesThe Discounted vs. Premium Zones indicator visually highlights areas of the chart that are in either a discounted zone (below the 50% equilibrium level) or a premium zone (above the 50% equilibrium level). It helps traders identify potential buying opportunities in discounted zones and selling opportunities in premium zones based on a dynamically calculated price range.
[Au Bullish Doji Star and Tristar-V1]** : Comprehensive Guide**
### Overview
The ** ** indicator is a powerful tool for traders aiming to identify and act upon key reversal patterns. This script is specifically designed to detect:
1. **Bullish Doji Star** - A potential bullish reversal after a period of indecision.
2. **Bullish Tristar** - A unique pattern involving three consecutive Doji candles indicating market indecision followed by a potential bullish breakout.
This guide provides an in-depth explanation of the code and its features, helping you integrate it into your trading strategy effectively.
---
### Features
#### 1. Input Settings
- **Bullish Doji Star**: Enables detection of this pattern.
- **Bullish Tristar**: Enables detection of this three-candle pattern.
- **Confirm Bar Count**: Defines the number of bars within which confirmation or failure of a detected pattern is checked.
#### 2. Reversal Detection
- Identifies potential market reversals using strict criteria for each pattern.
#### 3. Confirmation Levels
- Establishes confirmation and stop levels for patterns to validate their success or failure.
#### 4. Chart Visualization
- Displays key patterns with graphical annotations on the chart.
#### 5. Alerts
- Provides real-time notifications for confirmed or failed patterns.
---
### Code Breakdown
#### Input Settings
```pinescript
form_bullish_doji_star = input.bool(true, "Bullish Doji Star (Doji Yıldız Boğa)")
form_bullish_tristar = input.bool(true, "Bullish Tristar (Üç Yıldız Boğa)")
confirm_bar_count = input.int(3, "Confirm Bar Count", minval=1)
```
These inputs allow users to customize the detection of patterns and set confirmation parameters.
#### Detection Logic
- **Bullish Doji Star**:
```pinescript
bullish_doji_reversal = form_bullish_doji_star and (close < open ) and (math.abs(close - open) <= (high - low) * 0.1) and (close > close )
```
Detects a bullish reversal after a Doji candle.
- **Bearish Doji Star**:
```pinescript
bearish_doji_reversal = form_bullish_doji_star and (close > open ) and (math.abs(close - open) <= (high - low) * 0.1) and (close < close )
```
Identifies potential bearish reversals.
- **Bullish Tristar**:
```pinescript
bullish_tristar = form_bullish_tristar and (math.abs(close - open ) <= (high - low ) * 0.1) and (math.abs(close - open ) <= (high - low ) * 0.1) and (math.abs(close - open) <= (high - low) * 0.1) and (close > close )
```
Detects three consecutive Doji candles followed by a bullish breakout.
#### Confirmation Logic
```pinescript
if bullish_doji_reversal
doji_confirm_level := high + (high - low) * 0.02
doji_stop_level := low - (high - low) * 0.02
```
Defines confirmation and stop levels based on the detected pattern's high and low.
#### Visual Signals
```pinescript
plotshape(series=bullish_doji_reversal, title="Bullish Doji Star", location=location.belowbar, color=color.green, style=shape.triangleup, text="D")
plotshape(series=bullish_tristar, title="Bullish Tristar", location=location.belowbar, color=color.blue, style=shape.circle, text="T")
```
Graphical markers provide clear visual cues for detected patterns.
#### Alerts
```pinescript
alertcondition(doji_status == 1, title="Bullish Doji Confirmed", message="Bullish Doji Star Confirmed")
alertcondition(doji_status == 2, title="Bullish Doji Failed", message="Bullish Doji Star Confirmed & Failed")
```
Real-time alerts notify users about pattern confirmations or failures.
---
### Practical Applications
1. **Pattern Detection**: Use this indicator to identify high-probability bullish reversal patterns.
2. **Confirmation Levels**: Employ confirmation and stop levels to validate trades and manage risk.
3. **Integration**: Combine with other indicators (e.g., RSI, MACD) for robust analysis.
---
### Turkish Translation
** : Kapsamlı Kılavuz**
### Genel Bakış
** ** göstergesi, kilit dönüş formasyonlarını belirlemek ve değerlendirmek isteyen yatırımcılar için güçlü bir araçtır. Bu script, özellikle şu formasyonları tespit eder:
1. **Bullish Doji Star** - Kararsızlık sonrası olası bir yükseliş dönüşü.
2. **Bullish Tristar** - Piyasa kararsızlığını ve olası bir yükseliş kırılmasını gösteren üç ardışık Doji mumu.
Bu kılavuz, kodun işlevlerini ve özelliklerini detaylı bir şekilde açıklayarak, ticaret stratejinize etkin bir şekilde entegre etmenize yardımcı olur.
---
### Özellikler
#### 1. Giriş Ayarları
- **Bullish Doji Star**: Bu formasyonun tespitini etkinleştirir.
- **Bullish Tristar**: Bu üç mumlu formasyonun tespitini etkinleştirir.
- **Teyit Bar Sayısı**: Tespit edilen bir formasyonun teyidi veya başarısızlığı için kontrol edilecek bar sayısını belirler.
#### 2. Dönüş Tespiti
- Her bir formasyon için sıkı kriterler kullanarak potansiyel piyasa dönüşlerini belirler.
#### 3. Teyit Seviyeleri
- Formasyonların başarısını veya başarısızlığını doğrulamak için teyit ve stop seviyeleri oluşturur.
#### 4. Grafik Görselleştirme
- Anahtar formasyonları grafik üzerinde görsel olarak işaretler.
#### 5. Uyarılar
- Teyit edilen veya başarısız olan formasyonlar için gerçek zamanlı bildirimler sağlar.
---
### Kod Açıklaması
#### Giriş Ayarları
```pinescript
form_bullish_doji_star = input.bool(true, "Bullish Doji Star (Doji Yıldız Boğa)")
form_bullish_tristar = input.bool(true, "Bullish Tristar (Üç Yıldız Boğa)")
confirm_bar_count = input.int(3, "Confirm Bar Count", minval=1)
```
Bu girişler, kullanıcıların formasyon tespitini özelleştirmesine ve teyit parametrelerini ayarlamasına olanak tanır.
#### Tespit Mantığı
- **Bullish Doji Star**:
```pinescript
bullish_doji_reversal = form_bullish_doji_star and (close < open ) and (math.abs(close - open) <= (high - low) * 0.1) and (close > close )
```
- **Bullish Tristar**:
```pinescript
bullish_tristar = form_bullish_tristar and (math.abs(close - open ) <= (high - low ) * 0.1) and (math.abs(close - open ) <= (high - low ) * 0.1) and (math.abs(close - open) <= (high - low) * 0.1) and (close > close )
```
#### Görsel İşaretler
```pinescript
plotshape(series=bullish_doji_reversal, title="Bullish Doji Star", location=location.belowbar, color=color.green, style=shape.triangleup, text="D")
plotshape(series=bullish_tristar, title="Bullish Tristar", location=location.belowbar, color=color.blue, style=shape.circle, text="T")
```
#### Uyarılar
```pinescript
alertcondition(doji_status == 1, title="Bullish Doji Confirmed", message="Bullish Doji Star Confirmed")
```
---
### Kullanım İpuçları
1. **Formasyon Tespiti**: Bu göstergeyi, yüksek olasılıklı yükseliş dönüş formasyonlarını tespit etmek için kullanın.
2. **Teyit Seviyeleri**: İşlemleri doğrulamak ve riski yönetmek için teyit ve stop seviyelerinden yararlanın.
3. **Entegrasyon**: Daha sağlam bir analiz için diğer göstergelerle (ör. RSI, MACD) birleştirin.
---
### Sonuç
** **, piyasa hareketlerini analiz etmek ve potansiyel fırsatları belirlemek için güvenilir bir araçtır. Grafik görselleştirmeleri ve uyarıları sayesinde, işlem kararlarını daha etkili bir şekilde almanıza olanak tanır.
Multi-Period Technical AnalysisThis indicator table provides a comprehensive view of key technical indicators across different time periods. Here's what each component displays:
Layout:
Top row contains headers for each column
Left-most column shows time periods (Current, -2, -4, -6, -8 candles)
Color coding: Current period is highlighted in green, historical periods in gray
Indicators Displayed:
Price: The actual closing price for each period
MFI (Money Flow Index): A momentum indicator combining price and volume, ranging 0-100
CCI (Commodity Channel Index): Shows overbought/oversold conditions and trend strength
Stochastic K & D: Two lines showing momentum, both ranging 0-100
K line: The faster, more sensitive line
D line: The slower, smoothed line
Williams %R: Shows overbought/oversold levels, ranging -100 to 0
MACD: Two lines showing trend direction and momentum
MACD line: The difference between fast and slow moving averages
Signal line: A smoothed version of the MACD line
Purpose:
Allows traders to see how indicators have evolved over the last few periods
Helps identify trends by comparing current values with historical ones
Provides a quick way to spot divergences between price and indicators
Useful for comparing multiple indicators at specific points in time
My script
Ebrahim Shojaee
1:20 PM (0 minutes ago)
to me
//@version=5
indicator("USD/IRR Custom Data", overlay=true)
// دادههای شما
var float data = array.from(42400, 42500, 42600, 42700) // نرخ دلار
var int dates = array.from(20240101, 20240102, 20240103, 20240104) // تاریخ (YYYYMMDD)
// رسم نمودار
var lineColor = color.new(color.blue, 0)
for i = 0 to array.size(data) - 1
label.new(bar_index + i, array.get(data, i), tostring(array.get(dates, i)), color=lineColor)
My script//@version=5
indicator(title='Trade Bulls v1.2', shorttitle='Trade Bulls v1.2', overlay=true, max_boxes_count=20)
// Block Order
BO_on =input(defval=true, title='Enable Block Order', group='Block Order')
Senset = input.int(28, minval=1, title='Sensitivity', group='Block Order')
OB_mtype = input.string("Close", title="OB Mitigation Type", options= , group="Block Order")
colUpp = input.color(#50b090, title="Bullish OB Border", inline="1", group="Block Order")
colUpp_ob = input.color(color.new(#60C0A0, 85), title="BackGround", inline="1", group="Block Order")
colDnn = input.color(#4060b0, title="Bearish OB Border", inline="2", group="Block Order")
colDnn_ob = input.color(color.new(#5060D0, 85), title="BackGround", inline="2", group="Block Order")
bool BO_is = false
bool BO_is_Upp = false
boUpp = OB_mtype=="Close" ? close : low
boDnn = OB_mtype=="Close" ? close : high
var box Lbox = na
var box Sbox = na
var L_boxes = array.new_box()
var S_boxes = array.new_box()
var int jj = na
CrDt = (open - open ) / open * 100
Senset /= 100
if ta.crossover(CrDt, Senset)
BO_is_Upp := true
jj := bar_index
jj
if ta.crossunder(CrDt, -Senset)
BO_is := true
jj := bar_index
jj
if BO_is and jj - jj > 5 and BO_on
float Lgrn = 0
for i = 4 to 15 by 1
if close > open
Lgrn := i
break
Sbox := box.new(left=bar_index , top=high , bottom=low , right=bar_index , bgcolor=colDnn_ob, border_color=colDnn, extend=extend.right)
array.push(S_boxes, Sbox)
if BO_is_Upp and jj - jj > 5 and BO_on
float Lred = 0
for i = 4 to 15 by 1
if close < open
Lred := i
break
Lbox := box.new(left=bar_index , top=high , bottom=low , right=bar_index , bgcolor=colUpp_ob, border_color=colUpp, extend=extend.right)
array.push(L_boxes, Lbox)
if array.size(S_boxes) > 0
for i = array.size(S_boxes) - 1 to 0 by 1
sbox = array.get(S_boxes, i)
B_top = box.get_top(sbox)
B_bot = box.get_bottom(sbox)
if boDnn > B_top
array.remove(S_boxes, i)
box.delete(sbox)
if high > B_bot
alert('Price inside Bearish Block Order', alert.freq_once_per_bar)
if array.size(L_boxes) > 0
for i = array.size(L_boxes) - 1 to 0 by 1
sbox = array.get(L_boxes, i)
B_bot = box.get_bottom(sbox)
B_top = box.get_top(sbox)
if boUpp < B_bot
array.remove(L_boxes, i)
box.delete(sbox)
if low < B_top
alert('Price inside Bullish Block Order', alert.freq_once_per_bar)
// Sell/Buy/
BS_on =input(defval=true, title='Enable Buy/Sell', group='Buy/Sell')
LB_on =input(defval=true, title='Enable labels', group='Buy/Sell')
BS_type = input.string('Atr',options= ,inline='ln1', group='Buy/Sell')
BS_size = input(1.,'',inline='ln1', group='Buy/Sell')
BS_max = input(3,'Sequence Length', group='Buy/Sell')
var BS_fib = array.from(1,1)
var BS_dist = 0.
var BS_avg = 0.
var BS_fib_n = 1
var BS_os = 0
BS_src = close
BS_n = bar_index
if barstate.isfirst
for i = 1 to BS_max
array.push(BS_fib,array.get(BS_fib,i-1) + array.get(BS_fib,i))
if BS_type == 'Atr'
BS_dist := ta.atr(200)*BS_size*array.get(BS_fib,BS_fib_n)
else
BS_dist := BS_size*array.get(BS_fib,BS_fib_n)
BS_fib_n := math.abs(BS_src-BS_avg) > BS_dist ? BS_fib_n+1 : BS_fib_n
BS_avg := nz(BS_fib_n > BS_max+1 ? BS_src : BS_avg ,BS_src)
BS_fib_n := BS_fib_n > BS_max+1 ? 1 : BS_fib_n
BS_sell = BS_avg < BS_avg
BS_buy = BS_avg > BS_avg
BS_os := BS_buy ? 1 : BS_sell ? 0 : BS_os
BS_css = BS_os == 1 ? #00b010 : #fe1100
BS_stop = BS_avg != BS_avg ? na : BS_os == 0 ? BS_avg + BS_dist : BS_avg - BS_dist
BS_take = BS_avg != BS_avg ? na : BS_os == 1 ? BS_avg + BS_dist : BS_avg - BS_dist
p_0 = plot( BS_on? BS_src:na,color=na)
p_1 = plot( BS_on? BS_avg:na,color=na)
plot(BS_on ? BS_take:na,'Take',#00b010,1,plot.style_linebr)
plot(BS_on ? BS_stop:na,'Stop',#f01000,1,plot.style_linebr)
fill(p_0,p_1,color.new(BS_css,85))
plotshape(BS_on and BS_buy ? low : na,"Buy_Label",shape.labelup,location.absolute,#00b010,0,text="B",textcolor=color.white,size=size.tiny)
plotshape(BS_on and BS_sell ? high : na,"Sell_Label",shape.labeldown,location.absolute,#f01000,0,text="S",textcolor=color.white,size=size.tiny)
if BS_fib_n > BS_fib_n and BS_os == 1 and BS_src > BS_avg and BS_on and LB_on
label.new(BS_n,BS_src,str.tostring(array.get(BS_fib,BS_fib_n-1)) + ' ✅',yloc=yloc.abovebar,color=na,style=label.style_label_down,textcolor=color.gray,size=size.small)
else if BS_fib_n > BS_fib_n and BS_os == 1 and BS_src < BS_avg and BS_on and LB_on
label.new(BS_n,BS_src,str.tostring(array.get(BS_fib,BS_fib_n-1)) + ' ❌',yloc=yloc.belowbar,color=na,style=label.style_label_up,textcolor=color.gray,size=size.small)
if BS_fib_n > BS_fib_n and BS_os == 0 and BS_src < BS_avg and BS_on and LB_on
label.new(BS_n,BS_src,str.tostring(array.get(BS_fib,BS_fib_n-1)) + ' ✅',yloc=yloc.belowbar,color=na,style=label.style_label_up,textcolor=color.gray,size=size.small)
else if BS_fib_n > BS_fib_n and BS_os == 0 and BS_src > BS_avg and BS_on and LB_on
label.new(BS_n,BS_src,str.tostring(array.get(BS_fib,BS_fib_n-1)) + ' ❌',yloc=yloc.abovebar,color=na,style=label.style_label_down,textcolor=color.gray,size=size.small)
//Channel
CH_on =input(defval=true, title='Enable Channel', group='Channel')
CH_src = input(defval=close, title='Source', group='Channel')
CH_len = input.int(defval=100, title='Length', minval=10, group='Channel')
CH_divlen = input.float(defval=2., title='Deviation', minval=0.1, step=0.1, group='Channel')
CH_ext = input(defval=true, title='Extend Lines', group='Channel')
CH_shwfib = input(defval=false, title='Show Fibonacci Levels', group='Channel')
CH_shwbrk = input.bool(defval=true, title='Show Broken Channel', inline='brk', group='Channel')
CH_brkclr = input.color(defval=color.blue, title='', inline='brk', group='Channel')
CH_upclr = input.color(defval=color.lime, title='Up/Down Trend Colors', inline='trcols', group='Channel')
CH_dnclr = input.color(defval=color.red, title='', inline='trcols', group='Channel')
CH_lnwdt = input(defval=2, title='Line Width', group='Channel')
var CH_fiboln = array.new_float(0)
var CH_clrs = array.new_color(2)
if barstate.isfirst
array.push(CH_fiboln, 0.236)
array.push(CH_fiboln, 0.382)
array.push(CH_fiboln, 0.618)
array.push(CH_fiboln, 0.786)
array.unshift(CH_clrs, CH_upclr)
array.unshift(CH_clrs, CH_dnclr)
get_Channel(CH_src, CH_len) =>
md = math.sum(CH_src, CH_len) / CH_len
Ugl = ta.linreg(CH_src, CH_len, 0) - ta.linreg(CH_src, CH_len, 1)
ip = md - Ugl * math.floor(CH_len / 2) + (1 - CH_len % 2) / 2 * Ugl
lst = ip + Ugl * (CH_len - 1)
dev = 0.0
for x = 0 to CH_len - 1 by 1
dev += math.pow(CH_src - (Ugl * (CH_len - x) + ip), 2)
dev
dev := math.sqrt(dev / CH_len)
= get_Channel(CH_src, CH_len)
CH_break = Ugl > 0 and close < y2_ - dev * CH_divlen ? 0 : Ugl < 0 and close > y2_ + dev * CH_divlen ? 2 : -1
var CH_rlns = array.new_line(3)
var CH_fiblns = array.new_line(4)
if CH_on
for x = 0 to 2 by 1
if not CH_shwbrk or CH_break != x or nz(CH_break , -1) != -1
line.delete(array.get(CH_rlns, x))
else
line.set_color(array.get(CH_rlns, x), color=CH_brkclr)
line.set_width(array.get(CH_rlns, x), width=2)
line.set_style(array.get(CH_rlns, x), style=line.style_dotted)
line.set_extend(array.get(CH_rlns, x), extend=extend.none)
array.set(CH_rlns, x, line.new(x1=bar_index - (CH_len - 1), y1=y1_ + dev * CH_divlen * (x - 1), x2=bar_index, y2=y2_ + dev * CH_divlen * (x - 1), color=array.get(CH_clrs, math.round(math.max(math.sign(Ugl), 0))), style=x % 2 == 1 ? line.style_solid : line.style_dashed, width=CH_lnwdt, extend=CH_ext ? extend.right : extend.none))
if CH_shwfib
for x = 0 to 3 by 1
line.delete(array.get(CH_fiblns, x))
array.set(CH_fiblns, x, line.new(x1=bar_index - (CH_len - 1), y1=y1_ - dev * CH_divlen + dev * CH_divlen * 2 * array.get(CH_fiboln, x), x2=bar_index, y2=y2_ - dev * CH_divlen + dev * CH_divlen * 2 * array.get(CH_fiboln, x), color=array.get(CH_clrs, math.round(math.max(math.sign(Ugl), 0))), style=line.style_dotted, width=CH_lnwdt, extend=CH_ext ? extend.right : extend.none))
var label lbl1 = label.new(x=bar_index - (CH_len - 1), y=y1_, text='S', size=size.large)
lb_text = Ugl > 0 ? Ugl > Ugl ? '⇑' : '⇗' : Ugl < 0 ? Ugl < Ugl ? '⇓' : '⇘' : '⇒'
lb_style = Ugl > 0 ? Ugl > Ugl ? label.style_label_up : label.style_label_upper_right : Ugl < 0 ? Ugl < Ugl ? label.style_label_down : label.style_label_lower_right : label.style_label_right
if CH_on
label.set_style(lbl1, lb_style)
label.set_text(lbl1, lb_text)
label.set_x(lbl1, bar_index - (CH_len - 1))
label.set_y(lbl1, Ugl > 0 ? y1_ - dev * CH_divlen : Ugl < 0 ? y1_ + dev * CH_divlen : y1_)
label.set_color(lbl1, Ugl > 0 ? CH_upclr : Ugl < 0 ? CH_dnclr : color.blue)
DnTrend = math.sign(Ugl) != math.sign(Ugl ) and Ugl < 0
UpTrend = math.sign(Ugl) != math.sign(Ugl ) and Ugl > 0
alertcondition(CH_break, title='Channel Broken', message='Channel Broken')
alertcondition(DnTrend, title='Channel Down trend', message='Channel Down trend')
alertcondition(UpTrend, title='Channel Up trend', message='Channel Up trend')
// Support/Resistance
SR_on =input(defval=true, title='Enable Support/Resistance', group='Support/Resistance')
SR_lb = input(15, title='Left Bars ', group='Support/Resistance')
SR_rb = input(15, title='Right Bars', group='Support/Resistance')
SR_vol = input(20, title='Volume Threshold', group='Support/Resistance')
SR_high = fixnan(ta.pivothigh(SR_lb, SR_rb) )
SR_low = fixnan(ta.pivotlow(SR_lb, SR_rb) )
plot(SR_on?SR_low:na, color=ta.change(SR_low) ? na : #2030e0, linewidth=3, offset=-(SR_rb + 1), title='Support')
plot(SR_on?SR_high:na, color=ta.change(SR_high) ? na : #F00000, linewidth=3, offset=-(SR_rb + 1), title='Resistance')
SR_short = ta.ema(volume, 5)
SR_long = ta.ema(volume, 10)
SR_dlt = 100 * (SR_short - SR_long) / SR_long
alertcondition(ta.crossover(close, SR_high) and SR_dlt > SR_vol, title='Resistance Broken', message='Resistance Broken')
alertcondition(ta.crossunder(close, SR_low) and SR_dlt > SR_vol, title='Support Broken', message='Support Broken')
Enhanced Multi-Indicator StrategyEnhance your strategy by incorporating a combination of indicators to improve accuracy. We'll use the Relative Strength Index (RSI) and the Moving Average Convergence Divergence (MACD) along with your moving averages to provide a more robust signal.
EMA RSI Strategy harih1 zone based 5min entry 10 ema cross 20 ema for h1 timeframe bullish bios anr 5min rsi signal entry
Candle Swing Highs and LowsThe 5 Candle Swing Highs and Lows indicator is designed to help traders visually identify significant swing points in price action over a five-candle pattern. This indicator highlights areas of potential reversal by marking swing highs and lows directly on the chart, assisting in making informed trading decisions.
Key Features:
Swing High Detection: The indicator identifies a swing high when the middle candle of a five-candle pattern is higher than its neighboring candles. This can suggest potential resistance levels where price may reverse.
Twiggs Money FlowTwiggs Money Flow (TMF)
This indicator is an implementation of the Twiggs Money Flow (TMF), a volume-based tool designed to measure buying and selling pressure over a specified period. TMF is an enhancement of Chaikin Money Flow (CMF), utilizing more sophisticated smoothing techniques for improved accuracy and reduced noise. This version is highly customizable and includes advanced features for both new and experienced traders.
What is Twiggs Money Flow?
Twiggs Money Flow was developed by Colin Twiggs to provide a clearer picture of market momentum and the balance between buyers and sellers. It uses a combination of price action, trading volume, and range calculations to assess whether a market is under buying or selling pressure.
Unlike traditional volume indicators, TMF incorporates Weighted Moving Averages (WMA) by default but allows for other moving average types (SMA, EMA, VWMA) for added flexibility. This makes it adaptable to various trading styles and market conditions.
Features of This Script:
Customizable Moving Average Types:
Select from SMA , EMA , WMA , or VWMA to smooth volume and price-based calculations.
Tailor the indicator to align with your trading strategy or the asset's behavior.
Optional HMA Smoothing:
Apply Hull Moving Average (HMA) smoothing for a cleaner, faster-reacting TMF line.
Perfect for traders who want to reduce lag and capture trends earlier.
Dynamic Thresholds for Signal Filtering:
Set user-defined thresholds for Long (LT) and Short (ST) signals to highlight significant momentum.
Focus on actionable trends by ignoring noise around neutral levels.
Bar Coloring for Visual Clarity:
Automatically colors your chart bars based on TMF values:
Aqua for strong bullish signals (above the long threshold).
Fuchsia for strong bearish signals (below the short threshold).
Gray for neutral or undecided market conditions.
Ensures that trend direction and strength are visually intuitive.
Configurable Lookback Period:
Adjust the sensitivity of TMF by customizing the length of the lookback period to suit different timeframes and market conditions.
How It Works:
True Range Calculation: The script determines the high, low, and close range to calculate buying and selling pressure.
Adjusted Volume: Incorporates the relationship between price and volume to gauge whether trading activity is favoring buyers or sellers.
Weighted Moving Averages (WMAs): Smooths both volume and adjusted volume values to eliminate erratic fluctuations.
TMF Line: Computes the ratio of adjusted volume to total volume, representing the net buying/selling pressure as a percentage.
HMA Option (if enabled): Smooths the TMF line further to reduce lag and enhance trend identification.
Bar Coloring Logic:
Bars are colored dynamically based on TMF values, thresholds, and smoothing preferences.
Provides an at-a-glance understanding of market conditions.
Input Parameters:
Lookback Period: Defines the number of bars used to calculate TMF (default: 21).
Use HMA Smoothing: Toggle Hull Moving Average smoothing (default: true).
HMA Smoothing Length: Length of the HMA smoothing period (default: 14).
Moving Average Type: Select SMA, EMA, WMA, or VWMA (default: WMA).
Long Threshold (LT): Threshold value above which a long signal is considered (default: 0).
Short Threshold (ST): Threshold value below which a short signal is considered (default: 0).
How to Use It:
Confirm Trends: TMF can validate trends by identifying periods of sustained buying or selling pressure.
Divergence Signals: Watch for divergences between price and TMF to anticipate potential reversals.
Filter Trades: Use the thresholds to ignore weak signals and focus on strong trends.
Combine with Other Indicators: Pair TMF with trend-following or momentum indicators (e.g., RSI, Bollinger Bands) for a comprehensive trading strategy.
Example Use Cases:
Spotting breakouts when TMF crosses above the long threshold.
Identifying sell-offs when TMF dips below the short threshold.
Avoiding sideways markets by ignoring neutral (gray) bars.
Notes:
This indicator is highly customizable, making it versatile across different assets (e.g., stocks, crypto, forex).
While the default settings are robust, tweaking the lookback period, moving average type, and thresholds is recommended for different trading instruments or strategies.
Always backtest thoroughly before applying the indicator to live trading.
This version of Twiggs Money Flow goes beyond standard implementations by offering advanced smoothing, custom thresholds, and enhanced visual feedback to give traders a competitive edge.
Add it to your charts and experience the power of volume-driven analysis!
Ultimate Buy/Sell IndicatorUltimate Buy and Sell Indicator For Johnny B Ultimate Buy and Sell Indicator For Johnny B Ultimate Buy and Sell Indicator For Johnny B Ultimate Buy and Sell Indicator For Johnny B Ultimate Buy and Sell Indicator For Johnny B Ultimate Buy and Sell Indicator For Johnny B Ultimate Buy and Sell Indicator For Johnny B Ultimate Buy and Sell Indicator For Johnny B
Previous Candle Fully Engulfed by Current Candle jknPrevious Candle Fully Engulfed by Current Candle jkn
Heikin Ashi inside candle breakout signal
Heikin Ashi Inside Candle Breakout Signal
This custom Pine Script indicator displays Heikin Ashi candles alongside breakout signals based on inside bars. Inside bars occur when the current candle's high is lower than the previous candle's high, and the current candle's low is higher than the previous candle's low. These inside bars indicate a consolidation period, often followed by a strong breakout in either direction.
Key Features:
Heikin Ashi Candles: The indicator plots Heikin Ashi candles, which are calculated using the open, high, low, and close values of the regular candlesticks, providing a smoothed representation of price action.
Green Candles: Indicate bullish price action (when the Heikin Ashi close is higher than the open).
Red Candles: Indicate bearish price action (when the Heikin Ashi close is lower than the open).
Inside Bar Condition: Identifies when a candle's high is lower than the previous high, and its low is higher than the previous low. This signifies a consolidation pattern that might be followed by a breakout.
Breakout Signals:
Buy Signal: Triggered when the price breaks above the previous high after an inside bar.
Sell Signal: Triggered when the price breaks below the previous low after an inside bar.
Background Color: The chart background color is shaded to indicate the presence of inside bars, making it easy to spot consolidation zones.
How to Use:
Buy Signal: A breakout above the previous high is a potential buy signal.
Sell Signal: A breakout below the previous low is a potential sell signal.
This indicator is ideal for traders looking to capture breakouts after periods of consolidation. It can be used for both short-term and long-term trading strategies.
Single Candle Model-DTFXThe script identifies the candles with engulfing body and marks the 50% of the candle for easy entry based on model of #DTFX single candle entry
Interpreting the Signals:
Look for candles labeled as "BE". These represent significant price action where the range is larger than the previous candle's range.
Pay attention to the 50% line of the "BE" candle:
A green line indicates a bullish "BE" candle.
A red line indicates a bearish "BE" candle.
Watch for Buy ("B") and Sell ("S") labels:
"B": Indicates a potential bullish breakout.
"S": Indicates a potential bearish breakdown.
Alerts:
Configure alerts in TradingView to notify you whenever a "B" or "S" signal is detected. This allows you to act on the signals without constantly monitoring the chart.
Use in Trading Strategies:
Combine this indicator with other tools like support/resistance levels, moving averages, or trend analysis to validate the signals.
Use the midpoint (50% line) of the "BE" candle as a potential reference point for stop-loss or target levels.
Customizations:
Adjust the appearance of labels and lines by modifying their style, color, or placement in the script.
Add filters (e.g., timeframes or volume conditions) to refine the detection of "BE" candles.
This indicator helps traders identify pivotal price movements and act on potential breakouts or breakdowns with clear visual markers and alerts.
Gold Trading Signals + Trendlines + Patterns//@version=5
indicator("Gold Trading Signals + Trendlines + Patterns", overlay=true)
// === تنظیمات ورودی ===
emaShortLength = input.int(50, title="EMA Short Length", minval=1)
emaLongLength = input.int(200, title="EMA Long Length", minval=1)
rsiLength = input.int(14, title="RSI Length", minval=1)
atrMultiplierSL = input.float(1.5, title="ATR Multiplier for Stop Loss", minval=0.1)
tpMultiplier = input.float(2.0, title="Take Profit Multiplier", minval=1.0)
pivotLookback = input.int(5, title="Pivot Lookback Period", minval=2)
// === اندیکاتورها ===
emaShort = ta.ema(close, emaShortLength)
emaLong = ta.ema(close, emaLongLength)
rsi = ta.rsi(close, rsiLength)
atr = ta.atr(14)
// === قوانین ورود ===
longCondition = close > emaShort and emaShort > emaLong and rsi > 40
shortCondition = close < emaShort and emaShort < emaLong and rsi < 60
// === مدیریت ریسک ===
stopLossLong = close - atr * atrMultiplierSL
takeProfitLong = close + atr * atrMultiplierSL * tpMultiplier
stopLossShort = close + atr * atrMultiplierSL
takeProfitShort = close - atr * atrMultiplierSL * tpMultiplier
// === سیگنالهای بصری ===
plotshape(series=longCondition, style=shape.labelup, location=location.belowbar, color=color.green, text="BUY", size=size.small)
plotshape(series=shortCondition, style=shape.labeldown, location=location.abovebar, color=color.red, text="SELL", size=size.small)
if longCondition
line.new(x1=bar_index, y1=stopLossLong, x2=bar_index + 10, y2=stopLossLong, color=color.red, width=1, style=line.style_dotted)
line.new(x1=bar_index, y1=takeProfitLong, x2=bar_index + 10, y2=takeProfitLong, color=color.green, width=1, style=line.style_dotted)
if shortCondition
line.new(x1=bar_index, y1=stopLossShort, x2=bar_index + 10, y2=stopLossShort, color=color.red, width=1, style=line.style_dotted)
line.new(x1=bar_index, y1=takeProfitShort, x2=bar_index + 10, y2=takeProfitShort, color=color.green, width=1, style=line.style_dotted)
// === خطوط روند ===
// محاسبه سقفها و کفها (Pivot Points)
pivotHigh = ta.pivothigh(high, pivotLookback, pivotLookback)
pivotLow = ta.pivotlow(low, pivotLookback, pivotLookback)
// رسم خطوط روند بر اساس سقفها و کفها
var line upTrendline = na
var line downTrendline = na
if (not na(pivotLow))
if (na(upTrendline))
upTrendline := line.new(x1=bar_index , y1=pivotLow, x2=bar_index, y2=low, color=color.green, width=1, style=line.style_solid)
else
line.set_xy2(upTrendline, bar_index, low)
if (not na(pivotHigh))
if (na(downTrendline))
downTrendline := line.new(x1=bar_index , y1=pivotHigh, x2=bar_index, y2=high, color=color.red, width=1, style=line.style_solid)
else
line.set_xy2(downTrendline, bar_index, high)
// === الگوهای قیمتی ===
// شناسایی مثلث (Triangle)
isTriangle = ta.crossover(emaShort, emaLong) or ta.crossunder(emaShort, emaLong)
if isTriangle
label.new(bar_index, high, "Triangle", style=label.style_circle, color=color.orange, textcolor=color.white)
// === نمایش EMAها ===
plot(emaShort, color=color.blue, title="EMA 50", linewidth=2)
plot(emaLong, color=color.red, title="EMA 200", linewidth=2)
// === نمایش RSI ===
hline(70, "Overbought (70)", color=color.gray, linestyle=hline.style_dotted)
hline(30, "Oversold (30)", color=color.gray, linestyle=hline.style_dotted)
Custom MACD with Distance (Table Format)just added a calculation distance on macd line and signal line
PIERCING PATTERNThis indicator identify of piercing Bullish and bearish pattern finding for help you.
Bullish & Bearish Engulfing This indicator is identify of Bullish and bearish Engulfing pattern find
MTF Countdown with Direction - AynetIndicator Definition and Inputs:
pineCopyindicator('MTF Countdown with Direction - Aynet', overlay = true)
This code creates a Multiple Time Frame (MTF) countdown indicator with direction
The overlay = true parameter places the indicator on top of the price chart
Timeframe Options:
Users can choose to show/hide the following timeframes:
1 minute
5 minutes
15 minutes
30 minutes
1 hour
4 hours
Daily
Time Calculations:
pineCopyget_current_time()
Calculates the current time
Converts Unix timestamp to seconds
Calculates time since midnight
Returns time broken down into hours, minutes, and seconds
Countdown Calculation:
pineCopyget_period_countdown(period_seconds)
Calculates remaining time for each timeframe
Computes elapsed time in current period
Returns remaining time in hours, minutes, and seconds
Direction and Closing Price Calculation:
Separate functions for each timeframe (get_direction_and_close_1m(), get_direction_and_close_5m(), etc.)
Each function:
Gets current closing price
Compares with previous closing price
Determines direction (up: 1, down: -1, sideways: 0)
Returns direction and closing price
Table Creation and Updates:
Creates a table in the top right corner
Table consists of 4 columns:
Period (Timeframe)
Time Left (Remaining time)
Direction (Shown with arrows)
Close (Closing price)
Each row has a different background color
Direction arrows:
Green up arrow (▲): Price rising
Red down arrow (▼): Price falling
Gray line (―): Price sideways
Dynamic Data Structures:
pineCopyvar timeframes = array.new_int()
var timeframe_names = array.new_string()
var show_array = array.new_bool()
Uses dynamic arrays for timeframes
Adds selected timeframes to arrays on first run
Key Features:
Shows remaining time until period close
Displays price direction for each timeframe
Shows current closing prices
All information in a single, easy-to-read table
This indicator helps traders by providing a comprehensive view of:
When each timeframe will close
The direction of price movement
Current closing prices
across multiple timeframes in a single table, making it easier to track market movements across different time periods.
The color-coding and arrow system makes it visually intuitive to understand market direction at a glance, while the countdown timer helps with timing decisions.
Relative Strength IndexRelative Strength Index
The relative strength index (RSI) is a momentum indicator used in technical analysis. RSI measures the speed and magnitude of a security's recent price changes to detect overbought or oversold conditions in the price of that security.