OPEN-SOURCE SCRIPT
Trend Signal

System Trend Signal — What It Does
Shows you when your trading system says "be long" vs "stay out" — with a trailing line and buy/sell labels only when the state flips.
The Rules Built In:
BUY state requires ALL of these:
SELL state triggers on ANY of these:
What You See:
The Trailing Line:
Uses ATR to set distance from price.
Shows you when your trading system says "be long" vs "stay out" — with a trailing line and buy/sell labels only when the state flips.
The Rules Built In:
BUY state requires ALL of these:
- Price above 50-DMA (intermediate trend up)
- 10-DMA above 20-DMA (short-term trend confirmed)
- Sell/Buy Pressure Ratio below 1.5 AND flattening or falling (sellers not aggressive)
- RSI above 30 and not making lower lows (momentum OK)
SELL state triggers on ANY of these:
- Price drops below 50-DMA (trend broken)
- Pressure Ratio spikes above 2.0 (heavy selling)
- RSI making lower lows AND below 40 (momentum failing)
What You See:
- "Buy" label appears only when state flips from sell → buy
- "Sell" label appears only when state flips from buy → sell
- No spam. One label per flip.
The Trailing Line:
Uses ATR to set distance from price.
- In buy state: line = close - (ATR × 2.0), ratchets up only
- In sell state: line = close + (ATR × 2.0), ratchets down only
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.