INVITE-ONLY SCRIPT

ZynAlgo Trendline

618
Purpose

ZynAlgo Trendline V2.0 is a trend-following indicator designed to help traders visually identify market direction, momentum alignment, and dynamic risk zones.
It combines multiple moving averages, multi-timeframe analysis, and slope validation to show when a market is trending, ranging, or reversing.

How It Works — Conceptual Breakdown
🔹 1. Trendline Framework (Three-Layer MA System)

The indicator plots three moving-average layers:

Type 1 Line – Fast MA for early trend detection

Type 2 Line – Medium MA as a stability filter

Trendline (200-period) – Long-term structural baseline

When all three are properly stacked and sloped, a directional bias is confirmed:

Bullish → Type 1 > Type 2 > Trendline

Bearish → Type 1 < Type 2 < Trendline

Sideways → Misaligned or flat

Users can select from SMA, EMA, WMA, RMA, SWMA, ALMA, VWAP, fully adjustable to match their style.

🔹 2. Touch-and-Confirm Entry Logic

Entries are visualized only when:

Price touches the selected confirmation line (Trendline, Type 1 or Type 2), and

The direction is re-confirmed within a given number of candles (confirmation window).

You can choose between:

Fixed Mode — confirmation only on the exact N-th candle after touch.

Interval Mode — confirmation allowed anytime within N candles after touch.

This method ensures signals only appear when structure and timing both align — reducing false momentum entries.

🔹 3. Multi-Timeframe Trend Filter (MTF Filter)

The indicator checks trend direction across up to 8 higher timeframes (5 min → Daily).
A signal is valid only if a chosen minimum number of those timeframes confirm the same direction.
This feature creates cross-timeframe confluence, helping users avoid counter-trend setups.

🔹 4. Slope-Based Market Filter

To prevent entries in sideways or choppy markets, the system verifies:

Each MA’s slope is above a user-defined threshold.

MAs are sufficiently spaced apart (using percentage-of-price separation).

When conditions are met, candles are color-coded:
🟩 Uptrend 🟥 Downtrend ⬜ Sideways/No-trade zone.

This gives immediate visual feedback about current market structure.

🔹 5. Dynamic Risk Management System

Choose among three Stop-Loss modes:

Structure-Based – Swing high/low referencing market structure.

MA-Based – Uses the selected moving-average line as a dynamic stop.

ATR-Based – Volatility-adaptive stop (default).

Each entry automatically projects up to three Take-Profit (TP1-TP3) levels using user-defined Risk-to-Reward ratios.
Lines and labels are plotted for Entry, SL, and each TP with optional persistence control (“keep old lines” setting).

🔹 6. Anti-Martingale / Cooldown Logic

A built-in cooldown timer ensures only one trade setup per cycle — new signals pause until the prior trade has reached either TP or SL.
This mechanism prevents overlapping trades and unwanted martingale-style stacking.

🔹 7. Compact On-Chart Dashboard

A small table (top-right corner) summarizes:

Current position (LONG / SHORT / FLAT)

SL mode in use

Confirmation source

Touch/confirmation mode

Cooldown state and remaining bars

This helps monitor settings without opening the menu.

🔹 8. Smart Alerts (Telegram / Discord / Both)

When a new BUY ↗ or SELL ↘ confirmation occurs, the script can send structured alerts containing:

Symbol

Entry price

TP1 – TP3 values

Stop Loss

Timestamp

You can select the preferred platform (Telegram / Discord / Both).
These alerts are optional and serve as notifications, not trade instructions.

Usage Guide

  • Trendline Length: Period of the main long-term moving average (default = 200). Higher = smoother, slower trendline.
  • Trendline Type / Type 1 / Type 2 Type: Choose from SMA, EMA, WMA, RMA, SWMA, ALMA, VWAP depending on your preference for responsiveness or smoothness.
  • Confirmation Source: Which MA must be touched by price to start a confirmation window (Trendline = conservative, Type 1 = frequent, Type 2 = balanced).
  • Confirmation Window: Number of bars allowed for price to confirm direction after touch.
  • Stop Loss Mode: Select ATR-based, structure-based, or MA-based stop visualization.
  • R:R Ratios (TP1-TP3) Adjust distances for visual target levels based on risk-to-reward multiples.
  • Enable MTF Filter: Require trend alignment across higher timeframes before showing a signal.
  • Enable Slope Filter: Prevents signals when MAs are flat or overlapping (sideways market).
  • Enable Candle Coloring: Colors candles by trend state for quick visual confirmation.

How to Use

لقطة

  1. Apply the indicator to a clean chart with no other overlays for clarity.
  2. Check candle color:
  3. Green → Uptrend; Red → Downtrend; Gray → Sideways.
  4. Wait for a “BUY ↗” or “SELL ↘” label to appear after a valid touch + confirmation sequence.
  5. Observe drawn lines: Entry = blue, SL = red, TP = green.
  6. Use displayed levels as visual references only. You may combine them with your own entry rules or strategy.
  7. Optional: enable the dashboard (top-right) to monitor trend filter states and settings in real time.


⛔ False-Signal Reduction

Combining slope validation with multi-timeframe agreement filters out low-probability entries — useful for traders who prefer quality over quantity.

🧩 Professional Execution Layer

Integrated Stop Loss / Take Profit projection, cooldown logic, and anti-martingale control give it a disciplined, rule-based behavior — a hallmark of algorithmic consistency.

📡 Automation-Ready Alerts

The built-in Telegram / Discord alert module (JSON-formatted payloads) allows direct bot integration for remote monitoring — no additional coding required.

Unlike public MA crossover scripts, ZynAlgo Trendline includes proprietary logic for slope-weighted alignment, MTF aggregation, and confirmation-window entry detection.

🔶 RISK DISCLAIMER

Trading is risky & most day traders lose money. All content, tools, scripts, articles, & education provided by ZynAlgo are purely for informational & educational purposes only. Past performance does not guarantee future results.

إخلاء المسؤولية

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.