Vertical Line at Specific TimeDraws a vertical line at a specific time.
Vertical lines at specific times of the day may help make it easier to identify parts of a session.
If you know you perform better during certain parts of the day utilize these lines to help stay aware of your trading session.
The hours seem a bit buggy but just adjust the time to make the lines what you want to see on the chart. The time can be adjusted in settings to get what you want it to do.
Candlestick analysis
SMA + S/R + Trendkanal + Alarme (15/30 Min Settings)This TradingView script combines several useful tools for intraday trading on 15- and 30-minute charts:
SMA Crossovers: Two Simple Moving Averages (short and long) are calculated and plotted. Buy and sell signals are detected when the short SMA crosses the long SMA upward or downward. These signals are shown as labels on the chart.
Automatic Support and Resistance Lines: Swing highs and lows are detected to identify key support and resistance levels. These are drawn as horizontal lines and can be limited in number.
Trend Channel: A dynamic trend channel is drawn based on linear regression of the highs and lows of the last n bars. The channel’s width can be adjusted.
Alerts: The script triggers alerts on SMA crossovers, breaks of support or resistance lines, and when the price leaves the trend channel.
Adjustable Parameters: The key parameters such as SMA lengths, lookback periods for support/resistance and trend channel, and channel width are configurable via the input menu. There is also a preset selection for 15- or 30-minute timeframes.
This script simplifies the analysis of trend changes, key price levels, and overall market structure for medium-term intraday trading.
Dieses TradingView-Skript kombiniert mehrere nützliche Werkzeuge für den Intraday-Handel auf 15- und 30-Minuten-Charts:
SMA-Kreuzungen: Zwei gleitende Durchschnitte (SMA kurz und SMA lang) werden berechnet und auf dem Chart angezeigt. Buy- und Sell-Signale werden erkannt, wenn der kurze SMA den langen SMA von unten nach oben bzw. von oben nach unten kreuzt. Diese Signale werden als Labels auf dem Chart angezeigt.
Automatische Support- und Resistance-Linien: Swing Highs und Lows werden erkannt, um wichtige Unterstützungs- und Widerstandsniveaus zu bestimmen. Diese werden als horizontale Linien eingezeichnet und können in der Anzahl begrenzt werden.
Trendkanal: Ein dynamischer Trendkanal wird basierend auf linearer Regression der Hoch- und Tiefpunkte der letzten n Kerzen gezeichnet. Der Abstand des Kanals kann angepasst werden.
Alarme: Das Skript generiert Alarme bei SMA-Kreuzungen, beim Durchbrechen von Support- oder Resistance-Linien sowie beim Verlassen des Trendkanals.
Einstellbare Parameter: Die wichtigsten Parameter wie SMA-Längen, Lookback-Längen für Support/Resistance und Trendkanal sowie die Kanalbreite sind über das Input-Menü flexibel anpassbar. Außerdem gibt es eine Auswahlmöglichkeit für voreingestellte Parameter für 15- oder 30-Minuten-Zeiteinheiten.
AI Trend Strategy (Fast/Slow Line with Alternate Signals)just trial. iam usin a ema strategy a very basic one. just buy when buy signal appears and sell when it says sell
Canuck Trading Projection IndicatorCanuck Trading Projection Indicator
Overview
The Canuck Trading Projection Indicator is a powerful PineScript v6 tool designed for TradingView to project potential bullish and bearish price trajectories based on historical price and volume movements. It provides traders with actionable insights by estimating future price targets and assigning confidence levels to each outlook, helping to identify probable market directions across any timeframe. Ideal for both short-term and long-term traders, this indicator combines momentum analysis, RSI filtering, support/resistance detection, and time-weighted trend analysis to deliver robust projections.
Features
Bullish and Bearish Projections: Forecasts price targets for upward (bullish) and downward (bearish) movements over a user-defined projection period (default 20 bars).
Confidence Levels: Assigns percentage confidence scores to each outlook, reflecting the likelihood of the projected price based on historical trends, volatility, and volume.
RSI Filter: Incorporates a 14-period Relative Strength Index (RSI) to validate trends, requiring RSI > 50 for bullish and RSI < 50 for bearish signals.
Support/Resistance Detection: Adjusts confidence levels when projections are near key swing highs/lows (within 2% of average price), boosting confidence by 5% for alignments.
Time-Based Weighting: Prioritizes recent price movements in trend analysis, giving more weight to newer bars for improved relevance.
Customizable Inputs: Allows users to tailor lookback period, projection bars, RSI period, confidence threshold, colors, and label positioning.
Forced Label Spacing: Prevents overlap of bullish and bearish text labels, even for tight projections, using fixed vertical slots when price differences are small (<2% of average price).
Timeframe Flexibility: Works seamlessly across all TradingView timeframes (e.g., 30-minute, hourly, daily, weekly, monthly), adapting projections to the chart’s resolution.
Clean Visualization: Displays projections as green (bullish) and red (bearish) dashed lines, with non-overlapping text labels at the projection endpoints showing price targets and confidence levels.
How It Works
The indicator analyzes historical price and volume data over a user-defined lookback period (default 50 bars) to calculate:
Momentum: Combines price changes and volume to assess trend strength, using a weighted moving average (WMA) for directional bias.
Trend Analysis: Counts bullish (price up, volume above average, RSI > 50) and bearish (price down, volume above average, RSI < 50) trends, weighting recent bars more heavily.
Projections:
Bullish Slope: Positive or flat when momentum is upward, scaled by price change and momentum intensity.
Bearish Slope: Negative or flat when momentum is downward, amplified by bearish confidence for stronger projections.
Projects prices forward by 20 bars (default) using current close plus slope times projection bars.
Confidence Levels:
Base confidence derived from the proportion of bullish/bearish trends, with a 5% minimum to avoid zero confidence.
Adjusted by volatility (lower volatility increases confidence), volume trends, and proximity to support/resistance levels.
Visualization:
Draws projection lines from the current close to the 20-bar future target.
Places text labels at line endpoints, showing price targets and confidence percentages, with forced spacing for readability.
Input Parameters
Lookback Period (default: 50): Number of bars for historical analysis (minimum 10).
Projection Bars (default: 20): Number of bars to project forward (minimum 5).
Confidence Threshold (default: 0.6): Minimum confidence for strong trend indication (0.1 to 1.0).
Bullish Projection Line Color (default: Green): Color for bullish projection line and label.
Bearish Projection Line Color (default: Red): Color for bearish projection line and label.
RSI Period (default: 14): Period for RSI momentum filter (minimum 5).
Label Vertical Offset (%) (default: 1.0): Base offset for labels as a percentage of price range (0.1% to 5.0%).
Minimum Label Spacing (%) (default: 2.0): Minimum vertical spacing between labels for tight projections (0.5% to 10.0%).
Usage Instructions
Add to Chart: Copy the script into TradingView’s Pine Editor, save, and add the indicator to your chart.
Select Timeframe: Apply to any timeframe (e.g., 30-minute, hourly, daily, weekly, monthly) to match your trading strategy.
Interpret Outputs:
Green Line/Label: Bullish price target and confidence (e.g., "Bullish: 414.37, Confidence: 35%").
Red Line/Label: Bearish price target and confidence (e.g., "Bearish: 279.08, Confidence: 41.3%").
Higher confidence indicates a stronger likelihood of the projected outcome.
Adjust Inputs:
Modify Lookback Period to focus on shorter/longer historical trends (e.g., 20 for short-term, 100 for long-term).
Change Projection Bars to adjust forecast horizon (e.g., 10 for shorter, 50 for longer).
Tweak RSI Period or Confidence Threshold for sensitivity to momentum or trend strength.
Customize Colors for visual preference.
Increase Minimum Label Spacing if labels overlap in volatile markets.
Combine with Analysis: Use alongside other indicators (e.g., moving averages, Bollinger Bands) or fundamental analysis to confirm signals, as projections are probabilistic.
Example: TSLA Across Timeframes
Using live TSLA data (close ~346.46 USD, May 31, 2025), the indicator produces:
30-Minute: Bullish 341.93 (13.3%), Bearish 327.96 (86.7%) – Strong bearish sentiment due to intraday volatility.
1-Hour: Bullish 342.00 (33.9%), Bearish 327.50 (62.3%) – Bearish but less intense, reflecting hourly swings.
4-Hour: Bullish 345.52 (73.4%), Bearish 344.44 (19.0%) – Flat outlook, indicating consolidation.
Daily: Bullish 391.26 (68.8%), Bearish 302.22 (31.2%) – Bullish bias from recent uptrend, bearish tempered by longer lookback.
Weekly: Bullish 414.37 (35.0%), Bearish 279.08 (41.3%) – Wide range, reflecting annual volatility.
Monthly: Bullish 396.70 (54.9%), Bearish 296.93 (10.2%) – Long-term bullish optimism.
These results align with market dynamics: short-term intervals capture volatility, while longer intervals smooth trends, providing balanced outlooks.
Notes
Accuracy: Projections are estimates based on historical data and should be used with other analysis tools. Confidence levels indicate likelihood, not certainty.
Timeframe Sensitivity: Short-term intervals (e.g., 30-minute) show larger price swings and higher confidence due to volatility, while longer intervals (e.g., monthly) are more stable.
Customization: Adjust inputs to match your trading style (e.g., shorter lookback for day trading, longer for swing trading).
Performance: Tested on volatile stocks like TSLA, NVIDIA, and others, ensuring robust performance across markets.
Limitations: May produce conservative bearish projections in strong uptrends due to momentum weighting. Adjust lookback or projection_bars for sensitivity.
Feedback
If you encounter issues (e.g., label overlap, projection mismatches), please share your timeframe, settings, or a screenshot. Suggestions for enhancements (e.g., additional filters, visual tweaks) are welcome!
Disclaimer
The Canuck Trading Projection Indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves significant risks, and past performance is not indicative of future results. Always perform your own due diligence and consult a qualified financial advisor before making trading decisions.
Fractal Structure CHoCHThis shows recent Fractal High/Low and the dashed line for CHOCH(bullish/bearish) indicating an internal pullback/pushup
Schmit Trading LiquidityDescription
Schmit Trading Liquidity Marker automatically spots and labels open liquidity sweep levels by detecting classic stop-run patterns (Bull→Bear for highs, Bear→Bull for lows) across multiple timeframes. Lines are drawn exactly at the wick of the triggering candle and removed as soon as price “sweeps” through them, keeping your chart clean and focused on live levels only.
How It Works
1. Pattern Detection
• Liquidity High: When a bullish candle is immediately followed by a bearish candle (Bull→Bear), the script records the higher of the two wicks.
• Liquidity Low: When a bearish candle is immediately followed by a bullish candle (Bear→Bull), the script records the lower of the two wicks.
2. Multi-Timeframe Support
• Choose up to six timeframes (5 min, 15 min, 30 min, 1 h, 4 h, daily) via checkboxes.
• Each timeframe is evaluated independently, and liquidity levels are drawn on your current chart.
3. Precision Wick Placement
• Lines start at bar_index – 1 so they align exactly with the wick of the signal candle, regardless of your chart’s timeframe.
4. Automatic Cleanup
• As soon as price closes beyond a drawn line (sweep), that line is deleted automatically.
Inputs
Input Name Description
Show 5 min. Enable liquidity detection on the 5-minute timeframe.
Show 15 min. Enable liquidity detection on the 15-minute timeframe.
Show 30 min. Enable liquidity detection on the 30-minute timeframe.
Show 1 h. Enable liquidity detection on the 1-hour timeframe.
Show 4 h. Enable liquidity detection on the 4-hour timeframe.
Show 1 D. Enable liquidity detection on the daily timeframe.
High Line Color. Color of Bull→Bear (liquidity high) lines (default: red).
Low Line Color. Color of Bear→Bull (liquidity low) lines (default: blue).
Line Length. How many bars each liquidity line extends to the right.
Usage Tips
• Focus on Live Zones: Combine with volume or order-flow tools to confirm genuine
liquidity sweeps.
• Multiple TFs: Enable higher timeframes for major liquidity clusters; lower timeframes
for fine‐tuning entries.
• Chart Cleanliness: Lines self‐delete on sweep, ensuring no manual cleanup is needed.
⸻
Disclosure & License
This indicator is Open-Source under the Mozilla Public License 2.0. Feel free to review, adapt, and improve the code. No performance guarantees—use responsibly and backtest any strategy before trading live.
PinBar Finder | @CRYPTOKAZANCEVPinBar Finder | @CRYPTOKAZANCEV
This script helps traders identify high-probability reversal points based on price action, specifically Pin Bars — a well-known candlestick pattern used in technical analysis.
What does the indicator do?
It detects bullish and bearish Pin Bars using a custom method for wick-to-body ratio and filters based on historical volatility (pseudo-ATR). A label appears on the chart with detailed info on wick and body size when a valid signal is found.
How does it work?
- The indicator calculates a pseudo-ATR based on the percentage range of the last 1000 candles.
- It then multiplies this value by a user-defined factor (default: 1.1) to set a dynamic threshold for wick size.
- Bullish Pin Bars are detected when the lower wick is at least 1.1 times the body and greater than the dynamic ATR.
- Bearish Pin Bars are detected when the upper wick meets similar conditions.
- Signals are shown using chart labels with exact wick/body percentages.
- Alerts are included for automation or integration with trading bots.
How to use it?
- Add the indicator to any timeframe and asset.
- Use the alerts to notify you when a Pin Bar appears.
- Ideal for traders who use candlestick reversal strategies or combine price action with other confluence tools.
- You can adjust the wick length multiplier to fit the volatility of the instrument.
What makes it original?
Unlike many public scripts that use fixed ratios, this script adapts wick length detection based on recent volatility (pseudo-ATR logic). This makes it more dynamic and suitable for different markets and timeframes.
Developed by: @ZeeZeeMon
Original author name on chart: @CRYPTOKAZANCEV
This script is open-source and educational. Use at your own discretion.
PinBar Finder | @CRYPTOKAZANCEV
Этот скрипт помогает трейдерам находить точки потенциального разворота на основе прайс-экшена, а именно — свечного паттерна «Пин-бар». Индикатор автоматически определяет бычьи и медвежьи пин-бары с учетом адаптивных параметров волатильности.
Что делает индикатор?
Скрипт ищет свечи, у которых тень в несколько раз превышает тело (пин-бары), и отображает на графике точную информацию о длине тела и тени. Это полезно для трейдеров, использующих свечные сигналы на разворот.
Как работает?
- Рассчитывается псевдо-ATR по 1000 последним свечам на основе процентного диапазона high-low.
- Этот ATR умножается на заданный множитель (по умолчанию: 1.1), чтобы динамически задать минимальную длину тени.
- Бычий пин-бар определяется, когда нижняя тень больше тела в 1.1 раза и превышает ATR.
- Медвежий пин-бар — аналогично, но для верхней тени.
- Индикатор отображает лейблы с точными значениями тела и тени.
- Реализованы условия для оповещений (alerts).
Как использовать?
- Добавьте индикатор на нужный график и таймфрейм.
- Настройте alerts, чтобы не пропустить сигналы.
- Особенно полезен для трейдеров, работающих со свечным анализом, стратегиями разворота, а также в сочетании с другими индикаторами.
В чем оригинальность?
В отличие от многих скриптов, использующих фиксированные параметры, здесь используется динамический расчет длины тени на основе волатильности. Это делает скрипт адаптивным к рынку и таймфрейму.
Разработчик: @ZeeZeeMon
Оригинальное имя автора на графике: @CRYPTOKAZANCEV
Скрипт является открытым и предназначен для образовательных целей. Используйте на своё усмотрение.
MEDIAS MOVILES ASL//@version=5
indicator("MEDIAS MOVILES ASL",overlay=true, max_bars_back=3000)
// ======== Indicator Input Parameters =========
linew = 2 // line width for moving averages.
var string G_DAILY = "►► Daily Moving Average"
bool ma_c_enable = input(inline = "01", group = G_DAILY, defval=true, title="MM1")
string ma_c = input.string(inline = "01", group = G_DAILY, defval="ASL", title="", options= )
int len_c = input.int(inline = "01", group = G_DAILY, defval=21, minval=1, title="Length:")
color col_c = input(inline = "01", group = G_DAILY, defval=color.blue,title="")
bool ma_i_enable = input(inline = "02", group = G_DAILY, defval=true, title="MM2")
string ma_i = input.string(inline = "02", group = G_DAILY, defval="EMA", title="", options= )
int len_i = input.int(inline = "02", group = G_DAILY, defval=150, minval=1, title="Length:")
color col_i = input(inline = "02", group = G_DAILY, defval=color.red, title="")
bool ma_l_enable = input(inline = "03", group = G_DAILY, defval=true, title="MM3")
string ma_l = input.string(inline = "03", group = G_DAILY, defval="EMA", title="", options= )
int len_l = input.int(inline = "03", group = G_DAILY, defval=200, minval=1, title="Length:")
color col_l = input(inline = "03", group = G_DAILY, defval=color.orange,title="")
bool ma_a_enable = input(inline = "04", group = G_DAILY, defval=true, title="MM4")
string ma_a = input.string(inline = "04", group = G_DAILY, defval="SMA", title="", options= )
int len_a = input.int(inline = "04", group = G_DAILY, defval=30, minval=1, title="Length:")
color col_a = input(inline = "04", group = G_DAILY, defval=color.green,title="")
var string G_WEEKLY = "►► Weekly Moving Average"
bool w_ma_c_enable = input(inline = "01", group = G_WEEKLY, defval=true, title="MM1")
string w_ma_c = input.string(inline = "01", group = G_WEEKLY, defval="WMA", title="", options= )
int w_len_c = input.int(inline = "01", group = G_WEEKLY, defval=10, minval=1, title="Length:")
color w_col_c = input(inline = "01", group = G_WEEKLY, defval=color.blue,title="")
bool w_ma_i_enable = input(inline = "02", group = G_WEEKLY, defval=true, title="MM2")
string w_ma_i = input.string(inline = "02", group = G_WEEKLY, defval="WMA", title="", options= )
int w_len_i = input.int(inline = "02", group = G_WEEKLY, defval=30, minval=1, title="Length:")
color w_col_i = input(inline = "02", group = G_WEEKLY, defval=color.orange, title="")
bool w_ma_l_enable = input(inline = "03", group = G_WEEKLY, defval=true, title="MM3")
string w_ma_l = input.string(inline = "03", group = G_WEEKLY, defval="SMA", title="", options= )
int w_len_l = input.int(inline = "03", group = G_WEEKLY, defval=200, minval=1, title="Length:")
color w_col_l = input(inline = "03", group = G_WEEKLY, defval=color.green,title="")
bool w_ma_a_enable = input(inline = "04", group = G_WEEKLY, defval=true, title="MM4")
string w_ma_a = input.string(inline = "04", group = G_WEEKLY, defval="WMA", title="", options= )
int w_len_a = input.int(inline = "04", group = G_WEEKLY, defval=50, minval=1, title="Length:")
color w_col_a = input(inline = "04", group = G_WEEKLY, defval=color.red,title="")
var string G_MONTHLY = "►► Monthly Moving Average"
bool m_ma_c_enable = input(inline = "01", group = G_MONTHLY, defval=true, title="MM1")
string m_ma_c = input.string(inline = "01", group = G_MONTHLY, defval="WMA", title="", options= )
int m_len_c = input.int(inline = "01", group = G_MONTHLY, defval=12, minval=1, title="Length:")
color m_col_c = input(inline = "01", group = G_MONTHLY, defval=color.orange,title="")
bool m_ma_l_enable = input(inline = "02", group = G_MONTHLY, defval=false, title="MM2")
string m_ma_l = input.string(inline = "02", group = G_MONTHLY, defval="SMA", title="", options= )
int m_len_l = input.int(inline = "02", group = G_MONTHLY, defval=12, minval=1, title="Length:")
color m_col_l = input(inline = "02", group = G_MONTHLY, defval=color.olive,title="")
var color TBL_TXT = color.white
var color TBL_BG = #000000
var string TXT_SIZE = 'auto'
var string G_TABLE = '►► Moving Average and 2Sigma Table (Position & Size)'
bool i_table_enable = input.bool(true, inline='01', group=G_TABLE, title = "Enable? | ")
string i_tableYpos = input.string('bottom', '↕', inline='01', group=G_TABLE, options= )
string i_tableXpos = input.string('right', '↔', inline='01', group=G_TABLE, options= , tooltip='Position on the chart.')
color i_c_tableText = input.color(TBL_TXT, 'Text', inline='03', group=G_TABLE)
color i_c_tableBg = input.color(TBL_BG, 'Background', inline='03', group=G_TABLE)
string i_tableTextSize = input.string(TXT_SIZE, '', inline='03', group=G_TABLE, options= )
var string G_TABLEADD = '►► Table Additional Information'
bool unify_emas = input.bool(true, inline='01', group=G_TABLEADD, title = "Smart Unify Daily EMAS 150 & 200?", tooltip='Consolidate the two percentages in one to show the distance from close price to the long EMAS.')
cell_1 ='2σ Dispersion'
cell_2 = 'β-5Y'
cell_3 = 'Div Yield FQ'
var string G_SIGMAF = '►► 2Sigma and Bollinger Band Format'
string sigma_bb_format = input.string('0-100 inside band',inline='01', group=G_SIGMAF, title = "2σ and BB Format:", options= )
var string G_TABLEPARAM = '►► Beta & ATR Indicator Parameters'
string beta_baseline = input.string('SPY', inline='01', group=G_TABLEPARAM, title = "β Index or Benchmark:")
int beta_years = input.int(5, inline='01', group=G_TABLEPARAM, title = "Window Years:")
var color TBL_TXT2 = color.white
var color TBL_BG2 = #363A45
var string TXT_SIZE2 = 'auto'
var string COMMENT = 'EMAs = EMA(200)+EMA(150) / 2 (not adjusted by dividens) '
// ======== Functions Library =========
// ————— Function returning the leftmost `_n` characters in `_str`.
moving_avg(type, len) =>
value = type == "ASL" ? (ta.ema(close,len-1)+ta.wma(close,len))/2 : type =="EMA" ? ta.ema(close,len) : type=="WMA" ? ta.wma(close,len) : type=="HMA" ? ta.hma(close,len) : type=="L_EMAS_AVG" ? (ta.ema(close,len)+ta.ema(close,len+50))/2: ta.sma(close ,len)
txt = type + str.tostring(len,"#")
//sigma functions
// v=variation vs price
v(float x) => (close-x)/close
sigma2(x) => ta.stdev(x,bar_index > 3000 ? 3000 : (timeframe.isweekly or timeframe.ismonthly) ? 1000/5 : 1000) * 2
bg_mm(v,s) => (v > 0) ? (math.abs(v) > s) ? color.lime : color.green : (math.abs(v) > s) ? #ff0000 : #ad2323
bg_rsi(r) => r>70 ? color.red : r<30 ? color.green : r<35 ? #67Eb65 : r>65 ? #F2A09D : (r > 48 and r <52) ? color.olive : color.gray
bg_sigma2(x) => x < 0 ? #fffbbf : color.gray
fg_sigma2(x) => x < 0 ? #ff0000 : i_c_tableText
// Beta Background Color codes:
bg_beta(b) => b<0 ? color.blue : b<= 1 ? color.green : b>= 3 ? #ff0000 : b>= 1.7 ? #ad2323 : color.olive
// beta < 0 --> blue
// beta = 0 is chash no risk.
// 0 < beta <= 1 --> green
// 1 < beta <= 1.7 --> olive
// 1.7 < beta <= 3 --> dark red
// beta > 3 --> light red
// Div Yield Backgroudn
bg_div(x) => x == 0 ? color.gray : x < 3 ? color.blue : x < 5 ? color.olive : x < 10 ? color.green : color.lime
// identify ticker with operations
spread_symbol(x) =>
str.contains(x,"+") or str.contains(x,"-") or str.contains(x,"/") or str.contains(x,"*") or str.contains(x,"(")
// Table cells output.
print_cell(tbl, col, title_txt, color_txt_tit, color_bg_tit, value_txt, color_txt_val, color_bg_val,txt_size) =>
if barstate.islast
table.cell(tbl,col,0, title_txt, bgcolor = color_bg_tit , text_color = color_txt_tit,text_size = txt_size)
table.cell(tbl,col,1, value_txt, bgcolor = color_bg_val , text_color = color_txt_val,text_size = txt_size)
// formula simplified included in cells --> this function is used to setup if conditions to save execution time.
included(x,a,b,c) => x == a or x == b or x == c
// change funtion for beta
return_percent(src) => ta.change(src) * 100 / src
// bollinger band %B
bg_percentage_BB(x) => x < 0 or x > 100 ? #fffbbf : x <10 ? #30CC5A : x > 90 ? #F63538 : color.gray
fg_percentage_BB(x) => x < 0 ? color.green : x >100 ? #ff0000 : i_c_tableText
ETFs_tickers=' SPY QQQ DIA EWZ XLF XLE XLB XLV XLH XLK XLC XLY XLP XLI XLRE XLU MCHI VGLT VIG VYM VNQ SCHD IWM '
IsETF(x) => str.contains(ETFs_tickers, " " +x+" ")
// ====== End Functions Library =======
// ++++++++++++++++++ moving average calcs
= moving_avg(ma_c,len_c)
plot(timeframe.isdaily and ma_c_enable ? valmm1 : na, color=col_c, linewidth=linew)
= moving_avg(ma_i,len_i)
plot(timeframe.isdaily and ma_i_enable ? valmm2 : na, color=col_i, linewidth=linew)
= moving_avg(ma_l,len_l)
plot(timeframe.isdaily and ma_l_enable ? valmm3 : na, color=col_l,linewidth=linew)
= moving_avg(ma_a,len_a)
plot(timeframe.isdaily and ma_a_enable ? valmm4 : na, color=col_a,linewidth=linew)
if barstate.islast and timeframe.isdaily
ma_c_label = label.new(x=time, y=valmm1,
text=ma_c_enable ? txt1:na, xloc=xloc.bar_time, yloc=yloc.price, color=color.rgb(0, 0, 0, 100), style=label.style_label_left, textcolor=col_c , size=size.small)
ma_i_label = label.new(x=time, y=valmm2,
text=ma_i_enable ? txt2:na, xloc=xloc.bar_time, yloc=yloc.price, color=color.rgb(0, 0, 0, 100), style=label.style_label_left, textcolor=col_i, size=size.small)
ma_l_label = label.new(x=time, y=valmm3,
text=ma_l_enable ? txt3:na, xloc=xloc.bar_time, yloc=yloc.price, color=color.rgb(0, 0, 0, 100), style=label.style_label_left, textcolor=col_l, size=size.small)
ma_a_label = label.new(x=time, y=valmm4,
text=ma_a_enable ? txt4:na, xloc=xloc.bar_time, yloc=yloc.price, color=color.rgb(0, 0, 0, 100), style=label.style_label_left, textcolor=col_a, size=size.small)
xUpMM1 = ta.crossover(close, valmm1)
xDnMM1 = ta.crossunder(close, valmm1)
xUpEMA = ta.crossover(close, (valmm2+valmm3)/2)
xDnEMA = ta.crossunder(close, (valmm2+valmm3)/2)
if timeframe.isdaily and xUpMM1
alert(syminfo.ticker +" crossing UP ASL21 (short MA)")
if timeframe.isdaily and xDnMM1
alert(syminfo.ticker +" crossing DOWN ASL21 (short MA)")
if timeframe.isdaily and xUpEMA
alert(syminfo.ticker +" crossing UP EMAs (avg EMA150,EMA200)")
if timeframe.isdaily and xDnEMA
alert(syminfo.ticker +" crossing DOWN EMAs (avg EMA150,EMA200)")
alertcondition(xUpMM1 or xDnMM1, title="Daily Price x MA1 (ASL21)", message="Crossing ALS21")
alertcondition(xUpEMA or xDnEMA, title="Daily Price x Avg(MM2,MM3) (avg EMA150 & EMA200)",message="Crossing Big EMAs")
= moving_avg(w_ma_c,w_len_c)
plot(timeframe.isweekly and w_ma_c_enable ? w_valmm1 : na, color=w_col_c, linewidth=linew)
= moving_avg(w_ma_i,w_len_i)
plot(timeframe.isweekly and w_ma_i_enable ? w_valmm2 : na, color=w_col_i, linewidth=linew)
= moving_avg(w_ma_l,w_len_l)
plot(timeframe.isweekly and w_ma_l_enable ? w_valmm3 : na, color=w_col_l,linewidth=linew)
= moving_avg(w_ma_a,w_len_a)
plot(timeframe.isweekly and w_ma_a_enable ? w_valmm4 : na, color=w_col_a,linewidth=linew)
if barstate.islast and timeframe.isweekly
w_ma_c_label = label.new(x=time, y=w_valmm1,
text=w_ma_c_enable ? w_txt1:na, xloc=xloc.bar_time, yloc=yloc.price, color=color.rgb(0, 0, 0, 100), style=label.style_label_left, textcolor=w_col_c, size=size.small)
w_ma_i_label = label.new(x=time, y=w_valmm2,
text=w_ma_i_enable ? w_txt2:na, xloc=xloc.bar_time, yloc=yloc.price, color=color.rgb(0, 0, 0, 100), style=label.style_label_left, textcolor=w_col_i, size=size.small)
w_ma_l_label = label.new(x=time, y=w_valmm3,
text=w_ma_l_enable ? w_txt3:na, xloc=xloc.bar_time, yloc=yloc.price, color=color.rgb(0, 0, 0, 100), style=label.style_label_left, textcolor=w_col_l, size=size.small)
w_ma_a_label = label.new(x=time, y=w_valmm4,
text=w_ma_a_enable ? w_txt4:na, xloc=xloc.bar_time, yloc=yloc.price, color=color.rgb(0, 0, 0, 100), style=label.style_label_left, textcolor=w_col_a, size=size.small)
= moving_avg(m_ma_c,m_len_c)
plot(timeframe.ismonthly and m_ma_c_enable ? m_valmm1 : na, color= m_col_c, linewidth=linew)
= moving_avg(m_ma_l,m_len_l)
plot(timeframe.ismonthly and m_ma_l_enable ? m_valmm2 : na, color=m_col_l,linewidth=linew)
// ***** TABLE SETUP AND PRINT
unify_emas := unify_emas and timeframe.isdaily and ma_i_enable and ma_l_enable and len_i == 150 and len_l == 200 and ma_i == "EMA" and ma_l == "EMA" and
math.abs(v(valmm2)-v(valmm3)) /( math.abs(v(valmm2)+v(valmm3))/2) < 0.2 and
bg_mm(v(valmm2),sigma2(v(valmm2))) == bg_mm(v(valmm3),sigma2(v(valmm3)))
total_col = 1 // 1 is RSI
total_col += timeframe.isdaily ? ((ma_c_enable ? 1 : 0) + (ma_i_enable ? 1 : 0) + (ma_l_enable ? 1 : 0) + (ma_a_enable ? 1 : 0 )) : 0
total_col += unify_emas ? -1 : 0
total_col += timeframe.isweekly ? ((w_ma_c_enable ? 1 : 0) + (w_ma_i_enable ? 1 : 0) + (w_ma_l_enable ? 1 : 0) + (w_ma_a_enable ? 1 : 0)) : 0
total_col += timeframe.ismonthly ? ((m_ma_c_enable ? 1 : 0) + (m_ma_l_enable ? 1 : 0)) : 0
// not inluding for intraday ((i_ma_c_enable ? 1 : 0) + (i_ma_i_enable ? 1 : 0)
// additional info
total_col += cell_1 == 'None' ? 0 : 1
total_col += cell_2 == 'None' ? 0 : 1
total_col += cell_3 == 'None' ? 0 : 1
border = i_tableTextSize == "tiny" ? 0 : i_tableTextSize == "small" ? 1 : i_tableTextSize == "normal" ? 2 : 3
frame = i_tableTextSize == "tiny" ? 1 : i_tableTextSize == "small" ? 2 : i_tableTextSize == "normal" ? 3 : 4
var table display = table.new(i_tableYpos + '_' + i_tableXpos, total_col, 2 ,border_width=border, frame_width = frame, frame_color = i_c_tableBg, border_color = i_c_tableBg)
// calcs
// ++++++++++++++++++++++++++ Beta
float beta = na
smooth = 1
length = timeframe.ismonthly ? 12 * beta_years + 1 : timeframe.isweekly ? 52 * beta_years + 1 : timeframe.isdaily ? 252 * beta_years + 1 : 300
instrument = not spread_symbol(syminfo.ticker) ? request.security(syminfo.tickerid, 'M', ta.ema(close, smooth)) : na
benchmark = not spread_symbol(syminfo.ticker) ? request.security(beta_baseline, 'M', ta.ema(close, smooth)) : na
inst_return = return_percent(instrument)
bench_return = return_percent(benchmark)
avg_inst_return = ta.sma(inst_return, length)
avg_bench_return = ta.sma(bench_return, length)
sum = 0.0
for idx = length to 0 by 1
inst_variance = inst_return - avg_inst_return
bench_variance = bench_return - avg_bench_return
sum += inst_variance * bench_variance
sum
covariance = sum / (length - 1)
beta := covariance / ta.variance(bench_return, length)
// Print Table with Moving Average variation vs price percentages
i=0
if timeframe.isdaily and i_table_enable
bg_mm2 = nz(bg_mm(v(valmm2),sigma2(v(valmm2))),color.gray)
bg_mm3 = nz(bg_mm(v(valmm2),sigma2(v(valmm2))),color.gray)
if ma_c_enable
print_cell(display, i, txt1, i_c_tableText, i_c_tableBg, str.tostring(v(valmm1),'#.#%'), i_c_tableText,bg_mm(v(valmm1),sigma2(v(valmm1))),i_tableTextSize)
i+=1
if ma_i_enable and not unify_emas
print_cell(display, i, txt2, i_c_tableText, i_c_tableBg, str.tostring(v(valmm2),'#.#%'), i_c_tableText,bg_mm2,i_tableTextSize)
i+=1
if ma_l_enable and not unify_emas
print_cell(display, i, txt3, i_c_tableText, i_c_tableBg, str.tostring(v(valmm3),'#.#%'), i_c_tableText,bg_mm3,i_tableTextSize)
i+=1
if unify_emas
unified_var = (valmm2 > close) ? math.max(v(valmm2), v(valmm3)) : math.min(v(valmm2),v(valmm3))
print_cell(display, i, "EMAs", i_c_tableText, i_c_tableBg, str.tostring(unified_var,'#.#%'), i_c_tableText,bg_mm2,i_tableTextSize)
i+=1
if ma_a_enable
print_cell(display, i, txt4, i_c_tableText, i_c_tableBg, str.tostring(v(valmm4),'#.#%'), i_c_tableText,bg_mm(v(valmm4),sigma2(v(valmm4))),i_tableTextSize)
i+=1
print_cell(display, i, "RSI", i_c_tableText, i_c_tableBg, str.tostring(ta.rsi(close,14),'##'), i_c_tableText,bg_rsi(ta.rsi(close,14)),i_tableTextSize)
i+=1
d = math.abs(sigma2(v(valmm1))) - math.abs(v(valmm1))
if timeframe.isweekly and i_table_enable
if w_ma_c_enable
print_cell(display, i, w_txt1, i_c_tableText, i_c_tableBg, str.tostring(v(w_valmm1),'#.#%'), i_c_tableText,bg_mm(v(w_valmm1),sigma2(v(w_valmm1))),i_tableTextSize)
i+=1
if w_ma_i_enable
print_cell(display, i, w_txt2, i_c_tableText, i_c_tableBg, str.tostring(v(w_valmm2),'#.#%'), i_c_tableText,bg_mm(v(w_valmm2),sigma2(v(w_valmm2))),i_tableTextSize)
i+=1
if w_ma_l_enable
print_cell(display, i, w_txt3, i_c_tableText, i_c_tableBg, str.tostring(v(w_valmm3),'#.#%'), i_c_tableText,bg_mm(v(w_valmm3),sigma2(v(w_valmm3))),i_tableTextSize)
i+=1
if w_ma_a_enable
print_cell(display, i, w_txt4, i_c_tableText, i_c_tableBg, str.tostring(v(w_valmm4),'#.#%'), i_c_tableText,bg_mm(v(w_valmm4),sigma2(v(w_valmm4))),i_tableTextSize)
i+=1
print_cell(display, i, "RSI", i_c_tableText, i_c_tableBg, str.tostring(ta.rsi(close,14),'##'), i_c_tableText,bg_rsi(ta.rsi(close,14)),i_tableTextSize)
i+=1
d = math.abs(sigma2(v(w_valmm1))) - math.abs(v(w_valmm1))
if timeframe.ismonthly and i_table_enable
if m_ma_c_enable
print_cell(display, i, m_txt1, i_c_tableText, i_c_tableBg, str.tostring(v(m_valmm1),'#.#%'), i_c_tableText,bg_mm(v(m_valmm1),sigma2(v(m_valmm1))),i_tableTextSize)
i+=1
if m_ma_l_enable
print_cell(display, i, m_txt2, i_c_tableText, i_c_tableBg, str.tostring(v(m_valmm2),'#.#%'), i_c_tableText,bg_mm(v(m_valmm2),sigma2(v(m_valmm2))),i_tableTextSize)
i+=1
print_cell(display, i, "RSI", i_c_tableText, i_c_tableBg, str.tostring(ta.rsi(close,14),'##'), i_c_tableText,bg_rsi(ta.rsi(close,14)),i_tableTextSize)
i+=1
d = math.abs(sigma2(v(m_valmm1))) - math.abs(v(m_valmm1))
print_cell(display, i, "2σ", i_c_tableText, i_c_tableBg, str.tostring(d ,'####.#%'), fg_sigma2(d),bg_sigma2(d),i_tableTextSize)
// ++++++++++++++++++++++++++ Yield
temp_ticker = spread_symbol(syminfo.tickerid) ? "NASDAQ:TSLA" : syminfo.tickerid // Tesla is a dummy stock to have 0 div to execute the formula.
_divYield = barstate.islast ? request.financial(temp_ticker, "DIVIDENDS_YIELD", "FQ", ignore_invalid_symbol = true) : 0.0
s1 = IsETF(syminfo.ticker) ? request.dividends(temp_ticker) : na // no se puede poner barstate.islast al preguntar por anteriores s1 +s1 +s1 +s1
dividendPeriodicity = 4 // checkear como validar la periodicidad diferente de 4 para ETFs
_divYield := IsETF(syminfo.ticker) ? (s1 +s1 +s1 +s1 ) / close * 100 : _divYield
// ++++++++++++++++++++++++++ 2sigma percentage and 0-100 like %B
float bb_2sigma = na
d = 0.0
if sigma_bb_format == '0-100 inside band'
mid2sigma =
timeframe.isdaily ? valmm1 :
timeframe.isweekly ? w_valmm1 :
timeframe.ismonthly ? m_valmm1 : na
bandwidth2sigma =
timeframe.isdaily ? sigma2(v(valmm1)) :
timeframe.isweekly ? sigma2(v(w_valmm1)) :
timeframe.ismonthly ? sigma2(v(m_valmm1)) : na
upbb2 = mid2sigma + bandwidth2sigma * close
dnbb2 = mid2sigma - bandwidth2sigma * close
bb_2sigma := (close - dnbb2) / (upbb2 - dnbb2) * 100
if sigma_bb_format == '% to up/dn band'
d := timeframe.isdaily ? math.abs(sigma2(v(valmm1))) - math.abs(v(valmm1)) :
timeframe.isweekly ? math.abs(sigma2(v(w_valmm1))) - math.abs(v(w_valmm1)) :
timeframe.ismonthly ? math.abs(sigma2(v(m_valmm1))) - math.abs(v(m_valmm1)) : na
// // ++++++++++++++++++++++++++ PRINT SELECTIONS
if i_table_enable and barstate.islast
// cell 1 - 2 sigma dispesion
if sigma_bb_format == '0-100 inside band'
if timeframe.isdaily or timeframe.isweekly or timeframe.ismonthly
print_cell(display, i, "2σ", i_c_tableText, i_c_tableBg, str.tostring(bb_2sigma,'#'), fg_percentage_BB(bb_2sigma),bg_percentage_BB(bb_2sigma),i_tableTextSize)
i+=1
else
if timeframe.isdaily or timeframe.isweekly or timeframe.ismonthly
print_cell(display, i, "2σ", i_c_tableText, i_c_tableBg, str.tostring(d ,'####.#%'), fg_sigma2(d),bg_sigma2(d),i_tableTextSize)
i+=1
// cell 2 - beta
beta_txt = "β-5Y"
print_cell(display, i, beta_txt , i_c_tableText, i_c_tableBg, str.tostring(beta,'#.#'), i_c_tableText,bg_beta(beta),i_tableTextSize)
i+=1
// cell 3 - div
yield_txt = "Div Yield"
print_cell(display,i, yield_txt, i_c_tableText, i_c_tableBg, str.tostring(_divYield/100,'#.#%'), i_c_tableText,bg_div(nz(_divYield,0.0)),i_tableTextSize)
i+=1
3-Day Average Range Excluding TodayThis indicator shows average true range on last 3 bars, price only
My Trading mantra/playbook🧠 My Trading Mantra — Motivational Trading Reminder Overlay
This indicator displays a customizable trading mantra as an overlay on your TradingView charts to keep your mindset sharp and disciplined during trading sessions.
You can customize the mantra text, font size, text color, background color, transparency, and screen position (top, middle, bottom, left, right, center).
It’s designed to serve as a constant motivational reminder emphasizing core trading principles like planning, risk management, patience, and learning from losses to grow profits.
Features:
Customizable multi-line mantra text input
Adjustable font size (small to huge)
Color customization for text and background
Adjustable background transparency
Multiple screen position options for display
Lightweight and simple overlay, no performance impact
Purpose:
To help traders stay mentally focused and disciplined by having their personalized mantra visible at all times while analyzing charts.
Additionally, it can be used as a trading plan or playbook, allowing traders to display their key rules, strategies, or reminders directly on their charts for quick reference during live trading.
code is open with love.
you are a good trader don't let the markets tell you diffrent.
XAUUSD M5 Breakout Detector (v2)//@version=5
indicator("XAUUSD M5 Breakout Detector (v2)", overlay=true)
// === Input Parameters ===
compressionLength = input.int(10, "Số nến nén tối thiểu", minval=5)
useVolume = input.bool(true, "Xác nhận breakout bằng volume")
useRSI = input.bool(true, "Xác nhận breakout bằng RSI")
rsiSource = input.source(close, "Nguồn RSI")
rsiLength = input.int(14, "Chu kỳ RSI")
// === Tính RSI và Volume trung bình ===
rsi = ta.rsi(rsiSource, rsiLength)
volMA = ta.sma(volume, compressionLength)
// === Detect Compression (vùng nén) ===
highestHigh = ta.highest(high, compressionLength)
lowestLow = ta.lowest(low, compressionLength)
isCompressing = true
for i = 0 to compressionLength - 2
isCompressing := isCompressing and (high <= high ) and (low >= low )
inCompression = isCompressing
// === Breakout Logic cơ bản ===
basicBreakoutUp = inCompression and close > highestHigh
basicBreakoutDown = inCompression and close < lowestLow
// === Xác nhận breakout bằng volume và RSI ===
volConfirmed = volume > volMA
rsiConfirmedUp = rsi > 55
rsiConfirmedDown = rsi < 45
breakoutUp = basicBreakoutUp and (not useVolume or volConfirmed) and (not useRSI or rsiConfirmedUp)
breakoutDown = basicBreakoutDown and (not useVolume or volConfirmed) and (not useRSI or rsiConfirmedDown)
// === Entry và Stoploss ===
entryPrice = breakoutUp ? close : breakoutDown ? close : na
stopLoss = breakoutUp ? lowestLow : breakoutDown ? highestHigh : na
plotshape(breakoutUp, location=location.abovebar, color=color.green, style=shape.labelup, text="Break ↑", title="Breakout lên")
plotshape(breakoutDown, location=location.belowbar, color=color.red, style=shape.labeldown, text="Break ↓", title="Breakout xuống")
// Hiển thị Entry và Stoploss
plot(breakoutUp or breakoutDown ? entryPrice : na, title="Entry", color=color.orange, style=plot.style_cross, linewidth=2)
plot(breakoutUp or breakoutDown ? stopLoss : na, title="Stoploss", color=color.red, style=plot.style_line, linewidth=1, offset=0)
// === Plot vùng nén ===
rangeColor = inCompression ? color.new(color.gray, 80) : na
plot(inCompression ? highestHigh : na, color=color.gray, linewidth=1, title="Vùng nén trên")
plot(inCompression ? lowestLow : na, color=color.gray, linewidth=1, title="Vùng nén dưới")
bgcolor(rangeColor)
// === Alert conditions ===
alertcondition(breakoutUp, title="Alert: Breakout lên", message="Breakout lên đã xảy ra (XAUUSD M5)")
alertcondition(breakoutDown, title="Alert: Breakout xuống", message="Breakout xuống đã xảy ra (XAUUSD M5)")
Open Range Breakout (ORB) with Alerts
📘 Open Range Breakout (ORB) Indicator – by thechartsalgo™
🧠 What It Does:
This indicator helps traders identify breakout opportunities from t he initial price range of the trading day — typically the first 15 or 30 minutes after the market opens.
It tracks the high and low of a user-defined time window (e.g. 9:30–9:45) and plots these levels on the chart. Once the session range is set, it detects breakouts when price moves above the range high (bullish breakout) or below the range low (bearish breakout).
⚙️ Key Features:
✅ Custom Time Window
Define your own start and end time for the range (e.g., 09:30–09:45).
✅ Breakout Signals
Arrows show up when price breaks above or below the range after it has formed.
✅ Color Customization
Choose your own colors for range lines and background zone.
✅ Background Highlight
Optional shaded fill between high/low makes the range visually clear.
✅ Only Show Today's Range
Option to hide previous day levels to keep your chart clean.
✅ Alerts
Built-in alerts notify you when a breakout occurs — long or short.
📈 How to Use It:
Set the start and end time to match your market’s open range (commonly first 15, 30, or 60 minutes).
Wait for the range to lock in (highlighted area on chart).
Trade the breakout direction once price moves above or below the range.
Optionally, use it in combination with volume or price action confirmation.
🔔 Alerts (Optional Setup):
ORB Breakout Up → triggers when price closes above the high
ORB Breakout Down → triggers when price closes below the low
📌 Who Is It For?
Day traders looking to catch early momentum
Scalpers using session-based price action
Strategy developers who use the opening range as a key concept.
⚠️ Disclaimer:
This indicator is for educational and informational purposes only. It is not financial advice, and no guarantees are made regarding its accuracy or effectiveness.
All trading involves risk. You are solely responsible for your own trading decisions. Always do your own research and consult with a licensed financial advisor before making any investment decisions.
By using this script, you agree that thechartsalgo™, its developers, and affiliates are not liable for any losses or damages resulting from the use of this tool.
TZSesThe script visually highlights major forex trading sessions (London, New York, Tokyo) and a "true day" separator on the chart background to help traders identify the most active market hours and daily boundaries.
X OROverview
Designed to plot hourly opening ranges (ORs) on an intraday chart. It primarily serves as a trading tool for assessing market direction and potential trading opportunities by analyzing price action relative to key OHLC (Open, High, Low, Close) levels within each hourly range.
The code provided is for each hour sessions from 2:00 AM to 3:00 PM for a complete session-based framework. In addition there is the RTH open range
Purpose
The core purpose of this indicator is to:
✅ Define each hourly range (based on the session’s opening bar) by recording the high and low of that range.
✅ Extend this range into the following bars for visual reference — serving as dynamic support and resistance zones.
✅ Monitor price action relative to each hourly OR, helping traders evaluate market direction and structure trades using concepts like:
Breakouts above/below the OR high/low.
Rejections or consolidations within the OR.
Continuation or reversal signals tied to each OR.
Key Features
The script marks the first bar of the session as the OR session start.
During this bar, it initializes:
Opening price
Session high
Session low
These levels form the initial range.
🔹 Dynamic Range Tracking
Throughout the one-minute OR session:
The highest and lowest prices are updated in real time, capturing intra-hour volatility.
A visual background box is drawn to highlight the OR range on the chart.
🔹 Range Extension
The script defines an extended session period after the initial OR (e.g., 2:00 AM-2:45 AM for the 2:00 AM session).
During this extension period:
The box persists on the chart, providing a contextual zone that traders can use as a dynamic support/resistance area.
🔹 Visual Representation
Transparent colored boxes highlight each session’s OR visually on the chart.
These boxes help traders easily identify whether price is trading:
Inside the OR
Breaking above the high (potential bullish continuation)
Breaking below the low (potential bearish continuation)
Application in Trading
🔍 Trading the Opening Range Breakout
Traders often use the OR high and low as breakout triggers. For example:
A price break above the OR high may signal bullish momentum.
A break below the OR low may signal bearish momentum.
⚖️ Support and Resistance
Even if breakouts fail, the OR can act as a pivot zone — offering areas for:
Stop placements
Target levels
Entry confirmations for fade trades or mean reversion strategies.
🕒 Session Awareness
By defining each hour’s OR individually (from 2:00 AM to 3:00 PM), traders can:
Analyze price behavior within each session.
Recognize when liquidity or volatility increases (e.g. around overlapping sessions like London open or New York open).
Summary
This Pine Script indicator provides a powerful framework for visualizing and trading hourly opening ranges. It enhances intraday analysis by:
Structuring price action within hourly boxes.
Highlighting key price levels relative to OHLC concepts.
Helping traders make more informed decisions by assessing price behavior around these critical ranges.
Not-So-Average True Range (nsATR)Not-So-Average True Range (nsATR)
*By Sherlock_MacGyver*
---
Long Story Short
The nsATR is a complete overhaul of traditional ATR analysis. It was designed to solve the fundamental issues with standard ATR, such as lag, lack of contextual awareness, and equal treatment of all volatility events.
Key innovations include:
* A smarter ATR that reacts dynamically when price movement exceeds normal expectations.
* Envelope zones that distinguish between moderate and extreme volatility conditions.
* A long-term ATR baseline that adds historical context to current readings.
* A compression detection system that flags when the market is coiled and ready to break out.
This indicator is designed for traders who want to see volatility the way it actually behaves — contextually, asymmetrically, and with predictive power.
---
What Is This Thing?
Standard ATR (Average True Range) has limitations:
* It smooths too slowly (using Wilder's RMA), which delays detection of meaningful moves.
* It lacks context — no way to know if current volatility is high or low relative to history.
* It treats all volatility equally, regardless of scale or significance.
nsATR** was built from scratch to overcome these weaknesses by applying:
* Amplification of large True Range spikes.
* Visual envelope zones for detecting volatility regimes.
* A long-term context line to anchor current readings.
* Multi-factor compression analysis to anticipate breakouts.
---
Core Features
1. Breach Detection with Amplification
When True Range exceeds a user-defined threshold (e.g., ATR × 1.2), it is amplified using a power function to reflect nonlinear volatility. This amplified value is then smoothed and cascades into future ATR values, affecting the indicator beyond a single bar.
2. Direction Tagging
Volatility spikes are tagged as upward or downward based on basic price momentum (close vs previous close). This provides visual context for how volatility is behaving in real-time.
3. Envelope Zones
Two adaptive envelopes highlight the current volatility regime:
* Stage 1: Moderate volatility (default: ATR × 1.5)
* Stage 2: Extreme volatility (default: ATR × 2.0)
Breaching these zones signals meaningful expansion in volatility.
4. Long-Term Context Baseline
A 200-period simple moving average of the classic ATR establishes whether current readings are above or below long-term volatility expectations.
5. Multi-Signal Compression Detection
Flags potential breakout conditions when:
* ATR is below its long-term baseline
* Price Bollinger Bands are compressed
* RSI Bollinger Bands are also compressed
All three signals must align to plot a "Volatility Confluence Dot" — an early warning of potential expansion.
---
Chart Outputs
In the Indicator Pane:
* Breach Amplified ATR (Orange line)
* Classic ATR baseline (White line)
* Long-Term context baseline (Cyan line)
* Stage 1 and Stage 2 Envelopes (Purple and Yellow lines)
On the Price Chart:
* Triangles for breach direction (green/red)
* Diamonds for compression zones
* Optional background coloring for visual clarity
---
Alerts
Built-in alert conditions:
1. ATR breach detected
2. Stage 1 envelope breached
3. Stage 2 envelope breached
4. Compression zone detected
---
Customization
All components are modular. Traders can adjust:
* Display toggles for each visual layer
* Colors and line widths
* Breach threshold and amplification power
* Envelope sensitivity
* Compression sensitivity and lookback windows
Some options are disabled by default to reduce clutter but can be turned on for more aggressive signal detection.
---
Real-Time Behavior (Non-Repainting Clarification)
The indicator updates in real time on the current bar as new data comes in. This is expected behavior for live trading tools. Once a bar closes, values do not change. In other words, the indicator *does not repaint history* — but the current bar can update dynamically until it closes.
---
Use Cases
* Day traders: Use compression zones to anticipate volatility surges.
* Swing traders: Use envelope breaches for regime awareness.
* System developers: Replace standard ATR in your logic for better responsiveness.
* Risk managers: Use directional volatility signals to better model exposure.
---
About the Developer
Sherlock_MacGyver develops original trading systems that question default assumptions and solve real trader problems.
45 Second Futures Session Open RangeThis indicator plots the 45-second Opening Range Breakout (ORB) for futures, allowing users to select a specific trading session (Asia, Europe, or NY) to display on the chart. It visualizes the high, low, and midpoint of the opening range for the chosen session and includes dynamic price targets for breakout trading strategies.
Key Features:
Customizable Session Selection: Choose between Asia (17:00), Europe (2:00), or NY (8:30) sessions (Chicago time) to display only the relevant ORB levels.
45-Second Timeframe: Captures the high and low of the first 45 seconds of the selected session using request.security_lower_tf.
Visualized ORB Levels: Plots the high, low, and midpoint lines with session-specific colors:
Asia: Orange (high/low), Fuchsia (mid)
Europe: Olive (high/low), Lime (mid)
NY: Aqua (high/low), Yellow (mid)
Dynamic Price Targets: Draws breakout target lines above or below the ORB when price exceeds the range, with customizable percentage, color, style, and width.
Debug Labels: Displays warnings if the 45-second timeframe is unsupported or no valid ORB data is available for the selected session.
How It Works:
The indicator fetches 45-second high and low data at the start of the selected session (e.g., 8:30:00 for NY).
It plots the ORB high, low, and midpoint as step lines, with labels showing price values.
Price targets are drawn as horizontal lines when the price breaks above the ORB high or below the ORB low, based on a user-defined percentage of the ORB width.
Targets reset at the start of each new session.
Settings:
Select Session: Choose "Asia", "Europe", or "NY" to display the corresponding ORB.
Display Targets: Toggle price target lines on or off.
Target %: Set the percentage of the ORB width for target levels (default: 50%).
Target Color: Customize the color of target lines (default: silver).
Target Style: Select solid, dashed, dotted, or none for target line style.
Target Width: Adjust the thickness of target lines (default: 1).
Usage Tips:
Best for Futures: Optimized for futures contracts like ES (S&P 500 futures) that support lower timeframes.
Check Timeframe Support: The 45-second timeframe is non-standard. If no lines appear, a red debug label will indicate if the timeframe is unsupported. Consider using a premium TradingView plan or a supported symbol.
Timezone Alignment: Ensure your chart’s data aligns with Chicago time (America/Chicago) for accurate session timing (Asia: 17:00, Europe: 2:00, NY: 8:30).
Scaling: Adjust chart scaling if lines are off-screen due to large price ranges.
Notes:
Requires Pine Script v6 and a TradingView plan supporting lower timeframes for 45-second data.
If the 45-second timeframe is unsupported, contact the author for a fallback version (e.g., 1-minute ORB).
Licensed under Mozilla Public License 2.0.
Happy trading!
CBC Flip with Volume [Pt]CBC Flip with Volume
A volume-enhanced take on the classic Candle-By-Candle (CBC) Flip strategy.
This tool highlights when market control flips between bulls and bears, using both candle structure and volume confirmation.
█ How It Works
• Bull Flip: Close > previous high, bullish candle, and volume > previous bar
• Bear Flip: Close < previous low, bearish candle, and volume > previous bar
• Strong flips occur when volume is also above its moving average
█ Features
• Visual flip markers (triangles) for both normal and strong flips
• Background color shading on flip candles
• Customizable volume MA length (default: 50)
• Real-time alerts when a flip occurs
█ Use Cases
• Confirm breakout strength with volume
• Filter out weak flips on low volume
• Spot early trend reversals with added confidence
Inspired by MapleStax’s original CBC method, enhanced with volume-based filtering.
MM Hunter PRO [v1.1]**MM Hunter PRO** is a precision trading indicator designed to detect market maker activity and uncover hidden liquidity zones. It combines order flow analysis, volume spikes, and key price reactions to identify high-probability reversal and breakout points. The tool highlights zones where market makers trap traders, offering signals for smart entries and exits. Integrated with advanced logic, it adapts to different timeframes and filters false moves. Ideal for scalping and intraday trading, MM Hunter PRO empowers traders with a tactical edge in volatile markets. Use it to track smart money footprints and anticipate real market intentions before the crowd reacts.
3-Bar Reversal Trap: Candle 2 AlertShows potential setups for my 3 bar reversal strategy / may 30th 2025
Hidden Orderblock,HOB,OB,BB,Moneytaur,MT,MTFHidden Orderblock,HOB,OB,BB,Moneytaur,MT,MTF Indicator – Powered by @Moneytaur_ Concepts
This powerful and intuitive indicator is built upon the advanced market structure concepts taught by @Moneytaur_ on X. Designed for traders who value precision, clarity, and speed, it brings institutional-grade insights directly to your charts – without the usual clutter.
🔑 Key Features:
Hidden Order Block & Breaker Block Detection (HOB/BB): Automatically identifies critical Hidden Order Blocks and Breaker Blocks, giving you an edge in spotting institutional levels before price reacts.
Partial Hidden Order Block Detection (PHOB): Capture partial block formations that are often missed by conventional indicators, helping you anticipate potential reversals or continuations early.
Order Block Detection (OB): Traditional and essential OBs are marked with precision, helping you align with smart money footprints.
Multi-Time Frame View: Stay on your preferred timeframe (e.g., 1H) while effortlessly viewing Daily Hidden OBs, Breaker Blocks, and more. No more constant switching between timeframes.
Engulfing Engine: A dynamic filter system allowing you to define what qualifies as a valid block. Use the “Easy Engulfing” mode to reveal all qualifying Order Blocks with ease.
Clean Visual Interface: Blocks are displayed with a simple line marking their Equilibrium (EQ) – the midpoint of the block – for a sleek, non-intrusive visual. Ideal for traders who value screen clarity and efficiency.
Lightning Fast Performance: Optimized for speed and responsiveness, keeping your charts smooth and your decisions fast.
Streamlined Workflow: Say goodbye to juggling multiple indicators or constantly swapping timeframes. Everything you need is right where you want it.
This indicator is a direct application of the Moneytaur methodology – precise, actionable, and rooted in real smart money concepts. If you follow @Moneytaur_ and appreciate his teachings, this tool will feel like a natural extension of his trading philosophy.
Ready to level up your charting with institutional precision? Add this to your toolkit today.
EMA CCI SSL BUY SELL Signal [THANHCONG]EMA CCI SSL BUY SELL Signal
Introduction:
The EMA CCI SSL BUY SELL Signal indicator is a comprehensive technical analysis tool designed to help traders identify trends and optimal entry and exit points with clarity and reliability. By combining reputable indicators such as EMA, CCI, SSL Channel, and RSI, this indicator generates buy and sell signals based on multiple validated factors, helping to filter noise and increase accuracy.
Key Features:
Utilizes multi-timeframe SSL channel with both automatic and manual mode options, suitable for various trading strategies.
Includes an RSI filter to minimize false signals in overbought or oversold regions.
Detects volume spikes to confirm the strength of the current trend.
Integrates CCI divergence and reversal candle patterns (Hammer, Shooting Star) to enhance signal precision in spotting potential reversals.
Displays clear buy/sell signals directly on the chart and provides a live performance table showing percentage changes.
Supports linear regression channel drawing to help users easily recognize trend direction and price volatility.
Recommended Usage:
Optimal Timeframes: Best used on 5-minute, 15-minute, 1-hour, 4-hour, 12-hour, and daily (D) timeframes. Avoid using on other timeframes to maintain signal reliability.
Signal Confirmation: Combine indicator signals with SSL channel direction and regression channel slope to improve confidence.
Combined Indicators: For enhanced effectiveness and noise reduction, it is recommended to use this indicator alongside the MCDX+RSI+SMA indicator. This combined approach provides a more comprehensive market view and supports better trading decisions.
Alerts: Users can set buy/sell alerts on TradingView to receive timely notifications when signals occur.
Important Notes:
This indicator is provided as a technical analysis aid and is not financial advice or a guarantee of profit.
Indicator performance may vary depending on market conditions and the traded asset.
Users should combine multiple tools and practice proper risk management when making trading decisions.
Thank You:
Thank you for using this indicator! If you find it useful, please consider leaving positive feedback and sharing it to help build a professional, transparent, and sustainable trading community.
Disclaimer:
The author and TradingView are not responsible for any losses resulting from the use of this indicator. Please trade responsibly and carefully consider your decisions.
Wishing you successful and safe trading!
#EMA #CCI #SSLChannel #RSI #TradingView #BuySellSignals #TechnicalAnalysis #TrendFollowing #VolumeSpike #CandlePatterns #TradingTools #Forex #Stocks #Crypto #Thanhcong
HTF Candle Breakout Fibonacci LevelsThis indicator automatically plots Fibonacci retracement levels on a lower timeframe (LTF) after detecting a breakout candle on a selected higher timeframe (HTF).
🔍 How It Works
When a candle on your selected HTF closes beyond the high or low of the previous candle, the indicator automatically draws Fibonacci levels on the LTF.
These levels remain visible until the next HTF candle is formed — allowing you to trade retracements with contextual precision.
⸻
⚙️ Customization Options
From the indicator settings, you can modify:
• The HTF candle timeframe (default is 1D)
• Fibonacci levels and colors
• Enable or disable “Show Only the Latest Levels” — ideal for live trading to keep the chart clean and focused.
⸻
🟪 HTF Candles Preview
After applying the indicator, you’ll see 3 vertical bars on the right edge of your LTF chart. These represent a live preview of the last three HTF candles and update in real-time.
If you prefer a cleaner chart, disable this feature via the “Show HTF Candles” toggle in the settings.
⸻
Feel free to reach out if you have any questions.
PriceLevels GB🚨 NEW INDICATOR: GOLDBACH LEVELS
In a market ruled by speed, algorithms, and hidden logic...
Goldbach Levels reveals 5 numbers that aren’t random:
35 – 29 – 71 – 11 – 65
Selected for a reason.
These are Goldbach numbers, deeply tied to algorithmic market behavior.
This free indicator automatically marks key price levels where these numbers occur — levels that align with the extremes of trading algorithms.
What does this mean?
These are levels where price tends to hesitate, react, or reverse.
🛠️ Full customization included: highlight only the levels you care about, tailored to your strategy.
📌 Follow us on TradingView for more custom tools and next-level strategies!!!