1. **Indicators Used**: - SMA 9 (red line) - SMA 50 (blue line) - SMA 180 (white line) - EMA 20 (yellow line)
2. **Input Parameters**: - `smaInput1 = 9`: First SMA period (editable) - `smaInput2 = 50`: Second SMA period (editable) - `smaInput3 = 180`: Third SMA period (editable) - `emaInput1 = 20`: EMA period (editable) - `no = 3`: Lookback period for swing high/low calculation - `Barcolor`: Toggle for bar coloring - `Bgcolor`: Toggle for background coloring
3. **Buy/Sell Signal System**: - Uses a swing-based trailing stop loss (TSL) system - `res`: Highest high over 'no' periods - `sup`: Lowest low over 'no' periods - Buy signal: When price crosses above the trailing stop - Sell signal: When price crosses below the trailing stop - Visual indicators: - Green up arrow for Buy signals - Red down arrow for Sell signals - Green/red line for the trailing stop level - Optional bar and background coloring
4. **Logic Breakdown**: - `avd`: Determines trend direction (1 for up, -1 for down, 0 for neutral) - `avn`: Captures the last significant trend direction - `tsl`: Sets trailing stop level based on trend direction - Color coding: - Green when price is above TSL - Red when price is below TSL
5. **Features**: - Plots all moving averages as an overlay on price chart - Shows entry/exit signals with arrows - Includes alert conditions for Buy and Sell signals - Customizable colors and visibility of elements
This is a trend-following system that: - Uses multiple timeframe moving averages for trend confirmation - Implements a swing-based trailing stop for trade management - Provides clear visual signals for entries and exits
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
לגישה מהירה לגרף, הוסף את הסקריפט הזה למועדפים שלך - למד עוד כאן.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
לגישה מהירה לגרף, הוסף את הסקריפט הזה למועדפים שלך - למד עוד כאן.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.