Correlation Coefficient [Giang]### **Introduction to the "Correlation Coefficient" Indicator**
#### **Idea behind the Indicator**
The "Correlation Coefficient" indicator was developed to analyze the linear relationship between Bitcoin (**BTCUSD**) and other important economic indices or financial assets, such as:
- **SPX** (S&P 500 Index): Represents the U.S. stock market.
- **DXY** (Dollar Index): Reflects the strength of the USD against major currencies.
- **SPY** (ETF representing the S&P 500): A popular trading instrument.
- **GOLD** (Gold price): A traditional safe-haven asset.
The correlation between these assets can help traders understand how Bitcoin reacts to market movements of traditional financial instruments, providing opportunities for more effective trading decisions.
Additionally, the indicator allows users to **customize asset symbols for comparison**, not limited to the default indices (SPX, DXY, SPY, GOLD). This flexibility enables traders to tailor their analysis to specific goals and portfolios.
---
#### **Significance and Use of Correlation in Trading**
**Correlation** is a measure of the linear relationship between two data series. In the context of this indicator:
- **The correlation coefficient ranges from -1 to 1**:
- **1**: Perfect positive relationship (both increase or decrease together).
- **0**: No linear relationship.
- **-1**: Perfect negative relationship (one increases while the other decreases).
- **Use in trading**:
- Identify **strong relationships or unusual divergences** between Bitcoin and other assets.
- Help determine **market sentiment**: For example, if Bitcoin has a negative correlation with DXY, traders might expect Bitcoin to rise when the USD weakens.
- Provide a foundation for hedging strategies or investments based on inter-asset relationships.
---
#### **Components of the Indicator**
The "Correlation Coefficient" indicator consists of the following key components:
1. **Main Data (BTCUSD)**:
- The closing price of Bitcoin is used as the central asset for calculations.
2. **Comparison Data**:
- Users can select different asset symbols for comparison. By default, the indicator supports:
- **SPX**: Stock market index.
- **DXY**: Dollar Index.
- **SPY**: Popular ETF.
- **GOLD**: Gold price.
3. **Correlation Coefficients**:
- Calculated between BTC and each comparison index, based on a Weighted Moving Average (WMA) over a user-defined period.
4. **Graphical Representation**:
- Displays individual correlation coefficients with each comparison index, making it easier for traders to track and analyze.
---
#### **How to Analyze and Use the Indicator**
**1. Identify Key Correlations:**
- Observe the correlation lines between BTC and the indices to determine positive or negative relationships.
- Example:
- If the **Correlation Coefficient (BTC-DXY)** sharply declines to -1, this indicates that when USD strengthens, Bitcoin tends to weaken.
**2. Analyze the Strength of Correlations:**
- **Strong Correlations**: If the coefficient is close to 1 or -1, the relationship between the two assets is very clear.
- **Weak Correlations**: If the coefficient is near 0, Bitcoin may be influenced by other factors outside the compared index.
**3. Develop Trading Strategies:**
- Use correlations to predict Bitcoin's price movements:
- If BTC has an inverse relationship with **DXY**, traders might consider selling BTC when the USD strengthens.
- If BTC and **SPX** are strongly correlated, traders can monitor the stock market to predict Bitcoin's trend.
**4. Evaluate Changes Over Time:**
- Use different timeframes (daily, weekly) to track the correlation's fluctuations.
- Look for unusual signals, such as a breakdown or shift from positive to negative relationships.
---
#### **Conclusion**
The "Correlation Coefficient" indicator is a powerful tool that helps traders analyze the relationship between Bitcoin and major financial indices. The ability to customize asset symbols for comparison makes the indicator flexible and suitable for various trading strategies. When used correctly, this indicator not only provides insights into market sentiment but also supports the development of intelligent trading strategies and optimized profits.
Индикаторы и стратегии
Did it move?That is the eternal question in trading.: Is the price moving? This indicators aims to answer that question. It is based on concepts from 2 Bars from "The Strat". This indicator measures the distance the current price is above the previous high or below the previous low and on two timeframes. The assumption is that the price is moving as long as the price is above or below the previous bar.
The distance the price moved is normalized by the standard deviation. This serves the trader in two ways: 1) you can quickly determine if a price movement is significant (score > 1), and 2) you can plan exits when the score falls below 1 (e.g., movement become insignificant). Movement upwards are colored green and down movements are red. When the price is also above the higher timeframe high (below the HTF low), the color are more intense. When the price is not moving, the background is highlighted.
Finally, there are two alert setting. One is for then the price stops moving (movement score falls below a threshold. The other is a exit/reversal warning. For example if there is a strong move in the opposite it will trigger that alert.
WVAD (Optimized Log Scaled)The WVAD (Optimized Log Scaled) indicator is a refined version of the classic Williams' Volume Accumulation/Distribution (WVAD). This version introduces logarithmic scaling for better visualization and usability, especially when dealing with large value ranges. It also includes EMA smoothing to highlight trends and reduce noise, providing traders with a more precise and clear representation of market dynamics.
Key Features:
1.Logarithmic Scaling:
Applies a log-based transformation to the WVAD values, ensuring extreme values are compressed while maintaining the overall structure of the data.
The log scaling allows better readability and interpretation, particularly for volatile or high-volume markets.
2.EMA Smoothing:
Uses an exponential moving average (EMA) to smooth the logarithmic WVAD values.
Helps reduce noise while preserving short-term trends, making it suitable for both trend-following and reversal strategies.
3.Customizable Parameters:
N (Lookback Period): Defines the accumulation period for calculating WVAD.
EMA Smoothing Period: Controls the sensitivity of the EMA applied to the logarithmic WVAD.
Decimal Places: Adjusts the precision of the displayed values for clearer visualization.
Line Colors: Fully customizable colors for both the raw WVAD line and the smoothed EMA.
4.Directional Preservation:
Keeps the positive and negative signs of WVAD to reflect accumulation (buying pressure) or distribution (selling pressure) in the market.
5.Zero Line Reference:
A horizontal zero line is plotted to help traders easily identify bullish (above 0) or bearish (below 0) market conditions.
How to Use:
Identify Trends: The smoothed WVAD line (EMA) can help detect trends or shifts in buying/selling pressure.
Crossovers: Use crossovers of the WVAD with the zero line as potential buy or sell signals.
Divergence: Spot divergences between price and the WVAD for early indications of reversals.
Applications:
Suitable for intraday, swing, or longer-term trading strategies.
Works across various asset classes, including stocks, commodities, and cryptocurrencies.
Chande Volatility-Based Trailing Stops This indicator is developed from a description outlined in the Chande - Kroll book, "The New Technical Trader". It is designed to help control risk by plotting two lines that function as long and short trailing stops.
How does it work?
"These stops are derived from recent highest high or lowest low. They adjust based on volatility. However, to avoid giving up a sizable chunk of profit before the stop is hit, it is modified in such a way that the stop can only advance with price, not retreat. This will lock in a greater portion of potential profits..."
Settings:
The default settings are those described in the book. They are described as being best for intermediate term trades. Use the multiplier to tighten or loosen the stop. A smaller multiplier will result in tighter stops. It is recommended to adjust this value for your preferred timeframe. You can toggle the trailing stop lines on or off as well as cross over marker.
Liquid Pours XtremeStrategy Description: Liquid Pours Xtreme
The Liquid Pours Xtreme is an innovative trading strategy that combines the analysis of specific time-based patterns with price comparisons to identify potential opportunities in the forex market. Designed for traders seeking a structured methodology based on clear rules, this strategy offers integration with Telegram for real-time alerts and provides visual tools to enhance trade management.
Key Features:
Analysis of Specific Time Patterns: The strategy captures and compares closing prices at two key moments during the trading day, identifying recurring patterns that may indicate future market movements.
Dynamic SL and TP Levels Implementation: Utilizes tick-based calculations to set Stop-Loss and Take-Profit levels, adapting to the current market volatility.
Advanced Telegram Integration: Provides detailed alerts including information such as the asset, signal time, entry price, and SL/TP levels, facilitating real-time decision-making.
Complete Customization: Allows users to adjust key parameters, including operation schedules, weekdays, and visual settings, adapting to different trading styles.
Enhanced Chart Visualization: Includes visual elements like candle color changes based on signal state, event markers, and halos to highlight important moments.
Default Strategy Properties: Specific configuration for optimal risk management and simulation.
How the Strategy Works
Capturing Prices at Key Moments:
- The strategy records the closing price at two user-defined specific times. These times typically correspond to periods of high market volatility, such as the opening of the European session and the US pre-market.
- Rationale: Volatility and trading volume usually increase during these times, presenting opportunities for significant price movements.
Generating Signals Based on Price Comparison:
- Buy Signal: If the second closing price is lower than the first, it indicates possible accumulation and is interpreted as a bullish signal.
- Sell Signal: If the second closing price is higher than the first, it suggests possible distribution and is interpreted as a bearish signal.
- Signals are only generated on selected trading days, allowing you to avoid days with lower liquidity or higher risk.
Calculating Dynamic SL and TP Levels:
- Stop-Loss (SL) and Take-Profit (TP) levels are calculated based on the entry price and a user-defined number of ticks, adapting to market volatility.
- The strategy offers the option to base these levels on the close of the signal candle or the open of the next candle, providing flexibility according to the trader's preference.
- SL and TP boxes are drawn on the chart for visual reference, facilitating trade management.
Automatic Execution and Alerts:
- Upon signal generation, the strategy automatically executes a market order (buy or sell).
- Sends a detailed alert to your Telegram channel, including essential information for quick decision-making.
Visual Elements:
- Colors candles based on the signal state: buy, sell, or neutral, allowing for quick trend identification.
- Provides a smooth color transition between signal states and uses markers and halos to highlight important events and signals on the chart.
Trade Management:
- Manages open trades with automatic exit conditions based on the established SL and TP levels.
- Includes mechanisms to prevent exceeding TradingView's limitations on boxes and labels, ensuring optimal script performance.
Originality and utility:
- This strategy incorporates a unique approach focusing on specific time patterns and their relationship to institutional activity in the market.
How to Use the Strategy
Add the Script to the Chart:
- Go to the indicators menu in TradingView.
- Search for " Liquid Pours Xtreme " and add it to your chart.
Set Up Telegram Alerts:
- Enter your Telegram Chat ID in the script parameters to receive alerts.
- Customize the Buy and Sell alert messages as desired.
Configure Time Patterns:
- Set the hours and minutes for the two times you want to compare closing prices, aligning them with relevant market sessions or events.
Set SL and TP Parameters:
- Define the number of ticks for the Stop-Loss and Take-Profit levels, adapting them to the asset you're trading and your risk tolerance.
- Choose the basis for SL and TP calculation (close of the signal candle or open of the next candle).
Select Trading Days:
- Enable or disable trading on specific days of the week, allowing you to avoid days with lower activity or unexpected volatility.
Customize Visual Elements:
- Adjust the colors and styles of visual elements to enhance readability and suit your personal preferences.
Monitor the Strategy:
- Observe the chart for signals and use Telegram alerts to stay informed of new opportunities, even when you're not at your terminal.
Testing and Optimization:
- Use TradingView's backtesting features to evaluate the historical performance of the strategy with different parameters.
- Adjust and optimize the parameters based on the results and your own analysis.
Adjust the Strategy Properties:
- Ensure that the strategy properties (order size, commission, slippage) are aligned with your trading account and platform to obtain realistic results.
Strategy Properties (Important)
This script backtest is conducted on M30 EURUSD , using the following backtesting properties:
Initial Capital: $10,000
Order Size: 50,000 Contracts (equivalent to 0.5% of the capital)
Commission: $0.20 per order
Slippage: 1 tick
Pyramiding: 1 order
Verify Price for Limit Orders: 0 ticks
Recalculate on Order Execution: Enabled
Recalculate on Every Tick: Enabled
Recalculate After Order Filled: Enabled
Bar Magnifier for Backtesting Precision: Enabled
We use these properties to ensure a realistic preview of the backtesting system. Note that default properties may vary for different reasons:
- Order Size: It is essential to calculate the contract size according to the traded asset and desired risk level.
- Commission and Slippage: These costs can vary depending on the market and instrument; there is no default value that might return realistic results.
We strongly recommend all users adjust the Properties within the script settings to align with their accounts and trading platforms to ensure the results from the strategies are realistic.
Backtesting Results:
- Net Profit: $4,037.50 (40.37%)
- Total Closed Trades : 292
- Profitability Percentage: 26.71%
- Profit Factor: 1.369
- Max Drawdown: $769.30 (6.28%)
- Average Trade: $13.83 (0.03%)
- Average Bars in Trades: 11
These results were obtained under the mentioned conditions and properties, providing an overview of the strategy's historical performance.
Interpreting Results:
- The strategy has demonstrated profitability in the analyzed period, although with a win rate of 26.71%, indicating that success relies on a favorable risk-reward ratio.
- The profit factor of 1.369 suggests that total gains exceed total losses by that proportion.
- It is crucial to consider the maximum drawdown of 6.28% when evaluating the strategy's suitability to your risk tolerance.
Risk Warning:
Trading leveraged financial instruments carries a high level of risk and may not be suitable for all investors. Before deciding to trade, you should carefully consider your investment objectives, level of experience, and risk tolerance. Past performance does not guarantee future results. It is essential to conduct additional testing and adjust the strategy according to your needs.
---
What Makes This Strategy Original?
Time-Based Pattern Approach: Unlike conventional strategies, this strategy focuses on identifying time patterns that reflect institutional activity and macroeconomic events that can influence the market.
Advanced Technological Integration: The combination of automatic execution and customized alerts via Telegram provides an efficient and modern tool for active traders.
Customization and Adaptability: The wide range of adjustable parameters allows the strategy to be tailored to different assets, time zones, and trading styles.
Enhanced Visual Tools: Incorporated visual elements facilitate quick market interpretation and informed decision-making.
Additional Considerations
Continuous Testing and Optimization: Users are encouraged to perform additional backtesting and optimize parameters according to their own observations and requirements.
Complementary Analysis: Use this strategy in conjunction with other indicators and fundamental analysis to reinforce decision-making.
Rigorous Risk Management: Ensure that SL and TP levels, as well as position sizing, align with your risk management plan.
Updates and Support: I am committed to providing updates and improvements based on community feedback. For inquiries or suggestions, feel free to contact me.
---
Example Configuration
Assuming you want to use the strategy with the following parameters:
Telegram Chat ID: Your unique Telegram Chat ID
First Time (Hour:Minute): 6:30
Second Time (Hour:Minute): 7:30
SL Ticks: 100
TP Ticks: 400
SL and TP Basis: Close of the Signal Candle
Trading Days: Tuesday, Wednesday, Thursday
Simulated Initial Capital: $10,000
Risk per Trade in Simulation: $50 (-0.5% of capital)
Slippage and Commissions in Simulation: 1 tick of slippage and $0.20 commission per trade
---
Conclusion
The Liquid Pours Xtreme strategy offers an innovative approach by combining specific time analysis with robust risk management and modern technological tools. Its original and adaptable design makes it valuable for traders looking to diversify their methods and capitalize on opportunities based on less conventional patterns.
Ready for immediate implementation in TradingView, this strategy can enrich your trading arsenal and contribute to a more informed and structured approach to your operations.
---
Final Disclaimer:
Financial markets are volatile and can present significant risks. This strategy should be used as part of a comprehensive trading approach and does not guarantee positive results. It is always advisable to consult with a professional financial advisor before making investment decisions.
---
TRBOalgoThe Trboalgo Alerts Indicator is a standard trend-following tool
that utilizes price position and trail stop to generate alerts.
When the price is above its trail stop, the indicator indicates an uptrend by coloring the candles green and displaying a buy alert , signaling the start of a new trend.
When the price is below its trail stop, the indicator indicates an downtrend by coloring the candles red and displaying a sell alert , signaling the start of a new trend.
by this alert trader can identify overbought and oversold condition..
SMT Divergence ICT 01 [TradingFinder] Smart Money Technique🔵 Introduction
SMT Divergence (short for Smart Money Technique Divergence) is a trading technique in the ICT Concepts methodology that focuses on identifying divergences between two positively correlated assets in financial markets.
These divergences occur when two assets that should move in the same direction move in opposite directions. Identifying these divergences can help traders spot potential reversal points and trend changes.
Bullish and Bearish divergences are clearly visible when an asset forms a new high or low, and the correlated asset fails to do so. This technique is applicable in markets like Forex, stocks, and cryptocurrencies, and can be used as a valid signal for deciding when to enter or exit trades.
Bullish SMT Divergence : This type of divergence occurs when one asset forms a higher low while the correlated asset forms a lower low. This divergence is typically a sign of weakness in the downtrend and can act as a signal for a trend reversal to the upside.
Bearish SMT Divergence : This type of divergence occurs when one asset forms a higher high while the correlated asset forms a lower high. This divergence usually indicates weakness in the uptrend and can act as a signal for a trend reversal to the downside.
🔵 How to Use
SMT Divergence is an analytical technique that identifies divergences between two correlated assets in financial markets.
This technique is used when two assets that should move in the same direction move in opposite directions.
Identifying these divergences can help you pinpoint reversal points and trend changes in the market.
🟣 Bullish SMT Divergence
This divergence occurs when one asset forms a higher low while the correlated asset forms a lower low. This divergence indicates weakness in the downtrend and can signal a potential price reversal to the upside.
In this case, when the correlated asset is forming a lower low, and the main asset is moving lower but the correlated asset fails to continue the downward trend, there is a high probability of a trend reversal to the upside.
🟣 Bearish SMT Divergence
Bearish divergence occurs when one asset forms a higher high while the correlated asset forms a lower high. This type of divergence indicates weakness in the uptrend and can signal a potential trend reversal to the downside.
When the correlated asset fails to make a new high, this divergence may be a sign of a trend reversal to the downside.
🟣 Confirming Signals with Correlation
To improve the accuracy of the signals, use assets with strong correlation. Forex pairs like OANDA:EURUSD and OANDA:GBPUSD , or cryptocurrencies like COINBASE:BTCUSD and COINBASE:ETHUSD , or commodities such as gold ( FX:XAUUSD ) and silver ( FX:XAGUSD ) typically have significant correlation. Identifying divergences between these assets can provide a strong signal for a trend change.
🔵 Settings
Second Symbol : This setting allows you to select another asset for comparison with the primary asset. By default, "XAUUSD" (Gold) is set as the second symbol, but you can change it to any currency pair, stock, or cryptocurrency. For example, you can choose currency pairs like EUR/USD or GBP/USD to identify divergences between these two assets.
Divergence Fractal Periods : This parameter defines the number of past candles to consider when identifying divergences. The default value is 2, but you can change it to suit your preferences. This setting allows you to detect divergences more accurately by selecting a greater number of candles.
Bullish Divergence Line : Displays a line showing bullish divergence from the lows.
Bearish Divergence Line : Displays a line showing bearish divergence from the highs.
Bullish Divergence Label : Displays the "+SMT" label for bullish divergences.
Bearish Divergence Label : Displays the "-SMT" label for bearish divergences.
🔵 Conclusion
SMT Divergence is an effective tool for identifying trend changes and reversal points in financial markets based on identifying divergences between two correlated assets. This technique helps traders receive more accurate signals for market entry and exit by analyzing bullish and bearish divergences.
Identifying these divergences can provide opportunities to capitalize on trend changes in Forex, stocks, and cryptocurrency markets. Using SMT Divergence along with risk management and confirming signals with other technical analysis tools can improve the accuracy of trading decisions and reduce risks from sudden market changes.
Volume IQOverview
Volume IQ is meant to be the ‘intelligent volume distribution analyzer’ that takes much of the work of interpreting volume profiles off of your shoulders. It attempts to ‘do the technical analysis’ of volume data for you, with its capstone feature being "Trading Action Zones": ranges on the chart whose placement are determined by high and low volume nodes and sentiment analysis, and their adapting range affected by current volatility. These zones are meant to offer practical levels for potential entries, exits, targets, and stops while trading. These zones are the cherry on top of other useful and original features like visuals for grouping areas of similar buy/sell bias.
Originality and Usefulness
Volume IQ stands out for its originality by offering a data-driven approach to interpreting volume profiles and presenting its analysis on the chart. Unlike traditional volume profiles, Volume IQ automates much of the volume analysis process, helping traders identify potential opportunities and key trading areas with minimal effort. Its unique "Trading Action Zones" leverage high and low volume nodes, sentiment analysis, and current volatility to highlight practical levels for entries, exits, targets, and stops. Additionally, the tool provides grouped bias visuals, gradient coloring, and flexible customization options, allowing traders to gain a clearer understanding of market sentiment and structure. By simplifying complex volume data into actionable insights, Volume IQ provides a valuable and efficient resource for charting on TradingView.
The ‘Capstone’ Feature:
Trading ‘Action Zones’: Potential areas to take trading action based on built-in interpretations of high-volume nodes, low-volume nodes, and overarching chart sentiment (whose calculation is described below), and their interplay. Categorized by tiers - with Tier 2 zones intended as potential entry areas, and Tier 1 zones for exits or adds. These zones can also present logical areas to consider targets and stops, for example placing a stop loss in a Tier 1 sell zone below price where there is a series of low-volume nodes and potentially not much support. These zones help you quickly identify potential areas on the chart to ‘take action’.
Key Features:
Level and Block Biases: By estimating buying and selling volume, as well as leveraging intrabar data, the Volume IQ profile provides detailed buy/sell sentiment at individual price levels. It then groups together consecutive price levels with the same bias into what we call ‘Block Biases’ making it easy to determine larger price areas with distinct buying or selling pressure.
Chart Sentiment Analysis: A ‘continuously optimizing algorithm’ configured to find high average runups after a sentiment switch powers what we call ‘bias guidelines’ which border the Volume IQ profile and influence the determination of Action Zones. This algorithm is based on comparing many combinations of volume-weighted trends, largely based on smoothed volume weighted moving averages, on each bar, to ensure that the approach with the highest average runup amongst the combinations is used.
Zones of Control: A gradient-coloring approach to the profile highlighst areas of influence at a glance, making it easier to focus on key price levels.
Broad Compatibility: Works across all chart timeframes and market types - so long as volume data and OHLC candle data is available.
Highly Customizable: Configure features to align with your trading preferences and workflow. Show them all, or pick and choose the ones you want.
Settings
Use a Color Theme: Toggle between our predefined color themes or customize your own.
Style: Select your preferred color theme (e.g., "TI Fusion").
Colors (When Not Using a Theme): Customize primary, secondary, and background colors for your own non-theme styling.
Gradient Coloring: Enable or disable gradient shading of the profile for visual enhancement of zones with high control and low control.
Action Zones: Turn trading action zones on or off to highlight key trading levels.
Time Staggering: Enabling this option will simply ‘stagger’ the display of action zones horizontally. Zones closer to price will be placed leftwards, and as they become more distant from price, they will be ‘staggered out’ rightwards, to give an intuitive feel for the time it may take for price to reach these zones.
Tier Labels: Enable or disable the ‘tier labels’ (1 square for Tier 1, 2 squares for Tier 2) for action zones.
Bias Blocks: Toggle the display of grouped buy/sell bias blocks.
Extend: Choose how the bias blocks are displayed: “Left” to stretch them from the end to the beginning of the histogram, “Right” to extend from the end outwards, and “Across” to extend from the beginning to outwards past the end, enveloping the bias and volume count labels.
Opacity: Adjust the transparency level of bias blocks (0–100).
Level Bias Labels: Turn on/off labels for individual price level biases.
Bias Guidelines: Enable the visual guidelines for bias levels which border the profile.
Volume Counts: Toggle volume count labels for each of the profile’s price levels.
Split Buy/Sell Volume: Enable separate display of buy and sell volume for each level (buy volume on the left, sell volume on the right).
Font Size: Adjust the font size for these labels.
Histogram Display: Choose the display option for the histogram bars of the profile themselves: "Full View" will display the profile, and “None” will hide it.
BG Shading Logic: Adjust the background shading logic for the display: “Neutral” will use the ‘Neutral Color’ from your color theme to put some emphasis around high and low volume nodes, while “None” will remove any background shading.
Detail: This option allows you to set the granularity of the volume data used: “Bar Data” will simply use the bar data from the chart timeframe, while “Intrabar Data” will attempt to use bar data from a lower timeframe. Please note that using intrabar data may not be available with your TradingView subscription on some timeframes, and also that using intrabar data may increase calculation time.
Data Request: Choose the lookback for the volume distribution: "Long-term" will look back 500 bars, and “Short-Term” will halve this.
# of Levels: Specify the number of levels/rows to display for visualizing the distribution.
Pine Script Boilerplate ExampleI frequently receive questions about my coding style and logic, so I decided to publish a simple indicator that draws the OHLC of a higher timeframe as an example of my coding style. This example will also explain my approach to writing indicators.
This indicator showcases how I use Types and Methods to structure my code and maintain clarity in logic. It demonstrates how I collect input data, organize the flow of the code, and utilize the TradingView method feature.
The example illustrates:
1. The use of input settings within a settings object to keep configurations grouped together.
2. The use of Types to create an object that consolidates relevant data.
3. The collection of objects to create, update, and render elements on the chart.
Enhanced Swing Trading Strategy//@version=5
strategy("Enhanced Swing Trading Strategy", overlay=true)
// Input Parameters
smaShortLength = input.int(50, title="Short SMA Length")
smaLongLength = input.int(200, title="Long SMA Length")
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
takeProfitPerc = input.float(2.0, title="Take Profit (%)")
stopLossPerc = input.float(1.0, title="Stop Loss (%)")
riskPerc = input.float(1.0, title="Risk per Trade (%)")
alertOnSignal = input.bool(true, title="Enable Alerts")
// Indicators
smaShort = ta.sma(close, smaShortLength)
smaLong = ta.sma(close, smaLongLength)
rsi = ta.rsi(close, rsiLength)
= ta.macd(close, 12, 26, 9)
// Conditions
longCondition = ta.crossover(smaShort, smaLong) and rsi > rsiOversold and macdLine > signalLine
shortCondition = ta.crossunder(smaShort, smaLong) and rsi < rsiOverbought and macdLine < signalLine
// Position Sizing based on Risk
capital = strategy.equity
riskAmount = capital * (riskPerc / 100)
stopLossValue = riskAmount / (stopLossPerc / 100)
positionSize = stopLossValue / close
// Entry Signals
if (longCondition)
strategy.entry("Long", strategy.long, qty=positionSize)
if alertOnSignal
alert("Swing Trading: Long Position Opened", alert.freq_once)
if (shortCondition)
strategy.entry("Short", strategy.short, qty=positionSize)
if alertOnSignal
alert("Swing Trading: Short Position Opened", alert.freq_once)
// Exit Conditions
strategy.exit("Take Profit/Stop Loss",
from_entry="Long",
profit=takeProfitPerc,
loss=stopLossPerc)
strategy.exit("Take Profit/Stop Loss",
from_entry="Short",
profit=takeProfitPerc,
loss=stopLossPerc)
// Plotting
plot(smaShort, color=color.blue, title="SMA 50")
plot(smaLong, color=color.red, title="SMA 200")
hline(rsiOverbought, "RSI Overbought", color=color.red)
hline(rsiOversold, "RSI Oversold", color=color.green)
plot(macdLine, color=color.green, title="MACD Line")
plot(signalLine, color=color.orange, title="Signal Line")
// Draw Entry and Exit Labels
if (strategy.position_size > 0)
label.new(bar_index, high, "Long Open", style=label.style_label_up, color=color.green)
if (strategy.position_size < 0)
label.new(bar_index, low, "Short Open", style=label.style_label_down, color=color.red)
Session Highs and Lows IndicatorThis indicator marks the high and low levels for key trading sessions, allowing traders to identify significant price zones across different markets. The default session times are defined in UTC and will automatically adjust to your local timezone:
- **London Session (07:00-09:00 UTC)**: Tracks intraday liquidity zones for potential highs/lows.
- **New York Session (12:00-14:00 UTC)**: Highlights volatility during market overlaps with Europe.
- **Asia Session (23:00-01:00 UTC)**: Confirms trend continuation and retracement opportunities.
- **New York Close Session (19:00-21:00 UTC)**: Focuses on reversals and breakout tests during global transitions.
The script dynamically updates session highs and lows with clear labels and dashed horizontal lines for better visualization. **Time ranges can be adjusted to suit your trading preferences.** This makes the indicator flexible and effective for liquidity hunting, trend trading, and breakout strategies.
1 Percent Range TrackerThis indicator is a simple yet effective tool designed to calculate and display ±1% levels relative to the current market price. These levels are dynamically updated in real time, providing clear horizontal lines on the chart to visualize the 1% range above and below the current price.
The indicator also displays the precise numerical values of these levels on the right-hand price axis, making it easy to monitor critical thresholds at a glance.
Ultra Smart TrailIntroduction
The Ultra Smart Trail indicator is a comprehensive tool for traders seeking to identify and follow market trends efficiently. Combining dynamic trend detection with adaptive price bands, this indicator simplifies the process of understanding market direction and strength. It provides clear visual cues and customizable settings, catering to both novice and experienced traders.
Detailed Description
The Ultra Smart Trail indicator works by calculating a Trend Flow Line (TFL) using a hybrid moving average technique. This TFL dynamically adjusts to market conditions, smoothing out price fluctuations while remaining responsive to significant market shifts.
.........
Trend Flow Line (TFL)
A color-coded line indicating bullish, bearish, or neutral trends based on price movement relative to the TFL.
The TFL uses a combination of weighted moving averages (WMA) and double-weighted moving averages (DWMA) for accuracy.
.....
Dynamic Price Bands
The indicator plots upper and lower bands around the TFL, based on customizable multipliers of standard deviation. These bands adapt dynamically to volatility, helping traders spot overbought or oversold conditions.
The script calculates standard deviation-based bands with customizable multipliers, enabling precise adjustment to trading styles or instruments.
.....
Uptrend/Downtrend Highlights
The background and price bands visually differentiate trending and ranging markets, making it easier to identify high-probability trade setups.
.....
Reversal Alerts
By analyzing the relationship between price and bands, the script highlights potential reversals or continuation zones with distinct levels and fills.
.........
This indicator is a powerful addition to any trader’s toolkit, simplifying market analysis and enhancing decision-making.
VIDYA Auto-Trading(Reversal Logic)
Purpose and Unique Features
This script leverages the Variable Index Dynamic Average (VIDYA) to implement a dynamic trend-following auto-trading strategy. By adapting to price volatility, it optimizes entry points and strengthens risk management. Key differentiators of this strategy include:
VIDYA Characteristics:
Quickly responds to price momentum changes through dynamic calculations.
Incorporates volatility adjustments for enhanced trend detection accuracy.
ATR Band Utilization:
Measures market volatility to set stop-loss levels and guide risk management.
Supports more calculated trade entries in volatile markets.
Visual Trend Representation:
Displays "green zones" for uptrends and "red zones" for downtrends.
Enables intuitive understanding of trend continuation and reversal.
Usage Instructions
Entry Conditions
Long Entry:
Enter when the price crosses above the upper band.
Close any previous short positions and initiate a new long position.
Short Entry:
Enter when the price crosses below the lower band.
Close any previous long positions and initiate a new short position.
Exit Conditions
Take Profit and Stop Loss:
Reverse Position Strategy or Position Reversal Strategy
Account Size: ¥100,0000
Commissions and Slippage: Assumed commission of 94 pips per trade and slippage of 1 pip.
Risk per Trade: 10% of account equity (adjustable based on risk tolerance).
Script Parameters
VIDYA Length: The period for calculating the trend (e.g., 14).
Momentum Period: The lookback period for calculating the Chande Momentum Oscillator (CMO).
ATR Band Distance: Adjustment coefficient for the band width (e.g., 1.5).
Price Source: Choose from close, open, high, or low prices for VIDYA calculation.
Trend Display Colors: Customize the colors for uptrend and downtrend zones.
Visualization Options: Toggle the display of trend lines, bands, and other elements on or off.
Strategy Features and Enhancements
Dynamic Momentum Adaptation:
Utilizes VIDYA's sensitivity to momentum changes for rapid trend detection.
Volatility-Aware Risk Management:
Employs ATR to dynamically adjust risk levels, ensuring resilience in volatile markets.
Enhanced Visual Indicators:
Clearly plots trend zones and entry points on the chart.
Simplifies analysis with intuitive visual cues.
Credits
This script is inspired by the innovative work of BigBeluga, whose indicators laid the foundation for this enhanced trend-following strategy. By leveraging BigBeluga’s insights, this script integrates VIDYA, ATR Bands, and other technical elements to create a more dynamic and intuitive trading tool.
We extend our gratitude to BigBeluga and the broader trading community for their invaluable contributions, which have enabled this advanced implementation.
Disclaimer:
This script is provided for educational purposes, and past performance does not guarantee future results. Always practice proper risk management in live trading scenarios.
By leveraging VIDYA, this strategy provides a precise and intuitive approach to trend-following. It is particularly effective in capturing market reversals and adapting to sudden price changes in volatile environments.
TheHorsyAlgoPROThe Horsy algo is an automated strategy that uses any minute Higher timeframe range as reference and search for a purge of liquidity on the HTF high or low where buyside or sell side liquidity is, the algo only search this at specific desired times that can be configured according to the time you usually trade, the strategy is known as Turtle soup purge and reverse or lately as CRT.
Why is useful?
The purpose of this Algorithm is to help turtle soup traders to quickly identify when the market is likely to reverse the algo evaluates if the opportunity is worth it, base on risk reward and other desired filters. Also this strategy can help to quickly backtest the trader strategy it can be configured in different timeframes and adapt to the trader personality, they can easily see the results and statistics and notice if its profitable or not.
This algo is useful for intraday traders looking for a purge and reverse at a key times and at key HTF price levels this only looks the previous HTF highs and lows but is important to also monitor Order blocks, FVGs, gaps, or wicks to have the best results.
How it works and how it does it?
The Horsy algo simply Jumps from one type of liquidity to another one buyside to sell side or vice versa. In order for the algo to trigger an entry it has to meet these conditions
1. Take HTF liquidity, trade above a HTF high or below a HTF low in the selected time window
2. Make a change in the state of delivery with a close below the previous candle low for shorts and close above previous candle high for longs.
3. Allow for a reasonable risk reward, it will use the highest high for shorts and the lowest low for longs. The default take profit is the opposite side of the range.
4. Validate others user filters this include enter only trades aligned with the HTF bias, or trades aligned with the LTF bias or booth. The algo have the option to enter only premium and discount entries. And finally, an option to allow for different contract sizes depending of the maximum percent of the account we want to risk default is 1%. For this last option is important to check the initial balance and leverage are configured correctly, is disable by default because it requires more capital to perform well.
We can see the algo performing in the picture below with a short trade, notice there are some white lines, they are the high or the low of HTF candle that start generating inside candles in the HTF meaning a possible consolidation. The algo plots the HTF ranges in a shaded boxes as you can see below
The HTF bias as you can see in the picture is calculated based on the last close of the HTF meaning close above previous HTF high is bullish close below previous HTF low is bearish. This HTF bias level is also the last HTF mid-price or 50%. By default, this line is enabled.
The LTF bias is calculated based on the range created from the expansion outside the previous HTF range is also the mid-price. If the LTF close above previous HTF high is bullish and if the LTF close below previous HTF low is bearish. By default this LTF bias line is disable.
This strategy includes an original and personal developed code that uses dealing ranges to recognize if the market is expanding, retracing, reversing or consolidating. This allow the algo to exit the position when it detects a retracement or at the end of the expansion. This is the default exit type.
You can monitor the previous dealing ranges created in history with an option than can be enable, by default is disable, this ranges are created after price takes buyside and then sell side or vice versa. So this dealing ranges can be useful also to identify minor pools of liquidity and premium and discount in the lower timeframe.
The picture below is a long example, the exit in this case is just at the high of the range. The normal take profit is in a blue line for longs.
How to use it?
First select the desired HTF timeframe recommended is from 30min to 240min then you setup the chart on the lower timeframe you want to trade recommended is from 1min to 15min to enter. By default This strategy is designed to work for intraday during key times when price take stops and then moves quickly away from them. You can select as much as 6 different times or just one. After you select the desired time window where the algo will look for the purge and reverse, They are highlighted in the candles that change colors excluding the gray ones that indicates consolidation.
Then the Algo allow to performs several additional filters in the entries you can select if you want to trade only longs or shorts trades, you can select when to move the stop loss to Break even. In deviations of the risk or you can just select to remove risk when price hits the 50% of previous HTF range.
You can select the minimum desired risk reward of the trade before is allow to be taken. Once is configured correctly the algo should trigger signals with a triangle up or down plus the strategy entry.
At the beginning of the picture there are some blue lines in the HTF high low and close, this is to easily identify that the market is in the Asia session, the time can be configured by the user, these lines are normally gray.
On the right top of the screen you can see some statistics about the strategy how many trades it took, ARR is an approximated value of the accumulated total risk reward of all the trades when they get closed in the simulation.
Profit factor and percent profitable are also shown should be green it means that the strategy makes money over time. But apart from that is important to notice how it makes money it is stable over time? it is a roller coaster? that why I Include this other measurements MxcsTps is the maximum consecutives take profits and Mxcsls is the maximum consecutive stop losses it takes, the slash number after it is the consecutive Break evens. So this way you know what to expect and what is normal in the strategy.
The algo shows all the times the stop loss, take profit and break even level if enable in the colored red lines for short and blue lines for longs. You can also select how price will manage the profit or stoploss point meaning that you can choose to wait for the candle to close to invalidate your idea or to take profit. This is good to avoid liquidity sweeps but can also lead to mayor loses if the idea is wrong. The default setting is to close the trade when price takes the high or low where the stoploss is, the take profit is taken after a retracement to allow to profit on expansions. You can select also to exit on a reversal if you want to ride all the move. This last option has to be used with caution because sometimes price just retrace or reverse very fast decreasing the trade profit and overall strategy performance.
The algo have the option to use standard deviation from the normal risk if you prefer to prevent liquidity sweeps near the stop level this make wider stops but can lead to increased loses so it has to be used carefully.
Below is a picture that show the entry stop and take profit levels with an exit on a retracement activated.
Strategy Results
The backtesting results are obtained simulating a 2000usd account in the Micro Nasdaq using 1 contract per trade. Commission are set to 2usd per contract, slippage to 1tick. You can see in list of trades we are not risking more than 1 % percent of the account. The backtested range is from august to November 2024. This strategy doesn’t generate too much trades because of the time filters and conditions that has to be meet to take an entry but you can see the results of the last 4months with the available data that are around 32 trades.
The default settings for this strategy is HTF as 240min designed to work on a LTF 5min chart, the default purge times are 245-300, 745-800, 845-900, 1045-1100 and 1245-1300 UTC-4, the algo will look for shorts or longs, with a minimum risk reward of 2.0. With an additional filter of the HTFBias. The take profit is by default taken on the first retracement after hitting the target. The default settings are optimized to work on the Nasdaq or Spy, but can also perform well in other assets with the correct adjustments.
Remember entries constitute only a small component of a complete winning strategy. Other factors like risk management, position-sizing, trading frequency, trading fees, and many others must also be properly managed to achieve profitability. Past performance doesn’t guarantee future results. To really take advantage of this strategy you have to study turtle soup and the HTF key levels use this only as a confirmation that your overall idea will play out and use it to backtest your model.
Summary of features
·Adaptable strategy to different HTF timeframes from 1-1440min
· Select up to 6 different purge time windows UTC-4, UTC-5
· Choose desired Risk Reward per trade
· Easily see the HTF high low close and 50% key levels in the LTF
· Identify HTF consolidations that generate key major liquidity pools
· HTF/LTF bias filters to trade in favor of the big trend or in sync
· Shaded boxes that indicate if the market is bullish, bearish or consolidating
· See the current midpoint of the last expansion move
· Optimal trade entry filter to trade only in a discount or premium
· Customizable trade management take profit, stop, breakeven level
· Option to exit on a close, retracement or reversal after hitting the take profit level
· Option to exit on a close or reversal after hitting stop loss
· Configurable breakeven point with standard deviations or at 50% of the HTF
· Calculate different contract sizes depending of a percentage of the initial balance
· Standard deviations from normal risk can be used to prevent liquidity sweeps
· See dealing ranges history to check minor pools of liquidity and premium or discount
· Dashboard with instant statistics about the strategy current settings
Volatility vs ATRVolatility vs ATR Indicator Description for TradingView
Volatility vs ATR is a powerful custom indicator designed to help traders analyze and compare market volatility with the Average True Range (ATR). This indicator provides valuable insights into the dynamic behavior of asset prices, enabling traders to make informed decisions about market trends, potential reversals, and risk management.
What Does It Measure?
Volatility: Represents the degree of price variation over a given period. Calculated using standard deviation or other measures, it highlights periods of heightened or reduced market activity.
Average True Range (ATR): Measures the average range of price movement over a specific period, providing a sense of the asset's price fluctuations and market activity.
How It Works
The indicator plots both Volatility and ATR on the same chart, making it easy to visualize how these metrics interact.
Rising Volatility often signals increased market uncertainty or the beginning of strong trends.
ATR Spikes typically accompany high volatility, helping identify potential breakout or breakdown scenarios.
By tracking the interplay between these metrics, traders can anticipate shifts in momentum, recognize consolidation phases, and plan trades more effectively.
Key Features
Dual-Line Display: Clearly plots both Volatility (red) and ATR (blue) for easy comparison.
Customizable Periods: Allows you to adjust the lookback period for both metrics to match your trading style.
Versatile Application: Works across all asset classes, including stocks, forex, crypto, and commodities.
Why Use Volatility vs ATR?
Trend Analysis: Identify trending vs. ranging markets by observing the relationship between Volatility and ATR.
Breakout Confirmation: Use Volatility and ATR spikes as confirmation signals for potential breakouts.
Risk Management: Plan stop-loss levels and position sizing based on ATR values.
How to Use It
Add the indicator to your chart.
Look for periods where Volatility diverges from ATR to spot potential market shifts.
Use the indicator in conjunction with price action and other technical tools for a comprehensive analysis.
This indicator is ideal for traders looking to enhance their strategies by understanding market dynamics through the lens of volatility and average price movement.
Let me know if you’d like further refinement!
lib_kernelLibrary "lib_kernel"
Library "lib_kernel"
This is a tool / library for developers, that contains several common and adapted kernel functions as well as a kernel regression function and enum to easily select and embed a list into the settings dialog.
How to Choose and Modify Kernels in Practice
Compact Support Kernels (e.g., Epanechnikov, Triangular): Use for localized smoothing and emphasizing nearby data.
Oscillatory Kernels (e.g., Wave, Cosine): Ideal for detecting periodic patterns or mean-reverting behavior.
Smooth Tapering Kernels (e.g., Gaussian, Logistic): Use for smoothing long-term trends or identifying global price behavior.
kernel_Epanechnikov(u)
Parameters:
u (float)
kernel_Epanechnikov_alt(u, sensitivity)
Parameters:
u (float)
sensitivity (float)
kernel_Triangular(u)
Parameters:
u (float)
kernel_Triangular_alt(u, sensitivity)
Parameters:
u (float)
sensitivity (float)
kernel_Rectangular(u)
Parameters:
u (float)
kernel_Uniform(u)
Parameters:
u (float)
kernel_Uniform_alt(u, sensitivity)
Parameters:
u (float)
sensitivity (float)
kernel_Logistic(u)
Parameters:
u (float)
kernel_Logistic_alt(u)
Parameters:
u (float)
kernel_Logistic_alt2(u, sigmoid_steepness)
Parameters:
u (float)
sigmoid_steepness (float)
kernel_Gaussian(u)
Parameters:
u (float)
kernel_Gaussian_alt(u, sensitivity)
Parameters:
u (float)
sensitivity (float)
kernel_Silverman(u)
Parameters:
u (float)
kernel_Quartic(u)
Parameters:
u (float)
kernel_Quartic_alt(u, sensitivity)
Parameters:
u (float)
sensitivity (float)
kernel_Biweight(u)
Parameters:
u (float)
kernel_Triweight(u)
Parameters:
u (float)
kernel_Sinc(u)
Parameters:
u (float)
kernel_Wave(u)
Parameters:
u (float)
kernel_Wave_alt(u)
Parameters:
u (float)
kernel_Cosine(u)
Parameters:
u (float)
kernel_Cosine_alt(u, sensitivity)
Parameters:
u (float)
sensitivity (float)
kernel(u, select, alt_modificator)
wrapper for all standard kernel functions, see enum Kernel comments and function descriptions for usage szenarios and parameters
Parameters:
u (float)
select (series Kernel)
alt_modificator (float)
kernel_regression(src, bandwidth, kernel, exponential_distance, alt_modificator)
wrapper for kernel regression with all standard kernel functions, see enum Kernel comments for usage szenarios. performance optimized version using fixed bandwidth and target
Parameters:
src (float) : input data series
bandwidth (simple int) : sample window of nearest neighbours for the kernel to process
kernel (simple Kernel) : type of Kernel to use for processing, see Kernel enum or respective functions for more details
exponential_distance (simple bool) : if true this puts more emphasis on local / more recent values
alt_modificator (float) : see kernel functions for parameter descriptions. Mostly used to pronounce emphasis on local values or introduce a decay/dampening to the kernel output
Total Volume for Custom PeriodIndicator Description: Total Volume for Custom Period
This indicator calculates the total trading volume for a specified time period and displays the result in the top-right corner of the chart. It is designed for traders and analysts who want to see the cumulative volume over a defined range of time without needing to calculate it manually.
Features:
Customizable Time Period:
Define the start and end times of the calculation using the easy-to-use settings panel.
The indicator dynamically updates as you adjust the dates.
Accurate Volume Calculation:
Calculates the total trading volume for all candlesticks between the selected start and end dates.
Works on all assets and timeframes supported by TradingView (stocks, crypto, forex, etc.).
Fixed Display:
The result is displayed in the top-right corner of the chart inside a clear and simple table.
The value remains visible regardless of chart movement or zoom level.
Real-time Updates:
Automatically recalculates the volume when new data is added or the selected time period changes.
Customizable Design:
Black text with a transparent background ensures the display is clear and non-intrusive.
Large text size for easy readability.
Use Cases:
Volume Analysis: Quickly assess the total trading activity over a specific time period.
Historical Data Analysis: Compare volume data across different time intervals.
Custom Strategies: Use the total volume metric as part of a broader trading strategy or analysis.
How It Works:
Open the settings panel of the indicator and input the desired Start Date and End Date.
The indicator calculates the total trading volume for all candles within the selected range.
The result is displayed in the top-right corner of the chart.
This indicator is a simple yet powerful tool for traders who rely on volume analysis to make informed decisions. It enhances your ability to study market behavior during specific periods and provides insights into trading activity with ease.
Bullish and Bearish Harami DetectorHere’s a description of the script I built for you, designed for a **TradingView public indicator**:
### **Custom Bullish and Bearish Harami Detector with Timeframe Selection**
This custom Pine Script detects **Bullish Harami** and **Bearish Harami** candlestick patterns on the selected timeframe, with configurable settings for how many prior candles to consider for pattern detection.
---
### **Features:**
1. **Timeframe Selection:**
- **Input Field for Timeframe**: The script allows users to choose the timeframe for detecting patterns. For instance, you can set it to 1 hour, 4 hours, or even daily candles, ensuring the detection works as per your chosen market view.
- This is controlled by the `input.timeframe` function, and the user is prompted to select the desired timeframe (e.g., "1h", "4h", "1d").
2. **Enable/Disable Pattern Detection:**
- The user has the flexibility to enable or disable the detection of **Bullish Harami** and **Bearish Harami** patterns.
- The two toggles `detectBullishHarami` and `detectBearishHarami` allow users to turn on/off the detection for each pattern type.
3. **Customizable Bearish Candle Count for Bullish Harami:**
- The user can define how many prior **bearish candles** should be present before a **Bullish Harami** can be detected.
- The input variable `bearishCandleCountBullish` lets you choose how many previous bearish candles to consider for detecting a **Bullish Harami** (for example, the last 3, 5, or 6 bearish candles).
4. **Customizable Bullish Candle Count for Bearish Harami:**
- Similar to the Bullish Harami, the script allows the user to define how many prior **bullish candles** should be present before a **Bearish Harami** pattern is detected.
- The input variable `bearishCandleCountBearish` lets you select how many previous bullish candles to check for **Bearish Harami**.
5. **Pattern Detection Logic:**
- **Bullish Harami**: Detected when a bearish candle (open > close) is followed by a smaller bullish candle (open < close) where the entire body of the second candle is contained within the body of the first candle.
- **Bearish Harami**: Detected when a bullish candle (open < close) is followed by a smaller bearish candle (open > close) where the entire body of the second candle is contained within the body of the first candle.
- Both patterns are subject to the user-defined conditions (number of previous bearish or bullish candles).
6. **Visual Indicators:**
- **Bullish Harami**: A green label is plotted **below the bar** to indicate a **Bullish Harami** pattern.
- **Bearish Harami**: A red label is plotted **above the bar** to indicate a **Bearish Harami** pattern.
- The labels are displayed using the `plotshape` function with custom colors and text.
7. **Additional Settings**:
- The script includes tooltips and descriptions for each input to make the settings clear for users, allowing even those unfamiliar with candlestick patterns to understand and use the indicator effectively.
---
### **How It Works:**
- The script first checks the specified timeframe and identifies the current and previous candlesticks.
- It then applies the user-defined conditions for detecting the **Bullish Harami** and **Bearish Harami** patterns by checking the relative positions and sizes of the candlesticks over the selected number of previous candles.
- Once a pattern is detected, it plots a label on the chart (green for **Bullish Harami** and red for **Bearish Harami**) at the appropriate location (below or above the candle).
- The script updates dynamically as the price action unfolds.
---
### **Use Cases:**
- **Traders**: This script is useful for traders who want to identify reversal patterns like **Bullish Harami** and **Bearish Harami** on their chosen timeframes and adjust the sensitivity by changing the number of prior candles for pattern detection.
- **Customization**: Users can fine-tune the script’s settings based on their specific trading strategy, adjusting both the timeframe and the number of candles for pattern detection.
---
### **Conclusion:**
This indicator is an effective tool for detecting candlestick patterns, specifically **Bullish Harami** and **Bearish Harami**, on **TradingView**. By allowing customization in terms of timeframe and the number of prior candles to consider, users can tailor the script to fit their trading strategy and market conditions.
Breakaway Fair Value Gaps [LuxAlgo]The Breakaway Fair Value Gap (FVG) is a typical FVG located at a point where the price is breaking new Highs or Lows.
🔶 USAGE
In the screenshot above, the price range is visualized by Donchian Channels.
In theory, the Breakaway FVGs should generally be a good indication of market participation, showing favor in the FVG's breaking direction. This is a combination of buyers or sellers pushing markets quickly while already at the highest high or lowest low in recent history.
While this described reasoning seems conventional, looking into it inversely seems to reveal a more effective use of these formations.
When the price is pushed to the extremities of the current range, the price is already potentially off balance and over-extended. Then an FVG is created, extending the price further out of balance.
With this in consideration, After identifying a Breakaway FVG, we could logically look for a reversion to re-balance the gap.
However, it would be illogical to believe that the FVG will immediately mitigate after formation. Because of this, the dashboard display for this indicator shows the analysis for the mitigation likelihood and timeliness.
In the example above, the information in the dashboard would read as follows (Bearish example):
Out of 949 Bearish Breakaway FVGs, 80.19% are shown to be mitigated within 60 bars, with the average mitigation time being 13 bars.
The other 19.81% are not mitigated within 60 bars. This could mean the FVG was mitigated after 60 bars, or it was never mitigated.
The unmitigated FVGs within the analysis window will extend their mitigation level to the current bar. We can see the number of bars since the formation is represented to the right of the live mitigation level.
Utilizing the current distance readout helps to better judge the likelihood of a level being mitigated.
Additionally, when considering these mitigation levels as targets, an additional indicator or analysis can be used to identify specific entries, which would further aid in a system's reliability.
🔶 SETTINGS
Trend Length: Sets the (DC) Trend length to use for Identifying Breakaway FVGs.
Show Mitigation Levels: Optionally hide mitigation levels if you would prefer only to see the Breakaway FVGs.
Maximum Duration: Sets the analysis duration for FVGs, Past this length in bars, the FVG is counted as "Un-Mitigated".
Show Dashboard: Optionally hide the dashboard.
Use Median Duration: Display the Median of the Bar Length data set rather than the Average.
Triangular Moving AverageTriangular Moving Average (TMA)
The Triangular Moving Average (TMA) indicator is a versatile tool designed for traders seeking a smoother trend-following experience. By applying a double-smoothing technique, the TMA reduces market noise and highlights significant price trends, making it an ideal choice for identifying direction and potential reversals.
Key Features:
Customizable Period: Adjust the period length to suit your trading strategy.
Selectable Price Type: Choose from Close, Open, High, Low, Median, Typical, or Weighted prices.
Multi-Timeframe Capability: Analyze trends across different timeframes for confluence.
This indicator also dynamically changes color to reflect trend direction, helping traders visualize momentum shifts more effectively:
Green: Bullish trend (upward movement).
Red: Bearish trend (downward movement).
Gray: Neutral or flat movement.
Disclaimer
This indicator is a technical analysis tool and should not be considered financial advice. Trading involves substantial risk, and past performance is not indicative of future results. Always do your own research and consult with a licensed financial advisor before making trading decisions. The author is not responsible for any losses incurred through the use of this indicator.
10% Drop from Current High - Akshay10% Drop from Current High TradingView Indicator
Description:
The "10% Drop from Current High" indicator dynamically tracks the highest price within a user-defined period and highlights when the current price drops by a specified percentage. This tool is invaluable for traders looking to monitor significant pullbacks or corrections from recent highs.
Key Features:
Customizable Drop Percentage:
Allows users to set the percentage drop to track, with a default value of 10%.
Configurable via an input field to suit different trading strategies and market conditions.
Lookback Period:
Tracks the highest price over a user-defined lookback period (default is 20 bars).
This ensures the indicator adapts to short-term or long-term market conditions based on user preferences.
Dynamic Levels:
Current High Level: Plots the highest price within the lookback period in blue.
Drop Level: Plots the calculated drop level (e.g., 10% below the current high) in red.
Visual Alerts:
Background Highlighting:
A translucent red background appears when the current price is at or below the drop level, signaling a significant pullback.
Shape Marker:
A downward label is plotted below the bar when the price touches or falls below the drop level, providing cSet Alerts:lear visual feedback.
Overlay on Price Chart:
The indicator is plotted directly on the price chart (overlay=true), ensuring seamless integration with other technical analysis tools.
Use Case:
This indicator is designed for traders who want to:
Monitor Pullbacks:
Identify when the price of an asset experiences a defined percentage drop from its recent high, signaling potential reversal zones or buying opportunities.
Use visual cues to react quickly to price movements.
Analyze Trends:
Combine with other indicators to assess the strength of trends and corrections.
Customization Options:
Drop Percentage: Adjust the percentage drop to track based on asset volatility and trading strategy.
Lookback Period: Modify the lookback period to focus on short-term (e.g., 5 bars) or long-term (e.g., 50 bars) price highs.
This indicator provides a flexible and intuitive way to track price pullbacks, helping traders make informed decisions and stay ahead in dynamic market conditions.
Fancy Oscillator Screener [Daveatt]⬛ OVERVIEW
Building upon LeviathanCapital original RSI Screener (), this enhanced version brings comprehensive technical analysis capabilities to your trading workflow. Through an intuitive grid display, you can monitor multiple trading instruments simultaneously while leveraging powerful indicators to identify market opportunities in real-time.
⬛ FEATURES
This script provides a sophisticated visualization system that supports both cross rates and heat map displays, allowing you to track exchange rates and percentage changes with ease. You can organize up to 40 trading pairs into seven customizable groups, making it simple to focus on specific market segments or trading strategies.
If you overlay on any circle/asset on the chart, you'll see the accurate oscillator value displayed for that asset
⬛ TECHNICAL INDICATORS
The screener supports the following oscillators:
• RSI - the oscillator from the original script version
• Awesome Oscillator
• Chaikin Oscillator
• Stochastic RSI
• Stochastic
• Volume Oscillator
• CCI
• Williams %R
• MFI
• ROC
• ATR Multiple
• ADX
• Fisher Transform
• Historical Volatility
• External : connect your own custom oscillator
⬛ DYNAMIC SCALING
One of the key improvements in this version is the implementation of dynamic chart scaling. Unlike the original script which was optimized for RSI's 0-100 range, this version automatically adjusts its scale based on the selected oscillator.
This adaptation was necessary because different indicators operate on vastly different numerical ranges - for instance, CCI typically ranges from -200 to +200, while Williams %R operates from -100 to 0.
The dynamic scaling ensures that each oscillator's data is properly displayed within its natural range, making the visualization both accurate and meaningful regardless of which indicator you choose to use.
⬛ ALERTS
I've integrated a comprehensive alert system that monitors both overbought and oversold conditions.
Users can now set custom threshold levels for their alerts.
When any asset in your monitored group crosses these thresholds, the system generates an alert, helping you catch potential trading opportunities without constant manual monitoring.
em will help you stay informed of market movements and potential trading opportunities.
I hope you'll find this tool valuable in your trading journey
All the BEST,
Daveatt