OPEN-SOURCE SCRIPT
Actualizado

Follow The Line

820
Follow The Line (FTL) is a trend-following indicator that plots a user-defined moving average on the chart and generates visual buy and sell signals based on price interaction with that line. The indicator allows the user to choose the moving average length, source, and type, including SMA, EMA, WMA, VWMA, RMA, and HMA, making it adaptable to different trading styles and timeframes. The plotted line dynamically changes color depending on whether the selected price source is above or below the moving average, providing immediate visual feedback on trend direction.

Buy and sell signals are generated using crossover logic. A buy signal occurs when the selected price source crosses above the moving average, and a sell signal occurs when it crosses below. These signals are displayed directly on the chart as labeled markers, making it easy to identify potential entry points without additional indicators. The script includes an option to enable or disable these labels, as well as full customization of their colors.

To prevent excessive chart clutter, the indicator uses an internal label management system that stores buy and sell labels in separate arrays and limits how many are displayed at any given time. By default, it keeps only the most recent ten buy signals and ten sell signals, automatically removing older labels as new ones appear. This keeps the chart clean while still preserving recent signal history for reference.

Overall, Follow The Line is a clean and flexible moving average crossover tool that emphasizes simplicity and visual clarity. It works best in trending market conditions and can serve either as a standalone signal generator or as a foundation for more advanced strategies by layering in additional filters or confirmations.
Notas de prensa
Removed line style options from the style tab.
Notas de prensa
Updated indicator logic.
Added more user controls.
Notas de prensa
Internal updates.
Notas de prensa
Design & Signal reworked.
Pine category updated.
Notas de prensa
Non-Repaint user toggle/logic added.
Notas de prensa
The updated version of the indicator was redesigned to make the Follow Line system more flexible and easier to use while still preserving all of the original advanced trend logic from the uploaded script.

The biggest change is that the old “Show Main Follow Line” checkbox was removed and replaced with a new dropdown called **“Follow Line Mode.”** Instead of simply turning the line on or off, users can now choose between two different operating styles directly from the settings panel:

* **Simple Line**
* **Advanced Line**

## Simple Line Mode

“Simple Line” is now the default mode when the indicator loads.

In this mode, the trend logic is intentionally simplified:

* If price is above the selected moving average line, the line turns bullish.
* If price is below the line, the line turns bearish.

The line color changes are based purely on price location relative to the line itself. No additional trend filters are required before the color changes occur.

This makes the indicator:

* faster
* more responsive
* visually cleaner
* easier to read during active market conditions

Simple Line mode is better suited for traders who prefer quick visual trend recognition and minimal lag.

---

## Advanced Line Mode

“Advanced Line” is the renamed version of the original Main Follow Line logic from the uploaded script.

This mode still uses all of the original confirmation systems including:

* ATR slope filtering
* ADX trend strength filtering
* optional price confirmation
* confirmation-based trend transitions

Compared to Simple Line mode, Advanced Line mode is slower and more selective by design. Instead of reacting immediately to price crossing above or below the line, it waits for additional trend confirmation before changing direction.

This helps reduce:

* false trend flips
* sideways market noise
* weak momentum shifts
* choppy market conditions

Advanced Line mode is better suited for traders who prefer stronger confirmation before trend changes occur.

---

## Updated User Inputs

The overall settings structure remains familiar, but the new version gives users more control over how the indicator behaves.

### Follow Line Mode

This new dropdown now controls the entire trend engine of the indicator.

Users can instantly switch between:

* a fast price-based trend system
* or a filtered confirmation-based trend system

without needing separate scripts.

### Source

Still controls which price source is used for calculations.

### Line Length

Still controls how reactive or smooth the line behaves.

* Lower values = faster reactions
* Higher values = smoother trend behavior

### Line Type

Users can still choose between:

* SMA
* EMA
* WMA
* VWMA
* RMA
* HMA

This allows the indicator to maintain the same flexibility as the original version while supporting different trading styles.

---

## Visual & Styling Changes

All original color customization settings were preserved including:

* bullish line color
* bearish line color
* neutral line color

The default line width was also adjusted:

* Original default: **5**
* New default: **4**

This change was made to create a cleaner overall chart appearance while still keeping the line highly visible.

---

## Signal Labels & Non-Repaint Behavior

The buy and sell label system remains fully intact and now automatically follows whichever Follow Line mode is selected.

* In Simple Line mode, signals appear faster and more frequently.
* In Advanced Line mode, signals remain more filtered and confirmation-based.

The non-repaint option was also fully preserved from the original script. When enabled, all trend changes and signals are still confirmed only after bar close to prevent live-bar flickering and unstable signal behavior.

---

## Overall Purpose of the Update

The overall goal of the update was not to remove or replace the original logic, but to expand the indicator so it can support two different styles of trend analysis inside a single unified system.

The updated version now allows users to choose between:

* a lightweight, fast-reacting visual trend line
* or the original advanced filtered trend logic

while keeping the same appearance, settings structure, and customization system throughout the script.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.