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 อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?