OPEN-SOURCE SCRIPT

YFC 3LÜ TEST

YFC Technology Indicator
This script is a custom indicator for TradingView, combining various technical analysis tools, including breakout levels, the Chandelier Exit, and moving average (MA) crossovers. Below is a breakdown of the key features and logic of the code:

1. Breakout Probability Inputs
Purpose: Allows users to customize breakout levels by defining the percentage steps and the number of levels to be displayed.
Inputs:
perc: The percentage step used to calculate the distance between breakout levels.
nbr: Number of breakout levels above and below the current price.
upCol and dnCol: Colors for upward and downward breakout levels.
fill: Option to display background colors for visual clarity.
2. Chandelier Exit
Purpose: Implements the Chandelier Exit strategy to determine trailing stop levels for long and short positions.

Inputs:

lengthATR: Defines the period for the Average True Range (ATR) calculation.
multATR: ATR multiplier to adjust the sensitivity of the stop levels.
useClose: Boolean flag to decide whether to use closing prices or high/low prices for extremums.
Logic:

Computes longStop and shortStop levels using the ATR-based trailing stop formula.
Adjusts the stop levels dynamically based on the current price direction.
Generates Buy and Sell signals when the price crosses the stop levels.
Plots the stop levels on the chart with green (long) and red (short) lines.
3. Moving Average (MA) and Exponential Moving Average (EMA) Crossover
Purpose: Identifies bullish or bearish trends using the crossover of simple moving average (SMA) and exponential moving average (EMA).
Inputs:
lengthMA: Period for the moving average calculation.
lengthEMA: Period for the exponential moving average calculation.
Logic:
Computes SMA and EMA using the specified lengths.
Compares EMA and SMA values to determine the trend:
Bullish: EMA > SMA
Bearish: EMA < SMA
Plots the SMA and EMA on the chart with different colors (blue and orange).
4. Breakout Levels
Purpose: Displays breakout levels around the current price based on percentage steps.
Logic:
Calculates multiple levels above and below the current price.
Uses lines to visually indicate these levels on the chart.
Levels dynamically update based on the perc and nbr inputs.
5. Alerts
Purpose: Sends real-time alerts based on specific conditions.
Alert Conditions:
Buy Signal: Triggered when the price crosses above the shortStop level.
Sell Signal: Triggered when the price crosses below the longStop level.
Bullish EMA/MA Crossover: Triggered when EMA crosses above SMA.
Bearish EMA/MA Crossover: Triggered when EMA crosses below SMA.
6. Visual Features
Plots:
Stop levels for long and short positions (green and red lines).
SMA and EMA trends (blue and orange lines).
Shapes:
Buy and Sell signals are displayed as labels on the chart.
Breakout Levels:
Lines are drawn to represent potential breakout areas.
Candlestick analysisChart patternsCycles

Skrypt open-source

W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Chcesz użyć tego skryptu na wykresie?

Wyłączenie odpowiedzialności