SB TrendSB Trend Strategy Overview
The SB Trend Strategy is a quantitative, trend-following trading system designed to capture strong momentum moves in the stock market. Its primary objective is to optimize trade entries and exits to maximize profits during clear uptrends while limiting risk during market corrections.
Originally adapted from international momentum-based models, the strategy has been customized for the Vietnamese stock market, taking into account its specific conditions such as liquidity trends, volatility, and regulatory environment.
Core Principles
Trend-Focused Trading: The strategy only takes positions in the direction of confirmed market trends, avoiding trades that go against the prevailing direction.
Breakout-Driven Entries: Buy signals are generated when a stock breaks above a predefined price level, usually recent highs over a set lookback period.
Momentum-Based Exits: Positions are closed when momentum indicators indicate signs of trend weakness or potential reversals.
Selective Stock Universe: Trading is limited to stocks with strong liquidity and trading value to ensure efficient execution in the Vietnamese market context.
Penunjuk dan strategi
Higher Timeframe Ghost Candles (Labeled, Thicker)Displays the last three candles of the time frame above.
Time Frames I use:
Weekly
Daily
4h
1h
15m
5m
2m
1m
MACD + RSI + 61 EMA StrategyStrategy Conditions
Timeframe: Works on 5-minute chart
Buy Conditions:
Price is above the 61-period EMA
MACD crossover (MACD line crosses above Signal line) in the positive zone
RSI is above 50
Sell Conditions:
Price is below the 61-period EMA
MACD crossover (MACD line crosses below Signal line) in the negative zone
RSI is below 50
Smart Trendlines Strategy with SL/TP (Hybrid)This is a breakout trading strategy that uses dynamic trendlines based on recent swing highs and lows. Trendlines are sloped using ATR-based volatility to adapt to market conditions. Trades are triggered when price breaks above or below these trendlines, with automatic stop-loss and two take-profit levels based on customizable risk/reward settings. Includes visual signals, labels, and full backtest support.
EMA + CPR Buy/Sell Signalsautomated TradingView Pine Script for generating Buy/Sell signals based on the exact strategy you requested:
20 EMA & 50 EMA crossover
CPR levels (Pivot, Support, Resistance)
Optional: MACD & RSI filters
Custom Session Tracker (KN)**Custom Session Tracker (KN)**
Visually highlight any intraday session’s high, low, and midpoint on your chart with full styling control.
**Description**
Custom Session Tracker (KN) lets you define any trading session (e.g. 09:30–16:00 NY time) and automatically draws:
* A translucent box spanning the session’s High and Low
* A horizontal line marking the session midpoint
All elements update in real time and persist after session close.
**Features**
* **Session Range Box**: Plots from session open through close
* **Mid-Price Line**: Marks the exact midpoint of High/Low
* **Timezone Input**: Aligns session to any GMT offset
* **Custom Colors**: Fill, border, and mid-line colors
* **Line & Border Styles**: Choose solid or dashed
**Inputs**
* **Timezone** – GMT offset for your market
* **Session** – Hours in `HHMM-HHMM` format
* **Fill Color** – Box interior transparency
* **Border Color** – Box outline
* **Box Border Style** – Solid or dashed
* **Midline Color** – Mid-price line color
* **Mid Price Line Style** – Solid or dashed
**How to Use**
1. Add the script to your chart.
2. Set your session hours and timezone.
3. Customize colors and styles.
4. Watch each session’s high, low, and midpoint appear automatically.
Perfect for session-overlap strategies, mean-reversion signals, or simply keeping key levels in view.
EMA + CPR Buy/Sell Signalsautomated TradingView Pine Script for generating Buy/Sell signals based on the exact strategy
20 EMA & 50 EMA crossover
CPR levels (Pivot, Support, Resistance)
Optional: MACD & RSI filters
50-Week High Entry / 40-Week Low Exit StrategyThis is a simple long term strategy
Entry condition : You will enter the market when the stock’s current high exceeds its 50-week high. This condition enables you to identify upward momentum and capitalize on potential price surges.
Exit condition
Conversely, you will exit the market when the stock’s current low drops below its 40-week low. This exit strategy helps protect your capital by ensuring you withdraw from losing positions before further declines in price occur.
This trading strategy relies on the Donchian Channel indicator to monitor the relevant 50-week high and 40-week low levels. Given that this is a weekly trading strategy, all backtesting will be conducted using weekly timeframes.
Multi Moving Average with CustomizationCore Functionality
The indicator allows you to display up to 5 different moving averages on your chart simultaneously.
Each moving average can be fully customized with its own settings.
You can choose between
1. Simple Moving Average (SMA),
2. Exponential Moving Average (EMA)
3. Weighted Moving Average (WMA) types
Multi-Timeframe Support
One standout feature is the ability to display higher timeframe moving averages on lower timeframe charts.
For example, you can show a 200 EMA from the daily chart while viewing a 15-minute chart.
Advanced Visualization Features
The indicator includes several visualization enhancements:
1. MA Cloud - Creates a filled area between any two selected moving averages. The cloud automatically changes color based on which MA is on top - typically green when the faster MA is above (bullish) and red when below (bearish).
2. Golden/Death Cross Detection - Automatically detects and marks important MA crossover events:
* Golden Cross: When a shorter-term MA crosses above a longer-term MA (bullish signal)
* Death Cross: When a shorter-term MA crosses below a longer-term MA (bearish signal)
3. Trend Background - Colors the entire chart background based on whether price is above or below a specified MA, giving a clear visual indicator of the overall trend.
Alert System
The indicator can generate alerts when price crosses above or below any selected moving average. This feature is useful for automated trading signals or notifications, and can be configured to trigger once per bar.
Flexible Architecture
The code uses several programming techniques to maximize flexibility:
* Switch statements for selecting MA types and cloud values
* Conditional logic throughout the code
* Function abstraction for calculating MAs and handling multi-timeframe display
* String identifiers to select which MAs to use for cloud visualization
Unique Technical Aspects
1. The multi-timeframe plotting function solves the common problem of higher timeframe MAs looking distorted on lower timeframe charts.
2. The cloud feature uses string identifiers to select which MAs to use, allowing for any combination.
3. The indicator employs smart conditional logic to handle complex decision trees efficiently.
4. Every visual aspect (colors, line widths, display conditions) is customizable through the settings.
This indicator combines multiple technical analysis tools into a single, highly configurable package that can adapt to different trading styles and timeframes.
Its ability to correctly display higher timeframe MAs on lower timeframe charts makes it particularly valuable for traders who analyze multiple timeframes simultaneously.
Al Brooks Open Quality StatusThis indicator helps traders objectively evaluate the quality of the market open, based on core concepts from Al Brooks’ price action methodology.
It analyzes the most recent bars (default: 18) after the regular session opens at 09:30 ET, to determine whether conditions favor breakout trading or indicate a choppy, range-bound environment that should be avoided.
🔍 How It Works
The algorithm checks:
• ✅ Opening Range Strength – compares price range vs. ATR
• ✅ Small Body Bar % – high % = indecision and poor follow-through
• ✅ Bar Overlap % – tight overlap signals trapped, two-sided price action
• ✅ Optional RTH-only analysis toggle – to focus strictly on the NY session
If all conditions are favorable, the indicator will show:
✅ Good to Trade
If not, it will display:
⚠️ Choppy Conditions or ⏳ Waiting for 09:30 before the session begins.
A color-coded info box in the top-right corner summarizes the current environment.
Opening Range Breakout Detector📈 Opening Range Breakout Detector (TF-Independent)
Tracks breakouts with precision. No matter the chart, no matter the timeframe.
This indicator monitors whether price breaks above or below the Opening Range across multiple key durations — 1m, 5m, 10m, 15m, 30m, 45m, and 60m — using 1-minute data under the hood, while you can work on higher timeframe charts (daily, etc.).
Highlights:
✅ Status table shows which ORs broke UP or DOWN
⏱ Control which timeframes to track
🖼 Customizable table position, size and colors
Crafted by @FunkyQuokka
True OpensTrue Opens: Pinpoint Key Inflection Levels
This indicator plots "True Open" price levels for Monthly, Weekly, Daily, and key intraday Sessions. Unlike generic opens, these are anchored to precise New York kickoff times (e.g., True Month Open from the second Sunday at 18:00 NY).
Especially valuable for Futures traders, these levels frequently act as significant support/resistance, offering clear reference points for your analysis.
Conceptual framework based on Daye's Quarterly Theory.
Auto Session PredictorAuto Session Predictor: Intelligent Market Timing & Forecasting
Unlock the power of session-based trading with the Auto Session Predictor, a sophisticated indicator designed to analyze and forecast potential directional movements based on historical session behavior.
Key Features & Benefits:
Comprehensive Session Tracking: Automatically identifies and visualizes key trading sessions (Pre-Market, Regular Market, After Hours) with customizable start/end times and colors. Optional session range boxes and labels provide clear visual context on your chart.
Intelligent Adaptive Prediction Engine: Goes beyond simple historical averages. Inspired by advanced learning techniques, this indicator analyzes past session data (Volatility, Momentum, Volume, Day of Week patterns) to learn which factors have been most predictive for future session outcomes.
Dynamic Adaptive Weights: A unique feature that constantly evaluates the performance of different factors (Volatility, Momentum, Day of Week) and automatically assigns higher weights to those that have been more successful in predicting market direction, ensuring the prediction model adapts to changing market conditions.
Higher Timeframe Context: Incorporates analysis from a higher timeframe (e.g., Daily) to provide a broader market perspective, adjusting predictions to align with overarching trends and market sentiment.
Predictive Insights: Generates data-driven predictions for the upcoming trading sessions:
Predicts the Regular Market direction based on the preceding Pre-Market session.
Predicts the After Hours direction based on the preceding Regular Market session.
Confidence Scoring: Each prediction comes with a clear confidence score, helping you gauge the reliability of the forecast based on the historical data match.
Visual Signals: Displays clear Bullish (↑), Bearish (↓), or Neutral (→) signals directly on the chart at the end of sessions, based on the prediction and your chosen confidence threshold.
Informative Dashboard: A customizable on-chart dashboard provides a concise summary of:
Current session status (Active/Inactive)
Real-time session momentum
The current prediction (Bullish/Bearish/Neutral) for the next session
The confidence level of that prediction
Key model settings (Training Window, Feature Usage)
Visibility into the dynamically adjusting Adaptive Weights.
Fully Customizable: Tailor the indicator to your specific needs with extensive input options for session times, colors, visual elements, prediction thresholds, feature selection (Vol, Mom, DoW), adaptive weight settings, and dashboard appearance.
The Auto Session Predictor is a powerful tool for traders looking to gain an edge by understanding and anticipating potential directional biases based on proven session dynamics and an intelligent, adaptive prediction model.
UT Bot + Hull MA Confirmed Signal DelayOverview
This indicator is designed to detect high-probability reversal entry signals by combining "UT Bot Alerts" (UT Bot Alerts script adapted from QuantNomad - Originally developed by Yo_adriiiiaan and idea of original code for "UT Bot Alerts" from HPotter ) with confirmation from a Hull Moving Average (HMA) Developed by Alan Hull . It focuses on capturing momentum shifts that often precede trend reversals, helping traders identify potential entry points while filtering out false signals.
🔍 How It Works
This strategy operates in two stages:
1. UT Bot Momentum Trigger
The foundation of this script is the "UT Bot Alerts" , which uses an ATR-based trailing stop to detect momentum changes. Specifically:
The script calculates a dynamic stop level based on the Average True Range (ATR) multiplied by a user-defined sensitivity factor (Key Value).
When price closes above this trailing stop and the short-term EMA crosses above the stop, a potential buy setup is triggered.
Conversely, when price closes below the trailing stop and the short-term EMA crosses below, a potential sell setup is triggered.
These UT Bot alerts are designed to identify the initial shift in market direction, acting as the first filter in the signal process.
2. Hull MA Confirmation
To reduce noise and false triggers from the UT Bot alone, this script delays the entry signal until price confirms the move by crossing the Hull Moving Average (or its variants: HMA, THMA, EHMA) in the same direction as the UT Bot trigger:
A Buy Signal is generated only when:
A UT Bot Buy condition is active, and
The price closes above the Hull MA.
Or, if a UT Bot Buy condition was recently triggered but price hadn’t yet crossed above the Hull MA, a delayed buy is signaled when price finally breaks above it.
A Sell Signal is generated only when:
A UT Bot Sell condition is active, and
The price closes below the Hull MA.
Similarly, a delayed sell signal can occur if price breaks below the Hull MA shortly after a UT Bot Sell trigger.
This dual-confirmation process helps traders avoid premature entries and improves the reliability of reversal signals.
📈 Best Use Cases
Reversal Trading: This strategy is particularly well-suited for catching early trend reversals rather than trend continuations. It excels at identifying momentum pivots that occur after pullbacks or exhaustion moves.
Heikin Ashi Charts Recommended: The script offers a Heikin Ashi mode for smoothing out noise and enhancing visual clarity. Using Heikin Ashi candles can further reduce whipsaws and highlight cleaner shifts in trend direction.
MACD Alignment: For best results, trade in the direction of the MACD trend or use it as a filter to avoid counter-trend trades.
⚠️ Important Notes
Entry Signals Only: This indicator only plots entry points (Buy and Sell signals). It does not define exit strategies, so users should manage trades manually using trailing stops, profit targets, or other exit indicators.
No Signal = No Confirmation: You may see a UT Bot trigger without a corresponding Buy/Sell signal. This means the price did not confirm the move by crossing the Hull MA, and therefore the setup was considered too weak or incomplete.
⚙️ Customization
UT Bot Sensitivity: Adjust the “Key Value” and “ATR Period” to make the UT Bot more or less reactive to price action.
Use Heikin Ashi: Toggle between standard candles or Heikin Ashi in the indicator settings for a smoother trading experience.
The HMA length may also be modified in the indicator settings from its standard 55 length to increase or decrease the sensitivity of signal.
This strategy is best used by traders looking for a structured, logic-based way to enter early into reversals with added confirmation to reduce risk. By combining two independent systems—momentum detection (UT Bot) and trend confirmation (Hull MA)—it aims to provide high-confidence entries without overwhelming complexity.
Let the indicator guide your entries—you manage the exits.
Examples of use:
Futures:
Stock:
Crypto:
As shown in the snapshots this strategy, like most, works the best when price action has a sizeable ATR and works the least when price is choppy. Therefore it is always best to use this system when price is coming off known support or resistance levels and when it is seen to respect short term EMA's like the 9 or 15.
My personal preference to use this system is for day trading on a 3 or 5 minute chart. But it is valid for all timeframes and simply marks a high probability for a new trend to form.
Sources:
Quant Nomad - www.tradingview.com
Yo_adriiiiaan - www.tradingview.com
HPotter - www.tradingview.com
Hull Moving Average - alanhull.com
Supply & Demand (MTF) | Picaspec
Picaspec Supply and Demand Zone Indicator
*A multi-timeframe supply & demand zone detection tool for TradingView*
### 🧠 **Overview**
This indicator is designed to automatically identify and plot **supply and demand zones** across multiple timeframes on any TradingView chart. These zones are key areas where price has previously shown significant buying (demand) or selling (supply) interest — and where future price reactions are highly probable.
It simplifies the application of supply and demand trading concepts by visually marking potential reversal or continuation zones, helping traders spot high-probability trade opportunities with minimal effort.
---
### 🔍 **Key Features**
#### ✅ **Automatic Supply and Demand Zone Detection**
* The indicator identifies **strong price imbalances** based on previous price action.
* It plots **demand zones** where price moved away strongly after a base, indicating buying pressure.
* It plots **supply zones** where price dropped sharply after a base, indicating selling pressure.
* Zones are drawn based on classic supply/demand criteria (drop-base-rally, rally-base-drop, etc.).
#### 🕰️ **Multi-Timeframe Analysis**
* Detects zones from higher timeframes like **1H, 4H, Daily**, etc., and overlays them on lower timeframes.
* This helps traders combine intraday entries with broader context from higher timeframe zones.
#### 🎯 **Refinement and Filtering Options**
* **Mitigated zones** can be hidden or shown — once price revisits a zone, it’s marked as "used."
* **Zone strength** filters allow traders to focus only on the most relevant supply/demand areas.
* Traders can toggle visibility for each timeframe zone to reduce chart clutter.
#### 🎨 **Visual Clarity**
* **Color-coded zones**:
* Green for demand
* Red for supply
* Adjustable transparency and zone thickness.
* Labels for timeframes (e.g., "4H Supply") to clearly show origin.
#### 📐 **Dynamic Updates**
* Zones update in real-time as new supply/demand formations are detected.
* Outdated or invalid zones are removed, keeping charts clean and actionable.
---
### ⚙️ **Customization Options**
* Enable/disable zones by timeframe (e.g., only show Daily + 4H).
* Adjust zone style: color, line style, label visibility.
* Control how long zones remain on the chart after being mitigated.
* Turn on/off alerts when price enters a zone (optional).
---
### 💡 **Use Cases**
* **Swing Trading**: Use Daily and 4H zones for identifying macro-level turning points.
* **Intraday Trading**: Drop to 15m or 1H zones for scalping precise entries inside higher timeframe zones.
* **Confluence Trading**: Combine S\&D zones with price action, break of structure, or candlestick patterns for higher probability trades.
---
### 🧑💼 **Who Is This For?**
* Traders who follow **Supply & Demand** methodology.
* Price action traders looking to automate zone plotting.
* Beginners who want to visually learn how S\&D zones work.
* Advanced traders who need efficient multi-timeframe zone overlays.
Trade PlannerTrade planner - Input capital or No. of shares, entry price, target price, risk % and calculate your profit and risk
Initial Balance | Fib Extensions PROThis indicator plots the Initial Balance (IB) of the day and visualizes key Fibonacci-based extension levels above and below the IB range.
The Initial Balance is defined by the price action between 9:30 AM and 10:30 AM NY time, and serves as a powerful reference zone for identifying breakout moves, failed auctions, and liquidity targets.
Regression Slope ShiftNormalized Regression Slope Shift + Dynamic Histogram
This indicator detects subtle shifts in price momentum using a rolling linear regression approach. It calculates the slope of a linear regression line for each bar over a specified lookback period, then measures how that slope changes from bar to bar.
Both the slope and its change (delta) are normalized to a -1 to 1 scale for consistent visual interpretation across assets and timeframes. A signal line (EMA) is applied to the slope delta to help identify turning points and crossovers.
Key features:
- Normalized slope and slope change lines
- Dynamic histogram of slope delta with transparency based on magnitude
- Customizable colors for all visual elements
- Signal line for crossover-based momentum shifts
This tool helps traders anticipate trend acceleration or weakening before traditional momentum indicators react, making it useful for early trend detection, divergence spotting, and confirmation signals.
Live Signal (Manual OI Trend)Show signal inside TradingView with manual trend override using this Pine Script:
Engulfing Candles [keypoems]Engulfing Candles highlights bullish and bearish engulfing patterns on any chart and lets you study how price has *actually* behaved after they appeared.
WHAT THE INDICATOR SHOWS
• A candle is flagged when its wick sweeps the previous candle’s high (bearish case) or low (bullish case) **and** its close overpowers the prior body.
• For each engulfing candle the script automatically draws –
– **High line** at the engulfed candle’s top.
– **Sweep line** at the extreme that was taken.
– **Low line** at the opposite end of that candle’s body.
– An optional **box** that frames the entire engulfing candle.
– The **open of the next bar** so you can judge expansion.
– Three optional **projection levels** that often act as logical profit targets.
All drawings extend only until price invalidates them, so your chart stays tidy.
WHY THIS MATTERS
A full-length test on hourly data back to 2010 on Nasdaq showed that **more than 90 %** of bullish engulfing candles first reclaimed the engulfed high and roughly **75 %** went on to travel at least half the engulfed range. Similar result was found for the bearish case.
MAIN SETTINGS
• **Time-frame** – run on the chart’s period or pick 1m, 3m, 5m, 15m, 30m, 1h, 4h or Daily.
• **Engulfing box** – toggle the frame, its border, fill opacity, and whether the engulfing candle’s own open should be drawn.
• **Bar color** – optionally tint every bar that sits inside an active engulfing range.
ALERTS
Two non-repainting alert conditions trigger once the higher-time-frame candle closes:
• **Bullish Engulfing Pattern**
• **Bearish Engulfing Pattern**
Use them for notifications or as inputs to other TradingView tools.
GOOD-TO-KNOW
• Patterns are kept in a rolling list capped at 20 to save resources.
• Projection lines update only after the *next* bar opens, preventing premature levels.
• If the data feed cannot supply the requested time-frame, you will see a clear warning instead of partial plots.
DISCLAIMER
This indicator is provided for educational and informational purposes only. It is **not** financial advice, a trading recommendation or a guarantee of future performance. Historical probabilities are descriptive, not predictive; markets change. Always back-test thoroughly and apply sound risk management before risking real capital. Neither the author nor keypoems accepts liability for any losses.
ソーサー疑似2次曲線近似For detecting saucer patterns
Detects smooth chart patterns with curve approximation. Visual confirmation is essential as there are many false positives.