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.
Indicadores e estratégias
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.
Supertrend Tight Flip (v5)This is a faster responding version of the supertrend indicator
• Uses ATR Period = 5, Multiplier = 1.5
• Buy/Sell signals flip faster for responsive scalping
• Built with Pine Script v5 for compatibility
Daily S&P BreadthS&P breadth
measures stock percentages against their moving averages
5, 20, 50, 200
GStrategy1️⃣ Long entry based on RSI divergences.
2️⃣ Exit based on RSI filter (RSI> 40 after at least N bars).
3️⃣ Exit if the price has fallen more than 10% from the entry point.
4️⃣ Visualization of % difference for monitoring.
5️⃣ Flexibility: all parameters are configurable in the arguments window.
Volumen Institucional - AVTradingPro📊 Institutional Volume - AVTradingPro
This advanced volume analysis indicator by AVTradingPro detects institutional activity and market anomalies based on dynamic volume thresholds and price action behavior.
🔍 Key Features:
Smart Volume Classification:
🔺 Climax Buy: High volume on bullish candles.
🔻 Climax Sell: High volume on bearish candles.
🞂 Low Volume: Below-average activity indicating possible disinterest or transition.
▲ Hidden Accumulation: Bullish close with strong volume under a flat or lower high.
▼ Hidden Distribution: Bearish close with strong volume under a flat or higher low.
Dynamic Column Coloring:
Volume bars change color based on institutional behavior:
Red & Blue for Climax Events.
Pastel tones for Hidden Accumulation/Distribution.
Gray for Low/Normal Volume.
Custom Alerts: Label signals shown on chart to visually mark smart money actions.
Perfect for traders looking to spot smart money participation, confirm breakout strength, and filter false volume signals.
🧠 Created by AVTRADINGPRO – Professional Tools for Precision Trading.
Digital RSI Display (Bottom-Right)Digitial display bottom right of chart, displays RSI live during market hours.
Over 70 RSI turns red to indicate overbought
Under 30 RSI turns green to indicate oversold
SImple & easy.
SMC Breakout Bot [XAUUSD 5m]not finished but i have hit a wall. if anyyone refines it and makes it better could you message me. i would really appreciate it
Session-Based Sentiment Oscillator [TradeDots]Track, analyze, and monitor market sentiment across global trading sessions with this advanced multi-session sentiment analysis tool. This script provides session-specific sentiment readings for Asian (Tokyo), European (London), and US (New York) markets, combining price action, volume analysis, and volatility factors into a comprehensive sentiment oscillator. It is an original indicator designed to help traders understand regional market psychology and capitalize on cross-session sentiment shifts directly on TradingView.
📝 HOW IT WORKS
1. Multi-Component Sentiment Engine
Price Action Momentum : Calculates normalized price movement relative to recent trading ranges, providing directional sentiment readings.
Volume-Weighted Analysis : When volume data is available, incorporates volume flow direction to validate price-based sentiment signals.
Volatility-Adjusted Factors : Accounts for changing market volatility conditions by comparing current ATR against historical averages.
Weighted Combination : Merges all components using optimized weightings (Price: 1.0, Volume: 0.3, Volatility: 0.2) for balanced sentiment readings.
2. Session-Segregated Tracking
Automatic Session Detection : Precisely identifies active trading sessions based on user-configured time parameters.
Independent Calculations : Maintains separate sentiment accumulation for each major session, updated only during respective active hours.
Historical Preservation : Stores session-specific sentiment values even when sessions are closed, enabling cross-session comparison.
Real-Time Updates : Continuously processes sentiment during active sessions while preserving inactive session data.
3. Cross-Session Transition Analysis
Sentiment Differential Detection : Monitors sentiment changes when transitioning between trading sessions.
Configurable Thresholds : Generates signals only when sentiment shifts exceed user-defined minimum thresholds.
Directional Signals : Provides distinct bullish and bearish transition alerts with visual markers.
Smart Filtering : Applies smoothing algorithms to reduce false signals from minor sentiment variations.
⚙️ KEY FEATURES
1. Session-Specific Dashboard
Real-Time Status Display : Shows current session activity (ACTIVE/CLOSED) for all three major sessions.
Sentiment Percentages : Displays precise sentiment readings as percentages for easy interpretation.
Strength Classification : Automatically categorizes sentiment as HIGH (>50%), MEDIUM (20-50%), or LOW (<20%).
Customizable Positioning : Place dashboard in any corner with adjustable size options.
2. Advanced Signal Generation
Transition Alerts : Triangle markers indicate significant sentiment shifts between sessions.
Extreme Conditions : Diamond markers highlight overbought/oversold threshold breaches.
Configurable Sensitivity : Adjust signal thresholds from 0.05 to 0.50 based on trading style.
Alert Integration : Built-in TradingView alert conditions for automated notifications.
3. Forex Currency Strength Analysis
Base/Quote Decomposition : For forex pairs, separates sentiment into individual currency strength components.
Major Currency Support : Analyzes USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD strength relationships.
Relative Strength Display : Shows which currency is driving pair movement during active sessions.
4. Visual Enhancement System
Session Background Colors : Distinct background shading for each active trading session.
Overbought/Oversold Zones : Configurable extreme sentiment level visualization with colored zones.
Multi-Timeframe Compatibility : Works across all timeframes while maintaining session accuracy.
Customizable Color Schemes : Full color customization for dashboard, signals, and plot elements.
🚀 HOW TO USE IT
1. Add the Script
Search for "Session-Based Sentiment Oscillator " in the Indicators tab or manually add it to your chart. The indicator will appear in a separate pane below your main chart.
2. Configure Session Times
Asian Session : Set Tokyo market hours (default: 00:00-09:00) based on your chart timezone.
European Session : Configure London market hours (default: 07:00-16:00) for European analysis.
US Session : Define New York market hours (default: 13:00-22:00) for American markets.
Timezone Adjustment : Ensure session times match your broker's specifications and account for daylight saving changes.
3. Optimize Analysis Parameters
Sentiment Period : Choose 5-50 bars (default: 14) for sentiment calculation lookback period.
Smoothing Settings : Select 1-10 bars smoothing (default: 3) with SMA, EMA, or RMA options.
Component Selection : Enable/disable volume analysis, price action, and volatility factors based on available data.
Signal Sensitivity : Adjust threshold from 0.05-0.50 (default: 0.15) for transition signal generation.
4. Interpret Readings and Signals
Positive Values : Indicate bullish sentiment for the active session.
Negative Values : Suggest bearish sentiment conditions.
Dashboard Status : Monitor which session is currently active and their respective sentiment strengths.
Transition Signals : Watch for triangle markers indicating significant cross-session sentiment changes.
Extreme Alerts : Note diamond markers when sentiment reaches overbought (>70%) or oversold (<-70%) levels.
5. Set Up Alerts
Configure TradingView alerts for:
- Bullish session transitions
- Bearish session transitions
- Overbought condition alerts
- Oversold condition alerts
❗️LIMITATIONS
1. Data Dependency
Volume Requirements : Volume-based analysis only functions when volume data is provided by your broker. Many forex brokers do not supply reliable volume data.
Price Action Focus : In absence of volume data, sentiment calculations rely primarily on price movement and volatility factors.
2. Session Time Sensitivity
Manual Adjustment Required : Session times must be manually updated for daylight saving time changes.
Broker Variations : Different brokers may have slightly different session definitions requiring time parameter adjustments.
3. Ranging Market Limitations
Trend Bias : Sentiment calculations may be less reliable during extended sideways or low-volatility market conditions.
Lag Consideration : As with all sentiment indicators, readings may lag during rapid market transitions.
4. Regional Market Focus
Major Session Coverage : Designed primarily for major global sessions; may not capture sentiment from smaller regional markets.
Weekend Gaps : Does not account for weekend gap effects on sentiment calculations.
⚠️ RISK DISCLAIMER
Trading and investing carry significant risk and can result in financial loss. The "Session-Based Sentiment Oscillator " is provided for informational and educational purposes only. It does not constitute financial advice.
- Always conduct your own research and analysis
- Use proper risk management and position sizing in all trades
- Past sentiment patterns do not guarantee future market behavior
- Combine this indicator with other technical and fundamental analysis tools
- Consider overall market context and your personal risk tolerance
This script is an original creation by TradeDots, published under the Mozilla Public License 2.0.
Session-based sentiment analysis should be used as part of a comprehensive trading strategy. No single indicator can predict market movements with certainty. Exercise proper risk management and maintain realistic expectations about indicator performance across varying market conditions.
Simple Entry Signals (Confirmed)//@version=5
indicator("Simple Entry Signals (Confirmed)", overlay=true)
// إعدادات المتوسطات
emaFast = ta.ema(close, 8)
emaSlow = ta.ema(close, 21)
// إشارات الدخول
buySignal = ta.crossover(emaFast, emaSlow) and close > close
sellSignal = ta.crossunder(emaFast, emaSlow) and close < close
// رسم الأسهم على الشارت
plotshape(buySignal, title="Call Entry", location=location.belowbar, color=color.green, style=shape.labelup, text="CALL")
plotshape(sellSignal, title="Put Entry", location=location.abovebar, color=color.red, style=shape.labeldown, text="PUT")
Session High/Low: Asia & LondonIndicator to automatically mark the lower low and the higher high of the Asian and London sessions.
Minute Dots Bullish Above / Bearish Below (6AM–5PM EST)att indicactor shows you the high and the low of 1min chart using ATT
Position Size & Stop-Loss CalculatorPine Script Code for Position Size & Stop-Loss Calculator Indicator
This Pine Script indicator for TradingView will allow you to input your trading parameters and see the calculated Stop-Loss Price plotted on the chart, along with the recommended number of shares and maximum dollar risk displayed as a text label.
Clean XRP/USDT Alert & MarkerClean XRP/USDT Alert & Marker is a precision trading tool designed for futures traders. It highlights high-probability entry zones using visual markers and real-time alerts for both short and long breakouts.
🔍 Features:
Visual markers for short entry and long breakout
Real-time alerts at key levels (configurable)
Ideal for 1H and 4H strategies
Clean layout optimized for fast decision-making
Built for leverage-based futures trading
Use this script to improve timing, reduce noise, and trade XRP/USDT with clearer setups and better risk management.
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.
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.
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
Flipmeister | Candle Flips / ReversalsOpinionated way to highlight important candle flips and can lead to trading opportunities.
- Green to Red flip needs to break previous candle's high and flip to qualify
- Red to Green flip needs to break previous candle's low and flip to qualify
You can configure:
- Min Wick Size for marker to be shown
- Max lookback in bars to limit the amount of markers on the chart
Alerts! You can setup alert conditions for any flip and it's going to notify you when it happens.
Create alert -> Condition: Flipmeister -> Function: Any Flip (or any other available condition).
[Top] Indicator Status PanelThis tool allows traders quickly assess the market’s current bullish or bearish conditions using multiple widely-adopted technical indicators.
Key Features:
Real-time Market Status: Quickly identifies bullish, bearish, or neutral signals based on key indicators, including EMA crossovers, RSI levels, ADX strength, MACD signals, Bollinger Bands positioning, Keltner Channels, and Price Action thresholds.
Customizable Thresholds: Users can tailor indicator parameters, including EMA lengths, RSI thresholds, ADX strength, MACD settings, Bollinger Bands standard deviations, and Keltner Channel parameters.
Color-Coded Interface: Intuitive color-coding (Green for bullish, Red for bearish, Grey for neutral) enables rapid interpretation of the current market condition for each indicator.
Alert Integration: Provides alerts when multiple indicators become bullish simultaneously, supporting proactive trading decisions.
How to Use:
Configure Indicators: Set your preferred lengths and thresholds for each indicator group (EMA, RSI, ADX, MACD, Bollinger Bands, Keltner Channels, Price Action).
Monitor Conditions: Observe the color-coded panel displayed at the bottom-center of your chart. Green signals bullish momentum, red indicates bearish conditions, and grey represents neutrality.
React to Alerts: Utilize the built-in alerts to notify you when multiple indicators align bullishly, enhancing your strategic timing for entries or exits.
Suggested Use:
Ideal for traders seeking confirmation from multiple technical signals before making trade decisions. Employ this tool alongside your broader market analysis to confirm trend strength, assess market sentiment, and improve trading confidence.
Board Vol 1.1The "Board Vol 1.1" is a TradingView indicator displaying a table with market metrics: daily price change (%), daily volume, average volume, Normalized Average True Range (NATR), correlation with another ticker, trend direction, open interest (OI), and global trading session times. Each metric is color-coded for quick analysis. The updated version includes cells for major global trading sessions and a reworked open interest metric showing the difference in OI over a specified number of candles.
Grid TLong V1The “Grid TLong V1” strategy is based on the classic Grid strategy, but in the mode of buying and selling in favor of the trend and only on Long. This allows to take advantage of large uptrend movements to maximize profits in bull markets. For this reason, excessively sideways or bearish markets may not be very conducive to this strategy.
Like our Grid strategies in favor of the trend, you can enter and exit with the balance with controlled risk, as the distance between each grid functions as a natural and adaptable stop loss and take profit. What differentiates it from bidirectional strategies is that Short uses a minimum amount of follow-through, so that the percentage distance between the grids is maintained.
In this version of the script the entries and exits can be chosen at market or limit , and are based on the profit or loss of the current position, not on the percentage change in price.
The user may also notice that the strategy setup is risk-controlled, because it risks 5% on each trade, has a fairly standard commission and modest initial capital, all in order to protect the strategy user from unrealistic results.
As with all strategies, it is strongly recommended to optimize the parameters for the strategy to be effective for each asset and for each time frame.
WMA ATR With Zone + Donchian📈 Indicator Name: WMA ATR With Zone + Donchian
Short Title: WMA ATR+Donchian
Overlay: true (Plotted directly on the price chart)
🔹 1. Weighted Moving Average (WMA)
Inputs:
Fast WMA Period (default: 5)
Slow WMA Period (default: 17)
Calculates two WMAs and detects bullish crossovers (Fast WMA crossing above Slow WMA) and bearish crossunders (Fast WMA crossing below Slow WMA).
🔹 2. ATR-Based Dynamic Zones
Inputs:
ATR Length (default: 10)
ATR Multiplier (default: 3.0)
Defines upper and lower dynamic zones around the price using ATR.
Tracks trend changes:
Green Zone: Bullish regime (close above dynamic down zone)
Red Zone: Bearish regime (close below dynamic up zone)
Visual cues (colored bands and diamond markers) indicate transitions between regimes.
🔹 3. Donchian Channel
Inputs:
Donchian Channel Length (default: 20)
Calculates the Upper, Lower, and Middle Donchian bands.
Used to validate trades only when price is above/below the middle line based on regime.
🔹 4. Filtered Entry Signals
Buy Signal:
Entered when:
Bullish zone transition (GreenZone)
Close is above Donchian middle line
Previous zone was bearish
WMA crossover is bullish
Sell Signal:
Entered when:
Bearish zone transition (RedZone)
Close is below Donchian middle line
Previous zone was bullish
WMA crossunder is bearish
🔹 5. Visual Alerts & Labels
Displays:
"Long" or "Short" labels with entry price
Dynamic bar coloring:
Green: Price above both WMAs
Red: Price below both WMAs
Yellow: Price between WMAs
Plots WMA and Donchian levels for easy visualization
🔹 6. Info Panel
Optional toggle to show detailed information when in Buy/Sell zone.
Displays:
Time since last entry (Buy/Sell)
Entry price
Current price
Unrealized PnL (%)
WMA trend status
Labels update in real-time and auto-delete previous ones.
✅ Summary
This indicator combines:
Trend detection (ATR Zones)
Momentum confirmation (WMA cross)
Volatility filter (Donchian Middle Line)
Visual clarity with plots, shapes, and real-time info panels
It’s designed to identify high-probability breakout trades while filtering out sideways noise using a multi-confirmation approach.
Dynamic RSIThis is dynamic RSI to check the strength of the India stocks and indices on multiple time frames