Simple_Xtrade

TrendVortex Power

This Pine Script indicator in TradingView creates weekly labels for each trading day (Monday to Friday) and generates buy/sell signals based on a swing calculation:

Weekday Labels
Purpose: Labels each trading day of the week with different colors.

Implementation:
Initializes variables for labels (mondayLabel, tuesdayLabel, etc.).
Uses dayofweek function to determine the current day of the week.
Checks if the current day is different from the previous day to avoid redundant label creation.
Creates labels using label.new function with appropriate colors based on the day of the week.

Buy and Sell Signals:
Purpose: Identifies buy and sell signals based on swing high and swing low points.
Implementation:
Uses a specified number of bars (no) to determine swing highs (res) and lows (sup).
Determines the direction (avd) based on whether the close is above the previous swing high or below the previous swing low.
Tracks the last non-zero direction change (avn).
Calculates the trailing stop loss (tsl) based on whether the direction is bullish or bearish.
Generates buy signals (Buy) when the close crosses above the trailing stop loss (tsl), and sell signals (Sell) when the close crosses below.

Alerts:
Purpose: Alerts are generated when buy or sell signals occur.

Implementation:
Uses alertcondition function to trigger alerts when Buy or Sell conditions are met.
Optional: Remove labels on weekends
Purpose: Prevents labels from appearing on weekends or non-trading days.
Implementation: Checks if the current day (dayOfWeek) is Saturday or Sunday, and deletes the labels (mondayLabel, tuesdayLabel, etc.) if true.

Summary:
This indicator provides visual and alert-based indications of buy and sell signals based on swing highs and lows, alongside labeling each trading day of the week in a distinctive manner. It's designed to assist traders in identifying potential entry and exit points based on these technical signals. Adjustments can be made to parameters such as the swing number (no) and color schemes to fit specific trading strategies or preferences.






보호된 스크립트입니다
이 스크립트는 클로즈 소스로 게시되며 자유롭게 사용할 수 있습니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다. 소스 코드는 보거나 수정할 수 없습니다.
면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

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