TrendLine ScythesTrendline Scythes is a script designed to automatically detect and draw special curved trendlines, resembling scythes or blades, based on pivotal points in price action. These trendlines adapt to the volatility of the market, providing a unique perspective on trend dynamics.
🔲 Methodology
Traditional trendlines connect consecutive pivot points on a price chart, providing a linear representation of trend direction. However, this script employs a distinctive methodology by automatically detecting price pivots and then calculating special curved trendlines based on the Average True Range (ATR) of the price. This introduces a curvature to the trendlines, resembling scythes, offering a unique way to interpret market trends.
🔲 Auto Breakout and Target Detection
Trendline Scythes includes features for automatic breakout detection, signaling potential trend changes. Additionally, the script assists in target detection, helping traders set realistic and data-driven profit-taking levels based on market volatility and user adjustment.
🔲 Utility
Trend Confirmation - Use Trendline Scythes to confirm existing trends by observing how price interacts with the curved trendlines.
Breakout Signals - Auto-detection of breakouts adds a proactive element to your trading strategy, helping you stay ahead of potential trend reversals.
Target Setting - Utilize the script to set profit-taking targets based on volatility, aligning with the current market conditions.
🔲 Settings
Pivot Length - Swing detection length
Scythe Length - Adjusts the length of the scythes blade
Sensitivity - Controls how restrained the target calculation is, higher values will result in tighter targets.
🔲 Alerts
Breakout
Breakdown
Target Reached
Target Invalidated
As well as the option to trigger 'any alert' call.
Trendline Scythes is a versatile tool combining the benefits of traditional trendlines with the dynamic adaptability of curved lines for a unique approach to trend analysis.
Komut dosyalarını "trendline" için ara
Trendline Breakouts With Volume Strength [TradeDots]Trendline Breakouts With Volume Strength is an innovative indicator designed to identify potential market turning points using pivot-based trendline detection and volume confirmation. By merging dynamic trendline analysis with multi-tiered volume filters, this tool helps traders quickly spot breakouts or breakdowns that may signal significant shifts in price action.
📝 HOW IT WORKS
1. Pivot-Based Trendline Detection
The script automatically scans for recent pivot highs and lows over a user-defined lookback period.
When it finds higher pivot lows, it plots green uptrend lines; when it finds lower pivot highs, it plots red downtrend lines.
These dynamic lines update as new pivots form, providing continuously refreshed trend guidance.
2. Volume Ratio Analysis
A moving average of volume is compared against the current bar’s volume to calculate a ratio (e.g., 1.5×, 2×).
Higher ratios suggest above-average volume, often interpreted as stronger participation.
The script applies color-coded cues to highlight the intensity of volume surges.
3. Breakout & Breakdown Detection
Each trendline is monitored for a defined “break threshold,” which helps avoid minor penetrations that can trigger premature signals.
When price closes beyond a threshold below an uptrend line, the indicator labels it a “BREAKDOWN.” If it closes above a threshold on a downtrend line, it labels it a “BREAKOUT.”
Volume surges accompanying these breaks are highlighted with contextual emojis and distinct color gradients for quick visual reference.
4. Trend Direction Table
A small on-chart table provides a snapshot of the current market trend—Uptrend, Downtrend, or Sideways—based on a simple moving average slope and the number of active uptrend or downtrend lines.
This table also displays quick stats on how many lines are actively tracked, helping traders assess the broader market posture at a glance.
🛠️ HOW TO USE
1. Choose a Timeframe
This script works on multiple timeframes. Intraday traders can monitor minute or hourly charts for frequent pivot updates, while swing and position traders may prefer daily or weekly intervals to reduce noise.
2. Observe Trendlines & Labels
Watch for newly drawn green/red lines connecting pivots.
When you see a “BREAKOUT” or “BREAKDOWN” label, confirm whether volume was abnormally high based on the ratio or color-coded bars.
3. Consult the Trend Table
Use the table in the bottom-right corner to quickly check if the market is trending or range-bound.
Look at the count of active uptrend vs. downtrend lines to gauge broader sentiment.
4. Employ Additional Analysis
Combine these signals with other tools (e.g., candlestick patterns, oscillators, or fundamental analysis).
Validate potential breakouts using standard techniques like retests or support/resistance checks.
❗️LIMITATIONS
Delayed Pivots: Trendlines only adjust once new pivot highs or lows form, which can introduce a slight lag in highly volatile environments.
Choppy Markets: Rapid, back-and-forth price moves may produce conflicting trendline signals and frequent breakouts/breakdowns.
Volume Data Reliability: Gaps in volume data or unusual market conditions (holidays, low-liquidity sessions) can skew ratio readings.
RISK DISCLAIMER
Trading any financial instrument involves substantial risk, and this indicator does not guarantee profits or prevent losses. All signals and visual cues are for educational and informational purposes only; past performance does not assure future outcomes. You retain full responsibility for your trading decisions, including proper risk management, position sizing, and the use of additional confirmation methods. Always consider the possibility of losing some or all of your original investment.
Trendline Breakout Navigator [LuxAlgo]The Trendline Breakout Navigator indicator shows three trendlines, representing trends of different significance between Swing Points.
Dots highlight a Higher Low (HL) or Lower High (LH) that pierces through the Trendline without the closing price breaking the Trendline.
A bar color and background color option is included, which offers insights into the price against the trendlines.
🔶 USAGE
Trendlines (TL) are drawn, starting as a horizontal line from a Swing Point.
When an HL (in the case of a bullish TL) or an LH (bearish TL) is found, this Swing Point is connected to the first Swing Point. In both cases, the TL can be optimized when one or more historical close prices breach the TL (see DETAILS).
A solid-styled long-term trendline represents the overall market direction, while a dashed-styled medium-term trendline captures medium-term movements within the long-term trend. Finally, a dotted-styled short-term trendline tracks short-term fluctuations.
🔹 Swing Points vs. Trend
A "Higher High" (HH) or "Lower Low" (LL) will initialize a new trendline, respectively, starting from the previous "Swing Low" or Swing High".
To spot the trend shift, "HH/LL" labels and an optional background color are included. They can be enabled/disabled or set at "Long, Medium, or Short" term TL (Settings—"MS", "HH/LL" and "Background Color").
These features are linked to one Trendline of choice only.
Where the "HH/LL" labels can show a potential trend shift, the background color is:
Green from the moment the close price breaks above a bearish trendline or when an HH occurs
Red from the moment the close price breaks below a bullish trendline or when an LL occurs
🔹 Bar Color
The bar color will depend on the location of the closing price against the three trendlines. When a trendline is unavailable (for example, if the close price breaks the TL and there is no HH/LL), the last known trendline value will be considered.
All three trendlines influence the bar color.
If the close price is above the "Long Term" TL, the bar color will show a gradient of green, darker when the close price is below the "Medium Term" and/or "Short Term" TLs.
On the other hand, when the close price is below the "Long Term" TL, the bar color will show a gradient of red, which becomes darker when the close price is above the "Medium Term" and/or "Short Term" TLs.
To keep the above example simple, only the "Long Term" TL is considered. The white line (not included in the script) resembles the actual value of the TL at each bar, where you can see the effect on the bar color.
Combined with the trendlines and dots, the bar color can provide extra depth and insights into the underlying trends.
🔹 Tested Trendlines
If a new HL/LH pierces the Trendline without the close price breaking the Trendline, the Trendline will be updated.
The exact location where the price exceeded the Trendline is visualized by a dot, colored blue on a bullish trendline and orange when bearish.
These dots can be indicative of a potential trend continuation or reversal.
🔹 Higher TimeFrame Option
The "Period" setting enables users to visualize higher-timeframe trendlines as long as the line length doesn't exceed 5000 bars.
🔶 DETAILS
When a new trendline is drawn, the script first draws a preliminary line and then checks whether a historical close price exceeded this line above (in the case of a bearish TL) or below (in a bullish case).
Subsequently, the most valid point in between is chosen as the starting point of the Trendline.
🔶 SETTINGS
Period: Choose "chart" for trendlines from the current chart timeframe, or choose a higher timeframe
🔹 Swing Length
Toggle and Swing Length for three trendlines: Period used for the swing detection, with higher values returning longer-term Swing Levels.
🔹 Style
Trendline: color for bullish/bearish Trendline
Wick Dot: color for bullish/bearish trendline test
Term: Long-, medium- or short-term
HH/LL: Show HH/LL labels (with or without previous Swing High/Low) of chosen Term
Background Color: Green when the closing price is above the trendline of choice, red otherwise
Bar Color
BE-TrendLines & Price SentimentsOverview
The trendline is one of the most potent and flexible tools in trading. A rising trendline indicates an upward trend, a falling trendline indicates a downward trend, and a flat trendline indicates a range-bound bond market.
Breakouts, price bounces, and reversal / Retest tactics are all types of trades that may be made using a trendline. Additionally, stop-loss and profit-trailing orders can be based on trendlines as support and resistance levels, appropriately.
Technical Calculations for Trendlines & Price Sentiments:
Pivot points for a specified time frame and the Prevailing High/Low for the most recent bars are used to derive trendlines. While Pivot Points alert us to price movements, High/Low tells us where Bulls and Bears find a middle ground. This provides a remarkable set of conditions from which to extrapolate the efficacy of the Trendlines.
The term "price sensitivity" refers to how much a change in the price of a product causes consumers to alter their purchase habits. It's the relationship between price shifts and shifts in consumer demand. So, for example, if a 30% jump in the cost of a product leads to a 10% drop in purchases, we can conclude that the item has a price sensitivity of 0.33%.
Basis the above theoretical statement, If the underlying asset's price drops, the indicator shall compute data on the amount of volume being pumped (Inflow vs Outflow) into the market (if available), or the percentage by which the price has changed. This will be compared to the recent drop rate to see if the behavior has changed at the similar value zone and non similar value zone. similar calculation shall be done if the price of the underlying rises.
Traders may benefit from hearing about Trendlines in their "Story Telling" form, which we now present. To help you comprehend it better, candles are divided into three Sentiment groups based on their color. Colors: Green (with its shades), Silver, and Red (including its shades). Green signifies a Bullish Trend, Silver a neutral trend, and Red a Brearish Trend.
Bullish Trend
Bearish Trend
Neutral Trend
Sentiment Price Cycle in Trending Market: Green (Directional Bullish), Dark Green (Bullish Trend Loosing its Strength), Silver (Neutral Trend), Red (Directional Bearish), Dark Red (Bearish Trend Loosing its Strength)
Sentiment Price Cycle in RangeBound Market: Green (Over Brought), Silver (Neutral) & Red (Over Sold)
How to Initiate Trade when price is within TL:
Fake Break Out Trade:
BreakDown Trade:
BreakOut Trade:
Couple of Other Features in the Indicator:
Single Alerts = These are the alerts where in, as and when the Event happens Alerts shall the trigerred. like On BreakOut, BreakDown, TouchOf Up TrendLine, TouchOf DownTrendLine, Retest Of Up TrendLine, Retest of DownTrendLine.
Conditional Alerts = These are those type of Alerts where in you can combine 2 or 3 conditions to trigger an Alert. Like
Sample 1 - After Down TL is tested for 3 times, If BreakOut happens and the setiment turns Bullish within 5 Candles.
Sample 2 - After Up TL is tested for 2 times, If Price Bounces backUp from TL and the setiment turns Bullish within 5 Candles.
Similarly you can customize the combination of events for getting the alert.
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
Happy to receive suggestions and feedback in order to improve the performance of the indicator better.
TrendLines MTF [Cometreon]TrendLines MTF is a next-generation indicator designed to automatically detect and plot all relevant trendlines across any symbol and timeframe—including higher ones. Using advanced algorithms, it constantly scans price action and updates the chart in real-time, offering a fast, precise, and dynamic view of market structure.
This tool streamlines market analysis and boosts decision-making by eliminating the need for manual trendline drawing.
🔷 Key Features
🟩 Automatic Plotting
The indicator automatically draws and updates trendlines, providing a real-time overview of market trends.
🟩 Breakout and Bounce Signaling
Provides immediate notifications when a trendline is broken or the price bounces off it, allowing traders to react promptly to market changes.
🟩 Customization
Offers the ability to modify length, touches, colors, and line style to suit individual preferences.
🟩 Information Table
Includes a detailed table showing the values of all active trendlines, facilitating the monitoring of key market points.
🟩 Configurable Alerts
Allows setting custom alerts for breakouts, bounces, or creation of new trendlines.
🔷 Technical Details and Customizable Inputs
Trendline offers a range of customizable inputs that allow adapting the indicator to specific needs:
1️⃣ Trendline Type - Select between active trendlines, broken ones, both, or none.
2️⃣ Left and Right Length - Defines the extension of maximum and minimum points to identify Trendlines.
3️⃣ Timeframe - You can also modify the timeframe of Trendlines to display a higher timeframe.
4️⃣ Confirm at Timeframe - Allows you to confirm the Trendlines using the chart's timeframe instead of the selected one. This checks whether a candle has already broken the line previously.
5️⃣ Delete at Timeframe - Input to remove trendlines based on breakouts with chart candles, instead of using candles of a higher timeframe.
6️⃣ Touch Need - Sets the number of touches needed to confirm a Trendline.
7️⃣ Max Trend Line for Level - Limits the maximum number of Trendlines in a single level.
8️⃣ Extended Line After Break - Option to extend broken Trendlines by a specific value.
9️⃣ Session Range - The "Session Range" offers two options: select a specific date or a period relative to the last candle. The input allows choosing between "Choose" and "Pick Up".
With "Choose", you select a relative period, with two modes:
Last : shows the trendlines of the selected period, compatible with Replay.
Real Time : displays all TrendLines, searching from the last selected period.
Example: "1 Month" with "Last" shows the TrendLines from the previous month, while "Real Time" searches without time limits but uses the values from the last month. This allows defining the search depth of the indicator, crucial for computing power. In case of issues, use "Auto".
1️⃣0️⃣ Trendlines Style - Modify the style for each type of Trendlines (Valid, Break) including color, style, and line thickness.
1️⃣1️⃣ Trends Trendlines - Enable/disable two different trends:
Trend Bar Color : based on TrendLines breakouts. Breaking a bearish TrendLine results in a bullish trend, vice versa for breaking a bullish TrendLine.
Trend Background : based on the number of active TrendLines. For example, if the number of bullish TrendLines is greater than the "Strength", the trend will be bullish.
1️⃣2️⃣ Signal Style - You can enable or disable breakout and bounce signals, with customizable colors for each signal type.
1️⃣3️⃣ Alert - Set notifications for breakouts, bounces, or formation of new Trendlines.
1️⃣4️⃣ Table - Customize the table showing the values of all active trendlines, facilitating the monitoring of key market points. You can modify the appearance of the table, changing the color of cells and text.
These options allow you to optimize the indicator for different trading styles and market conditions, ensuring precise and personalized technical analysis.
🔍 How to Use Trendlines MTF
📌 Market Analysis
Use the displayed Trendlines as critical indicators of market dynamics to make informed trading decisions.
📈 Signal Interpretation
Leverage Trendline breakouts and bounces to identify potential trend changes and trading opportunities.
🛠 Strategy Integration
Use Trendlines and generated signals as a basis for creating personalized and innovative trading strategies.
☄️ With Trendlines, you can simplify your market analysis, saving time and improving the accuracy of your decisions with clearly visualized and customizable Trendlines.
Don't waste any more time and visit the link to get access to all Cometreon indicators.
TrendLine Toolkit w/ Breaks (Real-Time)The TrendLine Toolkit script introduces an innovating capability by extending the conventional use of trendlines beyond price action to include oscillators and other technical indicators. This tool allows traders to automatically detect and display trendlines on any TradingView built-in oscillator or community-built script, offering a versatile approach to trend analysis. With breakout detection and real-time alerts, this script enhances the way traders interpret trends in various indicators.
🔲 Methodology
Trendlines are a fundamental tool in technical analysis used to identify and visualize the direction and strength of a price trend. They are drawn by connecting two or more significant points on a price chart, typically the highs or lows of consecutive price movements (pivots).
Drawing Trendlines:
Uptrend Line - Connects a series of higher lows. It signals an upward price trend.
Downtrend Line - Connects a series of lower highs. It indicates a downward price trend.
Support and Resistance:
Support Line - A trendline drawn under rising prices, indicating a level where buying interest is historically strong.
Resistance Line - A trendline drawn above falling prices, showing a level where selling interest historically prevails.
Identification of Trends:
Uptrend - Prices making higher highs and higher lows.
Downtrend - Prices making lower highs and lower lows.
Sideways (or Range-bound) - Prices moving within a horizontal range.
A trendline helps confirm the existence and direction of a trend, providing guidance in aligning with the prevailing market sentiment. Additionally, they are usually paired with breakout analysis, a breakout occurs when the price breaches a trendline. This signals a potential change in trend direction or an acceleration of the existing trend.
The script adapts this methodology to oscillators and other indicators. Instead of relying on price pivots, which can only be detected in retrospect, the script utilizes a trailing stop on the oscillator to identify potential swings in real-time, you may find more info about it here (SuperTrend toolkit) . We detect swings or pivots simply by testing for crosses between the indicator and its trailing stop.
type oscillator
float o = Oscillator Value
float s = Trailing Stop Value
oscillator osc = oscillator.new()
bool l = ta.crossunder(osc.o, osc.s) => Utilized as a formed high
bool h = ta.crossover (osc.o, osc.s) => Utilized as a formed low
This approach enables the algorithm to detect trendlines between consecutive pivot highs or lows on the oscillator itself, providing a dynamic and immediate representation of trend dynamics.
🔲 Breakout Detection
The script goes beyond trendline creation by incorporating breakout detection directly within the oscillator. After identifying a trendline, the algorithm continuously monitors the oscillator for potential breakouts, signaling shifts in market sentiment.
🔲 Setup Guide
A simple example on one of my public scripts, Z-Score Heikin-Ashi Transformed
🔲 Settings
Source - Choose an oscillator source of which to base the Toolkit on.
Zeroing - The Mid-Line value of the oscillator, for example RSI & MFI use 50.
Sensitivity - Calibrates the Sensitivity of which TrendLines are detected, higher values result in more detections.
🔲 Alerts
Bearish TrendLine
Bullish TrendLine
Bearish Breakout
Bullish Breakout
As well as the option to trigger 'any alert' call.
By integrating trendline analysis into oscillators, this Toolkit enhances the capabilities of technical analysis, bringing a dynamic and comprehensive approach to identifying trends, support/resistance levels, and breakout signals across various indicators.
Trendline Pivots [QuantVue]Trendline Pivots
The Trend Line Pivot Indicator works by automatically drawing and recognizing downward trendlines originating from and connecting pivot highs or upward trendlines originating from and connecting pivot lows.
These trendlines serve as reference points of potential resistance and support within the market.
Once identified, the trend line will continue to be drawn and progress with price until one of two conditions is met: either the price closes(default setting) above or below the trend line, or the line reaches a user-defined maximum length.
If the price closes(default setting) above a down trend line or below an up trend line, an "x" is displayed, indicating the resistance or support has been broken. At the same time, the trend line transforms into a dashed format, enabling clear differentiation from active non-breached trend lines.
This indicator is fully customizable from line colors, pivot length, the number lines you wish to see on your chart and works on any time frame and any market.
Don't hesitate to reach out with any questions or concerns.
We hope you enjoy!
Cheers.
Trendline Cross CountThe Trendline Cross Count indicator is an innovative technical analysis tool that revolutionizes the way traders interact with trendlines. This cutting-edge indicator doesn't just identify trendlines - it quantifies their impact on price action in real-time, providing traders with unprecedented insight into market structure.
Core Functionality:
Trendline Cross Quantification:
At the heart of this indicator is its ability to display the actual number of trendlines being crossed by the current price. The algorithm doesn't just count intersections; it evaluates the significance of each trendline, weighing factors such as trendline duration, number of touch points, and historical reliability.
Dynamic Trendline Generation:
The indicator employs an advanced pivot-based trendline detection system. It continuously scans the chart for significant pivot points and constructs trendlines based on these pivots. The innovation lies in its ability to adapt to changing market conditions, constantly updating its trendline library.
Confluence Analysis:
By tracking multiple trendlines simultaneously, the indicator provides a real-time measure of trendline confluence. This allows traders to identify areas where multiple significant trendlines converge, potentially signaling powerful support or resistance levels.
Key Inputs and Their Significance:
Trendline Source:
This input allows traders to select the price data used for trendline analysis. While the default is the closing price, the flexibility to choose other price points enables traders to tailor the analysis to their specific trading style or market preferences.
Pivot Size:
This crucial parameter defines the lookback period for identifying pivot points. The default value of 3 strikes a balance between sensitivity and reliability, but adjusting this value can dramatically alter the indicator's behavior. Lower values increase sensitivity but may introduce noise, while higher values provide more stable, long-term trendlines.
Pivot Sequence:
This innovative feature allows traders to focus on specific market structures. Options include:
"LL" (Lower Lows): Focuses on downtrends
"HH" (Higher Highs): Emphasizes uptrends
"Any": Provides a comprehensive view of all trendlines
What Makes It Unique:
The Trendline Cross Count indicator stands out due to several groundbreaking features:
Quantitative Trendline Analysis:
While most indicators simply draw trendlines, this tool quantifies their impact, providing a numerical representation of market structure complexity.
Adaptive Pivot Detection:
The indicator's ability to dynamically adjust its pivot detection based on market volatility ensures relevance across all market conditions.
Sequence-Based Filtering:
The unique pivot sequence option allows traders to focus on specific trend types, a feature not found in conventional trendline tools.
Real-Time Confluence Measurement:
By providing a live count of intersecting trendlines, traders gain instant insight into potential support and resistance strength.
Significance Algorithm:
Not all trendlines are created equal. This indicator employs an algorithm to weigh the importance of each trendline, ensuring that the cross count reflects truly significant levels.
This indicator represents a significant advancement in trendline analysis, offering insights that are not readily available through traditional methods. Its ability to quantify trendline interactions in real-time provides traders with a unique edge in understanding market structure and potential price movements. The Trendline Cross Count indicator is not just a tool, but a gateway to a new dimension of technical analysis.
Trendlines_Pro[vn]- This is an indicator for trendline traders
-Pine Script strategy draws pivot points and trendlines on the chart.
-This strategy allows the user to specify the interval to calculate the pivot points and the number of pivot points used to generate the trend lines.
-when an up (or down) trendline is drawn according to the settings in the indicator's settings, that line is support and resistance so we can proceed to make BUY or SELL points according to the support strategy. and resistance
-when the price line breaks above or below the trendline, the price has reversed to the nearest trendline (like the examples in the pictures below.)
-The horizontal lines of the trend line, after being broken, it will form a support or resistance area, and it is likely that the price will retest that area to continue following the broken trend.
Vietnamese
-Đây là chỉ báo dành cho các trader thuộc trường phái phân tích đường xu hướng
-Chiến lược Pine Script vẽ các điểm trục và đường xu hướng trên biểu đồ.
-Chiến lược này cho phép người dùng chỉ định khoảng thời gian tính toán các điểm xoay và số điểm xoay được sử dụng để tạo các đường xu hướng .
-khi đường xu hướng tăng(hoặc giảm) được vẽ ra theo các thiết lập trong cài đặt của chỉ báo,thì đường đó là hỗ trợ,kháng cự để ta có thể tiến hành thực hiện điểm BUY hoặc SELL theo chiến lược hỗ trợ và kháng cự
-khi đường giá mà phá vỡ lên trên hoặc xuống dưới đường xu hướng thì giá đã đảo chiều ngược với đường xu hướng gần nhất (như các ví dụ trong các hình dưới đây.)
-Những đường nằm ngang của đường xu hướng sau khi bị phá vỡ nó sẽ hình thành cho ta là vùng hỗ trợ hoặc kháng cự mà rất có thể giá sẽ kiểm tra lại vùng đó để tiếp tục theo xu hướng bị phá vỡ.
Trendline Breaks with Multi Fibonacci Supertrend StrategyTMFS Strategy: Advanced Trendline Breakouts with Multi-Fibonacci Supertrend
Elevate your algorithmic trading with institutional-grade signal confluence
Strategy Genesis & Evolution
This advanced trading system represents the culmination of a personal research journey, evolving from my custom " Multi Fibonacci Supertrend with Signals " indicator into a comprehensive trading strategy. Built upon the exceptional trendline detection methodology pioneered by LuxAlgo in their " Trendlines with Breaks " indicator, I've engineered a systematic framework that integrates multiple technical factors into a cohesive trading system.
Core Fibonacci Principles
At the heart of this strategy lies the Fibonacci sequence application to volatility measurement:
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval = 0.01, step = 0.01)
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval = 0.01, step = 0.01)
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval = 0.01, step = 0.01)
These precise Fibonacci ratios create a dynamic volatility envelope that adapts to changing market conditions while maintaining mathematical harmony with natural price movements.
Dynamic Trendline Detection
The strategy incorporates LuxAlgo's pioneering approach to trendline detection:
// Pivotal swing detection (inspired by LuxAlgo)
pivot_high = ta.pivothigh(swing_length, swing_length)
pivot_low = ta.pivotlow(swing_length, swing_length)
// Dynamic slope calculation using ATR
slope = atr_value / swing_length * atr_multiplier
// Update trendlines based on pivot detection
if bool(pivot_high)
upper_slope := slope
upper_trendline := pivot_high
else
upper_trendline := nz(upper_trendline) - nz(upper_slope)
This adaptive trendline approach automatically identifies key structural market boundaries, adjusting in real-time to evolving chart patterns.
Breakout State Management
The strategy implements sophisticated state tracking for breakout detection:
// Track breakouts with state variables
var int upper_breakout_state = 0
var int lower_breakout_state = 0
// Update breakout state when price crosses trendlines
upper_breakout_state := bool(pivot_high) ? 0 : close > upper_trendline ? 1 : upper_breakout_state
lower_breakout_state := bool(pivot_low) ? 0 : close < lower_trendline ? 1 : lower_breakout_state
// Detect new breakouts (state transitions)
bool new_upper_breakout = upper_breakout_state > upper_breakout_state
bool new_lower_breakout = lower_breakout_state > lower_breakout_state
This state-based approach enables precise identification of the exact moment when price breaks through a significant trendline.
Multi-Factor Signal Confluence
Entry signals require confirmation from multiple technical factors:
// Define entry conditions with multi-factor confluence
long_entry_condition = enable_long_positions and
upper_breakout_state > upper_breakout_state and // New trendline breakout
di_plus > di_minus and // Bullish DMI confirmation
close > smoothed_trend // Price above Supertrend envelope
// Execute trades only with full confirmation
if long_entry_condition
strategy.entry('L', strategy.long, comment = "LONG")
This strict requirement for confluence significantly reduces false signals and improves the quality of trade entries.
Advanced Risk Management
The strategy includes sophisticated risk controls with multiple methodologies:
// Calculate stop loss based on selected method
get_long_stop_loss_price(base_price) =>
switch stop_loss_method
'PERC' => base_price * (1 - long_stop_loss_percent)
'ATR' => base_price - long_stop_loss_atr_multiplier * entry_atr
'RR' => base_price - (get_long_take_profit_price() - base_price) / long_risk_reward_ratio
=> na
// Implement trailing functionality
strategy.exit(
id = 'Long Take Profit / Stop Loss',
from_entry = 'L',
qty_percent = take_profit_quantity_percent,
limit = trailing_take_profit_enabled ? na : long_take_profit_price,
stop = long_stop_loss_price,
trail_price = trailing_take_profit_enabled ? long_take_profit_price : na,
trail_offset = trailing_take_profit_enabled ? long_trailing_tp_step_ticks : na,
comment = "TP/SL Triggered"
)
This flexible approach adapts to varying market conditions while providing comprehensive downside protection.
Performance Characteristics
Rigorous backtesting demonstrates exceptional capital appreciation potential with impressive risk-adjusted metrics:
Remarkable total return profile (1,517%+)
Strong Sortino ratio (3.691) indicating superior downside risk control
Profit factor of 1.924 across all trades (2.153 for long positions)
Win rate exceeding 35% with balanced distribution across varied market conditions
Institutional Considerations
The strategy architecture addresses execution complexities faced by institutional participants with temporal filtering and date-range capabilities:
// Time Filter settings with flexible timezone support
import jason5480/time_filters/5 as time_filter
src_timezone = input.string(defval = 'Exchange', title = 'Source Timezone')
dst_timezone = input.string(defval = 'Exchange', title = 'Destination Timezone')
// Date range filtering for precise execution windows
use_from_date = input.bool(defval = true, title = 'Enable Start Date')
from_date = input.time(defval = timestamp('01 Jan 2022 00:00'), title = 'Start Date')
// Validate trading permission based on temporal constraints
date_filter_approved = time_filter.is_in_date_range(
use_from_date, from_date, use_to_date, to_date, src_timezone, dst_timezone
)
These capabilities enable precise execution timing and market session optimization critical for larger market participants.
Acknowledgments
Special thanks to LuxAlgo for the pioneering work on trendline detection and breakout identification that inspired elements of this strategy. Their innovative approach to technical analysis provided a valuable foundation upon which I could build my Fibonacci-based methodology.
This strategy is shared under the same Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license as LuxAlgo's original work.
Past performance is not indicative of future results. Conduct thorough analysis before implementing any algorithmic strategy.
TrendLineScalping-BasicDear Traders,
Here is the thought which came to my mind on the trendline break scalping. sometimes during the trade we do plot trendlines and we do anticipate for the line to break and take a trade. with the same thing in mind I had created this basic script to help you and other to create based on the logic used in the script.
This is just a logic based script and doesn't do any kind of wonders. Hence you may use it as necessary.
Regards....
TrendLine ChannelsAbstract
This script provides a set of Trendline Channels which can be tighter than Donchian Channels.
This script computes the most suitable active upper and lower trendlines and updates them as soon as possible.
We can use it for breakout signals earlier than Donchian Channels.
Introduction
Channels are tools which can mark area of values of ranging markets.
Once the price leaves the original region, range traders may start admitting they are wrong and trigger trend.
Donchian Channels (misheard as Dungeon Channels) use the highest and the lowest price to define area of values.
When the price breakouts, it just like it got released from a dungeon.
However, waiting for the price making even higher or lower may be too late and risk reward ratio may be lower.
Trendlines can make the channels tighter and we can find earlier breakout signals.
Computing Trendline Channels
(1) Find the most active trendlines
In this script, a valid trendline connects two high values or two low values.
A high value means the highest value in a trading day.
A low value means the lowest value in a trading day.
In this script, every trendline does not crossover any bar but can exactly touch them.
The most flat trendline is taken. (one for upper and one for lower)
(2) Continue to use or Change a trendline
If there is a tighter trendline available, this script changes to use it.
If the previous active trendline is broken, this script re-computes the trendline available.
When this case happens, this script display with an another color.
Otherwise, this script continues using the previous trendline.
(3) Middle line
The middle line indicates the middle value between the upper and the lower.
Parameters
Length : how many days are used for computation. The default value is 16 just because 16=4*4, using binary characteristic.
x_go_on : If the previous trendline is not breakout and there are no tighter trendlines available, we continue use it.
Color Options
(1) Upper trendline (no update or tighter)
(2) Upper trendline (changed due to breakout)
(3) Middle line
(4) Lower trendline (no update or tighter)
(5) Lower trendline (changed due to breakout)
Conclusion
Trendline Channels can be tighter than Donchian Channels and evaluate earlier breakout signals.
Comparing to known auto trendline scripts, Trendline Channels is continuous.
Once a trendline is broken, Trendline Channels can instantly point out the next available one.
If you think the price movement is boring or you cannot have good risk reward ratio, you can go to an another timeframe.
Reference
How to trade with Donchian Channels
How to trade with Trendlines
TrendLine CrossThis indicator "TrendLine Cross", is designed to plot trend lines so you can spot potential trend reversal points on the charts. The main function is to draw several lines on the chart and identify the crossings between these lines, which can be significant indicators for trading. The lines are based on different periods which can be changed in the settings tabs.
Let's see the characteristics of the trend lines:
_Low Line Color(Green Line): This line connects the lowest point of low prices in the "low_time" period with the lowest point of low prices in the "high_time" period. Indicates a possible short-term support level on the chart.
_Liquidity Up Line Color (Golden Line): This line connects the lowest point of low prices in the "low_time" period with the highest point of low prices in the same period. It represents a liquidity zone and an important resistance in the chart.
_Lower Line Color (Blue Line): This horizontal line connects the lowest point of low prices in the "LowerLine_period" with the lowest point of low prices in the "high_time" period. Indicates a possible long-term support level.
_Upper Line Colorr: This line represents a connection between the highest points of the "high_time" period and the lowest point of the "LowerLine_period". Indicates a possible long-term resistance level.
_Up Line Color (Red Line): This line connects the highest point of high prices in the "high_time" period with the highest point of high prices in the "LowerLine_period". It represents a possible long-term resistance level.
_Liquidity Down Line Color(Golden Line): This line connects the highest point of high prices in the "high_time" period with the highest point of low prices in the "low_time" period. It represents a liquidity point and an important support zone.
The indicator becomes particularly interesting when the lines make crossings. These crossovers could suggest a potential trend change in the market. For example:
Change from Bearish to Bullish: If the "long-term" line (black) crosses the "short- or long-term" line (green or blue) from top to bottom, it could indicate a shift from a bearish to a bullish market , suggesting the opportunity for long positions.
_Changing from Bullish to Bearish: If the "long-term" line (blue) crosses the "short-term" line (red or black) from bottom to top, it could indicate a shift from a bullish to a bearish market, suggesting the opportunity for short positions.
Generally speaking, crossings between these lines can be key points of interest for traders, as they can signal significant changes in price direction.
Trendline Breakouts With Targets [ChartPrime]The Trendline Breakouts With Targets indicator is meticulously crafted to improve trading decision-making by pinpointing trendline breakouts and breakdowns through pivot point analysis.
Here's a comprehensive look at its primary functionalities:
Upon the occurrence of a breakout or breakdown, a signal is meticulously assessed against a false signal condition/filter, after which the indicator promptly generates a trading signal. Additionally, it conducts precise calculations to determine potential target levels and then exhibits them graphically on the price chart.
🔷 Key Features:
🔸 Trendline Drawing: The indicator automatically plots trendlines based on significant pivot points and wick data, visually representing the prevailing trend.
🔸 Breakout and Breakdown Signals : It triggers trading signals when a breakout (price moves above the trendline) or a breakdown (price moves below the trendline) is detected, helping traders identify potential entry points.
🔸 False Breakout/ Breakdown Filter ✔️: To enhance accuracy, the indicator incorporates a filter to reduce false breakout and breakdown signals, helping traders avoid premature entries.
🔸 Target Calculation: The indicator performs target-level calculations, a critical aspect of trade management.
These calculated target levels are visually displayed on the price chart, helping traders set precise profit targets and make well-informed trading decisions.
🔸 Color-Change Labels: The indicator features label color changes to provide quick visual cues. Labels are initially displayed in orange. When a take profit (TP) level is reached, the label changes to green, indicating a successful trade. Conversely, if a stop-loss (SL) level is hit, the label turns red, signaling a losing trade.
🔸 Settings :
This indicator combines technical analysis, trendline identification, breakout/breakdown signals, and risk management tools to assist traders in making more informed and efficient trading decisions. It can be a valuable addition to any trader's toolkit, helping them identify potential trade opportunities and manage risk effectively.
TrendLine + AlertsThe TrendLine + Alerts indicator is an advanced technical analysis tool designed to quickly identify trend direction using various moving averages and RMSD deviation. It dynamically generates buy and sell signals and visually marks entry points with price labels on the chart. Additionally, an optional transaction table can be toggled on or off, displaying buy and sell prices along with the percentage returns of individual trades and an aggregated summary row, facilitating the evaluation of trading strategy performance.
🔧 Key Features:
- Supports multiple moving average types: SMA, EMA, HMA, DEMA, TEMA, RMA, FRAMA
- Dynamic trend analysis based on RMSD deviation, adaptable to current market conditions
- Color-coded trend indication: green for uptrends, red for downtrends
- Alert generation: real-time buy and sell signals (TrendLine BUY / SELL)
- Price labels on the chart for better visualization of entry/exit points
- Interactive settings panel allowing selection of data source (open, close, high, low etc.), adjustable moving average length, and RMSD deviation multiplier
- Optionally displays a dynamic transaction table (toggleable via chart settings) that shows:
- Buy: entry prices
- Sell: exit prices
- Percent: percentage return of each trade, displayed as a number
- A summary row that aggregates the percentage returns, offering a quick evaluation of trading performance
⚙️ Settings:
- Ability to select the data source: open, close, high, low, oc2, hl2, occ3, hlc3, ohlc4, hlcc4
- Adjustable moving average length
- Customizable RMSD deviation multiplier
- Toggle switch to enable or disable the transaction table
🚀 Application:
Ideal for traders seeking an effective method to identify trends and turning points in the market. It is suitable for both short-term day trading and long-term trend analysis, with adjustable settings to suit individual trading strategies.
Tetra Trendline Indicator 2.0This script is designed to help traders visualize and identify potential overbought and oversold conditions in a financial instrument's price chart using four customizable trendlines. It also provides the option to set alerts for these conditions. Users can adjust the input parameters to tailor the indicator's behavior to their trading preferences.
Input Parameters: The script allows users to configure various input parameters to customize the behavior of the indicator. These parameters include:
showTrendlineX: Boolean inputs to control whether to show each of the four trendlines (Trendline 1, Trendline 2, Trendline 3, and Trendline 4).
trendlineColorX: Color inputs to specify the color of each trendline.
trendlineWidthX: Numeric inputs to set the width of each trendline.
trendlineLengthX: Numeric inputs to determine the length of each trendline.
alertOnTrendlineXBreak: Boolean inputs to enable or disable alerts for each trendline when they are breached.
Trendline Calculations: The script calculates the coordinates for each of the four trendlines. It does this by identifying the starting and ending points of each trendline based on user-defined parameters and the highest or lowest price levels within a specified length.
Plotting Trendlines: The script uses the plot function to display the calculated trendlines on the price chart. It also fills the area between the trendlines to visually emphasize the region.
Alert Conditions: The script defines alert conditions for each trendline. Alerts are triggered when certain price conditions are met:
Trendline 1: An alert is triggered when the price crosses above the Trendline 1 (indicating overbought conditions).
Trendline 2: An alert is triggered when the price crosses below the Trendline 2 (indicating oversold conditions).
Trendline 3: Similar to Trendline 1, an alert is triggered when the price crosses above Trendline 3 (overbought).
Trendline 4: Similar to Trendline 2, an alert is triggered when the price crosses below Trendline 4 (oversold).
Dynamic Touch Trendlines [QuantVue]The Dynamic Touch Trendlines (DTT) indicator automatically draws and manages trendlines on your chart, helping traders identify key support and resistance levels.
What sets the DTT indicator apart from other trendline indicators is its ability to let traders customize the number of touches required to validate a trendline. This flexibility allows you to fine-tune the indicator for different markets or trading styles, ensuring only strong trendlines with the specified number of touches are considered valid.
This indicator features both uptrend lines (drawn from pivot lows) and downtrend lines (drawn from pivot highs), making it suitable for detecting bullish and bearish trends.
An uptrend line connects three (default setting) or more significant lows, showing where price has historically found support. Traders often look for price to bounce off this line during pullbacks in an uptrend.
When price breaks below an uptrend line, it suggests a weakening of the bullish trend. This could mean that buyers are losing strength, and the market may be transitioning into a bearish phase, providing a potential opportunity for traders to enter short positions or exit long positions.
Conversely, a downtrend line connects three (default setting) or more significant highs, indicating potential resistance in a downtrend. Price action below this line can signal continued bearish momentum.
When price breaks above a downtrend line, it indicates a potential reversal of the bearish trend. This can signal the end of selling pressure and the beginning of a new bullish phase, offering traders a potential opportunity to enter long positions.
Key settings:
Minimum Touches: This sets the number of price touches required to validate a trendline. Increasing the minimum touches filters out weaker trends, ensuring that only more reliable trendlines are drawn.
Buffer: The buffer is used to account for minor price overshoots or near misses relative to the trendline. It creates a margin around the trendline, allowing price to come close to the line—whether it overshoots slightly or falls just short—and still count as a valid touch. This helps ensure that small price fluctuations or market noise don’t prevent valid trendline touches from being recognized, making the trendlines more reliable.
Trendline Break Source: Allows traders to define how a trendline is considered broken—either based on the close of the price bar or the wicks (highs and lows) of the price action.
The DTT indicator also features alerts whenever a new trendline is detected or an existing trendline is broken!
MTF Trendlines on chart_Pro[vn]Hello Traders .
👉This is an indicator of the trendlines in the analysis series with my trendlines.
- It statistics the upper and lower trend lines of the current Time Frame.
- Pine Script strategy draws pivot points and trendlines on the chart.
- This strategy allows the user to specify the interval to calculate the pivot points and the number of pivot points used to generate the trend lines.
- In the process of trading with the trendline, I see different timeframes showing each trendline differently, many times the trendline in the 15m frame has been broken but I don't know where the price is going, and it takes a lot of time to find support points, resistance to entry or take profit, So I came up with the idea of drawing different timeframes on the same chart in a specified timeframe, and I found it shortened the time to find support and resistance points in trading without having to switch back and forth between timeframes.
- For example, when the H1 trendline breaks downwards, we can determine a high probability that the price will be supported by the trendlines below it. for us to find entry points or exit orders effectively. Or when the price breaks the H1 trendline to go up, the chart shows us the trend lines above that broken H1 line so that we have a more effective entry or take profit point because it is a resistance zone....
- It can shows 7 pairs of trendlines during different times in the chart.
- each timeframe will display two trendlines, one up, and one down.When the price crosses a trendline, only one valid trendline is displayed, while the line crossed is not displayed.
- The upper trendline (down trend) is a red horizontal line, with the timeframe name and the value of its trendline, for example 4H(1.234) means timeframe = H4, the current value of the trendline is 1.234.
- The trendline below (up trend) is the blue horizontal line that also represents the same value as the line above.
- In the Settings section, up to 6 different timeframes can be selected to display those trendlines on the chart.
- Small timeframes such as m1, m3, m5 or D1 I leave the default (cannot be changed) in the 'Length' setting = 50, timeframe is H6, H8, H12 'Length' = 30, the rest of the time can be changed, the default is 20 ...
- Some cases I have applied with this indicator to look for entry points and take profit ...
Xin chào Trader Việt nam.
- Đây là chỉ báo về các đường xu hướng trendline trong chuỗi phân tích với đường xu hướng của tôi. Chỉ báo này là muti trendlines trên biểu đồ , nó hiển thị được tối da 7 cặp đường xu hướng trong các thời gian khác nhau trên 1 biểu đồ.Dựa vào đó các trader có cái nhìn trực quan nhất không phải thay đổi qua lại các thời gian để tìm các đường trendlines, và có thể tìm được những cú hồi hoặc phá ngưỡng để vào lệnh hoặc chốt lời .
- Thực ra trong quá trình giao dịch với đường xu hướng, tôi thấy các khung thời gian khác nhau thì hiển thị mỗi đường xu hướng khác nhau, nhiều khi đường xu hướng trong khung 15m đã bị phá nhưng không biết giá đi đến đâu, và mất rất nhiều thời gian để tìm các điểm hỗ trợ, kháng cự để vào lệnh hoặc chốt lời, nên tôi nảy ra ý tưởng vẽ ra các khung thời gian khác nhau trên cùng 1 biểu đồ trong một khung thời gian được chỉ định, và tôi thấy rút ngắn được thời gian để tìm các điểm hõ trợ , kháng cự trong giao dịch mà không cần phải chuyển qua lại giữa các khung thời gian .
- Chẳng hạn ,khi đường xu hướng H1 bị phá vỡ xuống dưới thì ta có thể xác định được khả năng cao giá sẽ được hỗ trợ bởi những đường xu hướng bên dưới nó. để ta tìm điểm vào lệnh hoặc thoát lệnh cho hiệu quả.Hoặc khi giá phá vỡ đường xu hướng H1 để đi lên , thì trên biểu đồ đã hiện cho ta các đường trendline bên trên đường H1 bị phá vỡ đó để ta có điểm vào hoặc chốt lời hiệu quả hơn vì đó là vùng kháng cự....
- Đường xu hướng bên trên(down trend) là đường kẻ ngang màu đỏ ,có kèm tên timeframe và giá trị của đường xu hướng của nó,ví dụ 4H(1.234) nghĩa là timeframe=4H, giá trị hiện tại đường trendline là 1.234.
- Đường xu hướng bên dưới (up trend) là đường ngang màu xanh cũng thể hiện giá trị như đường bên trên.
- Các timeframe nhỏ như 1m, 3m, 5m hoặc 1D tôi để mặc định (không thay đổi được) trong setting mục 'Length' = 50, timeframe là 6H,8H,12H 'Length' = 30, các thời gian còn lại có thể thay đổi được ,mặc định là 20
- Để điều chỉnh có thể vào setting để thiết lập các thời gian theo nhu cầu.
Auto AI Trendlines [TradingFinder] Clustering & Filtering Trends🔵 Introduction
Auto AI trendlines Clustering & Filtering Trends Indicator, draws a variety of trendlines. This auto plotting trendline indicator plots precise trendlines and regression lines, capturing trend dynamics.
Trendline trading is the strongest strategy in the financial market.
Regression lines, unlike trendlines, use statistical fitting to smooth price data, revealing trend slopes. Trendlines connect confirmed pivots, ensuring structural accuracy. Regression lines adapt dynamically.
The indicator’s ascending trendlines mark bullish pivots, while descending ones signal bearish trends. Regression lines extend in steps, reflecting momentum shifts. As the trend is your friend, this tool aligns traders with market flow.
Pivot-based trendlines remain fixed once confirmed, offering reliable support and resistance zones. Regression lines, adjusting to price changes, highlight short-term trend paths. Both are vital for traders across asset classes.
🔵 How to Use
There are four line types that are seen in the image below; Precise uptrend (green) and downtrend (red) lines connect exact price extremes, while Pivot-based uptrend and downtrend lines use significant swing points, both remaining static once formed.
🟣 Precise Trendlines
Trendlines only form after pivot points are confirmed, ensuring reliability. This reduces false signals in choppy markets. Regression lines complement with real-time updates.
The indicator always draws two precise trendlines on confirmed pivot points, one ascending and one descending. These are colored distinctly to mark bullish and bearish trends. They remain fixed, serving as structural anchors.
🟣 Dynamic Regression Lines
Regression lines, adjusting dynamically with price, reflect the latest trend slope for real-time analysis. Use these to identify trend direction and potential reversals.
Regression lines, updated dynamically, reflect real-time price trends and extend in steps. Ascending lines are green, descending ones orange, with shades differing from trendlines. This aids visual distinction.
🟣 Bearish Chart
A Bullish State emerges when uptrend lines outweigh or match downtrend lines, with recent upward momentum signaling a potential rise. Check the trend count in the state table to confirm, using it to plan long positions.
🟣 Bullish Chart
A Bearish State is indicated when downtrend lines dominate or equal uptrend lines, with recent downward moves suggesting a potential drop. Review the state table’s trend count to verify, guiding short position entries. The indicator reflects this shift for strategic planning.
🟣 Alarm
Set alerts for state changes to stay informed of Bullish or Bearish shifts without constant monitoring. For example, a transition to Bullish State may signal a buying opportunity. Toggle alerts On or Off in the settings.
🟣 Market Status
A table summarizes the chart’s status, showing counts of ascending and descending lines. This real-time overview simplifies trend monitoring. Check it to assess market bias instantly.
Monitor the table to track line counts and trend dominance.
A higher count of ascending lines suggests bullish bias. This helps traders align with the prevailing trend.
🔵 Settings
Number of Trendlines : Sets total lines (max 10, min 3), balancing chart clarity and trend coverage.
Max Look Back : Defines historical bars (min 50) for pivot detection, ensuring robust trendlines.
Pivot Range : Sets pivot sensitivity (min 2), adjusting trendline precision to market volatility.
Show Table Checkbox : Toggles display of a table showing ascending/descending line counts.
Alarm : Enable or Disable the alert.
🔵 Conclusion
The multi slopes indicator, blending pivot-based trendlines and dynamic regression lines, maps market trends with precision. Its dual approach captures both structural and short-term momentum.
Customizable settings, like trendline count and pivot range, adapt to diverse trading styles. The real-time table simplifies trend monitoring, enhancing efficiency. It suits forex, stocks, and crypto markets.
While trendlines anchor long-term trends, regression lines track intraday shifts, offering versatility. Contextual analysis, like price action, boosts signal reliability. This indicator empowers data-driven trading decisions.
Auto TrendLines [TradingFinder] Support Resistance Signal Alerts🔵 Introduction
The trendline is one of the most essential tools in technical analysis, widely used in financial markets such as Forex, cryptocurrency, and stocks. A trendline is a straight line that connects swing highs or swing lows and visually indicates the market’s trend direction.
Traders use trendlines to identify price structure, the strength of buyers and sellers, dynamic support and resistance zones, and optimal entry and exit points.
In technical analysis, trendlines are typically classified into three categories: uptrend lines (drawn by connecting higher lows), downtrend lines (formed by connecting lower highs), and sideways trends (moving horizontally). A valid trendline usually requires at least three confirmed touchpoints to be considered reliable for trading decisions.
Trendlines can serve as the foundation for a variety of trading strategies, such as the trendline bounce strategy, valid breakout setups, and confluence-based analysis with other tools like candlestick patterns, divergences, moving averages, and Fibonacci levels.
Additionally, trendlines are categorized into internal and external, and further into major and minor levels, each serving unique roles in market structure analysis.
🔵 How to Use
Trendlines are a key component in technical analysis, used to identify market direction, define dynamic support and resistance zones, highlight strategic entry and exit points, and manage risk. For a trendline to be reliable, it must be drawn based on structural principles—not by simply connecting two arbitrary points.
🟣 Selecting Pivot Types Based on Trend Direction
The first step is to determine the market trend: uptrend, downtrend, or sideways.
Then, choose pivot points that match the trend type :
In an uptrend, trendlines are drawn by connecting low pivots, especially higher lows.
In a downtrend, trendlines are formed by connecting high pivots, specifically lower highs.
It is crucial to connect pivots of the same type and structure to ensure the trendline is valid and analytically sound.
🟣 Pivot Classification
This indicator automatically classifies pivot points into two categories :
Major Pivots :
MLL : Major Lower Low
MHL : Major Higher Low
MHH : Major Higher High
MLH : Major Lower High
These define the primary structure of the market and are typically used in broader structural analysis.
Minor Pivots :
mLL: minor Lower Low
mHL: minor Higher Low
mHH: minor Higher High
mLH: minor Lower High
These are used for drawing more precise trendlines within corrective waves or internal price movements.
Example : In a downtrend, drawing a trendline from an MHH to an mHH creates structural inconsistency and introduces noise. Instead, connect points like MHL to MHL or mLH to mLH for a valid trendline.
🟣 Drawing High-Precision Trendlines
To ensure a reliable trendline :
Use pivots of the same classification (Major with Major or Minor with Minor).
Ensure at least three valid contact points (three touches = structural confirmation).
Draw through candles with the least deviation (choose wicks or bodies based on confluence).
Preferably draw from right to left for better alignment with current market behavior.
Use parallel lines to turn a single trendline into a trendline zone, if needed.
🟣 Using Trendlines for Trade Entries
Bounce Entry: When price approaches the trendline and shows signs of reversal (e.g., a reversal candle, divergence, or support/resistance), enter in the direction of the trend with a logical stop-loss.
Breakout Entry: When price breaks through the trendline with strong momentum and a confirmation (such as a retest or break of structure), consider trading in the direction of the breakout.
🟣 Trendline-Based Risk Management
For bounce entries, the stop-loss is placed below the trendline or the last pivot low (in an uptrend).
For breakout entries, the stop-loss is set behind the breakout candle or the last structural level.
A broken trendline can also act as an exit signal from a trade.
🟣 Combining Trendlines with Other Tools (Confluence)
Trendlines gain much more strength when used alongside other analytical tools :
Horizontal support and resistance levels
Moving averages (such as EMA 50 or EMA 200)
Fibonacci retracement zones
Candlestick patterns (e.g., Engulfing, Pin Bar)
RSI or MACD divergences
Market structure breaks (BoS / ChoCH)
🔵 Settings
Pivot Period : This defines how sensitive the pivot detection is. A higher number means the algorithm will identify more significant pivot points, resulting in longer-term trendlines.
Alerts
Alert :
Enable or disable the entire alert system
Set a custom alert name
Choose how often alerts trigger (every time, once per bar, or on bar close)
Select the time zone for alert timestamps (e.g., UTC)
Each trendline type supports two alert types :
Break Alert : Triggered when price breaks the trendline
React Alert : Triggered when price reacts or bounces off the trendline
These alerts can be independently enabled or disabled for all trendline categories (Major/Minor, Internal/External, Up/Down).
Display :
For each of the eight trendline types, you can control :
Whether to show or hide the line
Whether to delete the previous line when a new one is drawn
Color, line style (solid, dashed, dotted), extension direction (e.g., right only), and width
Major lines are typically thicker and more opaque, while minor lines appear thinner and more transparent.
All settings are designed to give the user full control over the appearance, behavior, and alert system of the indicator, without requiring manual drawing or adjustments.
🔵 Conclusion
A trendline is more than just a line on the chart—it is a structural, strategic, and flexible tool in technical analysis that can serve as the foundation for understanding price behavior and making trading decisions. Whether in trending markets or during corrections, trendlines help traders identify market direction, key zones, and high-potential entry and exit points with precision.
The accuracy and effectiveness of a trendline depend on using structurally valid pivot points and adhering to proper market logic, rather than relying on guesswork or personal bias.
This indicator is built to solve that exact problem. It automatically detects and draws multiple types of trendlines based on actual price structure, separating them into Major/Minor and Internal/External categories, and respecting professional analytical principles such as pivot type, trend direction, and structural location.
{20}Dashboard Trendlines & Wedge_Pro[vn]This is a script about 20 trading pairs with trendline.
-on each chart of a trading pair, there is only one trendline pair: 1 uptrendline and 1 downtrendline
-so when the statistics on the table also show the column of the uptrend and the column of the downtrend
-When the price approaches any trendline but the ratio is 1%, that trendline will be colored blue (downtrend), red (uptrend)
The column ✎ T.line-trendline above(✐ T.line-trendline below) is the value of the current trendline compared to the closing price of the candle
The ══════\n\𝖗𝖊𝖘𝖎𝖘𝖙𝖆𝖓(𝖘𝖚𝖕𝖕𝖔𝖗𝖙\n\══════) column when the price breaks will show ➊ (the is the first candle) and the percentage value when breaking through the point of the trendline.
Especially when a candle has closed above the trendline (assuming an uptrend), then from the 2nd tree to the current , it will count according to memory so that traders know when the price broke, and how many candles already.
The parameter when breaking is displayed < 10, it means that the price has broken through 10 candles, and the first 10 candles are colored yellow, then the color returns to normal.
In addition, when displaying 3 parameters as above, the next column (above/below T.line) will display the percentage from when the price breaks that point to the current price of the candle.
Wedge column is when the price is stuck between the upper and lower trendlines, if the sharp angle ratio is <=10%, the new column will show the value (and the text color is white) until it breaks to the bottom. 1 direction is left is hidden
Price column is the current price of the candle and the parameter 20:2 is the length of the trendline and to combine the same parameter with the indicator "Trendlines_pro "
You can change the time in Resolution indicator settings to show multiple time display the same cell as the price cell
The up arrow icons 🡹 represent the price broke upwards , the down arrows 🡻 represent the price broke below
------------------------------------------------------------------------------------------------------------------------------------------------------
Vietnamese
Đây là script về bảng thống kê 20 cặp giao dịch với đường trendline .
-trên mỗi biểu đồ của cặp giao dịch chỉ tồn tại duy nhất 1 cặp trendline là: 1trendline tăng và 1 trendline giảm
-vì vậy khi thống kê trên bảng cũng hiển thị cột của trend tăng và cột của trend giảm
-khi giá tiến gần đến 1 đường trendline bất kì mà tỉ lệ còn 1% thì đường trendline đó tô màu xanh(trend giảm) ,màu đỏ(trend tăng)
-cột ✎ T.line-đường trendline bên trên(✐ T.line-đường trendline bên dưới) là giá trị của đường trendline hiện tại so với giá đóng cửa của nến
-cột ══════\n\𝖗𝖊𝖘𝖎𝖘𝖙𝖆𝖓(𝖘𝖚𝖕𝖕𝖔𝖗𝖙\n\══════) khi giá phá vỡ sẽ thể thiện ➊(tức là cây nến đầu tiên) và giá trị phần trăm khi phá qua điểm của trendline.
-đặc biệt khi 1 cây nến đã đóng cửa trên đường trendline(giả sử trend tăng) thì từ cây thứ 2 đến hiện tại nó sẽ đếm theo bộ nhớ để các trader biết được giá đã phá khi nào,và qua bao nhiêu nến rồi.
-thông số khi phá vỡ hiển thị < 10 thì hiểu là giá đã phá vỡ qua 10 nến, và 10 nến đầu tiên được tô màu vàng ,sau đó màu trở lại trạng thái bình thường
-ngoài ra khi hiện thông số như trên thì cột bên cạnh (above/below T.line) sẽ hiển thị được số phần trăm tính từ khi giá phá vỡ điểm đó đến giá hiện tại của cây nến.
-cột Wedge(cái nêm) là khi giá đang bị kẹt giữa 2 đường trendline trên và dưới ,nếu tỷ lệ góc nhọn <=10% thì cột đó mới hiện giá trị (và màu chữ là trắng) cho đến khi phá vỡ về 1 hướng nào đó còn lại là bị ẩn
-cột giá là giá hiện tại của nến và thông số 20:2 là độ dài đường trendline và để kết hợp cùng thông số với chỉ báo "Trendlines_pro "
-các bạn có thể thay đổi thời gian trong cài đặt chỉ báo Resolution để hiển thị nhiều cung thời gian hiển thị cùng ô với ô giá
-các biểu tượng mũi tên lên 🡹 thể hiện giá phá vỡ lên trên ,mũi tên xuống 🡻 thể hiện giá đã phá vỡ xuống dưới
Cảm ơn mọi người đã quan tâm và tin dùng
MTF Trendlines_Pro[vn]-This is an indicator for trendline traders
-it statistics the upper and lower trend lines of the Multi Time Frame.
-Pine Script strategy draws pivot points and trendlines on the chart.
-This strategy allows the user to specify the interval to calculate the pivot points and the number of pivot points used to generate the trend lines.
-I use the "Trendlines_Pro " indicator to interpret the indicator "MTF trendlines_Pro " indicator for everyone to understand
-time frames are selected in settings like 1m,3m,15m,1h,2h,4h,6h,12h,1D.1W.1Month..
-If the price is in a wedge pattern, it is represented by the upper and lower parameters, the upper parameter is the resistance point of the upper trendline,the lower parameter is the support point of the below trendline
-when the price distance is <=1% from the trendline, the upper or lower parameter is colored blue (above) or red (below).
-when only the parameter is accompanied by the ⇗ or ⇘. symbol, it tells us that the price has not broken the corresponding trend line
-when showing green heart and % break .indicates that the price has broken the downtrend line to become an uptrend.
On the contrary, the red heart % breaks, it signals us to break the uptrend line to become a downtrend
-when showing parameters 12(1)|18(2)|20(3) and green heart, then :(3) shows that the price has broken out before 20 candles, (2) shows that there are 18 candles to close above The breakout point, (1) represents the last 12 candles that closed above the breakout point and as if a nice uptrend has occurred because 98% of the candles have closed above the breakout point....the opposite of The red heart is the price that broke below the trendline below.
-"MTF trendlines_Pro "indicator is integrated for both the trendline of the price line and the RSI. You can change it in the settings as shown below.
----------------------------------------------------------------------------
vietnamese
-Đây là chỉ báo dành cho các trader thuộc trường phái phân tích đường xu hướng
-nó thống kê các đường xu hướng trên và dưới của Multi Time Frame.
-Chiến lược Pine Script vẽ các điểm trục và đường xu hướng trên biểu đồ.
-Chiến lược này cho phép người dùng chỉ định khoảng thời gian tính toán các điểm xoay và số điểm xoay được sử dụng để tạo các đường xu hướng .
-tôi có dùng chỉ báo trendline_pro dùng để diễn giải chỉ báo MTF trendlines_pro cho mọi người dễ hiểu
-các khung thời gian được lựa chọn trong cài đặt như 1m,3m,15m,1h,2h,4h,6h,12h,....
-Nếu giá đang trong mô hình cái nêm thì được thể hiện bằng tham số trên và tham số dưới, tham số trên là điểm kháng cự của đường xu hướng bên trên,tham số dưới là điểm hỗ trợ của đường xu hướng bên dưới
-khi giá cách đường xu hướng <=1% thì tham số trên hoặc dưới được tô màu xanh (trên) hoặc đỏ(dưới)
-khi chỉ có tham số kèm theo biểu tượng ⇗ or ⇘.thì cho ta biết là giá chưa phá vỡ được đường xu hướng tương ứng
-khi hiện trái tim xanh và % phá vỡ .báo hiệu cho ta biết giá đã phá vỡ đường xu hướng giảm trở thành xu hướng tăng.
ngược lại trái tim đỏ % phá vỡ thì báo hiệu cho ta phá vỡ đường xu hướng tăng trở thành xu hướng giảm
-khi hiện thông số 12(1)|18(2)|20(3) và trái tim xanh thì :(3) thể hiện giá đã phá vỡ trước đó 20 nến,(2) thể hiện có 18 cây nến đóng cửa trên điểm phá vỡ,(1) thể hiện có 12 nến gần nhất đóng cửa trên điểm phá vỡ và như vạy xu hướng tăng đẹp đã xảy ra vì chiếm đến 98% nến đã đóng cửa trên điểm phá vỡ....ngược lại với trái tim đỏ là giá đã đột phá xuống dưới đường xu hướng bên dưới
-chỉ báo MTF trendlines_pro được tích hợp chung cho cả trendline của đường giá và RSI .các bạn có thể thay đổi trong phần cài đặt như hình bên dưới.
Cloud Trendlines_Pro[vn]👉Hello Trader .
- This is the Kumo cloud trendline indicator (taken from the indicator) in my "trendline analysis" series.
- On the chart of this indicator, there is only 1 pair of trendlines that are closest to the clouds: 1 uptrend line and 1 downtrend line.
- Actually in the process of trading with the trendline of the price I see the price undulating and sometimes the trendline of the price has been broken but also not sure if the price is a real break or a fake break, from which I came up with the idea to include the Ichimoku indicator for analysis. The Ichimoku indicator gives a good "Long" signal when the price breaks above the Kumo cloud and an uptrend when the price is still above the cloud (mathematical formula for creating the cloud of the Kumo cloud). Ichimoku I won't repeat it again), from here I have studied the trend line of the Kumo cloud. Because when the cloud goes up, the price increases, when the cloud goes down, the price decreases, So when the clouds begin to flatten and If the cloud shows signs of crossing its trendline, it is a signal of trend reversal or continuation of the previous trend.
- So, when combining 2 trend lines: price trendline and cloud trendline, it allows me to filter false breakout price signals and give a stoploss very effectively, especially effective with 5m frames. ,15m to create a new trend.
- The best entry signal is when the 2 trendlines are parallel and tend to cluster and the "price candle" breaks the 2 trend lines of the price and the cloud at the same time (it is possible that the price reacts at this point a few candles). ).if in a small time frame we can enter the "Market" order, and on the H1 frame or higher, we can still enter the "Market" order or wait for the retest of these 2 trend lines to place an order.
- If only one of the above 2 trend lines is displayed, the trader can ignore it.
- This cloud trendline method is very effective when the price is in the sideway, the price is bumpy (can't draw the trendline of the price)...but look at the trendline of the cloud if the cloud breaks its trendline. then it is a signal for us to know that the price has come out of the sideway and we can enter an order in the direction of breaking the trendline of the cloud.
- Small timeframes such as 1m, 3m, 5m, 15m I leave the default (cannot be changed) in the setting item 'Length' = 50, the remaining time can be changed, the default is 50
- To adjust, you can go to the setting to set the time according to your needs.
- The color of the Clouds trendline should be the same color as the clouds.
Note:
👉Indicator "Cloud Trendlines_Pro " should be combined with indicator "Trendlines_Pro " to give the best signal
Below are the images taken from my transaction.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Vietnamese
👉Xin chào Trader Việt nam.
- Đây là chỉ báo về đường xu hướng của mây Kumo(lấy từ chỉ báo ) trong chuỗi "phân tích với đường xu hướng" của tôi.
- Trên biểu đồ của chỉ báo này chỉ vẽ ra 1 cặp đường xu hướng đi sát nhất với mây là: 1 đường xu hướng tăng và 1 đường xu hướng giảm.
- Thực ra trong quá trình giao dịch với đường xu hướng của giá tôi thấy giá đi nhấp nhô và có khi đường xu hướng của giá đã bị phá vỡ nhưng cũng không chắc chắn là giá phá vỡ thật hay phá vỡ giả, từ đó tôi nảy ý tưởng đưa chỉ báo Ichimoku vào để phân tích.Chỉ báo Ichimoku cho tín hiệu "Long" tốt khi giá vượt lên đám mây Kumo và xu hướng tăng khi giá vẫn ở trên mây(công thức toán học để tạo lên đám mây của Ichimoku tôi xin không nhắc lại nữa), từ đây tôi đã nghiên cứu ra đường xu hướng của mây Kumo.Vì khi mây hướng lên thì cho giá tăng, mây hướng xuống thì cho giá giảm,Vậy khi mây bắt đầu đang bằng phẳng và mây có dấu hiệu cắt đường xu hướng của nó thì đó là điểm báo đảo chiều xu hướng hay tiếp diễn xu hướng trước đó.
- Như vậy khi kết hợp 2 đường xu hướng là :đường xu hướng của giá và đường xu hướng của mây cho tôi lọc được tín hiệu giá phá vỡ giả và cho điểm stoploss cũng cực hiệu quả, đặt biệt hiệu quả với các khung 5m,15m để tạo lên xu hướng mới.
- Tín hiệu vào lệnh đẹp nhất khi 2 đường xu hướng song song và có xu hướng chụm lại và "cây nến giá" phá vỡ đồng thời 2 đường xu hướng của giá và mây(có thể giá phản ứng tại điểm này vài cây nến).nếu ở khung thời gian nhỏ ta có thể vào lệnh "Thị trường", còn khung H1 trở lên ta có vẫn có thể vào lệnh "Thị trường" hoặc chờ retest lại 2 đường xu hướng này để đặt lệnh.
- Nếu chỉ hiển thị một trong 2 đường xu hướng trên thì trader có thể bỏ qua.
- Phương pháp đường xu hướng cloud này rất hiệu quả khi giá trong vùng sideway ,giá mấp mô(không kẻ được đường xu hướng của giá )...nhưng nhìn vào đường xu hướng của mây nếu mây phá vỡ đường xu hướng của nó thì đó là tín hiệu để ta biết là giá đã ra khỏi vùng sideway và ta có thể vào lệnh theo hướng phá vỡ đường xu hướng của mây.
- Các timeframe nhỏ như 1m, 3m, 5m ,15m tôi để mặc định (không thay đổi được) trong setting mục 'Length' = 50, các thời gian còn lại có thể thay đổi được ,mặc định là 0
- Để điều chỉnh có thể vào setting để thiết lập các thời gian theo nhu cầu.
- Màu của đường xu hướng Mây tôi để cùng màu với mây.
Note:
👉chỉ báo "Cloud Trendlines_Pro " nên kết hợp với chỉ báo "Trendlines_Pro " để cho tín hiệu tốt nhất