OPEN-SOURCE SCRIPT

Trend and RSI Bias Fusion

מעודכן
Trend and RSI Bias Fusion Indicator
This is my first ever indicator. I created this indicator for myself. I was inspired by the indicators created by Bjorgum, Duyck and QuantTherapy and decided to create multiple indicators that either work well combined with their indicators or something new that applies some of their indicator concepts. I decided to share this because I believe in learning and earing together as a community. I will later share the rest of the indicators I have created. This is my first time ever sharing any indicator so if you guys have any questions or suggestions write them.

Overview

The "Trend and RSI Bias Fusion" indicator is a versatile tool designed to help traders identify key market trends, potential reversals, momentum shifts, and RSI-based pullbacks. This indicator fuses trend analysis and RSI bias into a single, comprehensive visual, making it easier to make informed trading decisions across various timeframes and market conditions.

Features

Dual Timeframe Analysis: Combines trend analysis on a higher timeframe (e.g., Daily) with RSI analysis on a lower timeframe (e.g., 4-Hour), providing a more granular view of market conditions. You can, however, choose any timeframe you want for instance 12hr with trend and 2hr RSI analysis.

Trend and Momentum Visualization: The indicator uses Exponential Moving Averages (EMAs) to determine trend direction and colors the chart background to reflect bullish or bearish trends, along with momentum strength.

RSI Bias Detection: Automatically identifies overbought and oversold conditions using the RSI, providing a clear indication of potential market reversals or continuations.
Color-Coded Bars: Optionally color codes bars based on either trend direction or RSI bias, giving you a quick visual cue of the market's state.

Reversal Markers: Displays trend reversal markers on the chart when the short-term EMA crosses over or under the long-term EMA.


Calculation Details

Exponential Moving Averages (EMAs): The indicator calculates short-term and long-term EMAs using the closing prices.
The crossover between these EMAs is used to determine the trend direction:
Short-Term EMA: Typically a 14-period EMA.
Long-Term EMA: Typically a 50-period EMA.

Momentum: Calculated using the RSI and then centered around zero by subtracting 50. This allows the indicator to distinguish between positive and negative momentum.

RSI Bias: The RSI is calculated on a lower timeframe to detect overbought (above 60) and oversold (below 40) conditions, which are used to determine the bias:
RSI Above 60: Indicates potential overbought conditions (bearish bias).
RSI Below 40: Indicates potential oversold conditions (bullish bias).

How to Use the Indicator

Select Your Timeframes: Choose your preferred trend timeframe (e.g., Daily) and RSI timeframe (e.g., 4-2 Hour) in the indicator settings. These should match your trading strategy and the asset class you're analyzing.

Interpret Trend and Momentum

Background Color: The background color reflects the current trend direction:
Green/Lime: Uptrend, with lime indicating positive momentum.
Red/Maroon: Downtrend, with maroon indicating positive momentum within a downtrend.
Momentum Histogram: The histogram plot shows momentum, color-coded by the trend. A histogram above zero with green/lime indicates bullish momentum, while below zero with red/maroon indicates bearish momentum.

תמונת-בזק
Image above: Both RSI and Trend are set to daily, uses RSI bar color

Read RSI Bias:
The RSI bias line helps identify the current market state relative to overbought or oversold levels. The RSI value is plotted on the chart, with lines at 60 and 40 to mark these levels.
When the RSI crosses above 60, it suggests a bearish bias; crossing below 40 suggests a bullish bias.

Use Reversal Markers: The indicator places small circles on the chart at points where the short-term EMA crosses the long-term EMA, signaling potential trend reversals.


Bar Color Customization:
You can choose to color the bars based on either the trend or the RSI bias in the indicator settings. In the Images below I have changed the colors to fit my personal style , Blue for uptrend and Pink for downtrend:

Trend-Based: Bars will reflect the trend direction (green for uptrend or in this case blue, red for downtrend or in this case pink).
RSI-Based: Bars will reflect RSI conditions (yellow for overbought, maroon for oversold).

תמונת-בזק
Image above: RSI is set to 4hr and Trend is set to daily, uses RSI bar color

תמונת-בזק
Image above: RSI is set to 4hr and Trend is set to daily, uses Trend bar color

תמונת-בזק
Image above: Both RSI and Trend are set to daily, uses RSI bar color

תמונת-בזק
Image above: Both RSI and Trend are set to daily, uses Trend bar color

תמונת-בזק
Image above: Both RSI and Trend are set to daily, without bar color

תמונת-בזק
Image above: Both RSI and Trend are set to daily, how it looks on a clean chart

Example Use Case Swing Traders:
For instance, if you're trading a 4-hour chart of USDCHF:
Set the trend timeframe to Daily and the RSI timeframe to 4-Hour.
Watch for background color shifts and reversal markers to determine trend direction.
Use RSI bias to time your entries and exits, especially around overbought/oversold levels.
Enable bar coloring to quickly see when conditions favor either trend continuation or reversal.
This indicator is particularly effective for swing traders and those who want to align their trades with higher timeframe trends while using momentum and RSI for entry and exit signals.

For Day Traders

Timeframe Selection:
Trend Timeframe: Set to a higher intraday timeframe such as the 1 or 2 Hour chart.
RSI Timeframe: Set to a shorter timeframe like 15-10 Minutes or 5-Minutes to capture finer details of intraday momentum shifts.

Using the Indicator:
Trend Identification: Day traders can use the background color to quickly identify whether the market is in a bullish or bearish trend on the 1-Hour chart. A green background suggests looking for long opportunities, while a red background suggests short opportunities.
Momentum Analysis: The histogram can help day traders gauge the strength of the current trend. For example, if the histogram is green and above zero, the trader may consider buying pullbacks within the trend.

RSI Bias: Monitor RSI levels on the lower timeframe (e.g., 15-Minutes). If the RSI crosses below 40, it indicates an oversold condition, potentially signaling a buying opportunity, especially if it aligns with a bullish trend on the higher timeframe.

Trade Execution:
Look for entries when the RSI shows a reversal or pullback in the direction of the higher timeframe trend.
Use the trend reversal markers to confirm potential intraday reversals, adding extra confidence to trade setups.

For Scalpers

Timeframe Selection:
Trend Timeframe: Set to a short intraday timeframe like 15-Minutes or 5-Minutes.
RSI Timeframe: Use an even shorter timeframe, such as 1-Minute, to capture rapid price movements.

Final Notes:
The "Trend and RSI Bias Fusion" indicator is a powerful tool that combines trend analysis, momentum assessment, and RSI insights into one cohesive package. By integrating these different aspects, the indicator helps traders navigate complex market environments with greater clarity and confidence. Customize the settings to fit your specific trading style and market and use it to stay ahead of market trends and potential reversals.
My Scripts/Indicators/Ideas /Systems that I share are only for educational purposes!
הערות שחרור
Summary of Fixes:

Updated Timeframe Argument: Replaced "4H" with "240" for the 4-hour timeframe.
This should resolve the invalid timeframe error. If you continue experiencing issues or need further adjustments, please let me know!
הערות שחרור
New Update: Added the option to choose between "regular RSI" and "future smoothed RSI"

Future Smoothed RSI: Uses Heikin-Ashi data to smooth the RSI values, providing an alternative to the standard RSI.

Option: You can now select "regular RSI" or "future smoothed RSI" from the input settings.

Image below shows the smoothed RSI option:
https://www.tradingview.com/x/e7XghF0i/

Image below shows the regular RSI option:
https://www.tradingview.com/x/sZvUf8X6/
Relative Strength Index (RSI)Trend Analysis

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?


גם על:

כתב ויתור