Trend lines indicator by ForexBeeEnhanced 3-Swing Trendline Zones - Complete Feature Guide
WHAT THIS INDICATOR DOES
This indicator automatically draws trendline zones on your chart using a 3-point validation system. Instead of just connecting any two price points like basic trendline tools, it waits for three swing points to confirm the trendline is valid before drawing it.
FEATURE 1: SWING POINT DETECTION
What it detects:
Swing highs: Price points where the high is higher than surrounding candles
Swing lows: Price points where the low is lower than surrounding candles
These show up as small arrows on your chart labeled "SH" (swing high) and "SL" (swing low)
Settings that control this:
Swing Length : Default is 6, range 1-20
Higher numbers = fewer, more significant swing points
Lower numbers = more swing points, including minor ones
Example: Setting 5 means each swing point must be higher/lower than 5 candles on each side
How to use this setting:
On 1-minute charts: Use 5-10 to filter out noise
On daily charts: Use 2-3 for more sensitivity
Volatile markets: Increase the number
Quiet markets: Decrease the number
Please See the Below Images To See the difference of swing length of 6 and 8
Display control:
Show Swing Points : Turn the arrows on/off
Default: ON (you'll see the arrows)
Turn OFF if arrows clutter your chart
FEATURE 2: RETRACEMENT VALIDATION SYSTEM
What this does:
After finding two swing points, the system checks if the second swing represents a proper market retracement, not just random price movement.
How it works:
Finds the highest point between two swing lows (or lowest point between two swing highs)
Calculates how much the second swing retraced from this extreme point
Only accepts swings that retrace between your set percentages
Settings that control this:
Lower Limit % : Default 50%, range 0-100%
Upper Limit % : Default 90%, range 0-100%
These create a "valid retracement zone"
Why this matters:
Eliminates random trendlines that don't follow market structure
Ensures trendlines represent actual retracement patterns
Based on Elliott Wave and Fibonacci principles
FEATURE 3: ATR-BASED ZONE WIDTH
What ATR means:
Average True Range measures how much price typically moves in a given period. Instead of fixed-width trendlines, this creates zones that adapt to market volatility.
Settings that control this:
Zone Width (ATR Multiple) : Default 0.3, range 0.1-1.0
ATR Length : Default 14, range 1-50 periods
How zone width works:
Multiplier 0.1 = Very narrow zones (tight around trendline)
Multiplier 0.5 = Medium zones
Multiplier 1.0 = Wide zones (accommodates more price movement)
ATR Length explained:
14 periods = Uses last 14 candles to calculate average volatility
Shorter periods (7) = More sensitive to recent volatility changes
Longer periods (21) = Smoother, less sensitive to volatility spikes
Practical impact:
During high volatility: Zones automatically become wider
During low volatility: Zones automatically become narrower
Prevents false breakouts during normal market noise
Creates realistic support/resistance areas instead of precise lines
FEATURE 4: VISUAL ZONE SYSTEM
Active Uptrend Zones:
Green upper boundary line (solid, thick)
Lime green lower boundary line (solid, thick)
Green fill between lines (80% transparency)
These represent dynamic support levels
Active Downtrend Zones:
Blue upper boundary line (solid, thick)
Navy blue lower boundary line (solid, thick)
Red fill between lines (80% transparency)
These represent dynamic resistance levels
Broken/Expired Zones:
Gray/silver boundary lines (dashed, thick)
Original fill color maintained (green for uptrend zones, red for downtrend zones)
Shows historical trendlines that are no longer active
FEATURE 5: BREAK DETECTION SYSTEM
How breaks are detected:
The system monitors when price violates the zone boundaries, indicating the trendline structure has failed.
Settings that control this:
Use Wick Break : True/False toggle
TRUE: Break occurs when candle high/low touches zone boundary
FALSE: Break occurs when candle close price crosses zone boundary
Conservative vs Aggressive approach:
Wick Break = TRUE (Aggressive) :
- More sensitive, earlier signals
- May produce more false breaks during volatile periods
- Good for scalping and short-term trading
Wick Break = FALSE (Conservative) :
- Requires candle to close beyond zone
- Fewer false signals, more reliable breaks
- Better for swing trading and position trading
What happens when zone breaks:
Zone lines change from solid to dashed
Zone lines change color to gray/silver
Fill color remains original (green/red) for identification
Zone stops extending forward
Zone is removed from active monitoring
FEATURE 6: ZONE EXPIRATION SYSTEM
What expiration does:
Allows trendlines to automatically become inactive after a set number of bars, even if they haven't been broken.
Settings that control this:
Use Zone Expiration : True/False toggle
Zone Expiration (Bars) : Default 500, range 1-1000
FALSE: Zones run indefinitely until broken
TRUE: Zones expire after specified number of bars
Visual result:
Expired zones look identical to broken zones
Lines become dashed and gray/silver
Fill colors remain original (green/red)
FEATURE 7: MULTI-TIMEFRAME TREND ANALYSIS TABLE
What the table shows:
A small table on your chart that monitors trend conditions across four different timeframes simultaneously.
Settings that control this:
TF1, TF2, TF3, TF4 : Four customizable timeframes
Default: 4H, 8H, 1D, 1W
Table Position : 9 positions (top/middle/bottom + left/center/right)
Text Size : Tiny, Small, Normal, Large, Huge
How trend detection works:
Uptrend Pattern : Current candle's high AND low are both higher than previous candle's high AND low on specified timeframes
This creates higher highs and higher lows
Shows consistent buying pressure
Table displays green background with upward arrow (▲)
Downtrend Pattern : Current candle's high AND low are both lower than previous candle's high AND low on specified timeframes
This creates lower highs and lower lows
Shows consistent selling pressure
Table displays red background with downward arrow (▼)
Range/Sideways Pattern : Current candle creates either inside bar or outside bar
Inside bar: Current range smaller than previous candle
Outside bar: Current range larger than previous candle
Shows market indecision or consolidation
Table displays orange background with diamond symbol (◆)
No Clear Pattern : None of the above conditions are met
Table displays gray background with horizontal line (⎯)
How to interpret the table:
All timeframes green (uptrend): Strong bullish alignment
All timeframes red (downtrend): Strong bearish alignment
Mixed colors: Conflicting timeframes, exercise caution
Mostly orange: Market in consolidation phase
Tooltip explanations: Hover over each cell for detailed description
FEATURE 8: BACKGROUND COLOR SYSTEM
What background colors show:
Optional feature that colors your chart background based on the current timeframe's trend condition.
Settings that control this:
Show Background Colors : True/False toggle
Background Transparency : 80-98% range
Default: OFF (no background colors)
Color scheme:
Green background: Current timeframe showing uptrend
Red background: Current timeframe showing downtrend
Orange background: Current timeframe showing range/consolidation
No background: No clear trend pattern
Transparency levels:
80%: More visible background color
95%: Subtle background hint
98%: Very subtle background tint
TRENDLINERETEST
Trend FriendTrend Friend — What it is and how to use it
I built Trend Friend to stop redrawing the same trendlines all day. It automatically connects confirmed swing points (fractals) and keeps the most relevant lines in front of you. The goal: give you clean, actionable structure without the guesswork.
What it does (in plain English)
Finds swing highs/lows using a Fractal Period you choose.
Draws auto-trendlines between the two most recent confirmed highs and the two most recent confirmed lows.
Colours by intent:
Lines drawn from highs (potential resistance / bearish) = Red
Lines drawn from lows (potential support / bullish) = Green
Keeps the chart tidy: The newest lines are styled as “recent,” older lines are dimmed as “historical,” and it prunes anything beyond your chosen limit.
Optional crosses & alerts: You can highlight when price closes across the most recent line and set alerts for new lines formed and upper/lower line crosses.
Structure labels: It tags HH, LH, HL, LL at the swing points, so you can quickly read trend/rotation.
How it works (under the hood)
A “fractal” here is a confirmed pivot: the highest high (or lowest low) with n bars on each side. That means pivots only confirm after n bars, so signals are cleaner and less noisy.
When a new pivot prints, the script connects it to the prior pivot of the same type (high→high, low→low). That gives you one “bearish” line from highs and one “bullish” line from lows.
The newest line is marked as recent (brighter), and the previous recent line becomes historical (dimmed). You can keep as many pairs as you want, but I usually keep it tight.
Inputs you’ll actually use
Fractal Period (n): this is the big one. It controls how swingy/strict the pivots are.
Lower n → more swings, more lines (faster, noisier)
Higher n → fewer swings, cleaner lines (slower, swing-trade friendly)
Max pair of lines: how many pairs (up+down) to keep on the chart. 1–3 is a sweet spot.
Extend: extend lines Right (my default) or Both ways if you like the context.
Line widths & colours: recent vs. historical are separate so you can make the active lines pop.
Show crosses: toggle the X markers when price crosses a line. I turn this on when I’m actively hunting breakouts/retests.
Reading the chart
Red lines (from highs): I treat these as potential resistance. A clean break + hold above a red line often flips me from “fade” to “follow.”
Green lines (from lows): Potential support. Same idea in reverse: break + hold below and I stop buying dips until I see structure reclaim.
HH / LH / HL / LL dots: quick read on structure.
HH/HL bias = uptrend continuation potential
LH/LL bias = downtrend continuation potential
Mixed prints = rotation/chop—tighten risk or wait for clarity.
My H1 guidance (fine-tuning Fractal Period)
If you’re mainly on H1 (my use case), tune like this:
Fast / aggressive: n = 6–8 (lots of signals, good for momentum days; more chop risk)
Balanced (recommended): n = 9–12 (keeps lines meaningful but responsive)
Slow / swing focus: n = 13–21 (filters noise; better for trend days and higher-TF confluence)
Rule of thumb: if you’re getting too many touches and whipsaws, increase n. If you’re late to obvious breaks, decrease n.
How I trade it (example workflow)
Pick your n for the session (H1: start at 9–12).
Mark the recent red & green lines. That’s your immediate structure.
Look for interaction:
Rejections from a line = fade potential back into the range.
Break + close across a line = watch the retest for continuation.
Confirm with context: session bias, HTF structure, and your own tools (VWAP, RSI, volume, FVG/OB, etc.).
Plan the trade: enter on retest or reclaim, stop beyond the line/last swing, target the opposite side or next structure.
Alerts (set and forget)
“New trendline formed” — fires when a new high/low pivot confirms and a fresh line is drawn.
“Upper/lower trendline crossed” — fires when price crosses the most recent red/green line.
Use these to track structure shifts without staring at the screen.
Good to know (honest limitations)
Confirmation lag: pivots need n bars on both sides, so signals arrive after the swing confirms. That’s by design—less noise, fewer fake lines.
Lines update as structure evolves: when a new pivot forms, the previous “recent” line becomes “historical,” and older ones can be removed based on your max setting.
Not an auto trendline crystal ball: it won’t predict which line holds or breaks—it just keeps the most relevant structure clean and up to date.
Final notes
Works on any timeframe; I built it with H1 in mind and scale to H4/D1 by increasing n.
Pairs nicely with session tools and VWAP for intraday, or with supply/demand / FVGs for swing planning.
Risk first: lines are structure, not guarantees. Manage position size and stops as usual.
Not financial advice. Trade your plan. Stay nimble.
Trendlines (long)Hi all!
I hope that this indicator helps you to be a more efficient trader. The concept is well known and useful. So this is not some magic algorithm founded by me, but rather a well known concept. The concept is the drawing of trendlines.
It draws trendlines that has a retest. It draws the trendlines in different colors, the colors used are blue, red, fuchsia and lime.
These are the steps for finding a trendline:
1. Find a generic retest
Find a low that has 2 earlier lows and 1 later low that are higher. This is the reason that a trendline will be created "1 bar late". This is the base and the indicator goes on from here, meaning that this needs to be true to continue.
2. Find an uptrend
Look back 8 bars to find a low that is lower than the retest low.
3. Create the first point of a trendline
Go thru every bar between the user defined "Lookback" and the retest bar (minus the user defined "Skip gap" that's needed between points to create a trendline). From the earliest bar to the latest.
4. Create the second point of the trendline
Go thru every bar between the retest bar and the the first point (bar) minus the "Skip gap". From latest bar to the earliest. A trendline between the two bars are invalidated if some of the criteria are met in-between the bars creating the trendline:
- closed above the trendline (trendline broken)
- is not within the retest bar
- the slope of the trendline is upwards (this indicator is for long entries only)
- at least 1 of the bars creating the retest (1 main bar and 2 earlier bars) has NOT been above the trendline
- is not the created trendline (between the two points) that's closest to the low of the retest bar
TODO:
- add functionality to draw trendlines directly on breakouts
- add volume (high volume needed to create a trendline from a breakout/retest)
- ...?
I hope this explanation makes sense, let me know otherwise. Also let me know if you have any suggestions on improvements.
Best of luck trading!
IsAlgo - Manual TrendLine► Overview:
Manual TrendLine is a strategy that allows traders to manually insert a trendline and opens trades when the trendline is retested or when the price hits a new highest high or lowest low. It provides flexibility in trendline configuration and trading behavior, enabling responsive and adaptable trading strategies.
► Description:
The Manual TrendLine strategy revolves around using manually defined trendlines as the primary tool for making trading decisions. Traders start by specifying two key points on the chart to establish the trendline. Each point is defined by a specific time and price, enabling precise placement according to the trader’s analysis and insights. Additionally, the strategy allows for the adjustment of the trendline’s width, which acts as a buffer zone around the trendline, providing flexibility in how closely price movements must align with the trendline to trigger trades.
Once the trendline is established, the strategy continuously monitors price movements relative to this line. One of its core functions is to execute trades when the price retests the trendline. A retest occurs when the price approaches the trendline after initially diverging from it, indicating potential continuation of the prevailing trend. This behavior is often seen as a confirmation of the trend’s strength, and the strategy takes advantage of these moments to enter trades in the direction of the trend.
Beyond retests, the strategy also tracks the formation of new highest highs and lowest lows in relation to the trendline. When the price reaches a new highest high or lowest low, it signifies strong momentum in the trend’s direction. The strategy can be configured to open trades at these critical points.
Another key feature of the strategy is its response to trendline breaks. A break occurs when the price moves through the trendline, potentially signaling a reversal or a significant shift in market sentiment. The strategy can be set to open reverse trades upon such breaks, enabling traders to quickly adapt to changing market conditions. Additionally, traders have the option to stop opening new trades after a trendline break, helping to avoid trades during periods of uncertainty or increased volatility.
↑ Up Trend Example:
↓ Down Trend Example:
► Features and Settings:
⚙︎ TrendLine: Define the time and price of the two main points of the trendline, and set the trendline width.
⚙︎ Entry Candle: Specify the minimum and maximum body size and the body-to-candle size ratio for entry candles.
⚙︎ Trading Session: Define specific trading hours during which the strategy operates, restricting trades to preferred market periods.
⚙︎ Trading Days: Specify active trading days to avoid certain days of the week.
⚙︎ Backtesting: backtesting for a selected period to evaluate strategy performance. This feature can be deactivated if not needed.
⚙︎ Trades: Configure trade direction (long, short, or both), position sizing (fixed or percentage-based), maximum number of open trades, and daily trade limits.
⚙︎ Trades Exit: Set profit/loss limits, specify trade duration, or exit based on band reversal signals.
⚙︎ Stop Loss: Choose from various stop-loss methods, including fixed pips, ATR-based, or highest/lowest price points within a specified number of candles. Trades can also be closed after a certain number of adverse candle movements.
⚙︎ Break Even: Adjust stop loss to break even once predefined profit levels are reached, protecting gains.
⚙︎ Trailing Stop: Implement a trailing stop to adjust the stop loss as the trade becomes profitable, securing gains and potentially capturing further upside.
⚙︎ Take Profit: Set up to three take-profit levels using methods such as fixed pips, ATR, or risk-to-reward ratios. Alternatively, specify a set number of candles moving in the trade’s direction.
⚙︎ Alerts: Comprehensive alert system to notify users of significant actions, including trade openings and closings. Supports dynamic placeholders for take-profit levels and stop-loss prices.
⚙︎ Dashboard: Visual display on the chart providing detailed information about ongoing and past trades, aiding users in monitoring strategy performance and making informed decisions.
► Backtesting Details:
Timeframe: 30-minute EURUSD chart
Initial Balance: $10,000
Order Size: 500 units
Commission: 0.05%
Slippage: 5 ticks
This strategy opens trades around a manually drawn trendline, which results in a smaller number of closed trades.