OPEN-SOURCE SCRIPT

Uptrend & SMA

The "Uptrend and Close to SMA" indicator is designed to help traders identify when the price of a stock is in an uptrend and is trading near its Simple Moving Average (SMA) over a user-defined period. The indicator uses multi-timeframe analysis, allowing the user to select different timeframes for calculating the SMA.

Key Features:

SMA Calculation: The indicator calculates the SMA for a selected timeframe (e.g., daily, weekly, monthly) based on a user-specified period (default is 150 periods).

Multi-Timeframe Options: Users can choose between multiple timeframes (1 day, 1 week, 1 month, 3 months, 6 months, 12 months) to calculate the SMA, providing flexibility in trend analysis.

Proximity Threshold: The indicator includes a proximity threshold in percentage terms, allowing users to define how close the real-time price needs to be to the SMA to trigger a visual alert.

Uptrend Identification: The indicator identifies an uptrend when the real-time price is above the selected SMA.

Visual Alerts: If the price is above the SMA and within the defined proximity threshold, the background color of the chart will change to green, signaling that the stock is in an uptrend and close to the SMA.

Alert Condition: The indicator includes an alert condition that triggers when the price is in an uptrend and within the proximity threshold, allowing traders to be notified when their criteria are met.

Percentage Difference Display: A table displays the percentage difference between the real-time price and the SMA, providing a quick reference to see how far the price is from the SMA in percentage terms.

This indicator is especially useful for traders looking for potential buying opportunities when a stock is trending upwards but still near its moving average, indicating potential continuation or momentum.
150smaadikCandlestick analysisChart patternsmichastocksmichoMoving Averagessma

오픈 소스 스크립트

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

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

면책사항