Follow The LineFollow 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.
Indicatore Pine Script®






















