NEXT BAR PercentagesNEXT BAR Percentages Indicator
This Pine Script code implements the "NEXT BAR Percentages" indicator, designed to analyze and display percentage changes between consecutive bars on a TradingView chart. The script provides valuable insights into how percentage changes in price behave after significant price movements, aiding traders in identifying potential trends or reversals.
Key Features:
Percentage Change Calculations :
Close-to-Close : Calculates the percentage change between the close of the current bar and the close of the previous bar.
High-to-Close : Calculates the percentage change between the high of the current bar and the close of the previous bar.
Low-to-Close : Calculates the percentage change between the low of the current bar and the close of the previous bar.
High-to-Close (Wick) : Computes the percentage change from the close to the high of the current bar.
Low-to-Close (Wick) : Computes the percentage change from the close to the low of the current bar.
Dynamic Table Display :
Creates a table on the chart to display various statistics related to percentage changes.
The table position is customizable, with options including "Top Left," "Middle Left," "Bottom Left," "Top Right," "Middle Right," "Bottom Right," "Top Center," "Middle Center," and "Bottom Center."
Count and Average Calculations :
High POS/NEG Counts : Counts occurrences of significant positive and negative percentage changes based on user-defined thresholds.
High POS/NEG Average : Computes the average percentage change following high positive and negative percentage changes.
Next Bar Statistics : Provides statistics on the percentage change of the next bar following identified significant price movements.
Visual Indicators :
Labels : Plots arrows on the chart when a high positive or high negative percentage change is detected, visually highlighting these events.
Customizable Input Parameters :
Adjust the thresholds for identifying high positive and negative percentage changes ( highpos, highposEnd, highneg, highnegEnd ).
Specify the start date for analysis ( teststartdate ), allowing for focused period analysis.
Usage:
Traders : Gain insights into price behavior following significant movements to make informed trading decisions.
Analysis : Customizable parameters and visual indicators enable detailed analysis of price action and trend identification.
Enhance your chart analysis with this indicator for a clear, data-driven view of percentage changes and their implications for future price movements.
Candlestick analysis
Market Structure Based Stop LossMarket Structure Based Dynamic Stop Loss
Introduction
The Market Structure Based Stop Loss indicator is a strategic tool for traders designed to be useful in both rigorous backtesting and live testing, by providing an objective, “guess-free” stop loss level. This indicator dynamically plots suggested stop loss levels based on market structure, and the concepts of “interim lows/highs.”
It provides a robust framework for managing risk in both long and short positions. By leveraging historical price movements and real time market dynamics, this indicator helps traders identify quantitatively consistent risk levels while optimizing trade returns.
Legend
This indicator utilizes various inputs to customize its functionality, including "Stop Loss Sensitivity" and "Wick Depth," which dictate how closely the stop loss levels hug the price's highs and lows. The stop loss levels are plotted as lines on the trading chart, providing clear visual cues for position management. As seen in the chart below, this indicator dynamically plots stop loss levels for both long and short positions at every point in time.
A “Stop Loss Table” is also included, in order to enhance precision trading and increase backtesting accuracy. It is customizable in both size and positioning.
Case Study
Methodology
The methodology behind this indicator focuses on the precision placement of stop losses using market structure as a guide. It calculates stop losses by identifying the "lowest close" and the corresponding "lowest low" for long setups, and inversely for short setups. By adjusting the sensitivity settings, traders can tweak the indicator's responsiveness to price changes, ensuring that the stop losses are set with a balance between tight risk control and enough room to avoid premature exits due to market noise. The indicator's ability to adapt to different trading styles and time frames makes it an essential tool for traders aiming for efficiency and effectiveness in their risk management strategies.
An important point to make is the fact that the stop loss levels are always placed within the wicks. This is important to avoid what can be described as a “floating stop loss”. A stop loss placed outside of a wick is susceptible to an outsized degree of slippage. This is because traders always cluster their stop losses at high/low wicks, and a stop loss placed outside of this level will inevitably be caught in a low liquidity cascade or “wash-out.” When price approaches a cluster of stop losses, it is highly probable that you will be stopped out anyway, so it is prudent to attempt to be the trader who gets stopped out first in order to avoid high slippage, and losses above what you originally intended.
// For long positions: stop-loss is slightly inside the lowest wick
float dynamic_SL_Long = lowestClose - (lowestClose - lowestLow) * (1 - WickDepth)
// For short positions: stop-loss is slightly inside the highest wick
float dynamic_SL_Short = highestClose + (highestHigh - highestClose) * (1 - WickDepth)
The percentage depth of the wick in which the stop loss is placed is customisable with the “Wick Depth” variable, in order to customize stop loss strategies around the liquidity of the market a trader is executing their orders in.
Candle Speed and AccelerationCandle Speed and Acceleration Indicator
This indicator calculates the speed and acceleration of candlesticks in points per minute (P/M), providing traders with insights into the momentum and volatility of price movements during the trading session.
Features:
Speed Calculation: Measures the change in price per minute, helping you understand how quickly the market is moving.
Acceleration Measurement: Tracks the change in speed between consecutive candles, offering an additional layer of momentum analysis.
Real-Time Display: Shows the current, previous, and second previous candles' speed and acceleration in a table on the chart.
Crosshair Integration: Displays speed and acceleration at the crosshair location, offering instant feedback as you hover over the chart.
Alerts: Notifies you when candle speed exceeds a customizable threshold, helping you catch significant market moves as they happen.
Permanent Markers: Marks candles on the chart when the speed threshold is exceeded, visually highlighting high-speed candles.
This tool is essential for traders who want to analyze the momentum and acceleration of market movements, providing clear visual cues and alerts for potential trading opportunities.
Supertrend (Buy/Sell) With TP & SLSupertrend (Buy/Sell) with TP & SL: An Enhanced Trading Tool
This Pine Script indicator combines the popular Supertrend indicator with multiple take-profit (TP) and stop-loss (SL) levels, providing traders with a comprehensive visual aid for potential entries, exits, and risk management.
Originality
Buffer Zones for Precision: Instead of relying solely on the Supertrend line, this script incorporates buffer zones around it. This helps filter out false signals, especially in volatile markets, leading to more accurate buy/sell signals.
Flexible Stop-Loss: Offers the choice between a fixed or trailing stop-loss, allowing traders to tailor their risk management approach based on their preferences and market conditions.
Multiple Take-Profit Levels: Provides three potential take-profit levels, giving traders the flexibility to secure profits at different stages of a trend.
Heikin Ashi Candles & VWAP: Incorporates Heikin Ashi candles for smoother trend visualization and adds a VWAP line for potential support/resistance levels.
Clear Table Display: Presents key information like Stop Loss and Take Profit levels in a user-friendly table, making it easier to track trade targets.
How It Works
Supertrend Calculation: The Supertrend is calculated using ATR (Average True Range) to gauge market volatility. The script then creates buffer zones around the Supertrend line for refined signal generation.
Buy/Sell Signals:
Buy: When the close price crosses above the upper buffer zone, indicating a potential uptrend.
Sell: When the close price crosses below the lower buffer zone, suggesting a potential downtrend.
Take Profit & Stop Loss:
Take Profits: Three TP levels are calculated based on ATR and a customizable profit factor.
Stop Loss: The stop-loss can be set as either a fixed value based on ATR or as a trailing stop-loss that dynamically adjusts to lock in profits.
How To Use
Add the Indicator: Search for "Supertrend (Buy/Sell) With TP & SL" in the TradingView indicators list and add it to your chart.
Customize Inputs: Adjust parameters like ATR Period, Factor, Take Profit Factor, Stop Loss Factor, Stop Loss Type, etc., based on your trading style and preferences.
Interpret Signals: Look for buy signals when the price crosses above the upper buffer and sell signals when it crosses below the lower buffer.
Manage Risk: Use the plotted Take Profit and Stop Loss levels to manage your risk and potential rewards.
Concepts
Supertrend: A trend-following indicator that helps identify the direction of the prevailing trend.
ATR (Average True Range): A measure of market volatility.
Buffer Zones: Used to filter out false signals by creating a zone around the Supertrend line.
Trailing Stop Loss: A dynamic stop-loss that moves with the price to protect profits.
Heikin Ashi: A type of candlestick chart designed to filter out market noise and make trends easier to identify.
VWAP (Volume Weighted Average Price): An indicator that shows the average price at which a security has traded throughout the day, based on both volume and price.
Important Note: This script is for educational and informational purposes only. Backtest thoroughly and use with caution in live trading. Always manage your risk appropriately.
Big Candle HighlighterBig Candle Highlighter
The Big Candle Highlighter indicator highlights significant candles based on their percentage difference between the open and close prices. This tool helps traders quickly identify candles with substantial price movements, which can be crucial for spotting key price action, potential reversals, or significant market events.
Key Features:
Percentage Threshold : Customize the minimum percentage difference from open to close required to mark a candle as "big."
Bullish and Bearish Markers : Bullish big candles are marked with a label below the bar in green, while bearish big candles are marked with a label above the bar in red.
Background Highlighting : Optionally highlight the background of big candles for better visual emphasis.
Inputs:
Percentage Threshold (% ): Set the percentage threshold to define what constitutes a "big" candle. For example, a threshold of 2.0 means that only candles with a 2% or more difference between open and close will be marked.
Color for Big Bullish Candle : Choose the color for labeling and highlighting bullish big candles.
Color for Big Bearish Candle : Choose the color for labeling and highlighting bearish big candles.
Usage :
This indicator is useful for traders looking to identify significant price movements and potential trading opportunities. By focusing on candles that show substantial changes from open to close, you can better understand market dynamics and make more informed trading decisions.
Add the Big Candle Marker to your charts to enhance your technical analysis and stay ahead of market trends.
Engulfing Candles with Sweep by AydmaxxEngulfing Candles with Sweep Indicator
The "Engulfing Candles with Sweep" indicator identifies bullish and bearish engulfing candles that exhibit liquidity sweeps. It marks these significant candlestick patterns and draws a 50% Fibonacci retracement line from the high to low of the engulfing candle. The indicator helps traders spot potential reversal points where large market players might be accumulating or distributing positions.
Key Features:
Bullish Engulfing Candle with Sweep:
Identifies when a bullish candle (closing higher than it opened) engulfs the previous bearish candle (closing lower than it opened).
Ensures that the bullish candle’s low is lower than the previous candle’s low, indicating a sweep of liquidity.
Marks the identified bullish candle with a symbol below the candlestick.
Draws a 50% Fibonacci retracement line from the high to the low of the bullish engulfing candle.
Bearish Engulfing Candle with Sweep:
Identifies when a bearish candle (closing lower than it opened) engulfs the previous bullish candle (closing higher than it opened).
Ensures that the bearish candle’s high is higher than the previous candle’s high, indicating a sweep of liquidity.
Marks the identified bearish candle with a symbol above the candlestick.
Draws a 50% Fibonacci retracement line from the high to the low of the bearish engulfing candle.
Customizable Settings:
Fibonacci Line Color: Allows customization of the Fibonacci retracement line color for both bullish and bearish engulfing candles.
Fibonacci Line Style: Provides options to choose the line style (solid, dotted, dashed).
Fibonacci Line Width: Enables adjustment of the line width for better visibility.
Toggle Fibonacci Lines: Option to enable or disable the display of Fibonacci retracement lines.
How to Use:
Apply the indicator to your chart.
Look for symbols below or above the candlesticks, indicating bullish or bearish engulfing candles with liquidity sweeps.
Utilize the 50% Fibonacci retracement lines to identify potential support or resistance levels.
Benefits:
Helps in identifying key reversal patterns in the market.
Provides visual aids with Fibonacci retracement levels for potential entry and exit points.
Enhances trading decisions by confirming engulfing patterns with liquidity sweeps.
50%er Lite by Tren10x50%er Script Lite
Overview:
The Tren10x 50%er Script Lite is a streamlined version of my fully-featured 50%er script. It calculates the critical 50% line of the previous candle and extends this functionality to daily, weekly, monthly, quarterly, and yearly levels. This script also detects previous highs and lows for these timeframes, providing a comprehensive view of key price levels. Additionally, it calculates and prints opening levels for the day, week, month, quarter, and year. A custom timeframe feature allows for flexibility in setting 50% and high/low levels, catering to individual trading preferences.
How It Works:
The script leverages Pine Script to calculate the midpoint (50%) of the previous candle's high and low. This midpoint acts as a crucial level for traders to identify potential support and resistance. The same logic is applied to daily, weekly, monthly, quarterly, and yearly timeframes, offering a multi-dimensional perspective on price action.
The script identifies and marks the previous high and low points for these timeframes, which are essential for breakout and breakdown strategies. It also tracks and prints the opening levels for various periods, helping traders gauge market sentiment from the open.
How to Use:
Adding to Chart:
Apply the Tren10x 50%er Script Lite to your TradingView chart.
Configuring Inputs:
Customize the timeframes and levels according to your trading strategy.
Use the custom timeframe feature to set specific periods for 50% and high/low levels.
Analyzing Levels:
Observe the plotted 50% lines and opening levels to identify potential areas of support and resistance.
Utilize the previous high and low markers to spot breakout or breakdown points.
Strategizing Trades:
Incorporate these levels into your trading strategy for entry and exit points.
Monitor price reactions around these critical levels for potential trade setups.
What Makes It Original:
50%er Lite stands out for its simplicity and precision. By focusing on the essential 50% line and previous high/low levels across multiple timeframes, it provides traders with a clear and concise view of the market. The custom timeframe feature adds a layer of personalization, allowing traders to adapt the script to their unique trading styles.
50%er Lite maintains a clean and straightforward approach. It offers essential data without overwhelming the user, making it a valuable tool for both novice and experienced traders.
Future Prospects:
For traders seeking even more advanced features, the fully-fledged version of the 50%er script includes Futures levels.
Session OHLC [neo.|]OHLC/OLHC and Po3 (Power of Three by ICT) are both concepts describing a potential way to describe candle formations. While OHLC stands for Open High Low Close, what it usually refers to is the bearish scenario of how a candle first opens, manipulates until the high then creates the low before closing, and vice versa for OLHC. Po3 goes hand in hand with this concept as a way to sequentialize this candle formation into three separate cycles seen on a lower timeframe known as "Accumulation", "Manipulation", and "Distribution". Where the accumulation in the OHLC scenario would be the range created before the high, the manipulation being the high, and the distribution being the run downwards to the low.
What Session OHLC allows you to do, is to view these Po3 scenarios not through a higher timeframe candle perspective, but instead through a fully customizable session perspective. For example, you might want to see a specific period of time as a candle to simplify the process of identifying an AMD cycle, and all you would need to do is to enter that period of time in the indicator settings, and when you are at that period of time, you will see it being represented as a bar candle, with the session open, high, low, and close being annotated as O, H, L, and C.
This is especially useful for when you want to track the manipulation before a session open, or track a specific time where there is more volume in the market, allowing you to enter trades prior to when a distribution phase will begin.
Currently, you are able to select up to 4 different sessions that will appear on your chart while the session is active, however it is a good idea for the session times you choose not to overlap as the drawings will overlap as well. If you would like to monitor two times that happen to overlap, it is a good idea to add another instance of the indicator to your chart, and adjust the bar offset on one of them in the settings.
Engulfing Candle Indicator with SweepTHIS IS ENGULFED SWEEP CANDLE
This TradingView indicator identifies and highlights bullish and bearish engulfing candlestick patterns with an additional condition: the recent candle must "sweep" the high or low of the previous candle. This refined approach helps to confirm the strength of the engulfing pattern by ensuring that the current candle extends beyond the previous candle's range.
Features:
- **Bullish Engulfing Detection**: Identifies a bullish engulfing pattern where the current candle fully engulfs the previous candle's body, and the low of the current candle is below the low of the previous candle.
- **Bearish Engulfing Detection**: Identifies a bearish engulfing pattern where the current candle fully engulfs the previous candle's body, and the high of the current candle is above the high of the previous candle.
- **Visual Indicators**: Marks bullish engulfing patterns with a green label below the bar and bearish engulfing patterns with a red label above the bar.
- **Alert Conditions**: Provides customizable alerts for detected patterns, enabling you to be notified when a bullish or bearish engulfing pattern with a sweep is detected.
#### Usage:
1. **Apply to Chart**: Add the indicator to your chart to start detecting engulfing patterns with sweep conditions.
2. **Set Alerts**: Configure alerts to receive notifications when the indicator identifies a bullish or bearish engulfing pattern with a sweep.
#### Ideal For:
- Traders looking for additional confirmation in engulfing patterns.
- Users who want to incorporate price action signals into their trading strategy.
By incorporating the sweep condition, this indicator aims to enhance the reliability of the engulfing patterns and provide more actionable signals.
---
Feel free to adjust the description based on any specific details or features you want to highlight. If there are any additional features or details about the indicator that should be included, let me know!
Flat Market Scanner [CHE]Flat Market Scanner
Introduction
Welcome to our presentation on the "Flat Market Scanner" for TradingView. This innovative indicator is designed to identify and highlight periods of sideways market movement, providing traders with crucial insights for making informed decisions. Sideways phases are characterized by alternating up and down movements within a narrow price range, lacking a clear directional trend.
The Idea Behind the Flat Market Scanner
The core concept of the Flat Market Scanner is to detect and visualize flat (sideways) market conditions. In such periods, the price of an asset does not exhibit significant upward or downward movements, remaining within a narrow range. These flat markets are often characterized by low volatility and can be challenging for trend-following traders.
How It Works:
1. RSI Analysis: The indicator utilizes the Relative Strength Index (RSI) to measure the speed and change of price movements.
2. Cumulative Test Variable: It calculates the cumulative sum of positive and negative price changes to create a test variable.
3. Flat Period Detection: By examining the highest and lowest values of the test variable over a specified period (`flatPeriod`), the indicator determines if the market is flat.
4. Consecutive Flat Periods: It tracks consecutive periods where the market is flat to identify sustained sideways movement.
5. Visualization: When a flat market is detected, a colored box is drawn on the chart to highlight the flat period. The color of the box indicates the current RSI trend.
Why Flat Markets Pose Risks
Flat markets can present several risks and challenges for traders:
1. Reduced Profit Opportunities: In a flat market, price movements are minimal, leading to limited profit opportunities for traders who rely on significant price swings.
2. False Signals: Sideways markets often generate false signals for technical indicators, leading to potential losses if traders misinterpret these signals as trends.
3. Increased Costs: Frequent trading in a flat market can result in higher transaction costs, eating into potential profits.
4. Psychological Stress: The lack of clear direction can cause frustration and stress, leading traders to make impulsive decisions that deviate from their trading strategy.
Benefits of the Flat Market Scanner
- Clarity: The Flat Market Scanner provides visual clarity on when the market is flat, helping traders avoid entering positions during low-volatility periods.
- Risk Management: By identifying flat periods, traders can better manage their risk and allocate their capital to more promising market conditions.
- Strategic Planning: Understanding when the market is flat allows traders to adjust their strategies, such as focusing on range-bound trading techniques or waiting for breakout opportunities.
Conclusion
The Flat Market Scanner is an essential tool for traders seeking to navigate the complexities of market conditions. By effectively identifying and visualizing flat markets, this indicator empowers traders to make smarter decisions, manage risks, and optimize their trading strategies. Embrace the power of the Flat Market Scanner and enhance your trading experience on TradingView.
Thank you for your attention. Happy trading!
Best regards Chervolino
Last Candle OHLC (Ticks or Points)What the Code Does
1. **Draws Lines and Labels**:
- It draws lines on your chart to show the high, low, open, and close prices from the previous period (like the previous day or week).
- It also labels these lines with numbers that tell you how far the current price is from these levels.
2. **Shows Price Movement**:
- You can see how far the price has moved from these levels in terms of small price changes (ticks) or larger units (points).
- This helps you understand price movements and potential levels of support or resistance.
3. **Customizable**:
- You can choose whether to show these lines and labels, and you can select if you want to see the movement in ticks or points.
- The lines can extend into the future on your chart to help you anticipate where prices might be in the coming days.
### How It’s Useful:
1. **Identify Key Levels**:
- It helps you spot important price levels from past periods, which can act as support or resistance.
2. **Understand Price Movement**:
- You get a visual sense of how much the price has moved from key levels, which can help you gauge market volatility.
3. **Plan Trades**:
- By seeing where the price has been and how it has moved, you can better plan your trades, like deciding where to enter or exit based on these levels.
4. **Flexible for Different Markets**:
- It works across various markets, like stocks, futures, and forex, adjusting to the specific characteristics of each instrument.
In short, this tool helps you visualize and understand past price movements and levels on your chart, aiding in your trading decisions.
Internal/External Market Structure [UAlgo]The "Internal/External Market Structure " indicator is a tool designed to identify and visualize internal and external market structure based on swing highs and lows. It helps traders understand short-term (internal) and long-term (external) price behavior.
🔶 What are ChoCH and BoS?
Change of Character (ChoCH)
Change of character refers to the reversal of market trend either from bullish to bearish or bearish to bullish. ChoCH is also a break of market structure but in opposite direction.
If market is in bullish trend but it breaks it previous (higher) low and makes a lower low, it will be termed a “bearish change of character” as price changed its trend from bullish to bearish.
Like wise if price is in bearish trend and it breaks its previous (lower) high making a higher high it will be marked as “bullish change of character” as price changed its trend from bearish to bullish.
Break of Structure (BoS)
When price breaks its structure in direction of previous trend its called break of structure (BoS). So its a trend continuation pattern.
As you know in bullish trend price makes higher highs. Each time when price break a previous high and marks a new high its known as bullish break of structure.
But in bearish trend price makes lower lows so every time when price breaks previous low and makes a new low it is called as bearish break of structure.
🔶 Key Features
Internal Swing Length: Allowing for fine-tuning of sensitivity to smaller, more frequent market movements.
External Swing Length: Focusing on capturing broader market trends.
The indicator differentiates between internal and external market structures, using different styles and colors to represent each. Internal structures are shown with solid lines, while external structures use dashed lines, providing clear visual cues.
Internal Market Structure:
The internal market structure focuses on shorter-term swings and is useful for identifying minor trend changes and short-term price movements. Breaks of internal swing highs or lows can indicate potential changes in the market's direction or momentum. The labels "CHoCH" and "BoS" help distinguish between changes in character and break of structure events, respectively.
External Market Structure:
The external market structure captures larger, more significant market moves. It is particularly useful for identifying major trend changes and key support and resistance levels. The dashed lines and corresponding labels "CHoCH+" and "BoS+" indicate more substantial shifts in market sentiment.
For BoS (Break of Structure):
For ChoCH (Change of Character):
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
nPOC Levels by Tyler### Explanation of the Pine Script
This Pine Script identifies and displays weekly naked Points of Control (nPOCs) on a TradingView chart. An nPOC represents a Point of Control (POC) from a previous week that has not been revisited by price action in subsequent weeks. These nPOCs are extended to the right as horizontal lines, indicating potential support or resistance levels.
#### Script Overview
1. **Indicator Declaration:**
```pinescript
//@version=5
indicator("Weekly nPOCs", overlay=true)
```
- The script is defined as a version 5 Pine Script.
- The `indicator` function sets the script's name ("Weekly nPOCs") and specifies that the indicator should be overlaid on the price chart (`overlay=true`).
2. **Function to Calculate POC:**
```pinescript
f_poc(_hl2, _vol) =>
var float vol_profile = na
if (na(vol_profile))
vol_profile := array.new_float(100, 0.0)
_bin_size = (high - low) / 100
for i = 0 to 99
if _hl2 >= low + i * _bin_size and _hl2 < low + (i + 1) * _bin_size
array.set(vol_profile, i, array.get(vol_profile, i) + _vol)
max_volume = array.max(vol_profile)
poc_index = array.indexof(vol_profile, max_volume)
poc_price = low + poc_index * _bin_size + _bin_size / 2
poc_price
```
- The function `f_poc` calculates the Point of Control (POC) for a given period.
- It takes two parameters: `_hl2` (the average of the high and low prices) and `_vol` (volume).
- A volume profile array (`vol_profile`) is initialized to store volume data across different price bins.
- The price range between the high and low is divided into 100 bins (`_bin_size`).
- The function iterates over each bin, accumulating the volumes for prices within each bin.
- The bin with the maximum volume is identified as the POC (`poc_price`).
3. **Variables to Store Weekly Data:**
```pinescript
var float poc = na
var float prev_poc = na
var line poc_lines = na
if na(poc_lines)
poc_lines := array.new_line(0)
```
- `poc` stores the current week's POC.
- `prev_poc` stores the previous week's POC.
- `poc_lines` is an array to store lines representing nPOCs. The array is initialized if it is `na` (not initialized).
4. **Calculate Weekly POC:**
```pinescript
is_new_week = ta.change(time('W')) != 0
if (is_new_week)
prev_poc := poc
poc := f_poc(hl2, volume)
if not na(prev_poc)
line new_poc_line = line.new(x1=bar_index, y1=prev_poc, x2=bar_index + 100, y2=prev_poc, color=color.red, width=2)
label.new(x=bar_index, y=prev_poc, text="nPOC", style=label.style_label_down, color=color.red, textcolor=color.white)
array.push(poc_lines, new_poc_line)
```
- `is_new_week` checks if the current bar is the start of a new week using the `ta.change(time('W'))` function.
- If it's a new week, the previous week's POC is stored in `prev_poc`, and the current week's POC is calculated using `f_poc`.
- If `prev_poc` is not `na`, a new line (`new_poc_line`) representing the nPOC is created, extending it to the right (for 100 bars).
- A label is created at the `prev_poc` level, marking it as "nPOC".
- The new line is added to the `poc_lines` array.
5. **Remove Old Lines:**
```pinescript
if array.size(poc_lines) > 52
line.delete(array.shift(poc_lines))
```
- This section ensures that only the last 52 weeks of nPOCs are kept to avoid cluttering the chart.
- If the `poc_lines` array contains more than 52 lines, the oldest line is deleted using `array.shift`.
6. **Plot the Current Week's POC as a Reference:**
```pinescript
plot(poc, title="Current Weekly POC", color=color.blue, linewidth=2, style=plot.style_line)
```
- The current week's POC is plotted as a blue line on the chart for reference.
#### Summary
This script calculates and identifies weekly Points of Control (POCs) and marks them as nPOCs if they remain untouched by subsequent price action. These nPOCs are displayed as horizontal lines extending to the right, providing traders with potential support or resistance levels. The script also manages the number of lines plotted to maintain a clear and uncluttered chart.
High Low Lines (500 candle 5min)This TradingView script is designed to visualize the highest high and the lowest low from the previous 576 candles on the chart. It draws horizontal lines representing these values and updates them at a specific time each day.
Price GapsThis indicator highlights bullish and bearish gaps in price movement. You can customize the colors, transparency, border width, and label size. The script detects gaps where the current low is higher than the previous high (bullish) or the current high is lower than the previous low (bearish). It then draws boxes around these gaps and labels them with their size. The indicator updates the boxes as long as the gaps remain open and removes them once they close. You can also choose the timeframe for the gaps detection.
MA15, MA50 with Support/Resistance, CHoCH, Trend, and Entry/Exita comprehensive indicator that includes moving averages (MA), support and resistance levels, Change of Character (CHoCH) detection, trend identification, and entry/exit signals. Here's a breakdown of its components:
Input Parameters:
ma15_length and ma50_length: Lengths for the moving averages.
lookback: Period for detecting support and resistance levels.
Moving Averages:
ma15 and ma50 are simple moving averages with lengths defined by the user.
Support and Resistance Levels:
The script identifies swing highs and lows to update support and resistance levels.
These levels are plotted using extended lines for visualization.
Change of Character (CHoCH):
CHoCH up is detected when ma15 crosses above ma50.
CHoCH down is detected when ma15 crosses below ma50.
Corresponding signals are plotted on the chart.
Trend Identification:
An uptrend is confirmed when ma15 crosses above ma50 and the close price is above ma50.
A downtrend is confirmed when ma15 crosses below ma50 and the close price is below ma50.
Background colors are used to highlight uptrend (green) and downtrend (red).
Entry and Exit Signals:
Buy signals are generated when CHoCH up occurs, and the price pulls back to support during an uptrend.
Sell signals are generated when CHoCH down occurs, and the price pulls back to resistance during a downtrend.
These signals are plotted on the chart.
Alerts:
Alerts are set up to notify the user when a buy or sell signal is detected.
Bollinger Bands & SuperTrend Strategy by Tradinggg HubThis TradingView Pinescript combines Bollinger Bands and a custom SuperTrend indicator to generate trading signals.
Bollinger Bands:
Bollinger Bands are a popular volatility indicator that consists of three lines:
* Basis: A simple moving average (SMA) of the price (default length is 20 periods).
* Upper Band: The basis plus a standard deviation multiplier (default is 2).
* Lower Band: The basis minus a standard deviation multiplier (default is 2).
These bands expand and contract as volatility increases or decreases, helping traders identify potential overbought and oversold conditions.
SuperTrend:
The SuperTrend indicator is a trend-following tool that aims to identify the direction of the price trend. It uses the Average True Range (ATR) to determine the volatility of the market and sets levels above and below the price to indicate potential trend reversals.
How the Strategy Works:
1. Bollinger Bands: The script plots Bollinger Bands around the price, providing insight into the current volatility and potential overbought or oversold conditions.
2. SuperTrend: The script calculates and plots a custom SuperTrend indicator based on user-defined ATR period and factor. It helps visualize the current trend direction and potential trend reversals.
3. Buy Signals: A buy signal is generated when the following conditions are met:
- The price crosses above the SuperTrend line.
- The price is above the Bollinger Bands basis line.
4. Sell Signals: A sell signal is generated when one of the following conditions is met:
- The price crosses below the SuperTrend line.
- The price is below the Bollinger Bands basis line.
Key Parameters:
* Bollinger Bands Length: The number of periods used to calculate the basis (SMA) of the Bollinger Bands.
* Bollinger Bands Multiplier: The factor used to calculate the standard deviation for the upper and lower bands.
* SuperTrend ATR Period: The number of periods used to calculate the Average True Range (ATR) for the SuperTrend.
* SuperTrend Factor: The factor used to determine the distance of the SuperTrend levels from the price.
Customization:
Feel free to experiment with different parameter values to optimize the strategy for your preferred asset and time frame.
Disclaimer:
This script is intended for educational and informational purposes only. It should not be considered as financial advice. Always conduct thorough research and consider your own risk tolerance before making any trading decisions.
Price & Momentum Reversal Indicator [TradeDots]Price & Momentum Divergence Indicator is a variant of the Chande Momentum Oscillator (CMO), designed to identify reversal patterns in overvalued and undervalued markets. This indicator aims to mitigate the common problem of all oscillating indicators: false buy/sell signals during prolonged market trends, by incorporating a volume-weighted approach and momentum analysis.
📝 HOW IT WORKS
Price Extremeness Calculation
The indicator evaluates the extremeness of the current price by analyzing price changes over a fixed window of candlesticks.
It separates the price changes into positive and negative changes, then multiplies them by the bar volume to obtain volume-weighted values, giving higher significance to bars with larger volumes.
Extremeness Ratio
The ratio is calculated by taking the difference between the total positive changes and total negative changes, and then dividing this result by the sum of the total positive and negative changes.
The result is then smoothed to reduce market noise and rescaled to a range between -100 to 100, where 100 indicates all price changes within the window are positive.
Momentum Analysis
Momentum is calculated by measuring the rate of change of the smoothed extremeness ratio, indicating whether market extremeness is slowing and showing signs of reversion.
Reversal Signal Confirmation
For an asset to be considered a reversal, it has to be in the overvalued or undervalued zone (exceeding the overvalued & undervalued threshold). It must then show a slowed momentum change and a price reversion.
Lastly, candlestick analysis is used to confirm the reversal signal, ensuring there is no room for further breakout price movement.
🛠️ HOW TO USE
Candlestick Visualization
Candlestick bodies are painted with gradient colors representing the smoothed price extremeness (OBOS Index), ranging from -100 (solid red) to 100 (solid green). The exact value is displayed in a table at the bottom right corner.
Slowing price momentum is indicated with blue (bearish) and purple (bullish) colors, showing market pressure from the opposite side.
Reversal Confirmation
A decrease in price momentum combined with a price reversal triggers a signal label on the candlestick, indicating a potential pullback or reversal. This can serve as a reference for better entry and exit points.
⭐️ Premium Features
Higher Timeframe (HTF) Analysis
The indicator includes a feature to apply the same algorithm to a selected higher timeframe, ensuring trend alignment across multiple timeframes.
Alert Functions
Real-time notifications for overvalued and undervalued conditions, allowing traders to monitor trades and reversal signals anywhere and anytime.
❗️LIMITATIONS
Accuracy decreases in volatile and noisy markets.
Extended bullish or bearish market conditions may affect performance.
See Author's instructions below to get instant access to this indicator.
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
MSS-FVG Fusion by Tren10xMSS-FVG Fusion Script by Tren10x
What the Script Does:
The MSS-FVG Fusion Script by Tren10x combines Market Structure Shifts (MSS) and Fair Value Gaps (FVG) to provide traders with strategic entry points, customizable features, and a comprehensive tool for trading analysis. It identifies shifts and breaks in market structure while pinpointing significant fair value gaps.
How the Script Works:
Strategic Entry Points:
The script's logic detects fair value gaps formed prior to a market structure shift and uses these gaps as optimal entry points, integrating the precision of MSS with the significance of FVGs
Accurate and Timely Entry Points:
By combining MSS and FVG, the script aims to offer more precise and timely entry points, enhancing the overall trading strategy.
Dynamic Features for Cleaner Approach:
Users can toggle between box fair value gaps and bar fair value gaps, providing a cleaner and more customizable approach to analyzing price action.
Display of Untested FVGs:
The script is designed to display only untested fair value gaps based on how they are filled. It differentiates between gaps filled by the body of a candle and those filled by the wick, ensuring that only gaps that have not been fully tested are highlighted.
Delete Wick Filled FVG highlights that the FVG should be deleted if the price only wicks through the FVG but does not close outside it, indicating that the gap has been tested but not fully filled.
Whereas Delete Body Filled FVG focuses on the scenario where the price action closes outside of the FVG, indicating that the gap has been fully filled. So in this screenshot above, there is a large wick through the FVG but no close below. Therefore, this FVG will remain until there is a close in the other direction.
Or choose both! Enabling both options will remove both body filled and wick filled FVGs from your chart, leaving only FVGs that are still fully or partially untested, such as the image above.
Features:
Market Structure Shifts (MSS):
Detects shifts in market structure to help anticipate potential trend reversals and capitalize on new trading opportunities.
Market Structure Breaks (MSB):
Highlights breaks in market structure, signaling potential continuation or reversal points in the market.
Fair Value Gaps (FVG):
Identifies gaps in price where the market has moved rapidly, pinpointing potential areas of support and resistance. Includes a 50% line of the FVG, which often acts as a key level.
Customization Options:
Text Customization: Add personalized text and customize aspects such as color, line style, text size, border color and style, and FVG bar width.
FVG Handling: Options to delete FVGs where the price has wicked through but did not close inside the box, or delete FVGs when the price has closed outside the box.
FVG Display Options: Choose between traditional FVG boxes or a cleaner FVG bar look.
Input Options: Set the number of FVGs and market structure indicators displayed on the chart.
How to Use the Script:
Add to Chart:
Load the MSS-FVG Fusion Script onto your TradingView chart.
Customize Settings:
Adjust text, colors, line styles, and other settings to fit your trading preferences.
Analyze the Chart:
Observe the highlighted MSS, MSB, and FVGs to identify potential entry and exit points.
Use the dynamic features to toggle between different FVG display options and focus on untested gaps.
Leverage the 50% lines of FVGs and other key levels to make informed trading decisions.
What Makes This Script Original:
This script is original because it integrates the strategic fusion of Market Structure Shifts (MSS) and Fair Value Gaps (FVG) for entry points, offers dynamic customization between box and bar FVGs, and highlights only untested gaps based on how they are filled, providing a tailored and actionable analysis.
The Flip by Tren10xWhat the Script Does:
"The Flip" is a simple trading script designed to enhance market analysis and trading decisions by detecting key price levels and timeframe shifts. It identifies when timeframes switch from bullish to bearish or vice versa and displays this information using the 50% levels and the Full Time Frame Continuity (FTFC) table.
How the Script Works:
Detection of Key Levels:
50% Level of the Previous Candle: The script calculates and displays the midpoint of the previous candle, helping traders quickly identify potential reversal points and key support or resistance levels.
Opening Print Levels: The script tracks the opening prices for various timeframes (Day, Week, Month, Quarter, and Year), indicating whether the current price is above or below these levels to understand market sentiment and trends.
High/Low Levels: It monitors and displays the Previous Day High/Low, Week High/Low, Month High/Low, Quarter High/Low, and Year High/Low, highlighting significant price levels and potential breakout or breakdown points.
Full Time Frame Continuity Table:
The script provides a visual table showing the alignment of different timeframes (bullish or bearish), allowing traders to make informed decisions based on the overall market structure.
How to Use the Script:
Add to Chart:
Load "The Flip" script onto your TradingView chart.
Customize Settings:
Adjust the appearance and display settings to fit your trading preferences.
Analyze the Chart:
Use the 50% level of the previous candle to identify potential reversal points.
Track the opening print levels for various timeframes to gauge market sentiment.
Monitor the high/low levels to spot significant price levels and potential breakout or breakdown points.
Refer to the FTFC table to see the alignment of different timeframes and make decisions based on the overall market structure.
What Makes This Script Original:
Integration with "The Strat"
Inspired by "The Strat" created by Rob Smith, "The Flip" focuses on the critical moment when timeframes switch from bullish to bearish or vice versa, providing a unique perspective on market movements.
Comprehensive Market View:
By displaying the 50% level of the previous candle, opening print levels, high/low levels, and a full time frame continuity table, the script offers a holistic view of the market, helping traders make more informed decisions.
User-Friendly Visualization:
The script's visual indicators and FTFC table make it easy to quickly assess market conditions and potential trading opportunities, enhancing both the efficiency and effectiveness of market analysis.
When Full Time-Frame Continuity is bullish, you will see a green check mark ✔️, indicating all major timeframes (Daily, Weekly, Month, Quarter, and Year) are aligned.
When Full Time-Frame Continuity is bearish, you will see a red drop 🩸, indicating all major timeframes (Daily, Weekly, Month, Quarter, and Year) are aligned.
Otherwise, you will see mixed timeframes.
Volumetric Volatility Blocks [UAlgo]The Volumetric Volatility Blocks indicator is designed to identify significant volatility blocks based on price and volume data. It utilizes a combination of the Average True Range (ATR) and Simple Moving Average (SMA) to determine the volatility level and identify periods of heightened market activity. The indicator highlights these volatility blocks, providing traders with visual cues for potential trading opportunities. It differentiates between bullish and bearish volatility by analyzing price movement and volume, offering a nuanced view of market sentiment. This tool is particularly useful for traders looking to capitalize on periods of high volatility and momentum shifts.
🔶 Key Features
Volatility Measurement Length: Controls the period used to calculate the ATR.
Smooth Length of Volatility: Defines the period for the SMA used to smooth the ATR.
Multiplier of SMA: Sets the minimum threshold for the ATR to be considered a "high volatility" block.
Show Last X Volatility Blocks: Determines how many of the most recent volatility blocks are displayed on the chart.
Mitigation Method: Choose between "Close" or "Wick" price to filter volatility blocks based on price action. This helps avoid highlighting blocks broken by the chosen price level.
Volume Info: Displaying the volume associated with each block.
Up/Down Block Color: Sets the color for bullish and bearish volatility blocks.
🔶 Usage
The Volumetric Volatility Blocks indicator visually represents periods of high volatility with blocks on the chart. Green blocks indicate bullish volatility, while red blocks indicate bearish volatility.
Bullish Volatility Blocks: When the ATR surpasses the smoothed ATR multiplied by the set multiplier, and the price closes higher than it opened, a bullish block is formed. These blocks are generally used to identify potential buying opportunities as they indicate upward momentum.
Bearish Volatility Blocks: Conversely, bearish blocks form under the same conditions, but when the price closes lower than it opened. These blocks can signal potential selling opportunities as they highlight downward momentum.
Volume Information: Each block can display volume data, providing insight into the strength of the market movement. The percentage shown on the block indicates the relative volume contribution of that block, helping traders assess the significance of the volatility.
The volume percentages in the Volumetric Volatility Blocks indicator are calculated based on the total volume of the most recent volatility blocks. For each of the most recent volatility blocks, the percentage of the total volume is calculated by dividing the block's volume by the total volume:
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
MA Crossover StrategyIt is very simple strategy, in this you will will whenever MA 7 crossover MA 30 you will get the Buy and Sell signal. Best time frame to test this strategy is 4 hour and 1 day. Also you can try 1 hour and 15 min time frame