OPEN-SOURCE SCRIPT
מעודכן CS Trendline Pro

Title: CS Trendline Pro [Traffic Light System]
Description:
CS Trendline Pro is a comprehensive scalping and day-trading system designed to filter out noise and identify high-probability breakout setups. It combines the structural precision of Fractal Trendlines with a robust Dual-EMA Filter, visualized through an intuitive "Traffic Light" color system.
This tool is specifically engineered for traders who want to trade Trendline Breakouts but need a safety mechanism to avoid false signals (fakeouts) and counter-trend traps.
🚦 How the "Traffic Light" Logic Works
The core feature of this script is the dynamic coloring of the candles, which acts as a visual filter for your entries:
🟢 GREEN Zone (Safe Buy):
Condition: A Bullish Trendline Breakout has occurred AND the price is holding ABOVE the EMA 30 (Yellow Line).
Meaning: Momentum is bullish, and you are in a safe zone to look for Long entries.
🔴 RED Zone (Safe Sell):
Condition: A Bearish Trendline Breakout has occurred AND the price is holding BELOW the EMA 30 (Yellow Line).
Meaning: Momentum is bearish, and you are in a safe zone to look for Short entries.
⚪ GRAY Zone (No Trade / Wait):
Condition: A breakout occurred, but the price is on the "wrong side" of the EMA 30.
Meaning: Indecision. The market structure is conflicting with the immediate momentum. It is recommended to stay out until the color changes.
🛠️ Key Features
** automated Trendlines:** Automatically draws Support and Resistance dynamic trendlines based on pivot points (LuxAlgo engine).
Dual EMA Filter:
EMA 30 (Yellow): Acts as the immediate "Safe Zone" filter.
EMA 200 (White): Displays the macro trend. (Pro Tip: Only take Green signals if price is above the White line).
CS-BUY / CS-SELL Labels: Clear text markers appear exactly when a valid breakout occurs.
Customizable: Adjustable sensitivity (Length), EMA periods, and Slope calculation methods (ATR, Stdev, Linreg).
📉 How to Trade with CS Trendline Pro
For Scalping (5m / 15m):
Identify the Main Trend: Look at the White EMA (200).
If Price > EMA 200 → Focus on BUY signals.
If Price < EMA 200 → Focus on SELL signals.
Wait for the Signal:
Wait for the candle to turn Teal (Green) or Red.
Ensure the candle closes with the new color.
Risk Management:
Place Stop Loss below the recent swing low (for buys) or above the swing high (for sells).
Target a 1.5 Risk/Reward ratio or trail your stop using the EMA 30.
⚠️ Important Note on Backpainting
This indicator uses pivot points to draw trendlines. By nature, a pivot point can only be confirmed after a few bars have passed (Lag).
Backpaint Setting (Default ON): Keeps your historical chart clean by connecting the exact pivot points in the past.
Real-Time Behavior: In live trading, the trendline and signal will appear once the pivot is confirmed (based on your 'Length' setting). This is normal behavior for any trendline script.
Settings Recommended:
5-Minute Chart: Length 10 or 14.
15-Minute Chart: Length 14.
Enjoy trading with precision! ~ CS Trading
Description:
CS Trendline Pro is a comprehensive scalping and day-trading system designed to filter out noise and identify high-probability breakout setups. It combines the structural precision of Fractal Trendlines with a robust Dual-EMA Filter, visualized through an intuitive "Traffic Light" color system.
This tool is specifically engineered for traders who want to trade Trendline Breakouts but need a safety mechanism to avoid false signals (fakeouts) and counter-trend traps.
🚦 How the "Traffic Light" Logic Works
The core feature of this script is the dynamic coloring of the candles, which acts as a visual filter for your entries:
🟢 GREEN Zone (Safe Buy):
Condition: A Bullish Trendline Breakout has occurred AND the price is holding ABOVE the EMA 30 (Yellow Line).
Meaning: Momentum is bullish, and you are in a safe zone to look for Long entries.
🔴 RED Zone (Safe Sell):
Condition: A Bearish Trendline Breakout has occurred AND the price is holding BELOW the EMA 30 (Yellow Line).
Meaning: Momentum is bearish, and you are in a safe zone to look for Short entries.
⚪ GRAY Zone (No Trade / Wait):
Condition: A breakout occurred, but the price is on the "wrong side" of the EMA 30.
Meaning: Indecision. The market structure is conflicting with the immediate momentum. It is recommended to stay out until the color changes.
🛠️ Key Features
** automated Trendlines:** Automatically draws Support and Resistance dynamic trendlines based on pivot points (LuxAlgo engine).
Dual EMA Filter:
EMA 30 (Yellow): Acts as the immediate "Safe Zone" filter.
EMA 200 (White): Displays the macro trend. (Pro Tip: Only take Green signals if price is above the White line).
CS-BUY / CS-SELL Labels: Clear text markers appear exactly when a valid breakout occurs.
Customizable: Adjustable sensitivity (Length), EMA periods, and Slope calculation methods (ATR, Stdev, Linreg).
📉 How to Trade with CS Trendline Pro
For Scalping (5m / 15m):
Identify the Main Trend: Look at the White EMA (200).
If Price > EMA 200 → Focus on BUY signals.
If Price < EMA 200 → Focus on SELL signals.
Wait for the Signal:
Wait for the candle to turn Teal (Green) or Red.
Ensure the candle closes with the new color.
Risk Management:
Place Stop Loss below the recent swing low (for buys) or above the swing high (for sells).
Target a 1.5 Risk/Reward ratio or trail your stop using the EMA 30.
⚠️ Important Note on Backpainting
This indicator uses pivot points to draw trendlines. By nature, a pivot point can only be confirmed after a few bars have passed (Lag).
Backpaint Setting (Default ON): Keeps your historical chart clean by connecting the exact pivot points in the past.
Real-Time Behavior: In live trading, the trendline and signal will appear once the pivot is confirmed (based on your 'Length' setting). This is normal behavior for any trendline script.
Settings Recommended:
5-Minute Chart: Length 10 or 14.
15-Minute Chart: Length 14.
Enjoy trading with precision! ~ CS Trading
הערות שחרור
Title: 🚀 CS Trendline Pro: Smart Memory Trendlines & EMA Filter SystemDescription:
Are you tired of cluttered charts, infinite lines, and falling into false breakouts? CS Trendline Pro is not just another automated trendline drawer; it is a complete, visually clean trading system designed to keep your analysis objective and your screen pristine.
This indicator solves the biggest issues with standard automated trendlines by introducing a "Smart Memory" array system and a built-in macro trend filter.
✨ Key Features:
🧠 "Smart Memory" Array System: Say goodbye to spaghetti charts. The indicator draws the active dynamic trendline (dashed) into the future. When this line is broken and loses its validity, the script cuts the line exactly at the breakout candle, turns it solid, and saves it to history. You control exactly how many past lines you want to keep visible (e.g., the last 3). Any older lines are automatically deleted!
🎯 Synchronized Signals (Non-Repainting): The CS-BUY and CS-SELL labels are dynamically tied to your trendline history. If you choose to see only the last 3 setups, the indicator will automatically clean up any older labels from your chart. Total visual harmony.
🚦 Trend Traffic Light (Macro Filter): Not all breakouts are good trades. The script uses a fast EMA (30) and a slow EMA (200) to filter the noise and confirm momentum:
🟢 Bullish Candles (Teal/Green): Price broke resistance AND is trading above the 30 EMA. Valid Buy setup.
🔴 Bearish Candles (Red): Price broke support AND is trading below the 30 EMA. Valid Sell setup.
⚪ Danger Zone (Gray Candles): A breakout occurred, but the price is on the wrong side of the EMA. This keeps you out of deadly Bull/Bear Traps!
⚙️ Total Customization: Your chart, your rules. Easily adjust pivot sensitivity, toggle the visibility of EMAs, labels, or candle colors on/off with a single click, and fully customize the color palette to match your style.
💡 How to Trade with It:
Apply it to any timeframe (works great for day trading and swing trading).
Wait for the price to break the active dashed trendline.
Look for the candle color confirmation (Teal for long, Red for short). If the candle is Gray, stay out!
Manage your trade using the historical solid lines as potential support/resistance retest zones.
(Disclaimer: This script is an educational tool for chart analysis and does not constitute financial advice. Always use proper risk management).
הערות שחרור
Title: 🚀 CS Trendline Pro V3: Smart Memory Trendlines & Adaptive Filter EngineDescription:
Are you tired of automated trendline indicators that clutter your chart with endless lines and trap you in false breakouts? CS Trendline Pro V3 is a complete, institutional-grade visual trading system designed to keep your analysis objective, your screen pristine, and your entries highly probable.
This system solves the biggest issues with standard trendline tools by introducing a "Smart Memory" array system, dynamic Stop Loss calculations, and a fully customizable multi-filter engine.
✨ Core Features:
🧠 "Smart Memory" Array System: Say goodbye to spaghetti charts. The indicator draws the active dynamic trendline (dashed) extending into the future. When this line is broken, the script cuts it exactly at the breakout candle, turns it solid, and saves it to your chart's history. You control exactly how many past lines and signals you want to keep visible (e.g., the last 3). Older lines and labels are automatically deleted to maintain a perfectly clean workspace.
🎯 Dynamic Stop Loss Integration: Every time a valid CS-BUY or CS-SELL label appears, the indicator automatically calculates the optimal Stop Loss based on current market volatility (1.5x ATR). The exact Stop Loss price is printed directly inside the signal label. No more guessing where to place your risk!
☁️ Macro Trend Cloud: A beautifully smoothed visual cloud fills the space between the Fast EMA (30) and Slow EMA (200). This provides an instant, split-second read on the macro environment (Green for bullish, Red for bearish).
🚦 Dynamic Candle Semaphores: Candles are colored based on the validity of the setup. If a breakout happens but lacks the necessary filters, the candle paints Gray (Danger/Wait Zone), keeping you out of deadly Bull and Bear Traps.
⚙️ The Adaptive Filter Engine:
Not all markets are the same. This V3 engine allows you to change the strictness of your signals on the fly via a dropdown menu:
Aggressive (Breakout Only): Pure price action. Signals fire immediately upon trendline rupture. Great for fast scalping.
Normal (Breakout + EMA): Trend-following mode. Buys only trigger above the Fast EMA; Sells only trigger below it.
Volume (Breakout + Vol): Momentum mode. Ignores the EMA but requires the breakout candle to have higher volume than the 20-period average.
Strict (EMA + Volume): The ultimate safeguard. Requires price to break the line, follow the macro trend, AND be backed by institutional volume.
💡 How to Trade with It:
Apply it to your favorite timeframe (highly effective for crypto, forex, and indices).
Select your preferred Filter Mode based on current market conditions.
Wait for the price to break the active dashed trendline.
Look for the candle color confirmation (Teal for long, Red for short) and the Signal Label. If the candle is Gray, stay out!
Place your Stop Loss exactly where the label indicates and manage your trade using the historical solid lines as retest zones.
(Disclaimer: This script is an educational tool for chart analysis and does not constitute financial advice. Always use proper risk management).
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.