PROTECTED SOURCE SCRIPT
Support & Resistance Pro

Input Configuration: Allows selecting 3 timeframes (TF1 weak, TF2 medium, TF3 strong), show/hide levels, pivot parameters (left/right bars), max levels per TF, duplicate tolerance, max level age, colors, line styles, transparency, and line extension.
Helper Functions: Defines line styles (solid/thin/thick/dashed), widths, and colors with transparency. Calculates seconds per timeframe for time adjustments.
Array Management: Uses arrays to store resistance/support levels, times, lines, and labels per TF and type (resistance/support).
Duplicate Detection: Checks if a new level is similar (within tolerance %) to existing levels in any TF to avoid repetitions.
Level Addition: Adds detected high/low pivots if not duplicates or old; creates dynamic lines and labels; limits to maxLevels by removing oldest.
Data Request: Uses request.security to get high/low pivots in higher timeframes, adjusting pivot times by subtracting left bars.
Update on Each Bar: Extends lines to the right (infinite or specific bars) and moves labels to the chart's end.
Dashboard (Table): On the last bar, creates a table in the top-right corner showing the most recent levels per TF (type, level, % distance to close, age in bars), with corresponding colors. Only shows one level per type/TF (the last one).
Alerts: Generates alert conditions when price crosses over resistance or under support in TF3 (strong); can be extended to other TFs.
In summary, it plots multi-timeframe support/resistance levels based on pivots, manages them dynamically, displays info in a table, and alerts on touches at strong levels.
Helper Functions: Defines line styles (solid/thin/thick/dashed), widths, and colors with transparency. Calculates seconds per timeframe for time adjustments.
Array Management: Uses arrays to store resistance/support levels, times, lines, and labels per TF and type (resistance/support).
Duplicate Detection: Checks if a new level is similar (within tolerance %) to existing levels in any TF to avoid repetitions.
Level Addition: Adds detected high/low pivots if not duplicates or old; creates dynamic lines and labels; limits to maxLevels by removing oldest.
Data Request: Uses request.security to get high/low pivots in higher timeframes, adjusting pivot times by subtracting left bars.
Update on Each Bar: Extends lines to the right (infinite or specific bars) and moves labels to the chart's end.
Dashboard (Table): On the last bar, creates a table in the top-right corner showing the most recent levels per TF (type, level, % distance to close, age in bars), with corresponding colors. Only shows one level per type/TF (the last one).
Alerts: Generates alert conditions when price crosses over resistance or under support in TF3 (strong); can be extended to other TFs.
In summary, it plots multi-timeframe support/resistance levels based on pivots, manages them dynamically, displays info in a table, and alerts on touches at strong levels.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.