OPEN-SOURCE SCRIPT

B-Xtrender By Neal inspired from @Puppytherapy

Aggiornato
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.
Note di rilascio
Just updated the name
Note di rilascio
Revamped the entry and exit conditions to hitch a ride on the smoother line, ditching the old sluggish histogram method. Now this bad boy reacts quicker than a caffeine-fueled trader, jumping into trades faster than your finger can hit the "buy" button. Testing proved it's not just faster—it's like trading on turbo mode compared to the original snail-paced oscillator-based approach. 🚀
Note di rilascio
Updated the logic to make sure it is visually appealing so that it can only show the last 5 trades
Note di rilascio
Added the alert condition
Bands and ChannelsCandlestick analysis

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?


Anche su:

Declinazione di responsabilità