OPEN-SOURCE SCRIPT

B-Xtrender By Neal inspired from @Puppytherapy

ที่อัปเดต:
Thanks to @puppytherapy for creating the original B-Xtrender indicator, available at this link: B-Xtrender by QuantTherapy

I played around the code to have entry and exit condition. The B-Xtrender QuantTherapy
indicator is a momentum-based tool designed to help traders identify potential trade opportunities by tracking shifts in market momentum. Using a smoothed momentum oscillator, it detects changes in trend direction and provides clear signals for entry and exit points.
Features
  1. Momentum Detection:
    Tracks market momentum using the BX-Trender Oscillator.
    Green bars indicate bullish momentum, while red bars indicate bearish momentum.
    Lighter shades of green/red reflect weakening momentum.

  2. Entry and Exit Signals:Entry Condition: A long trade is triggered when the oscillator changes from red to green.
    Exit Condition: A long trade exit is triggered when the oscillator changes from green to red.
  3. Dynamic PnL Calculation:
    Automatically calculates profit or loss in percentage (%) when a trade is exited.
    Positive PnL values are prefixed with `+`, and negative values are shown as `-`.

  4. Clear Visualization:
    Bar chart-style oscillator in a separate pane for better trend visualization.
    Trade labels on the main price chart for clear entry and exit points.


Inputs

  1. Short-Term Momentum Parameters:Short - L1: Length of the first EMA for short-term momentum calculations.
    Short - L2: Length of the second EMA for short-term momentum calculations.
    Short - L3: RSI smoothing period applied to the short-term momentum.
  2. Long-Term Momentum Parameters:
    • Long - L1: Length of the EMA for long-term momentum calculations.
    • Long - L2: RSI smoothing period applied to the long-term momentum.


Entry and Exit Logic

  1. Entry Condition:
    A long trade is triggered when:
    The BX-Trender Oscillator changes from red to green.
    This shift indicates bullish momentum.
  2. Exit Condition:
    A long trade exit is triggered when:
    The BX-Trender Oscillator changes from green to red.
    This shift indicates a loss of bullish momentum or the start of bearish momentum.
  3. PnL Calculation:
    When exiting a trade, the indicator calculates the profit or loss as a percentage of the entry price.
    • Example:
      • A profit is displayed as +5.67%.
      • A loss is displayed as -3.21%.



Visualization

  1. Oscillator Bars:Green Bars: Represent increasing bullish momentum.
    Light Green Bars: Represent weakening bullish momentum.
    Red Bars: Represent increasing bearish momentum.
    Light Red Bars: Represent weakening bearish momentum.
    Just make sure that you checked off the B-Xtrend oscillator off from the style so chart can be active
  2. Trade Labels:Entry Labels: Displayed below the candle with the text Entry, long [price].
    Exit Labels: Displayed above the candle with the text Exit [+/-PnL%].
  3. Bar Chart Pane:
    The oscillator is displayed in a separate pane for clear trend visualization.



Default Style

  1. Oscillator Colors:Green for bullish momentum.
    Red for bearish momentum.
    Light green and light red for weaker momentum.
  2. Trade Labels:
    • Green labels for entries.
    • Red labels for exits, with percentage PnL displayed.



Use Cases

  1. Momentum-Based Entries:
    Detects shifts in momentum from bearish to bullish for precise trade entry points.

  2. Trend Reversal Detection:
    Identifies when bullish momentum weakens, signaling an exit opportunity.

  3. Visual Simplicity:
    Offers an intuitive way to track trends with its bar chart-style oscillator and clear trade labels.


This indicator doesn't indicate that it will work perfectly. More updates on the way.
เอกสารเผยแพร่
Just updated the name
Bands and ChannelsCandlestick analysis

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

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


และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ