RPS Trading Signals & Backtesting
Overview:
The Enhanced Relative Price Strength (RPS) Indicator is designed for trend traders looking to identify the relative strength of stocks within a select universe. By comparing the price movements of chosen stocks over a specified period, this indicator helps traders make informed decisions about potential buying and selling opportunities.
Key Features:
Relative Strength Ranking: Our RPS indicator ranks the price performance of individual stocks against a curated selection, enabling users to pinpoint which stocks are exhibiting relative strength or weakness.
Customizable Stock Universe: The script evaluates 40 stocks, which include 30 high-weight NDX100 stocks, 4 major index ETFs (SPY, QQQ, DIA, IWM), and allows for the addition of 6 user-defined custom stocks.
Dynamic Color Gradients: The visual representation of the RPS score utilizes a gradient color scheme ranging from purple at low scores to red at high scores, leveraging the color for clear, immediate insight into stock performance.
Threshold Visualization: Users can set specific high (default 85) and low (default 15) thresholds for RPS, highlighted with solid line indicators and area fills. This visual aspect aids traders in quickly spotting entry and exit points.
Trading Signal Generation: The script includes logic for generating buy and sell signals according to defined RPS behaviors relative to the set thresholds, factoring in market conditions based on a long-term moving average.
Backtesting Capabilities: Users can backtest trading signals by inputting desired start and end dates, allowing traders to evaluate the effectiveness of the RPS strategy on historical data for various assets including stocks and cryptocurrencies (e.g., NVDA, LLY, GOOG, BTC, ETH, SOL).
User-Friendly Options: The script allows for adjustments such as moving average lengths, visibility of trading signals, and fills for ease of use and customization according to trading preferences.
How It Works:
The RPS Indicator functions by calculating the performance of stocks relative to each other. Based on the RPS trends, the indicator identifies when to enter or exit trades, providing a framework to capitalize on market movements.
Conclusion:
The Enhanced RPS Indicator aims to empower traders with a powerful analytical tool in their arsenal, tailored to simplify decision-making and bolster trading strategies. As this script evolves, we encourage feedback and collaboration from users to refine and enhance its capabilities further.
Trade Less, Earn More!
Indicators and strategies
Dynamic Box IndicatorThe BOX Indicator is a sophisticated trading tool designed to operate on 15-minute charts, aimed at enhancing market analysis. This indicator identifies the highest and lowest values of the first bar of each day, providing traders with strategic buy and sell signals. As a new day begins, the indicator dynamically updates these values to reflect current market conditions.
When the closing price surpasses the established highest level, a buy signal (LONG) is generated, signaling a strong potential upward movement in price. Conversely, when the closing price falls below the lowest level, a sell signal (SHORT) is activated, indicating that the price may experience a downward correction. On the chart, these critical levels are highlighted in eye-catching colors, while buy and sell signals are represented by symbols.
Additionally, the indicator includes an alert system for buy and sell conditions, allowing traders to minimize the risk of missing significant trading opportunities. This alert system enables users to monitor market changes in real time and take swift action when necessary.
Overall, the BOX Indicator serves as an effective tool that helps traders gain a deeper understanding of market movements and refine their trading strategies. It empowers users to enhance their technical analysis skills while maximizing their potential to capitalize on market fluctuations.
Weighted EMA IndicatorWeighted EMA Indicator is a technical analysis tool designed to assist traders in making informed investment decisions by analyzing price movements. This indicator utilizes Exponential Moving Averages (EMAs) calculated with specific weighting over a set period, aiming to provide a more accurate identification of market trends.
Purpose of Use:
The Weighted EMA Indicator helps traders observe how prices interact with certain moving averages. By using different EMA lengths (such as 13, 21, 34, 55, 89, and 144 periods), the indicator analyzes how prices behave around these moving averages. Users can calculate the "touch" counts for each EMA based on a defined lookback period (for example, 1000 bars). These touch counts indicate how frequently the price interacts with each EMA.
How to Use:
Adjusting Parameters: The indicator allows users to set the band width percentage, the number of lookback bars, and the lengths of various EMAs. These settings help traders adapt to different market conditions and strategies.
Observation: When displayed on a chart, the weighted EMA line provides insights into market trends. The weighted EMA ensures that EMAs with higher touch counts are weighted more heavily in the calculation, offering a more reliable analysis of price movements.
Decision Making: Traders can observe the intersections of the weighted EMA with price movements to make buy or sell decisions. For instance, if the price crosses above the weighted EMA, it could signal a buying opportunity, while crossing below may indicate a selling opportunity.
Conclusion:
The Weighted EMA Indicator is an effective tool for analyzing price movements and identifying market trends. With its flexible settings, users can create personalized trading strategies and make decisions that align with current market conditions. This enables traders to invest more consciously and strategically.
EMA and ATR Indicator BY DemirkanEMA 10 and ATR Indicator BY Demirkan
The EMA 10 and ATR Indicator combines two powerful technical indicators used to analyze trends and identify potential trading opportunities.
Indicator Components:
Exponential Moving Average (EMA):
EMA 10: Calculates the weighted average of the last 10 closing prices. This indicator is effective in tracking short-term price movements. When the price is above the EMA, it is considered that the trend is upward; when it is below, it is assessed as a downward trend.
Average True Range (ATR):
ATR: A measure of market volatility. When the ATR value falls within a specified range (between 10 and 14 in this indicator), the price movement is considered significant. This helps you base your trading decisions on more solid grounds.
Usage Recommendations:
Buy Signal: When the price is above the EMA and the ATR is within the specified range, this can be interpreted as a potential buy signal.
Sell Signal: When the price is below the EMA, this can be interpreted as a potential sell signal.
Chart Displays:
EMA Line: Displayed as a blue line, allowing you to see how the EMA relates to current price levels.
Price Status: Circles are used to indicate whether the price is above or below the EMA. A green circle indicates the price is above the EMA, while a red circle indicates it is below.
Background Colors: The chart background changes to green or red to highlight buy and sell conditions.
Aesthetic Presentation:
Using the "Flag" and "Below" parameters for the Price vs EMA indicator provides an aesthetically pleasing appearance on the chart. This type of visual presentation helps users quickly and easily grasp trading signals. Additionally, this aesthetic touch makes investors' charts look more professional and appealing.
This indicator is a useful tool for traders looking to develop short-term trading strategies. However, it should always be used in conjunction with additional analysis and other indicators.
Note: This indicator is for educational purposes only and should not be taken as investment advice.
Fibonacci Dynamic LevelsThis Pine Script code implements an Automatic Fibonacci Levels indicator for TradingView, designed to analyze market trends and visualize key Fibonacci retracement levels dynamically on the chart.
1. User Inputs and Settings
The script begins by defining several user-configurable settings. These include options to extend the Fibonacci lines left or right, display an anchor line (a diagonal line connecting the most recent swing high and low), and customize its color and width. Additionally, users can select the size of the swing detection (small, medium, or large) and enable or disable individual Fibonacci levels such as 0, 0.236, 0.382, and so forth, allowing for personalized adjustments based on trading preferences.
2. Trend Information
The script also incorporates a label that provides real-time trend information. Users can choose where to position this trend label on the chart (e.g., top right, bottom left), enhancing the indicator's usability by providing context on the market’s current direction.
3. Swing Detection
A crucial part of the script involves detecting swing highs and lows based on the selected swing size. This is achieved by applying a lookback period (34, 89, or 144 bars) to determine the highest and lowest points within that range. This detection is pivotal for accurately calculating the Fibonacci levels based on the identified swing points.
4. Fibonacci Level Calculation
The Fibonacci levels are drawn dynamically based on the trend direction determined by comparing the current price with a simple moving average (SMA) over 50 periods.
In a downtrend, Fibonacci levels are calculated from the swing low to the swing high, indicating potential resistance levels where prices might retrace.
Conversely, in an uptrend, Fibonacci levels are calculated from the swing high to the swing low, highlighting potential support levels where prices could bounce back.
For each Fibonacci level that is enabled, the script creates a line and a corresponding label displaying the level value and price, providing clear visual cues for traders.
5. Anchor Line Feature
The anchor line visually connects the most recent swing high and low points, offering a quick reference for traders to gauge the price action's context. This line is updated dynamically as new swing points are detected, reflecting the most current market conditions.
6. Trend Label
The trend label provides a summary of the market trend—either positive (uptrend), negative (downtrend), or flat. This label updates in real time, ensuring traders can quickly ascertain the prevailing market sentiment at a glance.
7. Cleanup Mechanism
Finally, the script includes mechanisms to clean up the drawn lines and labels whenever conditions change or when settings are modified. This ensures that the chart remains uncluttered and only displays relevant information based on the user's current settings.
Normalized ATRWhat is Normalized ATR?
Normalized ATR (Average True Range) is an indicator used to assess the volatility of a financial asset in a more understandable way. Normalized ATR normalizes the Average True Range (ATR) over a specific period relative to the current price level, providing a more comparable measure of volatility. It gives appropriate volatility across all timeframes.
What is ATR (Average True Range)?
ATR is a technical indicator used to measure the volatility of an asset's price. ATR is calculated by taking the highest value from the following three values:
Daily High - Daily Low: The difference between the highest and lowest prices within the day.
Daily High - Previous Day's Close: The difference between today's highest price and the previous day's closing price.
Daily Low - Previous Day's Close: The difference between today's lowest price and the previous day's closing price.
The largest value among these three is then averaged over a specified period (usually 14 days) to calculate the ATR.
Why Use Normalized ATR?
Normalized ATR provides a way to compare the ATR relative to the current price level. This is particularly useful when comparing assets with different price levels. For example, two assets may have the same ATR value, but due to differing price levels, the perception of volatility could vary. Normalization helps eliminate these discrepancies, enabling more consistent analysis. It gives appropriate volatility across all timeframes.
Normalized ATR Calculation
Normalized ATR is calculated by dividing the ATR value by the current price level:
Normalized ATR
=
(
ATR
Current Price
)
×
Normalization Factor
Normalized ATR=(
Current Price
ATR
)×Normalization Factor
Here, the "Normalization Factor" is typically a multiplier (e.g., 100) to convert the result into a more readable format.
Example Usage
Investors can use the Normalized ATR value to determine the volatility of an asset and formulate risk management strategies. A high Normalized ATR indicates that the asset has high volatility, while a low value suggests lower volatility.
This indicator helps investors better understand market conditions and make informed trading decisions.
Hull Moving Averages 10, 20, 50, 100, 200This script generates multiple Hull Moving Averages (HMAs) on a trading chart, allowing for comprehensive trend analysis across different timeframes. Five HMAs with lengths of 10, 20, 50, 100, and 200 periods are plotted on the chart, providing insights into short, medium, and long-term market trends.
Each HMA can be customized with individual colors to easily distinguish between the different timeframes, helping traders visually track momentum changes and trend strength across these intervals. The Hull Moving Average is known for reducing lag compared to other moving averages, which makes it particularly useful for identifying turning points more accurately.
With this script:
You can adjust the colors of each HMA line individually, ensuring optimal visual differentiation.
You can analyze short-term trends with HMA 10 and HMA 20, medium-term trends with HMA 50, and long-term trends with HMA 100 and HMA 200.
The chart provides an at-a-glance view of multi-timeframe trends, making it useful for trading strategies that rely on crossovers or divergence patterns.
This tool is ideal for traders who want to identify trend direction, strength, and possible reversal points with minimal lag.
DRKMetricsLibrary "DRKMetrics"
TODO: add library description here
curve(disp_ind)
Call function to get a certain curve of your strategy.
Parameters:
disp_ind (string)
Returns: Returns type of curve plot.
cleaner(disp_ind, plot)
Call function to filter out your Strategy plots
Parameters:
disp_ind (string)
plot (float)
cobraTable(option, position)
Assign this function to a random variable to get the "Performance Table"
Parameters:
option (simple string)
position (simple string)
VOLUME DIRECTION INDICATORDesigned for the 1-hour chart, this indicator shows:
Green Line: Volume when price rises, suggesting buying.
Red Line: Volume when price falls, indicating selling.
How to Use:
Watch for Crossover: When the Green Line moves above the Red, it might signal a budding uptrend.
Check Retracement: If the Green Line pulls back but stays above the Red, the uptrend could be strengthening.
Price Check: Look for a small price drop but not a reversal.
Trade Entry:
Enter at the high of the retracement candle.
Or wait for the Green Line to rise again.
For Precision: Draw a line at the retracement peak and switch to a shorter timeframe to find entry patterns above this line.
Remember: Use this with other tools for better trading decisions.
The Volume Direction Indicator provides a visual representation of market activity by assuming volume can be attributed to buying or selling based on price action within each bar. When the price closes higher than it opened, the volume for that period is considered as 'Bought Shares', plotted in green. Conversely, if the price closes lower, the volume is treated as 'Sold Shares', shown in red. This indicator resets daily to give a fresh perspective on trading activity each day.
Key Features:
Buying Pressure: Green line represents the cumulative volume during periods where the price increased.
Selling Pressure: Red line indicates the cumulative volume during price decreases.
Daily Reset: Accumulated values reset at the start of each new trading day, focusing on daily market sentiment.
Note: This indicator simplifies market dynamics by linking volume directly to price changes. It does not account for complex trading scenarios like short selling or market manipulations. Use this indicator as a tool to gauge general market direction and activity, not for precise transaction data.
MoonrushCAPITALCOM:US100
Moonrush Indicator - Multi-Timeframe Trend Analysis Tool
Moonrush is a trend analysis tool that helps traders see market trends and identify potential entry or exit points using a combination of Exponential Moving Averages (EMAs) and overbought/oversold signals. The tool has the ability to display data in an easy-to-read dashboard, eliminating the need for users to frequently change charts to get an overview of trends across multiple timeframes.
Key Features and Methods
Multi-Timeframe Trend Analysis:
Moonrush analyzes trends on 1-minute, 5-minute, 15-minute, 30-minute, 1-hour, 4-hour, and 1-day timeframes. It calculates the trend by comparing two user-defined EMA values (EMAfast and EMAslow). If the EMAfast crosses above the EMAslow, it indicates an uptrend (shown in green), while if it crosses below, it indicates a downtrend (shown in red). This allows traders to see the consistency of trends across multiple timeframes.
Customizable Dashboard:
Moonrush provides a dashboard that shows the trend and RSI index for each timeframe, with a table that allows traders to quickly assess market conditions. By displaying the RSI level, it can indicate overbought or oversold conditions. Green is used to indicate overbought conditions, while red is used for oversold conditions.
Overbought/Oversold Color Display:
The dashboard highlights overbought and oversold zones on the support EMA and resistance EMA lines, making it easier for users to identify reversal opportunities.
Key Parameters for Flexibility
EMA Adjustment and Toggle Switch:
Users can adjust the EMAfast and EMAslow parameters to suit their preferences, including turning the EMA display on or off as needed.
Dashboard Customization:
Traders can adjust the size and position of the dashboard to enhance usability, ensuring a clear display without cluttering the chart.
Focus on Risk Management:
Although Moonrush helps in trend detection, users should use this analysis in conjunction with appropriate risk management techniques. It is important to understand how Moonrush works, as the intersection of the EMA and RSI can help identify reversal and continuation patterns. However, users should consider the limitations of this indicator and examine the signals within a broader trading strategy.
How to Use Moonrush
Trend Confirmation:
Check the dashboard to see if trends across multiple timeframes are consistent, to create opportunities to follow or counter the trend.
Identifying Reversals:
Use the overbought and oversold color representations on the EMA support/resistance lines as reversal signals.
Customization:
Adjust the EMA values to your trading style and turn the display on or off as needed.
Moonrush, which combines EMA crossovers and RSI indicators, offers a versatile approach to trend analysis across multiple timeframes. However, traders should note that no single indicator can guarantee success. Users should conduct thorough backtesting and use it in accordance with their personal trading goals and risk tolerance.
##Please note that the tool (Moonrush) is not a guarantee of future market performance and should be used in conjunction with appropriate risk management. Users should ensure that they fully understand the methodology and limitations of the indicator before making any investment decisions. In addition, past performance is not an indication of future results.
Gold scalper 1 min or 30 secThis Pine Script code for TradingView is designed to create a trading indicator titled "Gold scalper 1 min or 30 sec." The indicator is primarily used for scalping gold and is focused on short-term timeframes (1 minute or 30 seconds).
### Key Components of the Code:
1. **Inputs:**
- **Resolution:** Users can set the timeframe for analysis (default is 240 minutes).
- **SMA (Simple Moving Average):** Users can specify the period for the SMA used in the calculations.
2. **Daily Highs and Lows:**
- The script calculates the previous day’s high (`yesterdayHigh`) and low (`yesterdayLow`) prices using the `request.security` function.
3. **SMA Calculation:**
- An SMA is computed based on the closing prices of the selected timeframe.
4. **Breakout Conditions:**
- The script detects breakouts using the SMA in relation to yesterday's high and low:
- A breakout upwards occurs when the SMA crosses above the previous day's high.
- A breakout downwards occurs when the SMA crosses below the previous day's low.
5. **RSI (Relative Strength Index) Calculations:**
- Two RSI values are calculated to assess market momentum:
- **Banker RSI:** Used for buy conditions.
- **Hot Money RSI:** Used for sell conditions.
- These include adjustable sensitivity factors and periods to customize the indicator’s sensitivity.
6. **Trade Direction Selection:**
- Users can select whether to trade long, short, or both directions.
7. **Buy and Sell Signals:**
- Buy conditions are set when the Retail Moving Average crosses the Banker Moving Average under certain conditions.
- Sell conditions are marked when the Banker Moving Average crosses under the specified sell threshold.
- These signals are visually represented on the chart with specific shapes (up arrows for buys and down arrows for sells).
8. **Alerts:**
- Alerts are generated for buy and sell signals to notify users when certain conditions are met.
9. **Trend Visualization:**
- The script visually indicates uptrends and downtrends on the chart by plotting colors based on the relationship between the current price, yesterday's high, and low.
### General Purpose:
This indicator is designed to assist traders in identifying potential buying and selling opportunities in the gold market based on short-term price movements and momentum indicators, helping them capitalize on quick price fluctuations that are characteristic of scalping strategies.
Bar count with New day Markerbased on bar count, highlight the first Bar with special colour on every day.
30D Vs 90D Historical VolatilityVolatility equals risk for an underlying asset's price meaning bullish volatility is bearish for prices while bearish volatility is bullish. This compares 30-Day Historical Volatility to 90-Day Historical Volatility.
When the 30-Day crosses under the 90-day, this is typically when asset prices enter a bullish trend.
Conversely, When the 30-Day crosses above the 90-Day, this is when asset prices enter a bearish trend.
Peaks in volatility are bullish divergences while troughs are bearish divergences.
Cumulative Volume Distribution Spread Intrabar with BandsUpdated Description:
This script, "Cumulative Volume Spread by Levels with Histogram", analyzes cumulative buying and selling pressure at various price levels of each bar, based on intra-bar data from a lower timeframe (like 1-second bars). It visualizes the results using lines, histograms, and color-filled areas.
Key Concepts:
Price Levels: The script splits each bar into four distinct levels:
High to max(open, close): The range from the highest price of the bar to the higher of the open or close prices.
Max(open, close) to midline: The range from the higher of the open or close to the midpoint of the bar.
Midline to min(open, close): The range from the midpoint to the lower of the open or close.
Min(open, close) to low: The range from the lower of the open or close to the lowest price of the bar.
Volume Pressures:
The script fetches volume data from a lower timeframe (default is 1-second bars) to capture intra-bar buying and selling pressure.
Buying Pressure: Calculated when the close is greater than the open.
Selling Pressure: Calculated when the close is less than the open.
Cumulative Pressures:
The script accumulates buy and sell volumes within each of the four price levels described above.
At the beginning of a new day, these cumulative values are reset.
Spread Calculation:
For each level, the script calculates the spread between cumulative buying and selling volumes (i.e., buy pressure minus sell pressure). A positive spread indicates more buying pressure, and a negative spread indicates more selling pressure.
The script calculates an Exponential Moving Average (EMA) of the spread changes for each section:
EMA Spread High to Max Open/Close
EMA Spread Max Open/Close to Midline
EMA Spread Midline to Min Open/Close
EMA Spread Min Open/Close to Low
Fill Between Levels:
The areas between the key price levels are filled based on whether the EMA of the spread is positive (green) or negative (red). This helps to visually indicate where buying or selling pressure is stronger.
Background Color:
The script determines an overall background color based on the relative strength of cumulative buying vs. selling pressure. If cumulative buying pressure is stronger across the levels, the background turns green; if selling pressure dominates, it turns red.
CMF and Scaled EFI OverlayCMF and Scaled EFI Overlay Indicator
Overview
The CMF and Scaled EFI Overlay indicator combines the Chaikin Money Flow (CMF) and a scaled version of the Elder Force Index (EFI) into a single chart. This allows traders to analyze both indicators simultaneously, facilitating better insights into market momentum and volume dynamics , specifically focusing on buying/selling pressure and momentum , without compromising the integrity of either indicator.
Purpose
Chaikin Money Flow (CMF): Measures buying and selling pressure by evaluating price and volume over a specified period. It indicates accumulation (buying pressure) when values are positive and distribution (selling pressure) when values are negative.
Elder Force Index (EFI): Combines price changes and volume to assess the momentum behind market moves. Positive values indicate upward momentum (prices rising with strong volume), while negative values indicate downward momentum (prices falling with strong volume).
By scaling the EFI to match the amplitude of the CMF, this indicator enables a direct comparison between pressure and momentum , preserving their shapes and zero crossings. Traders can observe the relationship between price movements, volume, and momentum more effectively, aiding in decision-making.
Understanding Pressure vs. Momentum
Chaikin Money Flow (CMF):
- Indicates the level of demand (buying pressure) or supply (selling pressure) in the market based on volume and price movements.
- Accumulation: When institutional or large investors are buying significant amounts of an asset, leading to an increase in buying pressure.
- Distribution: When these investors are selling off their holdings, increasing selling pressure.
Elder Force Index (EFI):
- Measures the strength and speed of price movements, indicating how forceful the current trend is.
- Positive Momentum: Prices are rising quickly, indicating a strong uptrend.
- Negative Momentum: Prices are falling rapidly, indicating a strong downtrend.
Understanding the difference between pressure and momentum is crucial. For example, a market may exhibit strong buying pressure (positive CMF) but weak momentum (low EFI), suggesting accumulation without significant price movement yet.
Features
Overlay of CMF and Scaled EFI: Both indicators are plotted on the same chart for easy comparison of pressure and momentum dynamics.
Customizable Parameters: Adjust lengths for CMF and EFI calculations and fine-tune the scaling factor for optimal alignment.
Preserved Indicator Integrity: The scaling method preserves the shape and zero crossings of the EFI, ensuring accurate analysis.
How It Works
CMF Calculation:
- Calculates the Money Flow Multiplier (MFM) and Money Flow Volume (MFV) to assess buying and selling pressure.
- CMF is computed by summing the MFV over the specified length and dividing by the sum of volume over the same period:
CMF = (Sum of MFV over n periods) / (Sum of Volume over n periods)
EFI Calculation:
- Calculates the EFI using the Exponential Moving Average (EMA) of the price change multiplied by volume:
EFI = EMA(n, Change in Close * Volume)
Scaling the EFI:
- The EFI is scaled by multiplying it with a user-defined scaling factor to match the CMF's amplitude.
Plotting:
- Both the CMF and the scaled EFI are plotted on the same chart.
- A zero line is included for reference, aiding in identifying crossovers and divergences.
Indicator Settings
Inputs
CMF Length (`cmf_length`):
- Default: 20
- Description: The number of periods over which the CMF is calculated. A higher value smooths the indicator but may delay signals.
EFI Length (`efi_length`):
- Default: 13
- Description: The EMA length for the EFI calculation. Adjusting this value affects the sensitivity of the EFI to price changes.
EFI Scaling Factor (`efi_scaling_factor`):
- Default: 0.000001
- Description: A constant used to scale the EFI to match the CMF's amplitude. Fine-tuning this value ensures the indicators align visually.
How to Adjust the EFI Scaling Factor
Start with the Default Value:
- Begin with the default scaling factor of `0.000001`.
Visual Inspection:
- Observe the plotted indicators. If the EFI appears too large or small compared to the CMF, proceed to adjust the scaling factor.
Fine-Tune the Scaling Factor:
- Increase or decrease the scaling factor incrementally (e.g., `0.000005`, `0.00001`, `0.00005`) until the amplitudes of the CMF and EFI visually align.
- The optimal scaling factor may vary depending on the asset and timeframe.
Verify Alignment:
- Ensure that the scaled EFI preserves the shape and zero crossings of the original EFI.
- Overlay the original EFI (if desired) to confirm alignment.
How to Use the Indicator
Analyze Buying/Selling Pressure and Momentum:
- Positive CMF (>0): Indicates accumulation (buying pressure).
- Negative CMF (<0): Indicates distribution (selling pressure).
- Positive EFI: Indicates positive momentum (prices rising with strong volume).
- Negative EFI: Indicates negative momentum (prices falling with strong volume).
Look for Indicator Alignment:
- Both CMF and EFI Positive:
- Suggests strong bullish conditions with both buying pressure and upward momentum.
- Both CMF and EFI Negative:
- Indicates strong bearish conditions with selling pressure and downward momentum.
Identify Divergences:
- CMF Positive, EFI Negative:
- Buying pressure exists, but momentum is negative; potential for a bullish reversal if momentum shifts.
- CMF Negative, EFI Positive:
- Selling pressure exists despite rising prices; caution advised as it may indicate a potential bearish reversal.
Confirm Signals with Other Analysis:
- Use this indicator in conjunction with other technical analysis tools (e.g., trend lines, support/resistance levels) to confirm trading decisions.
Example Usage
Scenario 1: Bullish Alignment
- CMF Positive: Indicates accumulation (buying pressure).
- EFI Positive and Increasing: Shows strengthening upward momentum.
- Interpretation:
- Strong bullish signal suggesting that buyers are active, and the price is likely to continue rising.
- Action:
- Consider entering a long position or adding to existing ones.
Scenario 2: Bearish Divergence
- CMF Negative: Indicates distribution (selling pressure).
- EFI Positive but Decreasing: Momentum is positive but weakening.
- Interpretation:
- Potential bearish reversal; price may be rising but underlying selling pressure suggests caution.
- Action:
- Be cautious with long positions; consider tightening stop-losses or preparing for a possible trend reversal.
Tips
Adjust for Different Assets:
- The optimal scaling factor may differ across assets due to varying price and volume characteristics.
- Always adjust the scaling factor when analyzing a new asset.
Monitor Indicator Crossovers:
- Crossings above or below the zero line can signal potential trend changes.
Watch for Divergences:
- Divergences between the CMF and EFI can provide early warning signs of trend reversals.
Combine with Other Indicators:
- Enhance your analysis by combining this overlay with other indicators like moving averages, RSI, or Ichimoku Cloud.
Limitations
Scaling Factor Sensitivity:
- An incorrect scaling factor may misalign the indicators, leading to inaccurate interpretations.
- Regular adjustments may be necessary when switching between different assets or timeframes.
Not a Standalone Indicator:
- Should be used as part of a comprehensive trading strategy.
- Always consider other market factors and indicators before making trading decisions.
Disclaimer
No Guarantee of Performance:
- Past performance is not indicative of future results.
- Trading involves risk, and losses can exceed deposits.
Use at Your Own Risk:
- This indicator is provided for educational purposes.
- The author is not responsible for any financial losses incurred while using this indicator.
Code Summary
//@version=5
indicator(title="CMF and Scaled EFI Overlay", shorttitle="CMF & Scaled EFI", overlay=false)
cmf_length = input.int(20, minval=1, title="CMF Length")
efi_length = input.int(13, minval=1, title="EFI Length")
efi_scaling_factor = input.float(0.000001, title="EFI Scaling Factor", minval=0.0, step=0.000001)
// --- CMF Calculation ---
ad = high != low ? ((2 * close - low - high) / (high - low)) * volume : 0
mf = math.sum(ad, cmf_length) / math.sum(volume, cmf_length)
// --- EFI Calculation ---
efi_raw = ta.ema(ta.change(close) * volume, efi_length)
// --- Scale EFI ---
efi_scaled = efi_raw * efi_scaling_factor
// --- Plotting ---
plot(mf, color=color.green, title="CMF", linewidth=2)
plot(efi_scaled, color=color.red, title="EFI (Scaled)", linewidth=2)
hline(0, color=color.gray, title="Zero Line", linestyle=hline.style_dashed)
- Lines 4-6: Define input parameters for CMF length, EFI length, and EFI scaling factor.
- Lines 9-11: Calculate the CMF.
- Lines 14-16: Calculate the EFI.
- Line 19: Scale the EFI by the scaling factor.
- Lines 22-24: Plot the CMF, scaled EFI, and zero line.
Feedback and Support
Suggestions: If you have ideas for improvements or additional features, please share your feedback.
Support: For assistance or questions regarding this indicator, feel free to contact the author through TradingView.
---
By combining the CMF and scaled EFI into a single overlay, this indicator provides a powerful tool for traders to analyze market dynamics more comprehensively. Adjust the parameters to suit your trading style, and always practice sound risk management.
4AM-5AM BRT HighlighterThe 4AM-5AM BRT Highlighter is a simple yet effective tool designed to visually mark your preferred trading time on the chart. It highlights the period between 4:00 AM and 5:00 AM Brazilian Time (BRT/UTC-3) by default, helping you stay focused and aware of your prime trading window.
Key Features:
Clear Visual Highlight: Colors the background of your chart during the chosen timeframe, making it easy to see when your trading session starts and ends.
Customizable Colors: Easily adjust the highlight color and transparency to suit your visual preferences.
Accurate Time Conversion: Automatically accounts for Brazilian Time (BRT), ensuring the highlight appears correctly no matter your chart’s default timezone.
Whether you're trading currencies, metals, indexes, or cryptocurrencies, this indicator helps you maintain focus during your dedicated trading hour by clearly marking your active period on the chart.
MultiTimeframe Candles for Full Time Frame Continuity AnalysisIn honor of Rob Smith (R.I.P), the creator of TheStrat, I decided to try to figure out how to make an indicator that graphically shows you the price levels and movements on higher timeframes.
The goal is to have full timeframe continuity with TheStrat. Ideally when you are analyzing the lower time, you want it to be in continuity with the higher time frames.
How to Use It:
All you have to do is put on the indicator the number of times you desire.
So if you want the hourly, the daily, the weekly, and the monthly, then you have to just put on the indicator 4 times--once for each timeframe.
Then you go into each one you put on the chart and go to the drop down menu where you choose the timeframe you want displayed.
In the future, I'll do a video to show you exactly how that works, but I think you guys can figure it out.
Price in Time MarkerThis is intended to get the price of a market at a specific time of day, the intent being to mark the price of 'bankers fixes' such as the 'London 4pm fix' or the 'Tokyo fix', though can be used to mark any time of interest.
It shows the price up until the next days selected time. You can select the time you want to see, in a designated time zone, and it should find the correct time in your brokers zone and mark a line.
The sample chart also shows the price at this brokers day / close for reference in purple.
There are still some glitches where at least some AU, NZ and JP times don't show, but I hope to address this later.
Dynamic 4-Hour Candle (Accurate Highs and Lows)This gives a dynamic 4 hour history of the current price, so that you can assess the current trend. I found lots of indicators that looked at the previous 4 hr candle, but they then immediately switched to the new 4 hr candle when it started to be formed. this indicator looks back at the rolling previous 4 hours.
70% rule strength/trend/reversalThis indicator tells you which candle closed strong for the day by identifying if the price closed above 70% of the candle's total height. this can help you identify reversals/new trends/ renewed strength in the current trend.
The indicator colors such candle green and if the candle closes with increase in price by 5% or higher then marks an asterisk under the candle.
HOPE THIS HELPS
Harmony Signal Flow By ArunThis Pine Script strategy, titled "Harmony Signal Flow By Arun," uses the Relative Strength Index (RSI) indicator to generate buy and sell signals based on custom thresholds. The script incorporates stop-loss and target management and restricts new trades until the previous position closes. Here's a detailed description:
Custom RSI Metric:
The strategy calculates a 5-period RSI based on the closing price, aiming for a more responsive measure of price momentum.
RSI thresholds are defined:
Lower threshold (30): Indicates oversold conditions, triggering a potential buy.
Upper threshold (70): Indicates overbought conditions, prompting a possible sell.
Entry Conditions:
Buy Signal: The strategy initiates a buy order when the RSI crosses above the lower threshold (30), indicating a shift from oversold conditions.
Sell Signal: A sell order is triggered when the RSI crosses below the upper threshold (70), suggesting an overbought reversal.
Only one order (buy or sell) can be active at a time, ensuring that a new trade begins only when there’s no existing position.
Stop-Loss and Target Management:
For each trade, stop-loss and target conditions are applied to manage risk and secure profits.
For Buy Positions:
Stop-loss is set 100 points below the entry price.
Target is set 150 points above the entry price.
For Sell Positions:
Stop-loss is set 100 points above the entry price.
Target is 150 points below the entry price.
The strategy closes the trade when either the stop-loss or target is met, marking the trade as "closed" and allowing a new trade entry.
Trade Sequencing:
A new trade (buy or sell) is only permitted after the previous position hits either its stop-loss or target, preventing overlapping trades and ensuring clear trade sequences.
This sequential approach enhances risk management by ensuring only one active position at any time.
End-of-Day Closure:
All open positions are closed automatically at 3:25 PM (Indian market time) to avoid overnight exposure, ensuring the strategy remains strictly intraday.
The flag for trade entry is reset at the end of each day, enabling fresh trades the next day.
Chart Indicators:
The script plots buy and sell signals directly on the chart with visible labels.
It also displays the custom RSI metric with horizontal lines for the lower and upper thresholds, providing visual cues for entry and exit points.
Summary
This strategy is a momentum-based intraday trading approach that uses the RSI for identifying potential reversals and manages trades through predefined stop-loss and target levels. By enforcing trade sequencing and closing positions at the end of the trading day, it prioritizes risk management and seeks to capitalize on short-term trends while avoiding overnight market risks.
Opinicus PDH/PDL/ONH/ONL LabelsOpinicus PDH/PDL/ONH/ONL Labels is a powerful indicator designed for futures and index traders, particularly for products like NQ (NASDAQ 100 Futures) and ES (S&P 500 E-mini Futures). This private script highlights key price levels, offering clear, actionable insights to enhance your trading strategy.
🔑 Key Features:
Prior Day High (PDH) & Prior Day Low (PDL):
Automatically labels the highest and lowest price levels from the previous trading day.
Overnight High (ONH) & Overnight Low (ONL):
Marks critical price points during the overnight session, providing valuable support and resistance levels.
Color-Coded Labels:
Easily distinguish between PDH, PDL, ONH, and ONL with distinct colors for quick reference during active trading.
Smart Money Concepts IndicatorBEST ICT AND SMC INDICATOR
The **Smart Money Concepts Indicator** is designed to enhance trading decisions by incorporating key principles from Smart Money Concepts (SMC), focusing on the detection of market structure changes, liquidity zones, order flow, and order blocks. This indicator is particularly useful for traders looking to understand market dynamics and make informed trading decisions based on advanced market analysis.
#### Key Features:
1. **Break of Structure (BOS)**:
- Identifies upward and downward breaks in market structure, indicating potential trend reversals.
- Visual markers on the chart help traders spot these critical levels.
2. **Change of Character (CHOCH)**:
- Detects significant changes in market direction, highlighting potential shifts in momentum.
- Clearly labeled signals indicate when the market may be changing its character.
3. **Order Blocks**:
- Highlights order blocks, which are key areas where significant buying or selling has occurred.
- Provides visual cues for potential support and resistance zones.
4. **Liquidity Zones**:
- Marks liquidity zones, indicating areas where buy-side or sell-side liquidity may be targeted.
- Helps traders understand where the market might draw liquidity.
5. **Dynamic Take Profit and Stop Loss Levels**:
- Calculates and plots take profit (TP) and stop loss (SL) levels based on the Average True Range (ATR) for adaptive risk management.
- Customizable multipliers allow traders to adjust levels based on their risk tolerance.
6. **Order Flow Analysis**:
- Displays bullish and bearish order flow signals based on candle close relative to open.
- Provides insights into market sentiment and potential future price action.
#### How to Use:
- **Identifying Entry and Exit Points**: Use BOS and CHOCH signals to find potential entry points, while leveraging TP and SL levels for risk management.
- **Market Analysis**: Analyze order blocks and liquidity zones to make informed decisions on market behavior.
- **Visual Confirmation**: The clear visual cues provided by the indicator make it easier to interpret market movements and align trades with institutional behavior.
#### Conclusion:
The Smart Money Concepts Indicator is an invaluable tool for traders looking to enhance their understanding of market structure and make more informed trading decisions. By integrating advanced concepts like BOS, CHOCH, and liquidity analysis, this indicator helps traders navigate the complexities of the market with greater confidence.