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 автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?


Мои профили:

Отказ от ответственности