Volume Bubbles & Liquidity Heatmap [LuxAlgo]The Volume Bubbles & Liquidity Heatmap indicator highlights volume and liquidity clearly and precisely with its volume bubbles and liquidity heat map, allowing to identify key price areas.
Customize the bubbles with different time frames and different display modes: total volume, buy and sell volume, or delta volume.
🔶 USAGE
The primary objective of this tool is to offer traders a straightforward method for analyzing volume on any selected timeframe.
By default, the tool displays buy and sell volume bubbles for the daily timeframe over the last 2,000 bars. Traders should be aware of the difference between the timeframe of the chart and that of the bubbles.
The tool also displays a liquidity heat map to help traders identify price areas where liquidity accumulates or is lacking.
🔹 Volume Bubbles
The bubbles have three possible display modes:
Total Volume: Displays the total volume of trades per bubble.
Buy & Sell Volume: Each bubble is divided into buy and sell volume.
Delta Volume: Displays the difference between buy and sell volume.
Each bubble represents the trading volume for a given period. By default, the timeframe for each bubble is set to daily, meaning each bubble represents the trading volume for each day.
The size of each bubble is proportional to the volume traded; a larger bubble indicates greater volume, while a smaller bubble indicates lower volume.
The color of each bubble indicates the dominant volume: green for buy volume and red for sell volume.
One of the tool's main goals is to facilitate simple, clear, multi-timeframe volume analysis.
The previous chart shows Delta Volume bubbles with various chart and bubble timeframe configurations.
To correctly visualize the bubbles, traders must ensure there is a sufficient number of bars per bubble. This is achieved by using a lower chart timeframe and a higher bubble timeframe.
As can be seen in the image above, the greater the difference between the chart and bubble timeframes, the better the visualization.
🔹 Liquidity Heatmap
The other main element of the tool is the liquidity heatmap. By default, it divides the chart into 25 different price areas and displays the accumulated trading volume on each.
The image above shows a 4-hour BTC chart displaying only the liquidity heatmap. Traders should be aware of these key price areas and observe how the price behaves in them, looking for possible opportunities to engage with the market.
The main parameters for controlling the heatmap on the settings panel are Rows and Cell Minimum Size. Rows modifies the number of horizontal price areas displayed, while Cell Minimum Size modifies the minimum size of each liquidity cell in each row.
As can be seen in the above BTC hourly chart, the cell size is 24 at the top and 168 at the bottom. The cells are smaller on top and bigger on the bottom.
The color of each cell reflects the liquidity size with a gradient; this reflects the total volume traded within each cell. The default colors are:
Red: larger liquidity
Yellow: medium liquidity
Blue: lower liquidity
🔹 Using Both Tools Together
This indicator provides the means to identify directional bias and market timing.
The main idea is that if buyers are strong, prices are likely to increase, and if sellers are strong, prices are likely to decrease. This gives us a directional bias for opening long or short positions. Then, we combine our directional bias with price rejection or acceptance of key liquidity levels to determine the timing of opening or closing our positions.
Now, let's review some charts.
This first chart is BTC 1H with Delta Weekly Bubbles. Delta Bubbles measure the difference between buy and sell volume, so we can easily see which group is dominant (buyers or sellers) and how strong they are in any given week. This, along with the key price areas displayed by the Liquidity Heatmap, can help us navigate the markets.
We divided market behavior into seven groups, and each group has several bubbles, numbered from 1 to 17.
Bubbles 1, 2, and 3: After strong buyers market consolidates with positive delta, prices move up next week.
Bubbles 3, 4, and 5: Strength changes from buyers to sellers. Next week, prices go down.
Bubbles 6 and 7: The market trades at higher prices, but with negative delta. Next week, prices go down.
Bubbles 7, 8, and 9: Strength changes from sellers to buyers. Next weeks (9 and 10), prices go up.
Bubbles 10, 11, and 12: After strong buyers prices trade higher with a negative delta. Next weeks (12 and 13) prices go down.
Bubbles 12, 14, and 15: Strength changes from sellers to buyers; next week, prices increase.
Bubbles 15 and 16: The market trades higher with a very small positive delta; next week, prices go down.
Current bubble/week 17 is not yet finished. Right now, it is trading lower, but with a smaller negative delta than last week. This may signal that sellers are losing strength and that a potential reversal will follow, with prices trading higher.
This is the same BTC 1H chart, but with price rejections from key liquidity areas acting as strong price barriers.
When prices reach a key area with strong liquidity and are rejected, it signals a good time to take action.
By observing price behavior at certain key price levels, we can improve our timing for entering or exiting the markets.
🔶 DETAILS
🔹 Bubbles Display
From the settings panel, traders can configure the bubbles with four main parameters: Mode, Timeframe, Size%, and Shape.
The image above shows five-minute BTC charts with execution over the last 3,500 bars, different display modes, a daily timeframe, 100% size, and shape one.
The Size % parameter controls the overall size of the bubbles, while the Shape parameter controls their vertical growth.
Since the chart has two scales, one for time and one for price, traders can use the Shape parameter to make the bubbles round.
The chart above shows the same bubbles with different size and shape parameters.
You can also customize data labels and timeframe separators from the settings panel.
🔶 SETTINGS
Execute on last X bars: Number of bars for indicator execution
🔹 Bubbles
Display Bubbles: Enable/Disable volume bubbles.
Bubble Mode: Select from the following options: total volume, buy and sell volume, or the delta between buy and sell volume.
Bubble Timeframe: Select the timeframe for which the bubbles will be displayed.
Bubble Size %: Select the size of the bubbles as a percentage.
Bubble Shape: Select the shape of the bubbles. The larger the number, the more vertical the bubbles will be stretched.
🔹 Labels
Display Labels: Enable/Disable data labels, select size and location.
🔹 Separators
Display Separators: Enable/Disable timeframe separators and select color.
🔹 Liquidity Heatmap
Display Heatmap: Enable/Disable liquidity heatmap.
Heatmap Rows: select number of rows to be displayed.
Cell Minimum Size: Select the minimum size for each cell in each row.
Colors.
🔹 Style
Buy & Sell Volume Colors.
Penunjuk dan strategi
Dynamic EMA Stack Support & ResistanceEvery trader needs reliable support and resistance — but static zones and lagging indicators won't cut it in fast-moving markets. This script combines a Fibonacci-based 5-EMA stacking system and left/right pivots that create dynamic support & resistance logic to uncover real-time structural shifts & momentum zones that actually adapt to price action. This isn’t just a mashup — it’s a complete built-from-the-ground-up support & resistance engine designed for scalpers, intraday traders, and trend followers alike.
🧠 🧠 🧠What It Does🧠 🧠 🧠
This script uses two powerful engines working in sync:
1️⃣ EMA Stack (5-EMA Framework)
Built on Fibonacci-based lengths: 5, 8, 13, 21, 34, (configurable) this stack identifies:
🔹 Bullish Stack: EMAs aligned from fastest to slowest (uptrend confirmation)
🔹 Bearish Stack: EMAs aligned inversely (downtrend confirmation)
🟡 Narrowing Zones: When EMAs compress within ATR thresholds → possible breakout or reversal zone
🎯 Labels identify key transitions like:
✅"Begin Bear Trend?"
✅"Uptrend SPRT"
✅"RES?" (resistance test)
2️⃣ Pivot-Based Projection Engine
Using classic Left/Right Bar pivot logic, the script:
📌 Detects early-stage swing highs/lows before full confirmation
📈 Projects horizontal S/R lines that adapt to market structure
🔁 Keeps lines active until a new pivot replaces them
🧩 Syncs beautifully with EMA stack for confluence zones
🎯🎯🎯Key Features for Traders🎯🎯🎯
✅ Trend Detection
→ EMA order reveals real-time bias (bullish, bearish, compression)
✅ Dynamic S/R Zones
→ Historical support/resistance levels auto-draw and extend
✅ Smart Labeling
→ “SPRT”, “RES”, and “Trend?” labels for live context + testing logic
✅ Custom Candle Coloring
→ Choose from Bar Color or Full Candle Overlay modes
✅ Scalper & Swing Compatible
→ Use fast confirmations for scalping or stack consistency for longer trends
⚙️⚙️⚙️How to Use⚙️⚙️⚙️
✅Use Top/Bottom (trend state) Line Colors to quickly read trend conditions.
✅Use Pivot-based support/resistance projections to anticipate where price might pause or reverse.
✅Watch for yellow/blue zones to prepare for volatility shifts/reversals.
✅Combine with volume or momentum indicators for added confirmation.
📐📐📐Customization Options📐📐📐
✅EMA lengths (5, 8, 13, 21, 34) — fully configurable - try 21,34,55, 89, 144 for longer term trend states
✅Left/Right bar pivot settings (default: 21/5)
✅Label size, visibility, and color themes
✅Toggle line and label visibility for clean layouts
✅“Max Bars Back” to control how deep history is scanned safely
🛠🛠🛠Built-In Safeguards🛠🛠🛠
✅ATR-based filters to stabilize compression logic
✅Guarded lookback (max_bars_back) to avoid runtime errors
✅Works on any asset, any timeframe
🏁🏁🏁Final Word🏁🏁🏁
This script is not just a visual tool, it’s a complete trend and structure framework. Whether you're looking for clean trend alignment, dynamic support/resistance, or early warning labels, this system is tuned to help you react with confidence — not hindsight.
Rembember, no single indicator should be used in isolation. For best results, combine it with price action analysis, higher-timeframe context, and complementary tools like trendlines, moving averages etc Use it as part of a well-rounded trading approach to confirm setups — not to define them alone.
💡💡💡Turn logic into clarity. Structure into trades. And uncertainty into confidence.💡💡💡
Smart Algogn2 [ChartPrime]Smart Algo indicator with buy/sell signals, optimized for crypto intraday trading.
MEMEC - Meme Coin Market Cap [Da_Prof]For this indicator, the meme coin market cap of the top meme coins are added together to get an estimate of the total meme coin market cap back to the first meme coin, DOGE. Meme.C does this natively on TradingView, but its data only goes back to 19 May 2025. For the indicator, MEME.C supersedes the addition of all the individual meme coins (i.e., from 19 May 2025 to present). The start of MEME.C is labeled on the chart by default, but can be removed by deselecting the label in the settings.
After the creation of DOGE, but before data is available for Meme.C, the highest market cap meme coins are added together to estimate the meme coin market cap. The meme coins used by default are DOGE, SHIB, PEPE, BONK, FLOKI, PENGU, TRUMP, SPX6900, FARTCOIN, WIF, M, BRETT, B, MOG, APE, TURBO, DOG, and POPCAT. Users can select if they wish to disregard any or all of these coins. As of the creation of the indicator, DOGE, SHIB, and PEPE have CRYPTOCAP symbols on TradingView. Therefore, the true market cap of these coins is integrated into this indicator. The other meme coin market caps are estimated using price and the circulating supply as of 09/16/2025. I make no claims as to the indicator's exact accuracy. In fact, it isn't exactly accurate since I utilized the circulating supply on the day it was created, so for meme coins that have a changing supply, the market cap will be at least slightly inaccurate. Use this indicator at your own risk.
To use the indicator, it is best to plot overlayed on the CRYPTOCAP:DOGE chart. You can decide whether or not to hide the DOGE market cap.
Simple Technicals Table📊 Simple Technicals Table
🎯 A comprehensive technical analysis dashboard displaying key pivot points and moving averages across multiple timeframes
📋 OVERVIEW
The Simple Technicals Table is a powerful indicator that organizes essential trading data into a clean, customizable table format. It combines Fibonacci-based pivot points with critical moving averages for both daily and weekly timeframes, giving traders instant access to key support/resistance levels and trend information.
Perfect for:
Technical analysts studying multi-timeframe data
Chart readers needing quick reference levels
Market researchers analyzing price patterns
Educational purposes and data visualization
🚀 KEY FEATURES
📊 Dual Timeframe Analysis
Daily (D1) and Weekly (W1) data side-by-side
Real-time updates as market conditions change
Seamless comparison between timeframes
🎯 Fibonacci Pivot Points
R3, R2, R1 : Resistance levels using Fibonacci ratios (38.2%, 61.8%, 100%)
PP : Central pivot point from previous period's data
S1, S2, S3 : Support levels with same methodology
📈 Complete EMA Suite
EMA 10 : Short-term trend identification
EMA 20 : Popular swing trading reference
EMA 50 : Medium-term trend confirmation
EMA 100 : Institutional support/resistance
EMA 200 : Long-term trend determination
📊 Essential Indicators
RSI 14 : Momentum for overbought/oversold conditions
ATR 14 : Volatility measurement for risk management
🎨 Full Customization
9 table positions : Place anywhere on your chart
5 text sizes : Tiny to huge for optimal visibility
Custom colors : Background, headers, and text
Optional pivot lines : Visual weekly levels on chart
⚙️ HOW IT WORKS
Fibonacci Pivot Calculation:
Pivot Point (PP) = (High + Low + Close) / 3
Range = High - Low
Resistance Levels:
R1 = PP + (Range × 0.382)
R2 = PP + (Range × 0.618)
R3 = PP + (Range × 1.000)
Support Levels:
S1 = PP - (Range × 0.382)
S2 = PP - (Range × 0.618)
S3 = PP - (Range × 1.000)
Smart Price Formatting:
< $1: 5 decimal places (crypto-friendly)
$1-$10: 4 decimal places
$10-$100: 3 decimal places
> $100: 2 decimal places
📊 TECHNICAL ANALYSIS APPLICATIONS
⚠️ EDUCATIONAL PURPOSE ONLY
This indicator is designed solely for technical analysis and educational purposes . It provides data visualization to help understand market structure and price relationships.
📈 Data Analysis Uses
Support & Resistance Identification : Visualize Fibonacci-based pivot levels
Trend Analysis : Study EMA relationships and price positioning
Multi-Timeframe Study : Compare daily and weekly technical data
Market Structure : Understand key technical levels and indicators
📚 Educational Benefits
Learn about Fibonacci pivot point calculations
Understand moving average relationships
Study RSI and ATR indicator values
Practice multi-timeframe technical analysis
🔍 Data Visualization Features
Organized table format for easy data reading
Color-coded levels for quick identification
Real-time technical indicator values
Historical data integrity maintained
🛠️ SETUP GUIDE
1. Installation
Search "Simple Technicals Table" in indicators
Add to chart (appears in middle-left by default)
Table displays automatically on any timeframe
2. Customization
Table Position : Choose from 9 locations
Text Size : Adjust for screen resolution
Colors : Match your chart theme
Pivot Lines : Toggle weekly level visualization
3. Optimization Tips
Use larger text on mobile devices
Dark backgrounds work well with light text
Enable pivot lines for visual reference
✅ BEST PRACTICES
Recommended Usage:
Use for technical analysis and educational study only
Combine with other analytical methods for comprehensive analysis
Study multi-timeframe data relationships
Practice understanding technical indicator values
Important Notes:
Levels based on previous period's data
Most effective in trending markets
No repainting - uses confirmed data only
Works on all instruments and timeframes
🔧 TECHNICAL SPECS
Performance:
Pine Script v5 optimized code
Minimal CPU/memory usage
Real-time data updates
No lookahead bias
Compatibility:
All chart types (Candlestick, Bar, Line)
Any instrument (Stocks, Forex, Crypto, etc.)
All timeframes supported
Mobile and desktop friendly
Data Accuracy:
Precise floating-point calculations
Historical data integrity maintained
No future data leakage
📱 DEVICE SUPPORT
✅ Desktop browsers (Chrome, Firefox, Safari, Edge)
✅ TradingView mobile app (iOS/Android)
✅ TradingView desktop application
✅ Light and dark themes
✅ All screen resolutions
📋 VERSION INFO
Version 1.0 - Initial Release
Fibonacci-based pivot calculations
Dual timeframe support (Daily/Weekly)
Complete EMA suite (10, 20, 50, 100, 200)
RSI and ATR indicators
Fully customizable interface
Optional pivot line visualization
Smart price formatting
Mobile-optimized display
⚠️ DISCLAIMER
This indicator is designed for technical analysis, educational and informational purposes ONLY . It provides data visualization and technical calculations to help users understand market structure and price relationships.
⚠️ NOT FOR TRADING DECISIONS
This tool does NOT provide trading signals or investment advice
All data is for analytical and educational purposes only
Users should not base trading decisions solely on this indicator
Always conduct thorough research and analysis before making any financial decisions
📚 Educational Use Only
Use for learning technical analysis concepts
Study market data and indicator relationships
Practice chart reading and data interpretation
Understand mathematical calculations behind technical indicators
The Simple Technicals Table provides technical data visualization to assist in market analysis education. It does not constitute financial advice, trading recommendations, or investment guidance. Users are solely responsible for their own research and decisions.
Author: ToTrieu
Version: 1.0
Category: Technical Analysis / Support & Resistance
License: Open source for educational use
💬 Questions? Comments? Feel free to reach out!
RSI MA Cross + Divergence Signal (V2) Core Logic
RSI + Moving Average
The script calculates a standard RSI (default 14).
It then overlays a moving average (SMA/EMA/WMA, default 9).
When RSI crosses above its MA → bullish momentum.
When RSI crosses below its MA → bearish momentum.
Divergence Filter
Signals are only valid if there’s confirmed divergence:
Bullish divergence: Price makes a lower low, RSI makes a higher low.
Bearish divergence: Price makes a higher high, RSI makes a lower high.
Overbought / Oversold Filter
Optional extra:
Bullish signals only valid if RSI ≤ 30 (oversold).
Bearish signals only valid if RSI ≥ 70 (overbought).
This ensures signals happen in “stretched” conditions.
Risk & Trade Management
Entries taken only when all conditions align.
Exits can be managed with ATR stops, partial take-profits, breakeven moves, and trailing stops (we coded these in the strategy version).
Cooldown, session filters, and daily loss guard to keep risk tight.
🔹 Strengths
✅ High selectivity: Combining RSI cross + divergence + OB/OS means signals are rare but higher quality.
✅ Great at catching reversals: Divergence highlights where price may be running out of steam.
✅ Risk management baked in: ATR stops + partial exits smooth out equity curve.
✅ Works across markets: ES, FX, crypto — anywhere RSI divergences are respected.
✅ Flexible: You can loosen/tighten filters depending on aggressiveness.
🔹 Weaknesses
❌ Lag from pivots: Divergence only confirms after a few bars → you enter late sometimes.
❌ Choppy in ranges: In sideways markets, RSI divergences appear often and whipsaw.
❌ Filters reduce signals: With all filters ON (divergence + OB/OS + trend + session), signals can be very rare — may under-trade.
❌ Not standalone: Needs higher-timeframe context (trend, liquidity pools) to avoid counter-trend entries.
🔹 Best Ways to Trade It
Use Higher Timeframe Bias
Run the strategy on 15m/1H, but only trade in direction of higher timeframe trend (e.g., 4H EMA).
Example: If daily is bullish → only take bullish divergences.
Pair With Structure
Look for signals at key zones: HTF support/resistance, VWAP, or FVGs.
Divergence + RSI cross inside an FVG is a strong entry trigger.
Adjust OB/OS for Volatility
For crypto/FX: use 35/65 instead of 30/70 (markets trend harder).
For ES/S&P: 30/70 works fine.
Risk Management Is King
Use partial exits: take profit at 1R, trail rest.
Size by % of equity (we coded this into the strategy).
Avoid News Spikes
Divergences break down around CPI, NFP, Fed announcements — stay flat.
🔹 When It Shines
Trending markets that make extended pushes → clean divergences.
Reversal zones (oversold → bullish bounce, overbought → bearish fade).
Swing trading (15m–4H) — less noise than 1m/5m scalping.
🔹 When to Avoid
Low volatility chop → lots of false divergences.
During high-impact news → RSI swings wildly.
In strong one-way trends without pullbacks — divergence keeps calling tops/bottoms too early.
✅ Summary:
This is a reversal-focused RSI divergence strategy with strict filters. It’s powerful when combined with higher-timeframe bias + structure confluence, but weak if traded blindly in choppy or news-driven conditions. Best to treat it as a precision entry trigger, not a full system — layer it on top of your FVG/ORB framework for maximum edge.
Multi-Timeframe Candle Color Dashboard V.3 (ByTraderWut)หลักการทำงานของอินดิเคเตอร์ (Indicator's Working Principle)
อินดิเคเตอร์นี้ถูกออกแบบมาเพื่อช่วยให้นักเทรดสามารถวิเคราะห์แนวโน้มของตลาดในหลายๆ ไทม์เฟรมได้พร้อมกันอย่างรวดเร็วและแม่นยำ. หัวใจสำคัญของการทำงานอยู่ที่การตรวจสอบราคาเปิดและราคาปิดของแท่งเทียนที่ ปิดไปแล้ว ในแต่ละไทม์เฟรม ซึ่งเป็นข้อมูลที่มีความน่าเชื่อถือสูงกว่าแท่งเทียนที่กำลังวิ่งอยู่.
1. การคำนวณสีแท่งเทียน (Candle Color Calculation)
อินดิเคเตอร์จะทำการส่งคำสั่งไปยังไทม์เฟรมย่อยแต่ละช่วงเวลาที่คุณเลือก (เช่น M1, M5, H1, D1) เพื่อดึงข้อมูลราคาเปิดและราคาปิดของแท่งเทียนล่าสุดที่ปิดสมบูรณ์แล้ว.
Bullish (ขาขึ้น): หากราคาปิดของแท่งเทียนที่ปิดไปแล้ว สูงกว่า ราคาเปิด อินดิเคเตอร์จะแสดงเป็น สีเขียว.
Bearish (ขาลง): หากราคาปิดของแท่งเทียนที่ปิดไปแล้ว ต่ำกว่า ราคาเปิด อินดิเคเตอร์จะแสดงเป็น สีแดง.
2. การนับแท่งเทียนต่อเนื่อง (Consecutive Candle Count)
นอกจากการแสดงสีแล้ว อินดิเคเตอร์ยังมีการนับจำนวนแท่งเทียนที่มีสีเดียวกันต่อเนื่องกัน.
ฟังก์ชันการนับ: โค้ดจะใช้ลูปในการย้อนกลับไปตรวจสอบแท่งเทียนที่ปิดไปแล้วตามจำนวนที่คุณกำหนดในหน้าการตั้งค่า Consecutive Bars for Status. หากจำนวนแท่งเทียนสีเดียวกันต่อเนื่องถึงเกณฑ์ที่ตั้งไว้ อินดิเคเตอร์จะแสดงคำว่า "Bullish" หรือ "Bearish" เพิ่มเติม.
ประโยชน์: ฟีเจอร์นี้ช่วยกรองสัญญาณรบกวนที่เกิดจากราคาที่ขึ้นลงเล็กน้อย และช่วยให้คุณยืนยันความแข็งแกร่งของเทรนด์ได้อย่างแม่นยำยิ่งขึ้น.
3. การใช้งานร่วมกับการวิเคราะห์เชิงเทคนิค (Integration with Technical Analysis)
หลักการทำงานของอินดิเคเตอร์สอดคล้องกับการวิเคราะห์แบบ Multi-Timeframe Analysis ซึ่งเป็นพื้นฐานสำคัญของการเทรด. การใช้ Dashboard จะช่วยให้คุณเห็นภาพรวมของตลาดในมุมกว้าง และใช้สัญญาณยืนยันการเข้าออเดอร์ในไทม์เฟรมที่คุณเทรดอยู่ได้ทันที.
ตัวอย่าง: หากคุณเทรดในไทม์เฟรม H1 (ชั่วโมง) และเห็นว่า H4 และ D1 ก็เป็นเทรนด์ขาขึ้นเช่นกัน (Bullish) สัญญาณเข้าออเดอร์ซื้อ (Long) ของคุณใน H1 ก็จะมีความน่าเชื่อถือมากขึ้น.
English Version: Indicator's Working Principle
The indicator is designed to help traders analyze market trends across multiple timeframes quickly and accurately. The core of its functionality lies in checking the open and close prices of closed bars in each timeframe, which provides more reliable information than a bar that is still forming.
1. Candle Color Calculation
The indicator sends a request to each selected sub-timeframe (e.g., M1, M5, H1, D1) to fetch the open and close prices of the most recently completed bar.
Bullish (Uptrend): If the close price of the closed bar is higher than its open price, the indicator will display a green color.
Bearish (Downtrend): If the close price of the closed bar is lower than its open price, the indicator will display a red color.
2. Consecutive Candle Count
In addition to the color display, the indicator also counts the number of consecutive candles of the same color.
Counting Function: The code uses a loop to check the past closed bars up to the number you've defined in the Consecutive Bars for Status input. If the number of consecutive candles of the same color meets or exceeds this threshold, the words "Bullish" or "Bearish" will appear.
Benefit: This feature helps to filter out market noise from minor price fluctuations, allowing you to confirm the strength of a trend more accurately.
3. Integration with Technical Analysis
The indicator's working principle aligns with Multi-Timeframe Analysis, a fundamental trading concept. The dashboard provides a comprehensive market overview, allowing you to use confirmation signals to enter trades on your primary timeframe with greater confidence.
Example: If you are trading on the H1 (hourly) timeframe and see that H4 and D1 are also in an uptrend (Bullish), your long entry signal on H1 will be more reliable.
Pullback & ATR Trailing Strategy※日本語は英文の次に記載あります。
Overview
This indicator combines short-term RSI pullback/rebound signals with long-term RSI divergence to visualize potential buy and sell opportunities.
It also plots ATR-based trailing stops and partial take-profit lines, making it suitable for day trading and short-term trading.
Alerts are triggered when signal conditions are met.
Key Features
Detect short-term RSI pullbacks/rebounds (default 6 periods)
Detect divergences on long-term RSI
Visualize buy/sell signals with labels
Display ATR-based trailing stop and partial take-profit lines
Trigger alerts when conditions are met
Settings Explanation
Short-term RSI Length (rsiShortLen) Period for short-term RSI used to detect pullbacks or rebounds
Pullback Threshold (levelLow) RSI level below which a buy signal is considered
Rebound Threshold (levelHigh) RSI level above which a sell signal is considered
Long-term Timeframe (longTF) Timeframe used for divergence detection
Long-term RSI Length (longRSILen) Period for RSI on the long-term timeframe, used for divergence detection
Pivot Width Left / Right (pivotLeft / pivotRight)
Determines how we detect swing highs/lows (peaks and valleys).
For example, with pivotLeft=3 and pivotRight=3, a bar is considered a swing high if it is higher than the 3 bars to its left and 3 bars to its right.
Larger numbers detect only bigger swings, smaller numbers also detect smaller swings.
ATR Length (atrLen) Period for ATR calculation for trailing stops
ATR Multiplier (atrMult) Multiplier for ATR to calculate trailing stop distance
Partial Take-Profit Multiplier (tpMult) Multiplier to calculate half-profit level based on swing amplitude
Green line (Long Trail / translucent green)
ATR-based trailing stop line for long positions.
Used as a stop-loss or trailing stop for open buy trades.
Dark green line shows partial take-profit (TP), translucent green shows trailing stop level.
Red line (Short Trail / translucent red)
ATR-based trailing stop line for short positions.
Used as a stop-loss or trailing stop for open sell trades.
Dark red line shows partial take-profit (TP), translucent red shows trailing stop level.
Note: TP lines indicate partial take-profit targets, while ATR trailing lines indicate stop-loss/trailing stop levels if the price moves against the position.
日本語説明ーーーーーーーーーーーーーーーーーーーーーーーーーーーー
概要
このインジケーターは、短期RSIの押し目/戻りシグナルと、長期足RSIによるダイバージェンスを組み合わせて、買い・売りのチャンスを可視化します。
さらに、ATRベースのトレールストップラインや半分利確ラインも表示し、デイトレードや短期トレードに最適化しています。
シグナル条件に一致した場合にアラートも作動します。
主な機能
短期RSI(デフォルト6期間)で押し目・戻りを検出
長期足RSIでのダイバージェンスを検出
BUY/SELLラベルでシグナルを視覚化
ATRベースのトレールライン・半分利確ラインを表示
条件一致時にアラート発動
各設定の説明
短期RSI期間 (rsiShortLen) デイトレ用の短期RSIの期間。押し目や戻りのシグナルに使用
押し目閾値 (levelLow) RSIが下回ったら買いシグナル判定に使用
戻り閾値 (levelHigh) RSIが上回ったら売りシグナル判定に使用
長期足 (longTF) ダイバージェンス判定用の長期足の時間軸
長期RSI期間 (longRSILen) 長期足で計算するRSIの期間。ダイバージェンス判定に使用
左右ピボット幅 (pivotLeft / pivotRight) 高値や安値を「スイングの山・谷」として判定する時に使う幅です。
例えば pivotLeft=3, pivotRight=3 の場合、「左に3本、右に3本のローソク足より高い/低い点」をスイングの頂点や底と見なします。
数値を大きくすると大きな波だけを拾い、小さくすると小さな波も拾いやすくなります。
ATR期間 (atrLen) トレールライン計算用ATRの期間
ATR倍率 (atrMult) トレールラインの距離をATRに掛ける倍率
半分利確倍率 (tpMult) 押し目/戻り幅に対して半分利確ラインを設定する倍率
緑の線(Long Trail / 半透明緑)
ATRベースのトレールストップラインです。
買いポジション中の損切り目安やトレーリングストップとして使います。
緑の濃い線は半分利確ライン(TP)、薄い緑の線はトレールストップの位置を示します。
赤い線(Short Trail / 半透明赤)
ATRベースのトレールストップラインです。
売りポジション中の損切り目安やトレーリングストップとして使います。
赤の濃い線は半分利確ライン(TP)、薄い赤の線はトレールストップの位置を示します。
補足:TP(Take Profit)線は半分利確の目安で、ATRトレールラインはポジションが逆行した時の損切り目安です。
8/21 EMA Cross with 50 SMA FilterKey Features:
8/21 EMA Crossover: Detects when the 8 EMA crosses above/below the 21 EMA
50 SMA Filter: Only shows signals when:
Bullish cross occurs AND price is above 50 SMA
Bearish cross occurs AND price is below 50 SMA
Visual Signals: Green "BUY" labels for filtered bullish crosses, red "SELL" labels for filtered bearish crosses
Comparison: Small gray triangles show unfiltered crosses that were rejected by the 50 SMA filter
Trend Background: Light green when above 50 SMA, light red when below
Alerts: Built-in alert conditions for both filtered signals
SMC and FVG and EMAsThe Smart Money Concept (SMC) revolves around understanding how institutional traders—banks, hedge funds, and other large players—move the market. It’s not just about price action; it’s about decoding the intent behind price movements. Here's a breakdown of the core SMC market structure logic:
Core Principles of SMC Market Structure
1. Market Structure Shifts (Break of Structure - BOS / Change of Character - CHoCH)
BOS (Break of Structure): Occurs when price breaks a previous swing high/low, signaling continuation of trend.
CHoCH (Change of Character): Indicates a potential reversal when price breaks against the prevailing trend.
2. Liquidity Pools
Institutions target areas where retail traders place stop-losses:
Buy-side liquidity (BSL): Above swing highs.
Sell-side liquidity (SSL): Below swing lows.
These zones are often swept before a reversal or continuation.
3. Order Blocks (OB)
The last bullish or bearish candle before a strong move.
Acts as a zone of institutional interest—price often returns here before continuing.
-------
🧱 What Is an Order Block?
An Order Block (OB) is the last bullish or bearish candle before a significant price move—usually caused by institutional buying or selling. It represents a zone where smart money placed large orders, and price often returns to this area to "mitigate" or fill leftover orders.
Think of it as a footprint left by big players before they push the market in a new direction.
Types of Order Blocks
Type Description
Bullish OB Last bearish candle before a strong upward move
Bearish OB Last bullish candle before a strong downward move
Mitigated OB Price revisits the OB and reacts (fills unexecuted orders)
Unmitigated OB Price hasn’t returned to the OB yet—potential future reaction zone
How to Identify an Order Block
Find a strong impulsive move (break of structure or liquidity sweep).
Look back to the last opposite candle before that move.
Mark the zone from the candle’s open to close (some traders include wicks).
Wait for price to return to this zone—this is where smart money may re-enter.
Why Are Order Blocks Powerful?
They reveal institutional intent.
Price often respects these zones—either bouncing or consolidating.
They offer high-probability entries with tight stop-losses and strong risk-reward setups.
xample in Practice
Imagine price drops sharply after a bullish candle. That bullish candle is likely a bearish order block—institutions sold heavily right after it. When price returns to that candle’s zone, it may reject again, giving you a short setup.
4. Mitigation
Price revisits an order bblock to “mitigate” unfilled orders.
This is where smart money re-enters the market.
5. Fair Value Gaps (FVG)
Imbalance between buyers and sellers.
Price tends to fill these gaps before resuming direction.
6. Entry Models
Common setups include:
Liquidity sweep → Break of Structure → Retest of Order Block
CHoCH → Retest → Entry with confirmation
Example Flow in Bullish SMC Structure
Liquidity sweep below a swing low.
CHoCH as price breaks a minor high.
Retest of bullish order block or FVG.
Entry confirmation (e.g., bullish engulfing, lower timeframe BOS).
SMC helps traders align with institutional flow rather than getting trapped by retail patterns. It’s about trading with the market makers, not against them.
Target: Previous swing high or next liquidity pool.
Lot CalculatorFXでトレードする時に、「口座残高の○%だけリスクを取る」 という資金管理を自動化できるロット計算インジケーターです。
損切り幅(pips)とリスク%を入力するだけで、推奨Lot数を自動で表示します。
JPY口座専用設計(国内口座ユーザー向け)
開いている通貨ペアに自動対応(USDJPY, EURUSD, EURAUD, GBPJPY, AUDCAD など主要通貨ペアOK)
入力項目はシンプル:
口座残高(円)
リスク%
損切り幅(pips)
1ロット通貨単位(10万通貨 / 1万通貨 / 1000通貨)
⚠️ 免責事項
本インジケーターは資金管理の目安を示すツールです
計算されたLot数はあくまで参考値であり、実際の発注はご自身の判断と責任で行ってください
相場状況、スプレッド、証拠金状況によって結果が変動する場合があります
本スクリプトを利用したことによる損失について、作者は一切の責任を負いません
This is a lot size calculator indicator designed to automate risk management in FX trading by allowing you to take only a fixed percentage of your account balance per trade.
Simply enter your stop-loss (in pips) and risk percentage, and the indicator will automatically display the recommended lot size.
Key Features
JPY account only (designed for domestic account users)
Automatically adapts to the current chart pair (works with major pairs such as USDJPY, EURUSD, EURAUD, GBPJPY, AUDCAD, etc.)
Simple inputs:
Account balance (JPY)
Risk %
Stop-loss (pips)
Lot unit (100k / 10k / 1k contracts)
⚠️ Disclaimer
This indicator is a tool to provide a reference for risk management.
The calculated lot size is for guidance only. All trade execution must be done at your own discretion and responsibility.
Results may vary depending on market conditions, spread, and margin requirements.
The author assumes no liability for any losses incurred through the use of this script.
Manuel_Air//@version=6
indicator(title="Manuel_Air", shorttitle="Manuel_Air", overlay=true)
// ====== Layout / Estilo ======
posInput = input.string(defval="Top Right", title="Posición tabla", options= )
Table_Position = switch posInput
"Top Left" => position.top_left
"Top Center" => position.top_center
"Top Right" => position.top_right
"Middle Left" => position.middle_left
"Middle Center" => position.middle_center
"Middle Right" => position.middle_right
"Bottom Left" => position.bottom_left
"Bottom Center" => position.bottom_center
"Bottom Right" => position.bottom_right
label_size = input.string(defval="Normal", title="Tamaño texto", options= )
Tsize = switch label_size
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
"Large" => size.large
"Huge" => size.huge
// ====== Inputs checklist y nombres personalizables ======
check1 = input.bool(true, "HTF Alignment")
check2 = input.bool(true, "Liquidity Sweep")
check3 = input.bool(true, "Boss + Imbalance")
check4 = input.bool(true, "71% Retracement")
showTradeScore = input.bool(true, "Mostrar Trade Score")
name1 = input.string("HTF Alignment", "Nombre Check 1")
name2 = input.string("Liquidity Sweep", "Nombre Check 2")
name3 = input.string("Boss + Imbalance", "Nombre Check 3")
name4 = input.string("71% Retracement", "Nombre Check 4")
tableTitle = input.string("Checklist 📝", "Título tabla")
headerText = input.string("Manuel_Air", "Texto header")
// ====== Colores personalizables ======
colorChecked = input.color(color.green, "Color ✔")
colorUnchecked = input.color(color.red, "Color ✘")
colorHeader = input.color(color.black, "Color Header")
colorRow = input.color(color.new(color.black, 85), "Color Filas")
colorTradeHigh = input.color(color.green, "Color Trade Score Alto")
colorTradeMid = input.color(color.yellow, "Color Trade Score Medio")
colorTradeLow = input.color(color.red, "Color Trade Score Bajo")
colorText = input.color(color.white, "Color texto filas")
// ====== Preparar checklist ======
checks = array.new_bool()
names = array.new_string()
array.push(checks, check1)
array.push(checks, check2)
array.push(checks, check3)
array.push(checks, check4)
array.push(names, name1)
array.push(names, name2)
array.push(names, name3)
array.push(names, name4)
numChecks = array.size(checks)
// ====== Calcular Trade Score ======
checkedRows = 0
for i = 0 to numChecks - 1
checkedRows += array.get(checks, i) ? 1 : 0
tradeScore = math.round((checkedRows / numChecks) * 100)
tradeScoreColor = tradeScore >= 75 ? colorTradeHigh : tradeScore >= 50 ? colorTradeMid : colorTradeLow
// ====== Definir filas totales ======
totalRows = 1 + 1 + numChecks + (showTradeScore ? 1 : 0) // Header + título checklist + checks + Trade Score
var table myTable = table.new(position = Table_Position, columns = 2, rows = totalRows, border_width = 1, border_color = color.gray)
if barstate.islast
rowIndex = 0
// Header (merge 2 columnas)
table.cell(table_id = myTable, column = 0, row = rowIndex, text = headerText, text_size = Tsize, text_color = colorText, bgcolor = colorHeader)
table.merge_cells(table_id = myTable, start_column = 0, start_row = rowIndex, end_column = 1, end_row = rowIndex)
rowIndex += 1
// Título checklist (merge)
table.cell(table_id = myTable, column = 0, row = rowIndex, text = tableTitle, text_size = Tsize, text_color = colorText, bgcolor = colorHeader)
table.merge_cells(table_id = myTable, start_column = 0, start_row = rowIndex, end_column = 1, end_row = rowIndex)
rowIndex += 1
// Filas checklist
for i = 0 to numChecks - 1
checked = array.get(checks, i)
name = array.get(names, i)
table.cell(table_id = myTable, column = 0, row = rowIndex, text = (checked ? "✔" : "✘"), text_size = Tsize, text_color = (checked ? colorChecked : colorUnchecked), bgcolor = colorRow)
table.cell(table_id = myTable, column = 1, row = rowIndex, text = name, text_size = Tsize, text_color = colorText, bgcolor = colorRow)
rowIndex += 1
// Trade Score
if showTradeScore
table.cell(table_id = myTable, column = 0, row = rowIndex, text = str.tostring(tradeScore) + "%", text_size = Tsize, text_color = tradeScoreColor, bgcolor = colorRow)
table.cell(table_id = myTable, column = 1, row = rowIndex, text = "Trade Score", text_size = Tsize, text_color = colorText, bgcolor = colorRow)
unFair Value Gap Detector [theUltimator5]The unFair Value Gap Detector (uFVG) highlights imbalance zones that form when trend strength is weak but directional pressure spikes—a condition often followed by price reversion back into that level. Unlike the classic 3-candle ICT FVG, this tool is designed to help you have an unFair edge in gap retracement detection by plotting high probability gap reversion opportunities on the current timeframe and the next FIVE (yes five) higher timeframes.
What you’ll see:
Gap line per event: A single, no-nonsense line at the level price most often returns to.
Auto multi-timeframe view: uFVG ladders up through five higher timeframes and shows their levels too—each with its own color.
Smart de-clutter: Near-duplicate lines across timeframes are filtered so your chart stays readable.
Note: This indicator is intentionally minimalistic visually to minimize chart clutter, while still being an extremely powerful tool
Optional visuals:
Light background tint during quiet, coiling conditions.
Soft fill from price to the active line for quick context.
Compact labels that note the price and which timeframe printed it.
Why it is unique and effective (the “unfair” edge):
Early, practical context: Spots levels near when the imbalance forms—useful before the crowd catches on.
Clarity over noise: One line per event. No boxes, no sprawling zones, fewer “maybe” areas.
Timeframe confluence: When multiple timeframes cluster around the same price, you’ve got a stronger focal point.
Simple risk framing: If price slices through the line decisively, that idea’s done. Next.
How to use it:
Mean-reversion play: Look for price to tag the line, take profits into it, or fade a first reaction.
Continuation play: After the line is “mitigated,” reassess in the original direction.
Prioritize by timeframe: Higher-timeframe lines tend to carry more weight.
Respect clusters: Multiple lines stacked near one price often mark important pivots.
Customization
Colors: Separate colors for current and higher-timeframe lines.
Toggles: Turn on/off background highlights, line-to-price fill, and labels.
Minimal fuss: The rest is auto—timeframes, line lifecycle, and de-duplication are handled for you.
iKrit : EMACross🔸 Functionality Details
EMA Calculation
Calculates EMA lines with the specified values (3, 5, 20, 60, 200).
All lines are shifted forward by 1 bar (offset=1) and are displayed as thin lines (linewidth=1).
EMA Cross Signals (EMA3 vs EMA5)
When EMA3 crosses above EMA5 → Shows a white ▲ arrow below the bar + LONG signal.
When EMA3 crosses below EMA5 → Shows a white ▼ arrow above the bar + SHORT signal.
Alerts can be set for both cases.
EMA60/200 Cross Signals
When EMA60 crosses above EMA200 → Triggers a Golden Cross alert.
When EMA60 crosses below EMA200 → Triggers a Death Cross alert.
FX % Change TableFX % Change Table
This tool provides currency strength analysis at a glance, allowing traders to instantly identify which currencies are outperforming or underperforming without the need to manually check each pair. It offers decision support for entries and exits by helping traders align their positions with broader strength and weakness trends, such as buying the strongest currency against the weakest. Its versatility makes it suitable for any timeframe, whether used by scalpers or swing traders. Best of all, it delivers these insights in a clean and simple format, presenting complex multi-pair calculations in an easy-to-read visual display.
This tool is especially helpful for traders who incorporate currency strength analysis, correlation checks, or basket trading into their strategy. It reduces time spent flipping through charts and provides a structured overview for smarter trade decisions.
Unlike traditional single-pair indicators, this tool calculates the percentage change between the current and previous higher timeframe closes for a group of forex pairs. You can choose between two curated groups:
• Majors – EURUSD, GBPUSD, USDJPY, USDCHF, AUDUSD, NZDUSD, USDCAD
• Cross Pairs – A wide basket of EUR, GBP, AUD, NZD, CAD, and CHF crosses
For each symbol, the script requests the selected timeframe’s price data, calculates the percentage change from the previous bar’s close, and then displays it in a neatly formatted table. Green highlights strength, red highlights weakness, and gray shows neutrality — making shifts in momentum instantly recognizable.
How to Use
1. Select your timeframe – For example, "60" (1H) to view hourly change, "240" (4H) for broader moves, or "D" for daily strength/weakness.
2. Choose your group – Focus on the Majors for a macro USD view, or switch to Cross Pairs for secondary flows.
3. Position the table – Place it in any corner of your chart (top-left, top-right, bottom-left, bottom-right) to match your workspace.
The table updates dynamically at the close of each bar, ensuring the displayed data always reflects the most recent market movements.
Emas cryptosmart## General Summary
The Emas cryptosmart indicator is a technical analysis tool designed to provide a clear and comprehensive view of the market trend. It combines a long-term Hull Moving Average (HMA) to establish the overall trend with a faster, more responsive Triple Hull Moving Average (THMA) to identify short-term momentum.
Its primary feature is the dynamic candle coloring, which offers immediate visual cues about price direction, simplifying trading decisions.
## Indicator Components
This indicator is composed of two main lines:
Hull 200 (HMA): The Long-Term Trend Anchor
This line (dynamic lime/red by default) acts as a filter for the main market trend. Due to its 200-period setting, it moves smoothly and establishes the general context.
Uptrend: When the Hull 200 is rising (lime color), it indicates the macro trend is bullish.
Downtrend: When it is falling (red color), the macro trend is bearish.
THMA 55: The Short-Term Momentum Line
This line (dynamic aqua/orange by default) is a Triple Hull Moving Average. It is extremely fast and sensitive to recent price changes, designed to capture immediate momentum.
This is the key line for the candle coloring and for identifying potential entry or exit points.
## How to Interpret It
The primary strategy is to use the Hull 200 to define the direction for your trades and the THMA 55 to fine-tune your timing.
Candle Coloring (Main Signal):
Bullish Candles (default: aqua): When the price closes above the THMA 55, the candles turn to a bullish color. This signals that immediate momentum is positive and can be considered a buy signal or confirmation to stay in a long position.
Bearish Candles (default: orange): When the price closes below the THMA 55, the candles turn to a bearish color. This indicates that immediate momentum is negative, suggesting a potential sell or an exit from a long position.
Confluence Strategy:
The highest-probability signals occur when both moving averages are aligned.
Strong Buy Example: Look for a situation where the Hull 200 is rising (lime color) and wait for the candles to turn bullish as the price crosses above the THMA 55.
Strong Sell Example: Look for a situation where the Hull 200 is falling (red color) and wait for the candles to turn bearish as the price crosses below the THMA 55.
## Key Features
Visual Clarity: Automatic candle coloring eliminates the need to constantly interpret crosses, allowing for a quick read of the market's state.
Dual Perspective: Offers a balanced view by combining a slow trend indicator with a fast momentum indicator.
Reduced Lag: The use of Hull variants minimizes the delay typical of conventional moving averages (SMAs/EMAs).
Fully Customizable: All colors, for both the lines and the candles, can be adjusted in the settings menu to fit your visual style.
Heikin Ashi Overlay SuiteHeikin Ashi Overlay Suite is designed to give traders more control and clarity when working with Heikin Ashi candles — whether you're analyzing trend strength, reducing chart noise, or simply improving your visual read of market momentum. It works by layering multiple types of HA overlays and color systems on top of your standard candlestick chart — without switching chart types. With dynamic gradient coloring, smoothing options, and a predictive line tool, this script helps you see not just what the current trend is, but how strong it is, and what it would take to reverse it.
Heikin Ashi candles help reduce noise but this script goes further by:
➡️adding color intelligence that shows trend strength using a streak counter
➡️uses smoothing logic to clean up chop and whipsaws
➡️introduces a predictive close line — a subtle but powerful guide for anticipating trend flips before they happen
Everything is configurable: colors, candle sources, overlays, predictive tools, and line styles. It’s built for traders who want visual speed, but don’t want to sacrifice signal quality.
At its core, the script offers two powerful dropdown controls:
💥HA Color Scheme (Colors Regular Candles) — Applies Heikin Ashi-derived coloring to your regular candles based on trend direction or streak strength. This gives you instant visual context without switching to a separate chart type.
💥HA Candle Overlay Mode — Overlays actual Heikin Ashi-style candles directly on top of your chart, using your preferred source:
➡️Custom HA candles using internal formula logic
➡️TradingView’s built-in Heikin Ashi source with your own colors
➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
🎨 Custom + Gradient HA Coloring🎨
See trend strength at a glance:
➡️1–4 bar streaks → lighter tone
➡️5–8 bars → medium tone
➡️9+ bars → bold tone, ideal for momentum-based entries, exits, or scaling strategies
→ Choose from:
➡️Your own custom color set
➡️A simple 2-color base mode
➡️Or a 3-level gradient for progressive trend analysis (using the streak counter)
🏛️ TradingView Official Heikin Ashi Overlay
Prefer native HA candles but want your own colors?
This mode plots TradingView's Heikin Ashi source, with your personal bullish/bearish color scheme.
➡️Ensures consistency with built-in charts while still leveraging your visual style.
🌊 Smoothed Heikin Ashi Candles — Clarity in Chaos🌊
These aren’t your standard HA candles. Smoothed Heikin Ashi uses a two-step EMA process to transform chaotic price action into a cleaner, slower-moving trend structure:
🔹 First, it smooths the raw OHLC data using EMA — filtering out minor price fluctuations.
🔹 Then, it applies the Heikin Ashi transformation on top of the smoothed data.
🔹 Finally, it applies a second EMA smoothing pass to the HA values — creating ultra-smooth candles.
📈 What You See:
Trends appear more fluid and consistent.
Choppy ranges and fakeouts are visually suppressed.
Minor pullbacks within a trend are de-emphasized, helping you avoid premature exits.
🎯 Best For:
Swing traders looking to stay in positions longer.
Intraday traders dealing with volatile or noisy instruments.
Anyone who wants a "trend map" overlay without the distractions of raw price action.
✅ Reduces whipsaws
✅ Delivers high-contrast trend zones
✅ Makes reversals more visually apparent (but with a slight lag)
📍 Predictive Close Line📍
Shows where the real close must land to flip the current HA candle's color.
✅ Use it like predictive support/resistance
✅ Know if the trend is actually at risk
✅Visualize potential fakeouts or confirmation
Color-coded based on current HA direction (bullish, bearish, or neutral).
📈 Tick by tick & bar-to-bar Plots📈
Provides 2 plot types:
1)1 plot that tracks a bar tick by tick
2)another plot that tracks the close from bar to bar
For the bar to bar plot, you can choose between 2 options:
✅Full Plot — continuous line colored by HA trend
✅Recent Segments — color just the last few bars (configurable) to reduce chart clutter
✅ Customize width, number of bars, and visibility
➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
📘 How to Use this script📘
Imagine you're watching a choppy 15-minute chart on a volatile crypto pair — price action is messy, and it’s hard to tell if a trend is forming or just noise.
Here’s how to cut through the chaos using Heikin Ashi Overlay Suite:
🔹 Step 1: Enable "Smoothed HA Candles"
Start by turning on the smoothed candles. You’ll immediately notice the noise fades, and broader directional moves become easier to follow. It's like switching from static to clean trend zones.
🧠 Why: Smoothed HA uses a double EMA process that filters out small reversals and lets larger moves stand out. Perfect for sideways or jittery charts.
🔹 Step 2: Watch the Color Gradient Build
As the smoothed candles begin to align in one direction, the gradient coloring (1–4, 5–8, 9+ streaks) gives you an at-a-glance visual of how strong the trend is.
✅ If you see 9+ same-colored candles? You’re likely in a mature trend.
✅ If it resets often? You’re in chop — consider staying out.
🔹 Step 3: Use the Predictive Close Line for Anticipation
Now here’s the edge — this line tells you where the candle would have to close to flip colors.
📉 If price is hovering just above it during a bullish run — momentum may be weakening.
📈 If price bounces off it — the trend may be strengthening.
This is excellent for confirming entries, exits, or spotting early warning signs.
🔹 Step 4: Switch Between Candle Modes as Needed
You can flip between:
✅ Custom HA: Gradient candles with your colors
✅ TradingView HA: The official source with your styling
✅ None: Just color regular candles using the HA logic
Use what fits your style — everything is modular.
🔹 Step 5: Tune It to Your Chart
Lastly, tweak streak thresholds (currently only can do this within the source code), smoothing lengths, and line styles to match your timeframe and strategy.
🎯 Tailor The Settings to Fit Your Trading Style🎯
🔹 🧪 Scalper (1–5 min charts)
If you’re trading fast intraday moves, you want quicker responsiveness and less lag.
Try these settings:
🔸Smoothing Lengths: Use lower values (e.g. len = 3, len2 = 5)
🔸Candle Mode: Use Custom HA or TV’s HA for real-time color flips
🔸Predictive Close Line: Great for ultra-fast anticipation of color reversals
🔸Line Mode: Use Recent Segments mode to track short bursts of trend
🔸Colors: Use high-contrast, opaque colors for clarity
✅ These settings help you catch micro-trends and flip signals faster, while still filtering out the worst of the noise.
🔹 🧪 Swing Trader (30m–4h charts and beyond)
If you’re looking for multi-hour or multi-day trend confirmation, prioritize clarity and staying in moves longer.
Recommended setup:
🔸Smoothing Lengths: Medium to high values (e.g. len = 8, len2 = 21)
🔸Candle Mode: Use Smoothed HA Candles to block out intrabar chop
🔸Gradient Colors: Enable to visualize trend maturity and strength
🔸Predictive Close Line: Helps confirm trend continuation or spot early reversals
🔸Line Mode: Use Full Plot Line for clean HA-based trend tracking
✅ These settings give you a calm, clean view of the bigger picture — ideal for holding positions longer and avoiding early exits.
🔧 This script isn’t just a chart overlay — it’s a visual trend engine.🔧
Ideal For:
🔶 Trend-followers who want clean, color-coded confirmation
🔶 Reversal traders spotting exhaustion via predictive flips
🔶 Scalpers filtering noise with lighter smoothing
🔶 Swing traders using smoothed visuals to hold longer
📌 Final Note
Heikin Ashi Overlay Pro is designed to help you see momentum, trend shifts, and market structure with greater clarity — not to predict price on its own. For best results:
✔️ Combine with support/resistance, moving averages, or price action patterns
✔️ Use Predictive Close as a confirmation tool, not a signal generator
✔️ Pair gradient colors with structure to gauge trend maturity
✔️ Always zoom out and check higher timeframes for context
🧠 Use this as part of a layered approach — not a standalone system.
🙏 Credits🙏
⚡HA logic based on SimpleCryptoLife
⚡Smoothed HA concept adapted from a script by Jackvmk
💡💡💡Turn logic into clarity. Structure into trades. And uncertainty into confidence.💡💡💡
Support and Resistancy by ASRSupport and Resistancy by ASR
it is giving support and resistance zones its useful for where support where resistance
MTF Levels [OmegaTools]📖 Introduction
The Ω Levels Indicator is a complete market structure and level-mapping framework designed to help traders identify key zones where price is likely to react.
It blends classic technical anchors (VWAP, pivots, means, standard deviations) with modern statistical pattern recognition to dynamically project areas of manipulation, extension, and equilibrium.
At its core, Ω Levels creates an evolving map of market balance vs. imbalance, showing traders where liquidity is most likely to build and where price could pivot or accelerate.
But what makes it truly unique is the Pivot Forecaster — an embedded predictive engine that applies machine-learning inspired logic to recognize conditions that historically precede market turning points.
🔎 Key Features
Customizable Levels Framework
Define up to three levels (manipulation, extensions, VWAP, pivots, stdev bands, or prior extremes).
Choose mean references such as Open, VWAP, Pivot Mean, or Previous Session Mean.
Style controls (solid, dotted, dashed) and fill modes (internal, external, ranges) allow you to adapt the chart to your visual workflow.
Dynamic Zone Highlighting
Automatic fills between internal/external levels, or between specific level pairs (1–2, 1–3, 2–3).
Makes it easy to visualize value areas, expansions, and compression zones at a glance.
Multi-Timeframe Anchoring
Works on any timeframe, but calculations can be anchored to a higher timeframe (e.g., show daily VWAP & pivots on a 15m chart).
This allows traders to align intraday execution with higher timeframe context.
Pivot Forecaster (Machine Learning / Pattern Recognition)
This is the advanced predictive component.
The algorithm collects historical conditions observed around pivot highs and lows (volume state, ATR state, % candle expansion, oscillator conditions).
It then builds statistical “profiles” of typical pivot behavior and compares them in real-time against current market conditions.
When conditions match the “signature” of a pivot, the indicator highlights a Forecast Pivot High or Forecast Pivot Low (displayed as small diamond markers).
This functions as a pattern-recognition system, effectively learning from past pivots to anticipate where the next turning point is more likely to occur.
⚡ How Traders Can Use It
Intraday Execution: Use VWAP, manipulation, and extension levels to frame trades around liquidity zones.
Swing Context: Overlay higher timeframe pivots and means to guide medium-term positioning.
Fade Setups: Forecasted pivots often coincide with exhaustion zones where fading momentum carries edge.
Breakout Validation: When price breaks a structural level but the forecaster does not confirm a pivot, continuation probability is higher.
Risk Management: Levels provide natural stop/target placements, while pivot forecasts serve as warning signals for potential reversals.
⚙️ Settings Overview
Timeframe: Choose the anchor timeframe for calculations (default: Daily).
Means: Two selectable mean references (Open, VWAP, Pivot Point, Previous Mean).
Levels: Three levels can be customized (Manipulation, Extension, 1–2 StDev, Pivot Point, VWAP, Previous Extremes).
Fill Modes: Highlight zones between internal/external levels or custom ranges.
Visual Customization: Colors, line styles, fill opacity, and toggle for old levels.
Pivot Forecaster: Fully automated — no settings required, it adapts to instrument and timeframe.
🧭 Best Practices
Align Levels With Market Profile: Treat the levels as dynamic S/R zones and watch how price interacts with them.
Use Forecaster as Confirmation: The diamonds are not standalone signals; they are context filters that help you decide whether a move has higher reversal odds.
Higher Timeframe Anchoring: On intraday charts, set the timeframe to Daily or Weekly to trade with institutional levels.
Combine With ATR: Pair with the Ω ATR Indicator to size positions according to volatility while Ω Levels provides the structural roadmap.
📌 Summary
The Ω Levels Indicator is more than a level plotter — it’s a market map + predictive engine.
By combining traditional levels with an intelligent pivot forecaster, it gives traders both the static structure of where price should react, and the dynamic signal of where it is likely to react next.
This dual-layer approach — structural + predictive — makes it an invaluable tool for discretionary intraday traders, swing traders, and anyone who wants to anticipate price behavior instead of just reacting to it.
Ultimate Sniper Entry - Pivot PerfectionT2R📌 Description
The Ultimate Sniper Entry – Pivot Perfection is a precision trading tool designed to identify high-probability pivot points and generate early buy/sell entries with strong confirmation. By combining pivot detection, volume spikes, momentum filters (RSI), candle patterns, and EMA trend alignment, this system helps traders capture market reversals and trend continuation setups with improved accuracy.
It offers:
Smart Pivot Detection with adjustable sensitivity.
Multi-layer Confirmation: volume, momentum, candle structure, and EMA trend filter.
Non-Repainting Signals: arrows plotted only after pivot confirmation.
Visual Aids: buy/sell arrows, optional pivot markers, background trend shading.
Alerts: instant notifications for sniper buy/sell entries.
Info Panel: quick reference guide directly on chart.
Ideal for traders who want structured, rules-based entries while avoiding false signals, the Ultimate Sniper Entry system adapts to multiple markets and timeframes.
Price Action Concepts [RUDYINDICATOR]/// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © RUDYBANK INDICATOR - formerly know as RUDY INDICATOR
//@version=5
indicator("Price Action Concepts ", shorttitle = "RUDYINDICATOR-V1
- Price Action RUDYINDICATOR ", overlay = true, max_lines_count = 500, max_labels_count = 500, max_boxes_count = 500, max_bars_back = 500, max_polylines_count = 100)
//-----------------------------------------------------------------------------{
//Boolean set
//-----------------------------------------------------------------------------{
s_BOS = 0
s_CHoCH = 1
i_BOS = 2
i_CHoCH = 3
i_pp_CHoCH = 4
green_candle = 5
red_candle = 6
s_CHoCHP = 7
i_CHoCHP = 8
boolean =
array.from(
false
, false
, false
, false
, false
, false
, false
, false
, false
)
//-----------------------------------------------------------------------------{
// User inputs
//-----------------------------------------------------------------------------{
show_swing_ms = input.string ("All" , "Swing " , inline = "1", group = "MARKET STRUCTURE" , options = )
show_internal_ms = input.string ("All" , "Internal " , inline = "2", group = "MARKET STRUCTURE" , options = )
internal_r_lookback = input.int (5 , "" , inline = "2", group = "MARKET STRUCTURE" , minval = 2)
swing_r_lookback = input.int (50 , "" , inline = "1", group = "MARKET STRUCTURE" , minval = 2)
ms_mode = input.string ("Manual" , "Market Structure Mode" , inline = "a", group = "MARKET STRUCTURE" , tooltip = " Use selected lenght Use automatic lenght" ,options = )
show_mtf_str = input.bool (true , "MTF Scanner" , inline = "9", group = "MARKET STRUCTURE" , tooltip = "Display Multi-Timeframe Market Structure Trend Directions. Green = Bullish. Red = Bearish")
show_eql = input.bool (false , "Show EQH/EQL" , inline = "6", group = "MARKET STRUCTURE")
plotcandle_bool = input.bool (false , "Plotcandle" , inline = "3", group = "MARKET STRUCTURE" , tooltip = "Displays a cleaner colored candlestick chart in place of the default candles. (requires hiding the current ticker candles)")
barcolor_bool = input.bool (false , "Bar Color" , inline = "4", group = "MARKET STRUCTURE" , tooltip = "Color the candle bodies according to market strucutre trend")
i_ms_up_BOS = input.color (#089981 , "" , inline = "2", group = "MARKET STRUCTURE")
i_ms_dn_BOS = input.color (#f23645 , "" , inline = "2", group = "MARKET STRUCTURE")
s_ms_up_BOS = input.color (#089981 , "" , inline = "1", group = "MARKET STRUCTURE")
s_ms_dn_BOS = input.color (#f23645 , "" , inline = "1", group = "MARKET STRUCTURE")
lvl_daily = input.bool (false , "Day " , inline = "1", group = "HIGHS & LOWS MTF")
lvl_weekly = input.bool (false , "Week " , inline = "2", group = "HIGHS & LOWS MTF")
lvl_monthly = input.bool (false , "Month" , inline = "3", group = "HIGHS & LOWS MTF")
lvl_yearly = input.bool (false , "Year " , inline = "4", group = "HIGHS & LOWS MTF")
css_d = input.color (color.blue , "" , inline = "1", group = "HIGHS & LOWS MTF")
css_w = input.color (color.blue , "" , inline = "2", group = "HIGHS & LOWS MTF")
css_m = input.color (color.blue , "" , inline = "3", group = "HIGHS & LOWS MTF")
css_y = input.color (color.blue , "" , inline = "4", group = "HIGHS & LOWS MTF")
s_d = input.string ('⎯⎯⎯' , '' , inline = '1', group = 'HIGHS & LOWS MTF' , options = )
s_w = input.string ('⎯⎯⎯' , '' , inline = '2', group = 'HIGHS & LOWS MTF' , options = )
s_m = input.string ('⎯⎯⎯' , '' , inline = '3', group = 'HIGHS & LOWS MTF' , options = )
s_y = input.string ('⎯⎯⎯' , '' , inline = '4', group = 'HIGHS & LOWS MTF' , options = )
ob_show = input.bool (true , "Show Last " , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volumetric order blocks on the chart Ammount of volumetric order blocks to show")
ob_num = input.int (5 , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Orderblocks number", minval = 1, maxval = 10)
ob_metrics_show = input.bool (true , "Internal Buy/Sell Activity" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volume metrics that have formed the orderblock")
css_metric_up = input.color (color.new(#089981, 50) , " " , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
css_metric_dn = input.color (color.new(#f23645 , 50) , "" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
ob_swings = input.bool (false , "Swing Order Blocks" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display swing volumetric order blocks")
css_swing_up = input.color (color.new(color.gray , 90) , " " , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
css_swing_dn = input.color (color.new(color.silver, 90) , "" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
ob_filter = input.string ("None" , "Filtering " , inline = "d", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Filter out volumetric order blocks by BOS/CHoCH/CHoCH+", options = )
ob_mitigation = input.string ("Absolute" , "Mitigation " , inline = "4", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Trigger to remove volumetric order blocks", options = )
ob_pos = input.string ("Precise" , "Positioning " , inline = "k", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Position of the Order Block Cover the whole candle Cover half candle Adjust to volatility Same as Accurate but more precise", options = )
use_grayscale = input.bool (false , "Grayscale" , inline = "6", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Use gray as basic order blocks color")
use_show_metric = input.bool (true , "Show Metrics" , inline = "7", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show volume associated with the orderblock and his relevance")
use_middle_line = input.bool (true , "Show Middle-Line" , inline = "8", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show mid-line order blocks")
use_overlap = input.bool (true , "Hide Overlap" , inline = "9", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Hide overlapping order blocks")
use_overlap_method = input.string ("Previous" , "Overlap Method " , inline = "Z", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = " Preserve the most recent volumetric order blocks Preserve the previous volumetric order blocks", options = )
ob_bull_css = input.color (color.new(#089981 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
ob_bear_css = input.color (color.new(#f23645 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
show_acc_dist_zone = input.bool (false , "" , inline = "1", group = "Accumulation And Distribution")
zone_mode = input.string ("Fast" , "" , inline = "1", group = "Accumulation And Distribution" , tooltip = " Find small zone pattern formation Find bigger zone pattern formation" ,options = )
acc_css = input.color (color.new(#089981 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
dist_css = input.color (color.new(#f23645 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
show_lbl = input.bool (false , "Show swing point" , inline = "1", group = "High and Low" , tooltip = "Display swing point")
show_mtb = input.bool (false , "Show High/Low/Equilibrium" , inline = "2", group = "High and Low" , tooltip = "Display Strong/Weak High And Low and Equilibrium")
toplvl = input.color (color.red , "Premium Zone " , inline = "3", group = "High and Low")
midlvl = input.color (color.gray , "Equilibrium Zone" , inline = "4", group = "High and Low")
btmlvl = input.color (#089981 , "Discount Zone " , inline = "5", group = "High and Low")
fvg_enable = input.bool (false , " " , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap")
what_fvg = input.string ("FVG" , "" , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap", options = )
fvg_num = input.int (5 , "Show Last " , inline = "1a", group = "FAIR VALUE GAP" , tooltip = "Number of fvg to show")
fvg_upcss = input.color (color.new(#089981, 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_dncss = input.color (color.new(color.red , 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_extend = input.int (10 , "Extend FVG" , inline = "2", group = "FAIR VALUE GAP" , tooltip = "Extend the display of the FVG.")
fvg_src = input.string ("Close" , "Mitigation " , inline = "3", group = "FAIR VALUE GAP" , tooltip = " Use the close of the body as trigger Use the extreme point of the body as trigger", options = )
fvg_tf = input.timeframe ("" , "Timeframe " , inline = "4", group = "FAIR VALUE GAP" , tooltip = "Timeframe of the fair value gap")
t = color.t (ob_bull_css)
invcol = color.new (color.white , 100)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - UDT }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
type bar
float o = open
float c = close
float h = high
float l = low
float v = volume
int n = bar_index
int t = time
type Zphl
line top
line bottom
label top_label
label bottom_label
bool stopcross
bool sbottomcross
bool itopcross
bool ibottomcross
string txtup
string txtdn
float topy
float bottomy
float topx
float bottomx
float tup
float tdn
int tupx
int tdnx
float itopy
float itopx
float ibottomy
float ibottomx
float uV
float dV
type FVG
box box
line ln
bool bull
float top
float btm
int left
int right
type ms
float p
int n
float l
type msDraw
int n
float p
color css
string txt
bool bull
type obC
float top
float btm
int left
float avg
float dV
float cV
int wM
int blVP
int brVP
int dir
float h
float l
int n
type obD
box ob
box eOB
box blB
box brB
line mL
type zone
chart.point points
float p
int c
int t
type hqlzone
box pbx
box ebx
box lbx
label plb
label elb
label lbl
type ehl
float pt
int t
float pb
int b
type pattern
string found = "None"
bool isfound = false
int period = 0
bool bull = false
type alerts
bool chochswing = false
bool chochplusswing = false
bool swingbos = false
bool chochplus = false
bool choch = false
bool bos = false
bool equal = false
bool ob = false
bool swingob = false
bool zone = false
bool fvg = false
bool obtouch = false
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - General Setup }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
bar b = bar.new()
var pattern p = pattern.new()
alerts blalert = alerts.new()
alerts bralert = alerts.new()
if p.isfound
p.period += 1
if p.period == 50
p.period := 0
p.found := "None"
p.isfound := false
p.bull := na
switch
b.c > b.o => boolean.set(green_candle, true)
b.c < b.o => boolean.set(red_candle , true)
f_zscore(src, lookback) =>
(src - ta.sma(src, lookback)) / ta.stdev(src, lookback)
var int iLen = internal_r_lookback
var int sLen = swing_r_lookback
vv = f_zscore(((close - close ) / close ) * 100,iLen)
if ms_mode == "Dynamic"
switch
vv >= 1.5 or vv <= -1.5 => iLen := 10
vv >= 1.6 or vv <= -1.6 => iLen := 9
vv >= 1.7 or vv <= -1.7 => iLen := 8
vv >= 1.8 or vv <= -1.8 => iLen := 7
vv >= 1.9 or vv <= -1.9 => iLen := 6
vv >= 2.0 or vv <= -2.0 => iLen := 5
=> iLen
var msline = array.new(0)
iH = ta.pivothigh(high, iLen, iLen)
sH = ta.pivothigh(high, sLen, sLen)
iL = ta.pivotlow (low , iLen, iLen)
sL = ta.pivotlow (low , sLen, sLen)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - ARRAYS }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
hl () =>
= request.security(syminfo.tickerid , 'D' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'W' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'M' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , '12M', hl() , lookahead = barmerge.lookahead_on)
lstyle(style) =>
out = switch style
'⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
mtfphl(h, l ,tf ,css, pdhl_style) =>
var line hl = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var line ll = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var label lbl = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}L', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
var label hlb = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}H', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
hy = ta.valuewhen(h != h , h , 1)
hx = ta.valuewhen(h == high , time , 1)
ly = ta.valuewhen(l != l , l , 1)
lx = ta.valuewhen(l == low , time , 1)
if barstate.islast
extension = time + (time - time ) * 50
line.set_xy1(hl , hx , hy)
line.set_xy2(hl , extension , hy)
label.set_xy(hlb, extension , hy)
line.set_xy1(ll , lx , ly)
line.set_xy2(ll , extension , ly)
label.set_xy(lbl, extension , ly)
if lvl_daily
mtfphl(pdh , pdl , 'D' , css_d, s_d)
if lvl_weekly
mtfphl(pwh , pwl , 'W' , css_w, s_w)
if lvl_monthly
mtfphl(pmh , pml, 'M' , css_m, s_m)
if lvl_yearly
mtfphl(pyh , pyl , '12M', css_y, s_y)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Market Structure }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method darkcss(color css, float factor, bool bull) =>
blue = color.b(css) * (1 - factor)
red = color.r(css) * (1 - factor)
green = color.g(css) * (1 - factor)
color.rgb(red, green, blue, 0)
method f_line(msDraw d, size, style) =>
var line id = na
var label lbl = na
id := line.new(
d.n
, d.p
, b.n
, d.p
, color = d.css
, width = 1
, style = style
)
if msline.size() >= 250
line.delete(msline.shift())
msline.push(id)
lbl := label.new(
int(math.avg(d.n, b.n))
, d.p
, d.txt
, color = invcol
, textcolor = d.css
, style = d.bull ? label.style_label_down : label.style_label_up
, size = size
, text_font_family = font.family_monospace
)
structure(bool mtf) =>
msDraw drw = na
bool isdrw = false
bool isdrwS = false
var color css = na
var color icss = na
var int itrend = 0
var int trend = 0
bool bull_ob = false
bool bear_ob = false
bool s_bull_ob = false
bool s_bear_ob = false
n = bar_index
var ms up = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms dn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sup = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sdn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
switch show_swing_ms
"All" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, true )
"CHoCH" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, false )
"CHoCH+" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, true )
"BOS" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
"None" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
=> na
switch show_internal_ms
"All" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, true )
"CHoCH" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, false)
"CHoCH+" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, true )
"BOS" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
"None" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
=> na
switch
iH =>
up.p.unshift(b.h )
up.l.unshift(b.h )
up.n.unshift(n )
iL =>
dn.p.unshift(b.l )
dn.l.unshift(b.l )
dn.n.unshift(n )
sL =>
sdn.p.unshift(b.l )
sdn.l.unshift(b.l )
sdn.n.unshift(n )
sH =>
sup.p.unshift(b.h )
sup.l.unshift(b.h )
sup.n.unshift(n )
// INTERNAL BULLISH STRUCTURE
if up.p.size() > 0 and dn.l.size() > 1
if ta.crossover(b.c, up.p.first())
bool CHoCH = na
string txt = na
if itrend < 0
CHoCH := true
switch
not CHoCH =>
txt := "BOS"
css := i_ms_up_BOS
blalert.bos := true
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS
, txt
, true
)
CHoCH =>
dn.l.first() > dn.l.get(1) ? blalert.chochplus : blalert.choch
txt := dn.l.first() > dn.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_up_BOS.darkcss(0.25, true)
if (dn.l.first() > dn.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => bull_ob := true
ob_filter == "BOS" and txt == "BOS" => bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bull_ob := true
itrend := 1
up.n.clear()
up.p.clear()
// INTERNAL BEARISH STRUCTURE
if dn.p.size() > 0 and up.l.size() > 1
if ta.crossunder(b.c, dn.p.first())
bool CHoCH = na
string txt = na
if itrend > 0
CHoCH := true
switch
not CHoCH =>
bralert.bos := true
txt := "BOS"
css := i_ms_dn_BOS
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS
, txt
, false
)
CHoCH =>
if up.l.first() < up.l.get(1)
bralert.chochplus := true
else
bralert.choch := true
txt := up.l.first() < up.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_dn_BOS.darkcss(0.25, false)
if (up.l.first() < up.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => bear_ob := true
ob_filter == "BOS" and txt == "BOS" => bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bear_ob := true
itrend := -1
dn.n.clear()
dn.p.clear()
// SWING BULLISH STRUCTURE
if sup.p.size() > 0 and sdn.l.size() > 1
if ta.crossover(b.c, sup.p.first())
bool CHoCH = na
string txt = na
if trend < 0
CHoCH := true
switch
not CHoCH =>
blalert.swingbos := true
txt := "BOS"
icss := s_ms_up_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS
, txt
, true
)
CHoCH =>
if sdn.l.first() > sdn.l.get(1)
blalert.chochplusswing := true
else
blalert.chochswing := true
txt := sdn.l.first() > sdn.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_up_BOS.darkcss(0.25, true)
if (sdn.l.first() > sdn.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => s_bull_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bull_ob := true
trend := 1
sup.n.clear()
sup.p.clear()
// SWING BEARISH STRUCTURE
if sdn.p.size() > 0 and sup.l.size() > 1
if ta.crossunder(b.c, sdn.p.first())
bool CHoCH = na
string txt = na
if trend > 0
CHoCH := true
switch
not CHoCH =>
bralert.swingbos := true
txt := "BOS"
icss := s_ms_dn_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS
, txt
, false
)
CHoCH =>
if sup.l.first() < sup.l.get(1)
bralert.chochplusswing := true
else
bralert.chochswing := true
txt := sup.l.first() < sup.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_dn_BOS.darkcss(0.25, false)
if (sup.l.first() < sup.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => s_bear_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bear_ob := true
trend := -1
sdn.n.clear()
sdn.p.clear()
= structure(false)
if isdrw
f_line(drw, size.small, line.style_dashed)
if isdrwS
f_line(drw, size.small, line.style_solid)
= request.security("", "15" , structure(true))
= request.security("", "60" , structure(true))
= request.security("", "240" , structure(true))
= request.security("", "1440" , structure(true))
if show_mtf_str
var tab = table.new(position = position.top_right, columns = 10, rows = 10, bgcolor = na, frame_color = color.rgb(54, 58, 69, 0), frame_width = 1, border_color = color.rgb(54, 58, 69, 100), border_width = 1)
table.cell(tab, 0, 1, text = "15" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 2, text = "1H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 3, text = "4H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 4, text = "1D" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 1, 1, text = itrend15 == 1 ? "BULLISH" : itrend15 == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend15 == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend15 == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 2, text = itrend1H == 1 ? "BULLISH" : itrend1H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 3, text = itrend4H == 1 ? "BULLISH" : itrend4H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend4H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend4H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 4, text = itrend1D == 1 ? "BULLISH" : itrend1D == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1D == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1D == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 5, text = "Detected Pattern", text_halign = text.align_center, text_size = size.normal, text_color = color.silver, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 6, text = p.found, text_halign = text.align_center, text_size = size.normal, text_color = na(p.bull) ? color.white : p.bull ? i_ms_up_BOS.darkcss(-0.25, true) : p.bull == false ? i_ms_dn_BOS.darkcss(0.25, false) : na, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.merge_cells(tab, 0, 5, 1, 5)
table.merge_cells(tab, 0, 6, 1, 6)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Strong/Weak High/Low And Equilibrium }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
var phl = Zphl.new(
na
, na
, label.new(na , na , color = invcol , textcolor = i_ms_dn_BOS , style = label.style_label_down , size = size.tiny , text = "")
, label.new(na , na , color = invcol , textcolor = i_ms_up_BOS , style = label.style_label_up , size = size.tiny , text = "")
, true
, true
, true
, true
, ""
, ""
, 0
, 0
, 0
, 0
, high
, low
, 0
, 0
, 0
, 0
, 0
, 0
, na
, na
)
zhl(len)=>
upper = ta.highest(len)
lower = ta.lowest(len)
var float out = 0
out := b.h > upper ? 0 : b.l < lower ? 1 : out
top = out == 0 and out != 0 ? b.h : 0
btm = out == 1 and out != 1 ? b.l : 0
= zhl(sLen)
= zhl(iLen)
upphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
if top
phl.stopcross := true
phl.txtup := top > phl.topy ? "HH" : "HL"
if show_lbl
topl = label.new(
b.n - swing_r_lookback
, top
, phl.txtup
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
line.delete(phl.top )
phl.top := line.new(
b.n - sLen
, top
, b.n
, top
, color = toplvl)
phl.topy := top
phl.topx := b.n - sLen
phl.tup := top
phl.tupx := b.n - sLen
if itop
phl.itopcross := true
phl.itopy := itop
phl.itopx := b.n - iLen
phl.tup := math.max(high, phl.tup)
phl.tupx := phl.tup == high ? b.n : phl.tupx
phl.uV := phl.tup != phl.tup ? b.v : phl.uV
if barstate.islast
line.set_xy1(
phl.top
, phl.tupx
, phl.tup
)
line.set_xy2(
phl.top
, b.n + 50
, phl.tup
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tup
)
dist = math.abs(phl.uV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend < 0
? "Strong High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
dnphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
if btm
phl.sbottomcross := true
phl.txtdn := btm > phl.bottomy ? "LH" : "LL"
if show_lbl
btml = label.new(
b.n - swing_r_lookback
, btm, phl.txtdn
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
line.delete(phl.bottom )
phl.bottom := line.new(
b.n - sLen
, btm
, b.n
, btm
, color = btmlvl
)
phl.bottomy := btm
phl.bottomx := b.n - sLen
phl.tdn := btm
phl.tdnx := b.n - sLen
if ibtm
phl.ibottomcross := true
phl.ibottomy := ibtm
phl.ibottomx := b.n - iLen
phl.tdn := math.min(low, phl.tdn)
phl.tdnx := phl.tdn == low ? b.n : phl.tdnx
phl.dV := phl.tdn != phl.tdn ? b.v : phl.dV
if barstate.islast
line.set_xy1(
phl.bottom
, phl.tdnx
, phl.tdn
)
line.set_xy2(
phl.bottom
, b.n + 50
, phl.tdn
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tdn
)
dist = math.abs(phl.dV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend > 0
? "Strong Low | " + str.tostring(phl.dV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak Low | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
midphl() =>
avg = math.avg(phl.bottom.get_y2(), phl.top.get_y2())
var line l = line.new(
y1 = avg
, y2 = avg
, x1 = b.n - sLen
, x2 = b.n + 50
, color = midlvl
, style = line.style_solid
)
var label lbl = label.new(
x = b.n + 50
, y = avg
, text = "Equilibrium"
, style = label.style_label_left
, color = invcol
, textcolor = midlvl
, size = size.small
)
if barstate.islast
more = (phl.bottom.get_x1() + phl.bottom.get_x2()) > (phl.top.get_x1() + phl.top.get_x2()) ? phl.top.get_x1() : phl.bottom.get_x1()
line.set_xy1(l , more , avg)
line.set_xy2(l , b.n + 50, avg)
label.set_x (lbl , b.n + 50 )
label.set_y (lbl , avg )
dist = math.abs((l.get_y2() - close) / close) * 100
label.set_text (lbl, "Equilibrium (" + str.tostring(math.round(dist,0)) + "%)")
hqlzone() =>
if barstate.islast
var hqlzone dZone = hqlzone.new(
box.new(
na
, na
, na
, na
, bgcolor = color.new(toplvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(midlvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(btmlvl, 70)
, border_color = na
)
, label.new(na, na, text = "Premium" , color = invcol, textcolor = toplvl, style = label.style_label_down, size = size.small)
, label.new(na, na, text = "Equilibrium", color = invcol, textcolor = midlvl, style = label.style_label_left, size = size.small)
, label.new(na, na, text = "Discount" , color = invcol, textcolor = btmlvl, style = label.style_label_up , size = size.small)
)
dZone.pbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)) , phl.tup)
dZone.pbx.set_rightbottom(b.n + 50 , 0.95 * phl.tup + 0.05 * phl.tdn)
dZone.ebx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.525 * phl.tup + 0.475 * phl.tdn)
dZone.ebx.set_rightbottom(b.n + 50 , 0.525 * phl.tdn + 0.475 * phl.tup)
dZone.lbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.95 * phl.tdn + 0.05 * phl.tup)
dZone.lbx.set_rightbottom(b.n + 50 , phl.tdn)
dZone.plb.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tup)
dZone.elb.set_xy( int(b.n + 50) , math.avg(phl.tup, phl.tdn))
dZone.lbl.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tdn)
if show_mtb
upphl (trend)
dnphl (trend)
hqlzone()
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Volumetric Order Block }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method eB(box b, bool ext, color css, bool swing) =>
b.unshift(
box.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, text_font_family = font.family_monospace
, extend = ext ? extend.right : extend.none
, border_color = swing ? color.new(css, 0) : color.new(color.white,100)
, bgcolor = css
, border_width = 1
)
)
method eL(line l, bool ext, bool solid, color css) =>
l.unshift(
line.new(
na
, na
, na
, na
, width = 1
, color = css
, xloc = xloc.bar_time
, extend = ext ? extend.right : extend.none
, style = solid ? line.style_solid : line.style_dashed
)
)
method drawVOB(bool cdn, bool bull, color css, int loc, bool swing) =>
= request.security(
syminfo.tickerid
, ""
,
, lookahead = barmerge.lookahead_off
)
var obC obj = obC.new(
array.new()
, array.new()
, array.new< int >()
, array.new()
, array.new()
, array.new()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new()
, array.new()
, array.new< int >()
)
var obD draw = obD.new(
array.new()
, array.new()
, array.new()
, array.new()
, array.new()
)
if barstate.isfirst
for i = 0 to ob_num - 1
draw.mL .eL(false, false, use_grayscale ? color.new(color.gray, 0) : color.new(css,0))
draw.ob .eB(false, use_grayscale ? color.new(color.gray, 90) : css, swing)
draw.blB.eB(false, css_metric_up , swing)
draw.brB.eB(false, css_metric_dn , swing)
draw.eOB.eB(true , use_grayscale ? color.new(color.gray, 90) : css, swing)
float pos = ob_pos == "Full"
? (bull ? high : low)
: ob_pos == "Middle"
? ohlc4
: ob_pos == "Accurate"
? hl2
: hl2
if cdn
obj.h.clear()
obj.l.clear()
obj.n.clear()
for i = 0 to math.abs((loc - b.n)) - 1
obj.h.push(hH )
obj.l.push(lL )
obj.n.push(b.t )
// obj.h.reverse()
// obj.l.reverse()
int iU = obj.l.indexof(obj.l.min()) + 1
int iD = obj.h.indexof(obj.h.max()) + 1
obj.dir.unshift(
bull
? (b.c > b.o ? 1 : -1)
: (b.c > b.o ? 1 : -1)
)
obj.top.unshift(
bull
? pos
: obj.h.max()
)
obj.btm.unshift(
bull
? obj.l.min()
: pos
)
obj.left.unshift(
bull
? obj.n.get(obj.l.indexof(obj.l.min()))
: obj.n.get(obj.h.indexof(obj.h.max()))
)
obj.avg.unshift(
math.avg(obj.top.first(), obj.btm.first())
)
obj.cV.unshift(
bull
? b.v
: b.v
)
if ob_pos == "Precise"
switch bull
true =>
if obj.avg.get(0) < (b.c < b.o ? b.c : b.o ) and obj.top.get(0) > hlcc4
obj.top.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
false =>
if obj.avg.get(0) > (b.c < b.o ? b.o : b.c ) and obj.btm.get(0) < hlcc4
obj.btm.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
obj.blVP.unshift ( 0 )
obj.brVP.unshift ( 0 )
obj.wM .unshift ( 1 )
if use_overlap
int rmP = use_overlap_method == "Recent" ? 1 : 0
if obj.avg.size() > 1
if bull
? obj.btm.first() < obj.top.get(1)
: obj.top.first() > obj.btm.get(1)
obj.wM .remove(rmP)
obj.cV .remove(rmP)
obj.dir .remove(rmP)
obj.top .remove(rmP)
obj.avg .remove(rmP)
obj.btm .remove(rmP)
obj.left .remove(rmP)
obj.blVP .remove(rmP)
obj.brVP .remove(rmP)
if barstate.isconfirmed
for x = 0 to ob_num - 1
tg = switch ob_mitigation
"Middle" => obj.avg
"Absolute" => bull ? obj.btm : obj.top
for in tg
if (bull ? cC < pt : cC > pt)
obj.wM .remove(idx)
obj.cV .remove(idx)
obj.dir .remove(idx)
obj.top .remove(idx)
obj.avg .remove(idx)
obj.btm .remove(idx)
obj.left .remove(idx)
obj.blVP .remove(idx)
obj.brVP .remove(idx)
if barstate.islast
if obj.avg.size() > 0
// Alert
if bull
? ta.crossunder(low , obj.top.get(0))
: ta.crossover (high, obj.btm.get(0))
switch bull
true => blalert.obtouch := true
false => bralert.obtouch := true
float tV = 0
obj.dV.clear()
seq = math.min(ob_num - 1, obj.avg.size() - 1)
for j = 0 to seq
tV += obj.cV.get(j)
if j == seq
for y = 0 to seq
obj.dV.unshift(
math.floor(
(obj.cV.get(y) / tV) * 100)
)
obj.dV.reverse()
for i = 0 to math.min(ob_num - 1, obj.avg.size() - 1)
dmL = draw.mL .get(i)
dOB = draw.ob .get(i)
dblB = draw.blB.get(i)
dbrB = draw.brB.get(i)
deOB = draw.eOB.get(i)
dOB.set_lefttop (obj.left .get(i) , obj.top.get(i))
deOB.set_lefttop (b.t , obj.top.get(i))
dOB.set_rightbottom (b.t , obj.btm.get(i))
deOB.set_rightbottom(b.t + (b.t - b.t ) * 100 , obj.btm.get(i))
if use_middle_line
dmL.set_xy1(obj.left.get(i), obj.avg.get(i))
dmL.set_xy2(b.t , obj.avg.get(i))
if ob_metrics_show
dblB.set_lefttop (obj.left.get(i), obj.top.get(i))
dbrB.set_lefttop (obj.left.get(i), obj.avg.get(i))
dblB.set_rightbottom(obj.left.get(i), obj.avg.get(i))
dbrB.set_rightbottom(obj.left.get(i), obj.btm.get(i))
rpBL = dblB.get_right()
rpBR = dbrB.get_right()
dbrB.set_right(rpBR + (b.t - b.t ) * obj.brVP.get(i))
dblB.set_right(rpBL + (b.t - b.t ) * obj.blVP.get(i))
if use_show_metric
txt = switch
obj.cV.get(i) >= 1000000000 => str.tostring(math.round(obj.cV.get(i) / 1000000000,3)) + "B"
obj.cV.get(i) >= 1000000 => str.tostring(math.round(obj.cV.get(i) / 1000000,3)) + "M"
obj.cV.get(i) >= 1000 => str.tostring(math.round(obj.cV.get(i) / 1000,3)) + "K"
obj.cV.get(i) < 1000 => str.tostring(math.round(obj.cV.get(i)))
deOB.set_text(
str.tostring(
txt + " (" + str.tostring(obj.dV.get(i)) + "%)")
)
deOB.set_text_size (size.auto)
deOB.set_text_halign(text.align_left)
deOB.set_text_color (use_grayscale ? color.silver : color.new(css, 0))
if ob_metrics_show and barstate.isconfirmed
if obj.wM.size() > 0
for i = 0 to obj.avg.size() - 1
switch obj.dir.get(i)
1 =>
switch obj.wM.get(i)
1 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 1)
-1 =>
switch obj.wM.get(i)
1 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 1)
var hN = array.new(1, b.n)
var lN = array.new(1, b.n)
var hS = array.new(1, b.n)
var lS = array.new(1, b.n)
if iH
hN.pop()
hN.unshift(int(b.n ))
if iL
lN.pop()
lN.unshift(int(b.n ))
if sH
hS.pop()
hS.unshift(int(b.n ))
if sL
lS.pop()
lS.unshift(int(b.n ))
if ob_show
bull_ob.drawVOB(true , ob_bull_css, hN.first(), false)
bear_ob.drawVOB(false, ob_bear_css, lN.first(), false)
if ob_swings
s_bull_ob.drawVOB(true , css_swing_up, hS.first(), true)
s_bear_ob.drawVOB(false, css_swing_dn, lS.first(), true)
if bull_ob
blalert.ob := true
if bear_ob
bralert.ob := true
if s_bull_ob
blalert.swingob := true
if s_bear_ob
blalert.swingob := true
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - FVG | VI | OG }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
ghl() => request.security(syminfo.tickerid, fvg_tf, [high , low , close , open ])
tfG() => request.security(syminfo.tickerid, fvg_tf, )
cG(bool bull) =>
= ghl()
= tfG()
var FVG draw = FVG.new(
array.new()
, array.new()
)
var FVG cords = array.new()
float pup = na
float pdn = na
bool cdn = na
int pos = 2
cc = timeframe.change(fvg_tf)
if barstate.isfirst
for i = 0 to fvg_num - 1
draw.box.unshift(box.new (na, na, na, na, border_color = color.new(color.white, 100), xloc = xloc.bar_time))
draw.ln.unshift (line.new(na, na, na, na, xloc = xloc.bar_time, width = 1, style = line.style_solid))
switch what_fvg
"FVG" =>
pup := bull ? gl : l
pdn := bull ? h : gh
cdn := bull ? gl > h and cc : gh < l and cc
pos := 2
"VI" =>
pup := bull
? (gc > go
? go
: gc)
: (gc > go
? go
: gc )
pdn := bull
? (gc > go
? gc
: go )
: (gc > go
? gc
: go)
cdn := bull
? go > gc and gh > gl and gc > gc and go > go and gh < math.min(gc, go) and cc
: go < gc and gl < gh and gc < gc and go < go and gl > math.max(gc, go) and cc
pos := 1
"OG" =>
pup := bull ? b.l : gl
p
Salim ALHammadi-Telegram @salimalhammadiAuto Trading its show entry price and tp price and sl i hope every one like it