OPEN-SOURCE SCRIPT

Market Indicator by Atilla Yurtseven

AtillaYurtseven의
업데이트됨
This TradingView script is designed to analyze and visualize market trends by showing the percentage drops from the all-time high (ATH) of a stock or any other financial instrument. It also calculates and displays key statistical levels such as the mean, median, and various percentage thresholds. This indicator helps traders identify significant retracement levels and possible support/resistance zones based on historical price movements.

  • Indicator Settings:
    - The indicator is named "Market // Atilla Yurtseven" and can be overlaid on the price chart.
    - Users can choose to use the closing price (Use Close Price) or the high/low prices.
    - Options are provided to show the ATH, ATL (All-Time Low), mean, median, and various minor and macro percentage levels.

  • Color Customization:
    - The script allows customization of text and line colors for different levels, making it adaptable to different charting styles.

  • Initial Variable Setup:
    - The script initializes several variables, including ATH, ATL, and arrays to store price data.
    The round and roundy functions are used to format the values for display purposes.

  • ATH/ATL Calculation:
    - The script checks if the current price exceeds the previous ATH and updates the ATH accordingly.
    - Similarly, the script calculates the ATL based on the lowest point after reaching the ATH.

  • Mean and Median Calculation:
    - The mean is calculated as the average drop from the ATH, while the median is the middle value in the sorted array of drops.
    - These statistics provide insight into the overall trend and are used to identify significant price levels.

  • Plotting the Levels:
    The script plots the ATH, ATL, mean, median, and various percentage retracement levels (12.5%, 25%, 37.5%, etc.).
    The levels are color-coded based on user preferences, making it easier to interpret the chart visually.

  • Labels and Text Display:
    - The script dynamically creates and updates labels on the chart to show the values of the ATH, ATL, mean, median, and other key levels.
    - This feature allows traders to see at a glance how far the current price is from these critical levels.

  • Hit Detection:
    - The script includes logic to detect if the price is within the range of the mean and median. If the price is within this range, the color of the fill between these levels changes, highlighting this area on the chart.


This script is a powerful tool for traders who want to analyze the retracement levels from historical highs. By displaying the mean, median, and various percentage levels, it provides a comprehensive view of potential support and resistance areas, helping traders make more informed decisions. The customizable nature of the script allows it to fit seamlessly into different trading strategies and charting styles.

Disclaimer:

This script is provided for informational and educational purposes only and does not constitute financial or investment advice. The author, Atilla Yurtseven, is not responsible for any financial losses or damages that may occur as a result of using this script. Trading and investing in financial markets involve risk, and past performance is not indicative of future results. Users should conduct their own research and consult with a qualified financial advisor before making any investment decisions. Use this script at your own risk.

Trade smart, stay safe.

Atilla Yurtseven
릴리즈 노트
Due to TradingView house rules, I received a warning for publishing two similar indicators separately. Therefore, I updated the script so that both the indicator and the oscillator work on the same script. Additionally, the oscillator plots in candlestick form.
CyclesforecastingTrend Analysis
AtillaYurtseven
I know Kung-Fu!

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항