Market DNA: Structure, Volume, Range, and SessionsMarket DNA: Structure, Volume, Range, and Sessions**
The Market DNA indicator combines market structure, volume analysis, trading ranges, and global trading sessions into a single, comprehensive tool for traders. It helps identify key price levels, volume patterns, consolidation phases, and active market periods, enabling informed trading decisions.
Market Structure Detects swing highs and lows using `ta.pivothigh` and `ta.pivotlow`, plotting them as red/green triangles to highlight support/resistance and trend reversals.
- Fractal Volume Zones (FVG): Highlights areas of significant buying/selling pressure by comparing current volume to an average over a lookback period; high-volume zones are marked with a semi-transparent blue background.
- Trading Range: Defines a price channel using the Average True Range (ATR) and a multiplier, creating upper/lower bands to identify consolidation, breakouts, and potential trade levels.
- Market Sessions: Highlights major global trading sessions (Asia, Europe, US) with colored backgrounds (purple, teal, yellow) to indicate liquidity and volatility shifts.
How It Works
- Swing points help analyze trends and reversals.
- FVG confirms price movements with high volume for stronger signals.
- Trading range bands assist in identifying breakout opportunities and setting stops/take-profits.
- Session highlights allow traders to adapt strategies based on regional activity.
Customization
- Adjust `swing_length` for sensitivity in detecting turning points.
- Modify `volume_lookback` to control volume averaging.
- Tune `range_multiplier` for wider/narrower trading bands.
- Enable/disable session highlighting via `session_highlight`.
Use Cases
- Identify trends and key levels using swing points and FVG.
- Spot breakout opportunities with trading range bands.
- Adapt strategies to regional trading sessions for optimal timing.
This all-in-one indicator provides a clear, customizable view of the market, empowering traders to make data-driven decisions across asset classes and timeframes.
Cari dalam skrip untuk "range"
Eze Profit Range Detection FilterThe Range Detection Filter is a technical analysis tool designed to help traders identify range-bound market conditions and focus on breakout opportunities. It combines the ATR (Average True Range) for volatility analysis and the ADX (Average Directional Index) for trend strength evaluation to highlight consolidation phases and alert traders when the market is ready to break out.
This indicator provides visual cues and customizable alerts, making it suitable for traders looking to avoid false signals during choppy markets and capitalize on trending moves following a breakout.
What Makes It Unique?
ATR for Volatility:
Measures market volatility by comparing ATR with its moving average.
Consolidation phases are flagged when ATR remains below its moving average for a sustained period.
ADX for Trend Strength:
Monitors trend strength, confirming range-bound conditions when ADX falls below a user-defined threshold (default: 20).
Combines with ATR to ensure accurate detection of trendless periods.
Breakout Alerts:
Notifies traders of breakout opportunities when the price moves outside the highest high or lowest low of the range.
How It Works:
Range Detection:
The market is considered "in range" when:
ATR is below its moving average, indicating low volatility.
ADX is below the threshold, confirming a lack of trend strength.
Visual Indication:
A yellow background highlights range-bound conditions, allowing traders to avoid low-probability trades.
Breakout Detection:
Alerts are triggered for breakouts above or below the range to help traders identify potential opportunities.
Features:
Range Highlighting:
Automatically detects and highlights range-bound markets using a yellow background.
Breakout Alerts:
Sends alerts for breakouts above or below the range once the market exits consolidation.
Customizable Inputs:
ATR length, moving average length, and ADX parameters are fully adjustable to adapt to various trading styles and asset classes.
Multi-Timeframe Compatibility:
Suitable for all markets and timeframes, including stocks, forex, and cryptocurrencies.
How to Use:
Identify Ranges:
Avoid trading when the yellow background appears, signaling a range-bound market.
Focus on Breakouts:
Look for alerts indicating breakouts above or below the range for potential trending opportunities.
Combine with Other Indicators:
Use volume analysis, momentum oscillators, or candlestick patterns to confirm breakout signals.
Credits:
This script utilizes widely accepted methodologies for ATR and ADX calculations. ADX is calculated manually using directional movement (+DI and -DI) for precise trend detection. The concept has been adapted and enhanced to create this comprehensive range-detection tool.
Notes:
This indicator is intended for educational purposes and should not be used as standalone financial advice.
Always incorporate this tool into a broader trading strategy for optimal results.
Trading Ranges + ZScoreOverview
The "Trading Ranges + ZScore" script is a versatile technical indicator developed for TradingView. This tool combines two powerful conceptsโprice ranges and Z-Score analysisโto help traders identify potential trend reversals, overbought/oversold conditions, and trend strength. The script dynamically calculates price ranges based on recent price action and utilizes Z-Score to detect deviations from a statistical norm, providing valuable insights for decision-making in both ranging and trending markets.
Features
Price Ranges: Calculates dynamic upper and lower price boundaries based on volatility and market structure.
Z-Score Oscillator: A statistical measure that highlights overbought/oversold conditions based on the deviation from a moving average.
Trend Detection: Identifies trend continuation or reversal points by comparing current price action against historical levels.
Customizable Alerts: Generates visual signals (diamonds and X crosses) for potential long/short entries and exits.
Visual Representation: Colors the bars based on Z-Score and trend direction, enhancing the chartโs readability and signal clarity.
Customizable Parameters: The script allows users to fine-tune perception length, analysis period, factor multiplier, and oscillator thresholds to fit different market conditions.
Key Input Parameters
Perception: The length used for calculating highest/lowest price points (default: 20).
Analysis: The length used for calculating the moving average and volatility (default: 100).
Factor: A multiplier to adjust the width of the price ranges (default: 2.0).
Oscillator Threshold: The overbought/oversold threshold for the Z-Score oscillator (default: 70).
Trend Filter: A boolean switch that filters signals based on trend direction.
Fill Zones: Option to color-fill between price levels when certain conditions are met.
Bullish/Bearish/Neutral Colors: Customizable colors for bullish, bearish, and neutral signals.
How It Works
Price Ranges Calculation:
The script calculates five levels: two upper boundaries, the average price level, and two lower boundaries. These levels are based on the highest/lowest prices over a user-defined period and adjusted by volatility (Average True Range).
When the price crosses either of these levels, it suggests a significant change in market direction, potentially indicating a trend reversal.
Z-Score Oscillator:
The Z-Score is a statistical measurement of a price's position relative to its moving average. The indicator calculates two variations:
Z-Score based on the absolute difference between the price and the moving average.
Z-Score based on standard deviation.
These oscillators help detect extreme conditions where the price is likely to revert (overbought/oversold zones).
Trend Detection and Signals:
The indicator generates potential buy/sell signals when the price crosses the predefined levels or based on the fast Z-Score crossing the overbought/oversold thresholds.
Weak long/short signals are shown when the faster Z-Score oscillator reaches extreme levels but trend filters are applied to avoid noise.
Bar Colors and Signal Shapes:
Bar colors change dynamically to reflect the trend direction and Z-Score conditions. Signals for potential trades are displayed using diamonds and X crosses, making it easy to spot opportunities visually.
Visuals and Plots
Bar Colors: Changes the bar color based on Z-Score and trend direction.
Z-Score Plot: Displays two Z-Score oscillators, the standard and a faster one for detecting quicker price deviations.
Overbought/Oversold Zones: Highlighted by upper and lower thresholds of the Z-Score.
Long/Short Signals: Uses diamond-shaped markers for strong long/short signals and X-shaped markers for weaker signals.
Dynamic Range Lines: Plots lines for key price levels (upper/lower boundaries, mid-range) based on the dynamic range calculations.
Usage Guide
Identify Overbought/Oversold Conditions: Look for the Z-Score reaching extreme positive or negative values. When combined with trend signals, these conditions often point to a potential reversal.
Follow the Trend: Use the trend filter option to focus only on trades in the direction of the prevailing trend, reducing false signals in ranging markets.
Watch for Range Breakouts: Pay attention to the upper and lower boundaries. Price crossing these levels often signals the start of a new trend or a major price movement.
Adjust Parameters: Tailor the perception length, analysis length, and multiplier to suit different asset classes or timeframes.
Customization
You can adjust the key parameters to adapt the indicator to different markets or personal trading preferences:
- Perception & Analysis Lengths: Control the sensitivity of the price range calculations.
- Factor Multiplier: Adjusts the width of the ranges, with higher values indicating larger zones.
- Oscillator Threshold: Modify the overbought/oversold levels to suit different market volatility.
- Trend Filter: Toggle on/off to focus on trend-following strategies or range-bound conditions.
- Visual Options: Customize colors for bullish, bearish, and neutral signals, as well as enable/disable the zone fills.
Trend Day IndentificationVolatility is cyclical, after a large move up or down the market typically "ranges" during the next session. Directional order flow that enters the market during this subsequent session tends not to persist, this non-persistency of transactions leads to a non-trend day which is when I trade intraday reversionary strategies.
This script finds trend days in BTC with the purpose of:
1) counting trend day frequency
2) predicting range contraction for the next 1-2 days so I can run intraday reversion strategies
Trend down is defined as daily bar opening within X% of high and closing within X% of low
Trend up is defined as daily bar opening within X% of low and closing within X% of high
default parameters are:
1) open range extreme = 15% (open is within 15% of high or low)
2) close range extreme = 15% (close is within 15% of high or low)
There is also an atr filter that checks that the trend day has a larger range than the previous 4 bars this is to make sure we find true range expansion vs recent ranges.
Notes:
If a trend day occurs after a prolonged sideways contraction it can signal a breakout - this is less common but is an exception to the rule. These types of occurrences can lead to the persistency of order flow and result in extended directional daily runs.
If a trend day occurs close to 20 days high or low (stopping just short OR pushing slightly through) then wait an additional day before trading intraday reversion strategies.
Opening Range BreakoutOPENING RANGE BREAKOUT (ORB) INDICATOR
DESCRIPTION
The Opening Range Breakout indicator is a powerful technical analysis tool designed specifically for US equity markets. It identifies and visualizes the opening range established during the first configurable minutes of each trading day (starting at 9:30 AM EST), then provides clear signals when price breaks out of or rejects from these key levels.
This indicator combines multiple timeframe analysis capabilities with precise breakout detection to help traders identify high-probability trading opportunities based on opening range dynamics.
KEY FEATURES
Configurable Opening Range:
โข Set opening range duration from 5 minutes to 4 hours
โข Automatically adjusts calculations based on your chart timeframe
โข Works on any timeframe (1m, 5m, 15m, 1h, etc.)
Multi-Day Range Display:
โข Shows up to 50 days of historical opening ranges
โข Each day's range properly contained within its trading session
โข Range lines extend from market open (9:30 AM) to market close (4:00 PM EST)
Clear Signal System:
โข Green arrows (โฌ): Bullish breakouts and rejections
โข Red arrows (โฌ): Bearish breakouts and rejections
โข Two signal types: Close breakouts (normal size) and wick rejections (small size)
Visual Range Highlighting:
โข Opening range period highlighted with colored box
โข Customizable colors for range fill, borders, and midline
โข Clean, professional appearance with configurable line styles
SIGNAL TYPES
Bullish Signals (Green โฌ):
1. Close Breakout Above Range (Normal Size): 5-minute candle closes above the opening range high
2. Wick Rejection from Below (Small Size): Price wicks below the opening range low but closes back inside the range
Bearish Signals (Red โฌ):
1. Close Breakout Below Range (Normal Size): 5-minute candle closes below the opening range low
2. Wick Rejection from Above (Small Size): Price wicks above the opening range high but closes back inside the range
CONFIGURATION OPTIONS
Range Settings:
โข Opening Range Minutes: Duration of opening range (default: 30 minutes)
โข Lookback Days: Number of historical days to display (default: 20 days)
Visual Customization:
โข Range Color: Fill color for the opening range area
โข Border Color: Color for range high/low lines
โข Midline Color: Color for the range midpoint line
โข Opening Range Highlight Color: Color for the opening period box
โข Line Style: Solid, Dashed, or Dotted lines
โข Line Width: 1-4 pixel width options
Display Options:
โข Show Midline: Toggle midpoint line display
โข Show Range Labels: Toggle price level labels
โข Arrow Distance: Adjust arrow positioning (0.1-2.0%)
USAGE GUIDE
Basic Setup:
1. Add the indicator to your chart (works best on 5-minute timeframe)
2. Configure your preferred opening range duration (15m, 30m, or 60m are popular choices)
3. Adjust lookback days based on your analysis needs
4. Customize colors and line styles to match your chart theme
Trading Applications:
Breakout Trading:
โข Long Entry: Green arrow (close breakout above range) + confirmation
โข Short Entry: Red arrow (close breakout below range) + confirmation
โข Stop Loss: Opposite side of the opening range
โข Target: 1-2x the range size or key support/resistance levels
Range Rejection Trading:
โข Reversal Setups: Small arrows indicate failed breakouts
โข Mean Reversion: Trade back toward range midline
โข Support/Resistance: Use range levels as key price zones
Multi-Day Analysis:
โข Identify recurring support/resistance levels
โข Analyze range expansion/contraction patterns
โข Compare current day's activity to recent history
BEST PRACTICES
1. Timeframe Selection: 5-minute charts provide optimal signal clarity
2. Range Duration: 30-minute opening range is most commonly used, but adjust based on:
- Market volatility
- Stock characteristics
- Trading style preference
3. Confirmation: Use additional indicators or price action for trade confirmation
4. Risk Management: Always use appropriate position sizing and stop losses
MARKET SESSIONS
The indicator is specifically designed for US equity markets:
โข Market Open: 9:30 AM EST
โข Market Close: 4:00 PM EST
โข Opening Range: Calculated from market open
โข Range Lines: Extend throughout the trading day only
PERFORMANCE NOTES
โข Optimized for real-time trading with minimal lag
โข Automatically manages memory by cleaning old ranges
โข Efficiently handles multiple timeframes and range calculations
KNOWN ISSUES & WORKAROUNDS
Historical Buffer Error:
Issue: Occasionally, you may encounter an error: "The requested historical offset (XXX) is beyond the historical buffer's limit (770)"
Workaround:
1. Switch to a different timeframe temporarily
2. Switch back to your original timeframe
3. The indicator will reload and function normally
This is a Pine Script limitation related to historical data access and doesn't affect the indicator's core functionality.
COMPATIBILITY
โข Pine Script Version: v6
โข Chart Types: All chart types supported
โข Timeframes: All timeframes (optimized for 1m-1h)
โข Markets: Designed for US equity markets during regular trading hours
TIPS FOR MAXIMUM EFFECTIVENESS
1. Combine with Volume: High volume on breakouts increases reliability
2. Market Context: Consider overall market direction and volatility
3. News Awareness: Be cautious around earnings and major announcements
4. Range Quality: Wider ranges often provide better breakout opportunities
5. Time of Day: Early breakouts (first 1-2 hours) often have higher follow-through
This indicator is provided for educational and informational purposes. Always conduct your own analysis and manage risk appropriately.
Opening/Closing Range [Pro] (jdam18)Indicator Summary
The Opening/Closing Range indicator systematically captures and displays the Opening Range (OR) (9:30am ET) and Closing Range (CR) (3:50pm ET) for each trading session with flexible historical tracking and visual customization options.
Key functionalities include:
Opening and Closing Ranges: Dynamically plots the OR and CR session boxes with options for high/low lines, midline (equilibrium) plotting, and customizable extension to the current bar.
Extensions: Automatically generates extension levels above and below the range based on user-defined multipliers, facilitating clearer identification of price expansion levels.
Merging Logic: Optionally merges overlapping OR and CR ranges into unified boxes, enhancing clarity when sessions overlap significantly. Merged boxes may display a consolidated central line (CE) and visual extensions.
Event Horizons: Detects and highlights meaningful price gaps ("Event Horizons") between non-overlapping ranges, with optional subdivision into quarters and eighths for detailed gap structure analysis.
Weekly Extensions: Independently tracks Monday and Wednesday Opening and Closing Ranges, projecting expansion levels for the week.
Weekly Extension Table: Provides an optional summary table displaying the status of Monday and Wednesday extensions, range size, and the current location of price relative to key extension thresholds. Table positioning is customizable.
The script is designed to be performance-conscious, modular, and highly configurable, supporting intraday timeframes up to 15 minutes, and providing comprehensive visualizations to aid in market structure analysis and trading decisions.
Daily Volatility Range (DVR) [GIF]VIX as a Volatility Indicator:
The VIX is a measure of the market's expectation of volatility in the S&P 500 over the next 30 days, based on the prices of S&P 500 options.
The Rule of 16:
A VIX of 16 implies that the market expects the SPX to move up or down by roughly 1% on any given day.
If the VIX is 24, the expected daily move is around 1.5%, and with a VIX of 32, the expected move is around 2%.
The rationale for the rule is that the square root of the number of trading days in a year (approximately 252) is roughly 16.
Example:
If the VIX is at 20, the rule suggests that the SPX might see daily moves of around 1.25%.
Practical Application:
The rule of 16 can be used as a quick and easy way to estimate the potential daily volatility of the S&P 500 based on the VIX.
The Daily Volatility Range:
This indicator cross references the ticker on the chart with it's own volatility index (assuming it has one). Below are the indexes and stocks that have their own volatility index:
S&P 500
Nasdaq 100
Russell 2000
Dow Jones
TLT
Bitcoin
Gold
Crude Oil
Apple
Amazon
Google
IBM
Goldman Sachs
How I use the DVR:
Historic probabilities show that you will close the day within the DVR. However, there are times when those probabilities diminish greatly. One of those times is when you open in the RTH session outside of the DVR. If you open outside the DVR, you can look for the DVR to becomes support/resistance and stay extended outside the DVR. These days can often become muted as most of the most has happened before the market open. However, if we open outside the DVR and break back into range, it is highly probable that we will not break back into those extended ranges.
Indicator Options:
There are 2x and 3x DVR levels that can be plotted. During times of extreme volatility, it will become important to have these plotted.
There is the option to plot calculated pivot points. These are fib ranges that have historically been areas of consolidation or trend reversal. These are projections based on my own research and are not as important as the DVR levels themselves.
There is also an option to color the candles a specific color if the candle closes outside the DVR. This is to highlight the fact that price action has exceeded the range and caution should be taken.
If you have suggestions how to make this indicator better, please let me know in the comments and I will look into it. Thank you!
Equilibrium Range
Equilibrium Range Indicator
The Equilibrium Range Indicator is a powerful tool designed to assist traders in identifying key market equilibrium zones. By dynamically plotting ranges derived from critical market levels, this indicator provides actionable insights for trade entries, exits, and position management. It is particularly suited for traders who focus on intraday price action and rely on understanding market structure for decision-making.
How the Indicator Works
High-Timeframe Structural Equilibrium (Structural EQ)
This level is calculated by identifying the largest visible swing high and swing low on the 5-minute chart.
It represents the structural price equilibrium, where market sentiment is balanced between buyers and sellers.
Previous Day's Equilibrium (Historical EQ)
Derived from the midpoint of the previous day's high and low prices.
Acts as a historical reference point for potential support or resistance zones.
Dynamic Range Construction
The indicator combines the Structural EQ and the Historical EQ to create an Equilibrium Range.
This range is visually displayed on the chart as a transparent yellow rectangle, ensuring clear and immediate recognition.
Extension and Labeling
The equilibrium range extends infinitely to the right, keeping it relevant for ongoing price action.
A labeled "EQ Range" inside the rectangle ensures traders can quickly identify its purpose.
How to Use the Indicator
Consolidation Zones
The Equilibrium Range helps identify areas where price is likely to consolidate, aiding in avoiding trades during periods of low volatility.
Trade Entries and Exits
Use the upper and lower bounds of the range as guides for setting take-profit and stop-loss levels.
Ideal for scaling in and out of trades based on how price interacts with the range.
Market Sentiment and Breakouts
Observe how price behaves relative to the range:
Breakouts above the range may signal bullish momentum.
Breakouts below the range may indicate bearish trends.
Why It's Original
This indicator stands out by combining multiple concepts of equilibrium into a single, coherent visualization. Unlike traditional support/resistance indicators, the Equilibrium Range Indicator dynamically adapts to market structure while integrating historical context, providing traders with a unique perspective for analyzing price action.
[F][IND] - Candle Range SizeDescription:
Understanding market volatility is paramount for making informed trading decisions, and the Candle Range Histogram Indicator is designed to provide traders with a visual representation of price volatility over time.
Key Features:
1. Histogram Display:
The indicator presents a histogram on your TradingView chart, offering a clear visualization of the range of each candle, calculated as the difference between the high and low prices.
2. Volatility Insight:
Easily identify periods of heightened or subdued volatility. Larger histograms indicate greater price ranges, suggesting increased volatility, while smaller histograms signify lower volatility.
3. Intraday Analysis:
Intraday traders can benefit from monitoring the Candle Range Histogram to gauge volatility patterns throughout the trading day. This information is valuable for setting realistic profit targets and adjusting risk management strategies.
4. Breakout Opportunities:
Recognize potential breakout opportunities by observing significant increases in candle range. Traders often associate expanded ranges with potential strong price movements.
5. Trend Confirmation:
Confirm the strength of trends by assessing consecutive candles with expanding or contracting ranges. This can aid trend-following traders in making more informed decisions.
It's important to note that while the histogram provides valuable information, it's usually more effective when used in conjunction with other technical indicators and analysis methods. Traders often combine multiple tools to gain a comprehensive understanding of the market and make well-informed trading decisions.
Alerts:
You can enable alerts on this indicator to receive timely notifications.
Disclaimer:
This indicator is provided for educational purposes only. Trading involves risk, and users should consult with a financial professional before making any trading decisions.
Your Feedback Matters!
Please feel free to comment or reach out if you have any improvement suggestions or if you would like to request the development of a specific indicator. Your feedback is invaluable!
ICT Asian Range and KillzonesThis TradingView indicator highlights key trading sessions and their price ranges on a chart. It identifies the Asian Range and the Killzones for both the London Open and New York Open sessions. Hereโs a brief breakdown:
Asian Range:
Defines the high and low price levels during the Asian trading session (between the specified start and end hours, default 00:00 to 04:00 UTC).
Plots horizontal lines to mark the highest and lowest prices reached during the Asian session.
Adds labels showing the values of these high and low points after the session ends.
London and New York Killzones:
Identifies the โKillzonesโ or key trading windows for the London Open (default 06:00 to 09:00 UTC) and the New York Open (default 11:00 to 14:00 UTC).
Tracks the high and low price levels within these windows and plots rectangles ("boxes") on the chart to visualize these ranges.
The boxes are color-coded and customizable, indicating potential areas of high market activity or volatility.
Customizable Visuals:
Users can adjust the colors, border widths, and other visual properties for better clarity and chart integration.
[DarkTrader] Classic Swipe (DW)Classic Swipe (DW) indicator is a highly customizable tool designed to visualize key price zones and liquidity sweeps on a daily and weekly basis. This script uses advanced plotting features like boxes, labels, and color-coded zones to help traders identify critical market structures such as daily/weekly high-low ranges and bullish or bearish swipes (previous daily high/low levels).
Key Features :
Daily Zone Box: Marks and tracks the high-low range for each trading day. Provides clear visual representation of price action within the daily range.
Weekly Zone Box: Highlights weekly high-low ranges, giving insight into longer-term support and resistance areas.
Bullish and Bearish Daily Swipes: Detects and marks sweeps of previous daily highs (bullish) or lows (bearish) with custom colors and transparency settings.
Customization: Toggle between displaying weekly and daily zones, adjust box colors and transparency, and fine-tune the appearance to match your preferences.
How to Use :
Daily Zone Box: Use this feature to identify key areas of daily price consolidation or breakout, providing intraday support/resistance zones.
Weekly Zone Box: Longer-term traders can leverage the weekly zone box to track broader market trends and prepare for potential swing trade setups.
Daily Swipes: The bullish and bearish swipe detection helps in spotting liquidity grabs or stop hunts, aiding in precise entry/exit decisions based on liquidity pools.
Indicator In Use :
Whether you're a day trader looking for intraday levels or a swing trader focusing on broader trends, this tool can help enhance your analysis by providing clear visual aids for market structure and liquidity events.
Market Structure RangesI have written a script for determining the BIAS.
It uses fractals of 3 for the highs and lows.
It works as follows:
If a range high is broken (!!!candelclose!!!), the last fractal low is selected as the new low point. The Rangelow is determined from this low point.
If a fractal high now occurs, the range high is set at this point.
This Range between the low range and high range is called "Dealing range" , this is divided at the centre - into premium and discount.
The range stays the same, until we see a body close outside this range!
The same applies to a short scenario, only in reverse.
In the indicator, the higher timeframe is selected, which determines the input for the dealing range. Then the dealing range from the higher timeframe is displayed in each timeframe that we want to use for our trades.
The indicator should be used to trade with the trend: for example, the last higher timeframe break is bullish (displayed in the table) -- called kMS
and on the other hand that we only want to take tades that are in the lower part of the range, i.e. in the discount area for buy trades.
This indicator therefore serves as a filter for the higher timeframe trend and higher timeframe premium/discount ranges.
Quantum Duality Predictive Ranges### Quantum Duality Predictive Ranges v1.0
This Pine Script is designed to help traders predict price ranges and manage risk dynamically using ATR (Average True Range) calculations. It offers customizable settings, visual indicators, and alerts to assist in identifying trading opportunities and managing risk.
#### Key Features
- **Dynamic Risk Management**: Adjusts risk based on signals and cumulative risk.
- **Predictive Ranges**: Calculates predictive ranges based on ATR and user-defined multipliers.
- **Visual Indicators**: Plots lines and labels for easy visualization of trading signals and risk levels.
- **Alerts and Table**: Provides alerts for trading signals and displays a table with relevant trading data.
#### User Inputs
**EA Account Settings**
- **Initial Risk fixed in USD $**: Sets the initial risk amount in USD (default: 18).
- **Signal Multiply Factor for Risk**: Multiplier for signal risk (default: 1.257).
- **Pair Decimals**: Decimal places for pair pricing (default: 2).
**Trade Settings**
- **ATR Length**: Length for ATR calculation (default: 198).
- **ATR Factor**: Multiplier for ATR (default: 6.0).
- **ATR Source**: Source for ATR calculation (default: close).
- **ATR Multiplier**: Multiplier for defining RANGE Top/Bottom Levels (default: 0.45).
- **Inner Range Multiplier**: Multiplier for defining TP1 (default: 2.01).
- **Outer Range Multiplier**: Multiplier for defining TP2 (default: 3.0).
- **Spans Multiplier**: Multiplier for defining SL (default: 0.36).
**Display Options**
- **Display Table**: Option to display a table (default: true).
- **Display Labels for potential Gain and Loss**: Option to display gain/loss labels (default: true).
- **Display Labels for Bar counts since current Range**: Option to display bar counts (default: true).
- **Display Labels for Signals**: Option to display signal labels (default: true).
- **Line Width**: Width of the lines plotted (default: 1).
- **Line Transparency**: Transparency of the lines (default: 10).
- **Fill Transparency**: Transparency of the fill between lines (default: 75).
#### How It Works
1. **Predictive Ranges Calculation**:
- Calculates predictive ranges based on ATR, holds ATR values, and updates average values when price crosses defined levels.
2. **Risk Management and Signal Logic**:
- Counts the number of signals.
- Calculates cumulative and total risk based on signals.
- Resets signals and risk when price crosses predictive ranges.
3. **Entry Points and Potential Gains/Losses**:
- Determines buy and sell entry points.
- Calculates potential gains and losses for both buy and sell signals.
- Resets values when a new average range is established.
4. **Plotting and Alerts**:
- Plots lines for predictive ranges, spans, and stop loss levels.
- Displays labels for signals and potential gains/losses.
- Provides alerts for buy and sell signals with defined take profit and stop loss levels.
5. **Custom Ticker**:
- Renames tickers based on predefined rules (e.g., SPX500USD to SPX500).
#### Usage
1. **Set Up**:
- Adjust the input parameters in the settings menu to match your trading preferences and risk management strategy.
2. **Visualize**:
- View the plotted lines and labels on the chart to identify potential trading signals and manage risk.
3. **Alerts**:
- Enable alerts to receive notifications for buy and sell signals.
4. **Table**:
- Use the table to see a summary of important trading data, such as total risk and target levels.
This script provides a robust framework for managing risk and identifying trading opportunities using predictive ranges based on ATR. Happy trading!
REVE MarkersREVE stands for โRange Extensions Volume Expansionsโ. It seeks to report the same as the REVE which I published before. However the code uses a different algorithm to find the โusual rangeโ or โusual volumeโ to which the current range and volume is compared. In the old REVE a function is coded which mimics a median() function..
In this code the median() function provided in pinescript is used, which makes the code of the actual algorithm nice and short in lines 21 through 27
For example line 23: โmorevol=ta.median(curvol , usual)*eventnormโ in which
โmorevol โ is the calculated level above which the volume is deemed considerable,
โcurvolโ is the current volume (see line 21); curvol the volume of the previous period.
โusualโ is the lookback period (see line 8)
โta.median(curvol , usual)โ is therfore the median volume in the lookback period
โeventnormโ is the percent which sets when โnormalโ becomes โconsiderableโ (see line 6)
In line 26 the same is done for range.
The code in lines 30 to 92, concern logic manipulations to arrive at choosing the appropriate marker, which are plotted in lines 95 through 136.
Using the shapes as provided by Pinescript offers the possibility to give a much better and more meaningful visualization of volume and range events than different colored columns and histograms in the โoldโ REVE in the below panel (see example chart).
Using the Pinescript function to find the median opens the possibility of letting the user play in the inputs with the lookback period and the norms for considerable and excessive to find a setting he or she likes most.
Using median in stead of average is necessary in volume and range analysis because these are so volatile. E.g. range or volume can be 10 times larger in the next period! If you have a few excessive volumes or ranges in the lookback period the โaverage volume or rangeโ is much higher than the โusual volume or rangeโ In statistics this is referred to as the outlier problem.
The markers are located on the bottom of the instrument pane. Those indicating volume events (with โeventโ I mean a considerable or excessive expansion or extension) are colored triangles or squares, triangles indicate direction, squares that the price stays the same. those indicating range events with โnormalโ volume are crosses, plus-cross means considerable range event and x-cross is excessive event.
The red, fuchsia and maroon triangles and squares indicate a combination of volume and range events. I call this โeffective volumeโ because more trade leads to shifting prices. The green and blue triangles and squares indicate a volume event with โnormalโ ranges. I call this โineffective volumeโ because more volume does not lead to price shits. Effective volume can be attributed to occasional traders, because these do not care much for the price effect of their orders. The ineffective volume is attributable to institutional traders, because these go to great length to hide the size of their selling or buying objective by trading many small amounts in a day. Therefore one can theorize that โsmart moneyโ is active when green and blue markers show up.
There is an option in the inputs to show markers around the candles (or bars). Those above indicate volume events, plus-cross for considerable and x-cross for excessive volume.
Those below the candles (or bars) indicate range events, triangles for direction or a plus-cross when the price stays the same. The small ones indicate considerable range events and the big ones excessive range events. This option can be used for better understanding of the colors of the bottom markers or to check which marker applies to which candle or bar.
If the instrument is without volume, the indicator will show only range markers.
Have fun and take care.
Rolling ATR Channel (Expo)Rolling ATR Channel (Expo) is a sophisticated indicator that identifies the underlying trend as well as identifies ATR based trading ranges. In a trending market, the price will be within the Upper or Lower band. If the market is in a trading range , the price will bounce between the upper and lower ATR zones, until the price breaks through and creates a new trend. The user will no longer have to guess in which state the market is in, the indicator displays it clearly.
So, the indicator displays real-time Range (ATR based) support and resistance zones as well as if the market is in a trend.
If you know the current market state, you have the ability to choose the most applicable market strategy.
Real-time
No repainting
Works on any market and in any timeframe
HOW TO USE
- Use the indicator to identify trading range support and resistance zones.
- Use the indicator to identify when the price breaks through the trading range.
- Use the indicator to identify if the market is in a trend.
INDICATOR IN ACTION
4 Hour chart
I hope you find this indicator useful , and please comment or contact me if you like the script or have any questions/suggestions for future improvements. Thanks!
I will continually work on this indicator, so please share your experience and feedback as it will enable me to make even better improvements. Thanks to everyone that has already contacted me regarding my scripts. Your feedback is valuable for future developments!
-----------------
Disclaimer
Copyright by Zeiierman.
The information contained in my scripts/indicators/ideas does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, or individualโs trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My scripts/indicators/ideas are only for educational purposes!
-----------------
ACCESS THE INDICATOR
โข Contact me on TradingView or use the links below
888 BOT #alertsโ 888 BOT #alerts
This is an Expert Advisor 'EA' or Automated trading script for โlongsโ and โshortsโ, which uses only a Take Profit or, in the worst case, a Stop Loss to close the trade.
It's a much improved version of the previous โRepanochaโ. It doesn`t use 'Trailing Stop' or 'security ()' functions (although using a security function doesn`t mean that the script repaints) and all signals are confirmed, therefore the script doesn`t repaint in alert mode and is accurate in backtest mode.
Apart from the previous indicators, some more and other functions have been added for Stop-Loss, re-entry and leverage.
It uses 8 indicators, (many of you already know what they are, but in case there is someone new), these are the following:
1. Jurik Moving Average
It's a moving average created by Mark Jurik for professionals which eliminates the 'lag' or delay of the signal. It's better than other moving averages like EMA, DEMA, AMA or T3.
There are two ways to decrease noise using JMA. Increasing the 'LENGTH' parameter will cause JMA to move more slowly and therefore reduce noise at the expense of adding 'lag'
The 'JMA LENGTH', 'PHASE' and 'POWER' parameters offer a way to select the optimal balance between 'lag' and over boost.
Green: Bullish, Red: Bearish.
2. Range filter
Created by Donovan Wall, its function is to filter or eliminate noise and to better determine the price trend in the short term.
First, a uniform average price range 'SAMPLING PERIOD' is calculated for the filter base and multiplied by a specific quantity 'RANGE MULTIPLIER'.
The filter is then calculated by adjusting price movements that do not exceed the specified range.
Finally, the target ranges are plotted to show the prices that will trigger the filter movement.
Green: Bullish, Red: Bearish.
3. Average Directional Index (ADX Classic) and (ADX Masanakamura)
It's an indicator designed by Welles Wilder to measure the strength and direction of the market trend. The price movement is strong when the ADX has a positive slope and is above a certain minimum level 'ADX THRESHOLD' and for a given period 'ADX LENGTH'.
The green color of the bars indicates that the trend is bullish and that the ADX is above the level established by the threshold.
The red color of the bars indicates that the trend is down and that the ADX is above the threshold level.
The orange color of the bars indicates that the price is not strong and will surely lateralize.
You can choose between the classic option and the one created by a certain 'Masanakamura'. The main difference between the two is that in the first it uses RMA () and in the second SMA () in its calculation.
4. Parabolic SAR
This indicator, also created by Welles Wilder, places points that help define a trend. The Parabolic SAR can follow the price above or below, the peculiarity that it offers is that when the price touches the indicator, it jumps to the other side of the price (if the Parabolic SAR was below the price it jumps up and vice versa) to a distance predetermined by the indicator. At this time the indicator continues to follow the price, reducing the distance with each candle until it is finally touched again by the price and the process starts again. This procedure explains the name of the indicator: the Parabolic SAR follows the price generating a characteristic parabolic shape, when the price touches it, stops and turns (SAR is the acronym for 'stop and reverse'), giving rise to a new cycle. When the points are below the price, the trend is up, while the points above the price indicate a downward trend.
5. RSI with Volume
This indicator was created by LazyBear from the popular RSI.
The RSI is an oscillator-type indicator used in technical analysis and also created by Welles Wilder that shows the strength of the price by comparing individual movements up or down in successive closing prices.
LazyBear added a volume parameter that makes it more accurate to the market movement.
A good way to use RSI is by considering the 50 'RSI CENTER LINE' centerline. When the oscillator is above, the trend is bullish and when it is below, the trend is bearish.
6. Moving Average Convergence Divergence (MACD) and (MAC-Z)
It was created by Gerald Appel. Subsequently, the histogram was added to anticipate the crossing of MA. Broadly speaking, we can say that the MACD is an oscillator consisting of two moving averages that rotate around the zero line. The MACD line is the difference between a short moving average 'MACD FAST MA LENGTH' and a long moving average 'MACD SLOW MA LENGTH'. It's an indicator that allows us to have a reference on the trend of the asset on which it is operating, thus generating market entry and exit signals.
We can talk about a bull market when the MACD histogram is above the zero line, along with the signal line, while we are talking about a bear market when the MACD histogram is below the zero line.
There is the option of using the MAC-Z indicator created by LazyBear, which according to its author is more effective, by using the parameter VWAP (volume weighted average price) 'Z-VWAP LENGTH' together with a standard deviation 'STDEV LENGTH' in its calculation.
7. Volume Condition
Volume indicates the number of participants in this war between bulls and bears, the more volume the more likely the price will move in favor of the trend. A low trading volume indicates a lower number of participants and interest in the instrument in question. Low volumes may reveal weakness behind a price movement.
With this condition, those signals whose volume is less than the volume SMA for a period 'SMA VOLUME LENGTH' multiplied by a factor 'VOLUME FACTOR' are filtered. In addition, it determines the leverage used, the more volume, the more participants, the more probability that the price will move in our favor, that is, we can use more leverage. The leverage in this script is determined by how many times the volume is above the SMA line.
The maximum leverage is 8.
8. Bollinger Bands
This indicator was created by John Bollinger and consists of three bands that are drawn superimposed on the price evolution graph.
The central band is a moving average, normally a simple moving average calculated with 20 periods is used. ('BB LENGTH' Number of periods of the moving average)
The upper band is calculated by adding the value of the simple moving average X times the standard deviation of the moving average. ('BB MULTIPLIER' Number of times the standard deviation of the moving average)
The lower band is calculated by subtracting the simple moving average X times the standard deviation of the moving average.
the band between the upper and lower bands contains, statistically, almost 90% of the possible price variations, which means that any movement of the price outside the bands has special relevance.
In practical terms, Bollinger bands behave as if they were an elastic band so that, if the price touches them, it has a high probability of bouncing.
Sometimes, after the entry order is filled, the price is returned to the opposite side. If price touch the Bollinger band in the same previous conditions, another order is filled in the same direction of the position to improve the average entry price, (% MINIMUM BETTER PRICE ': Minimum price for the re-entry to be executed and that is better than the price of the previous position in a given %) in this way we give the trade a chance that the Take Profit is executed before. The downside is that the position is doubled in size. 'ACTIVATE DIVIDE TP': Divide the size of the TP in half. More probability of the trade closing but less profit.
โ STOP LOSS and RISK MANAGEMENT.
A good risk management is what can make your equity go up or be liquidated.
The % risk is the percentage of our capital that we are willing to lose by operation. This is recommended to be between 1-5%.
% Risk: (% Stop Loss x % Equity per trade x Leverage) / 100
First the strategy is calculated with Stop Loss, then the risk per operation is determined and from there, the amount per operation is calculated and not vice versa.
In this script you can use a normal Stop Loss or one according to the ATR. Also activate the option to trigger it earlier if the risk percentage is reached. '% RISK ALLOWED' wich is calculated according with: '%EQUITY ON EACH ENTRY'. Only works with Stop Loss on 'NORMAL' or 'BOTH' mode.
'STOP LOSS CONFIRMED': The Stop Loss is only activated if the closing of the previous bar is in the loss limit condition. It's useful to prevent the SL from triggering when they do a โpumpโ to sweep Stops and then return the price to the previous state.
โ ALERTS
There is an alert for each leverage, therefore a maximum of 8 alerts can be set for 'long' and 8 for 'short', plus an alert to close the trade with Take Profit or Stop Loss in market mode. You can also place Take Profit limit and Stop Loss limit orders a few seconds after filling the position entry order.
- 'MAXIMUM LEVERAGE': It is the maximum allowed multiplier of the % quantity entered on each entry for 1X according to the volume condition.
- 'ADVANCE ALERTS': There is always a time delay from when the alert is triggered until it reaches the exchange and can be between 1-15 seconds. With this parameter, you can advance the alert by the necessary seconds to activate it earlier. In this way it can be synchronized with the exchange so that the execution time of the entry order to the position coincides with the opening of the bar.
The settings are for Bitcoin at Binance Futures (BTC: USDTPERP) in 30 minutes.
For other pairs and other timeframes, the settings have to be adjusted again. And within a month, the settings will be different because we all know the market and the trend are changing.
โ 888 BOT (SPANISH)
Este es un Expert Advisor 'EA' o script de trading automatizado para โlongsโ y โshortsโ, el cual, utiliza solo un Take Profit o, en el peor de los casos, un Stop Loss para cerrar el trade.
Es una versiรณn muy mejorada del anterior โRepanochaโ. No utiliza โTrailing Stopโ, ni funciones โsecurity()โ (aunque usar una funciรณn security no significa que el script repinte) y todas las seรฑales son confirmadas, por consiguiente, el script no repinta en modo alertas y es preciso en en el modo backtest.
Aparte de los anteriores indicadores se han aรฑadido algunos mรกs y otras funciones para Stop-Loss, de re-entrada y apalancamiento.
Utiliza 8 indicadores, (muchos ya sabรฉis sobradamente lo que son, pero por si hay alguien nuevo), son los siguientes:
1. Jurik Moving Average
Es una media mรณvil creada por Mark Jurik para profesionales la cual elimina el โlagโ o retardo de la seรฑal. Es mejor que otras medias mรณviles como la EMA, DEMA, AMA o T3.
Hay dos formas de disminuir el ruido utilizando JMA. El aumento del parรกmetro 'LENGTH' harรก que JMA se mueva mรกs lentamente y, por lo tanto, reducirรก el ruido a expensas de aรฑadir โlagโ
Los parรกmetros 'JMA LENGTH', 'PHASE' y 'POWER' ofrecen una forma de seleccionar el equilibrio รณptimo entre โlagโ y sobre impulso.
Verde : Alcista, Rojo: Bajista.
2. Range filter
Creado por Donovan Wall, su funciรณn es la de filtrar o eliminar el ruido y poder determinar mejor la tendencia del precio a corto plazo.
Primero, se calcula un rango de precio promedio uniforme 'SAMPLING PERIOD' para la base del filtro y se multiplica por una cantidad especรญfica 'RANGE MULTIPLIER'.
A continuaciรณn, el filtro se calcula ajustando los movimientos de precios que no exceden el rango especificado.
Por รบltimo, los rangos objetivo se trazan para mostrar los precios que activarรกn el movimiento del filtro.
Verde : Alcista, Rojo: Bajista.
3. Average Directional Index (ADX Classic) y (ADX Masanakamura)
Es un indicador diseรฑado por Welles Wilder para medir la fuerza y direcciรณn de la tendencia del mercado. El movimiento del precio tiene fuerza cuando el ADX tiene pendiente positiva y estรก por encima de cierto nivel mรญnimo 'ADX THRESHOLD' y para un periodo dado 'ADX LENGTH'.
El color verde de las barras indica que la tendencia es alcista y que el ADX estรก por encima del nivel establecido por el threshold.
El color Rojo de las barras indica que la tendencia es bajista y que el ADX estรก por encima del nivel de threshold.
El color naranja de las barras indica que el precio no tiene fuerza y seguramente lateralizarรก.
Se puede elegir entre la opciรณn clรกsica y la creada por un tal 'Masanakamura'. La diferencia principal entre los dos es que en el primero utiliza RMA() y en el segundo SMA() en su cรกlculo.
4. Parabolic SAR
Este indicador, creado tambiรฉn por Welles Wilder, coloca puntos que ayudan a definir una tendencia. El Parabolic SAR puede seguir al precio por encima o por debajo, la particularidad que ofrece es que cuando el precio toca al indicador, este salta al otro lado del precio (si el Parabolic SAR estaba por debajo del precio salta arriba y viceversa) a una distancia predeterminada por el indicador. En este momento el indicador vuelve a seguir al precio, reduciendo la distancia con cada vela hasta que finalmente es tocado otra vez por el precio y se vuelve a iniciar el proceso. Este procedimiento explica el nombre del indicador: el Parabolic SAR va siguiendo al precio generando una caracterรญstica forma parabรณlica, cuando el precio lo toca, se para y da la vuelta (SAR son las siglas en inglรฉs de โstop and reverseโ), dando lugar a un nuevo ciclo. Cuando los puntos estรกn por debajo del precio, la tendencia es alcista, mientras que los puntos por encima del precio indica una tendencia bajista.
5. RSI with Volume
Este indicador lo creo un tal LazyBear de TV a partir del popular RSI.
El RSI es un indicador tipo oscilador utilizado en anรกlisis tรฉcnico y creado tambiรฉn por Welles Wilder que muestra la fuerza del precio mediante la comparaciรณn de los movimientos individuales al alza o a la baja de los sucesivos precios de cierre.
LazyBear le aรฑadiรณ un parรกmetro de volumen que lo hace mรกs preciso al movimiento del mercado.
Una buena forma de usar el RSI es teniendo en cuenta la lรญnea central de 50 'RSI CENTER LINE'. Cuando el oscilador estรก por encima, la tendencia es alcista y cuando estรก por debajo la tendencia es bajista.
6. Moving Average Convergence Divergence (MACD) y (MAC-Z)
Fue creado por Gerald Appel. Posteriormente se aรฑadiรณ el histograma para anticipar el cruce de medias. A grandes rasgos podemos decir que el MACD es un oscilador consistente en dos medias mรณviles que van girando en torno a la lรญnea de cero. La lรญnea del MACD no es mรกs que la diferencia entre una media mรณvil corta 'MACD FAST MA LENGTH' y una media mรณvil larga 'MACD SLOW MA LENGTH'. Es un indicador que nos permite tener una referencia sobre la tendencia del activo sobre el cual se estรก operando, generando de este modo seรฑales de entrada y salida del mercado.
Podemos hablar de mercado alcista cuando el histograma del MACD se sitรบe por encima de la lรญnea cero, junto con la lรญnea de seรฑal, mientras que hablaremos de mercado bajista cuando el histograma MACD se situarรก por debajo de la lรญnea cero.
Estรก la opciรณn de utilizar el indicador MAC-Z creado por LazyBear que segรบn su autor es mรกs eficaz, por utilizar el parรกmetro VWAP (precio medio ponderado por volumen) 'Z-VWAP LENGTH' junto con una desviaciรณn standard 'STDEV LENGTH' en su cรกlculo.
7. Volume Condition
El volumen indica el nรบmero de participantes en esta guerra entre toros y osos, cuanto mรกs volumen mรกs probabilidad de que se mueva el precio a favor de la tendencia. Un volumen bajo de negociaciรณn indica un menor nรบmero de participantes e interรฉs por el instrumento en cuestiรณn. Los bajos volรบmenes pueden revelar debilidad detrรกs de un movimiento de precios.
Con esta condiciรณn se filtran aquellas seรฑales cuyo volumen es inferior a la SMA de volumen para un periodo 'SMA VOLUME LENGTH' multiplicado por un factor 'VOLUME FACTOR'. Ademรกs, determina el apalancamiento utilizado, a mรกs volumen, mรกs participantes, mรกs probabilidad de que se mueva el precio a nuestro favor, es decir, podemos utilizar mรกs apalancamiento. El apalancamiento en este script lo determina las veces que estรก el volumen por encima de la lรญnea de la SMA.
El apalancamiento mรกximo es de 8.
8. Bollinger Bands
Este indicador fue creado por John Bollinger y consiste en tres bandas que se dibujan superpuestas al grรกfico de evoluciรณn del precio.
La banda central es una media mรณvil, normalmente se emplea una media mรณvil simple calculada con 20 perรญodos. ('BB LENGTH' Nรบmero de periodos de la media mรณvil)
La banda superior se calcula sumando al valor de la media mรณvil simple X veces la desviaciรณn tรญpica de la media mรณvil. ('BB MULTIPLIER' Nรบmero de veces la desviaciรณn tรญpica de la media mรณvil)
La banda inferior de calcula restando a la media mรณvil simple X veces la desviaciรณn tรญpica de la media mรณvil.
la franja comprendida entre las bandas superior e inferior contiene, estadรญsticamente, casi un 90% de las posibles variaciones del precio, lo que significa que cualquier movimiento del precio fuera de las bandas tiene especial relevancia.
En tรฉrminos prรกcticos, las bandas de Bollinguer se comporta como si de una banda elรกstica se tratara de manera que, si el precio las toca, รฉste tiene mucha probabilidad de rebotar.
En ocasiones, despuรฉs de rellenarse la orden de entrada, el precio se devuelve hacia el lado contrario. Si toca la banda de Bollinger se rellena otra orden en la misma direcciรณn de la posiciรณn para mejorar el precio medio de entrada, (% MINIMUM BETTER PRICE': Precio mรญnimo para que se ejecute la re-entrada y que sea mejor que el precio de la posiciรณn anterior en un % dado) de esta manera damos una oportunidad al trade de que el Take Profit se ejecute antes. La desventaja es que se dobla el tamaรฑo de la posiciรณn. 'ACTIVATE DIVIDE TP': Divide el tamaรฑo del TP a la mitad. Mรกs probabilidad de que se cierre el trade pero menos ganancias.
โ STOP LOSS y RISK MANAGEMENT.
Una buena gestiรณn de las pรฉrdidas o gestiรณn del riesgo es lo que puede hacer que tu cuenta suba o se liquide en poco tiempo.
El % de riesgo es el porcentaje de nuestro capital que estamos dispuestos a perder por operaciรณn. Este se aconseja que debe estar comprendido entre un 1-5%.
% Risk = (% Stop Loss x % Equity per trade x Leverage) / 100
Primero se calcula la estrategia con Stop Loss, despuรฉs se determina el riesgo por operaciรณn y a partir de ahรญ se calcula el monto por operaciรณn y no al revรฉs.
En este script puedes usar un Stop Loss normal o uno segรบn el ATR. Tambiรฉn activar la opciรณn de que salte antes si se alcanza el porcentaje de riesgo. '% RISK ALLOWED' que se calcula segรบn el porcentaje de tu capital para 1X '% EQUITY ON EACH ENTRY'.
'STOP LOSS CONFIRMED': Solamente se activa el Stop Loss si el cierre de la barra anterior se encuentra en la condiciรณn de lรญmite de pรฉrdidas. Es รบtil para evitar que se dispare el SL cuando hacen un โpumpโ para barrer Stops y luego se devuelve el precio a la normalidad.
โ ALERTAS
Hay una alerta por cada apalancamiento por consiguiente como mรกximo se pueden poner 8 alertas para 'long' y 8 para 'short', mรกs una alerta para cerrar el trade con Take Profit o Stop Loss en modo market. Tambien puedes colocar las ordenes Take Profit limit y Stop Loss limit unos segundos despues de rellenar la orden de entrada de la posiciรณn.
- 'MAXIMUM LEVERAGE': Es el mรกximo multiplicador permitido de la cantidad introducida para 1X segรบn la condiciรณn de volumen.
- 'ADVANCE ALERTS': Siempre existe un retardo de tiempo desde que se activa la alerta hasta que llega al exchange y que puede ser de entre 1-15 segundos. Con este pรกrametro se puede adelantar la alerta los segundos necesarios para que se active antes. De este modo se puede sincronizar con el exchange para que el tiempo de ejecuciรณn de la orden de entrada a la posiciรณn coincida con la de apertura de la barra.
Los settings son para Bitcoin en Binance Futures (BTC:USDTPERP) en 30 minutos.
Para otro pares y otras temporalidades se tienen que ajustar las opciones de nuevo. Ademรกs para dentro de un mes, los ajustes serรกn otros distintos ya que el mercado y la tendencia es cambiante.
10 Monday's 1H Avg Range + 30-Day Daily RangeWhat This Script Does
This indicator is designed for traders who want to monitor volatility and range behavior at the start of the trading week . It focuses specifically on the first four 15-minute candles of each Monday and tracks their combined high-low range over time.
How It Works
Monday 1H Range Detection:
Each week, it automatically detects and highlights the first 4 candles of Monday on a 15-minute chart (1 hour total). It calculates the range between the highest high and lowest low of these candles.
10-Week Average of Monday 1H Ranges:
It stores and averages the last 10 such ranges, displaying this average in a table for weekly comparison.
30-Day Daily Range Average:
Separately, it calculates the average daily range (high โ low) of the last 30 daily candles. This value helps put the Monday 1H range into broader context and can guide Stop Loss or TP planning.
Dynamic Labeling & Visual Highlights:
The script visually highlights the first 4 candles of Monday and places a label showing the pip range once the 4 candles have completed. It also updates a small table with the two averages described above.
How to Use It
Use it on the 15-minute timeframe to activate the Monday 1H logic.
Compare the current weekโs Monday range to the 10-week average to see if volatility is increasing or decreasing.
Use the 30-day daily range to determine if the Monday opening movement is unusually large or small.
Consider adjusting trade entries, stops, or targets if the Monday range is disproportionately large compared to recent historical behavior.
What Makes It Original?
This is not a typical volatility indicator like ATR or standard deviation. Instead, itโs a purpose-built tool combining:
Time-specific behavior (first hour of the week),
Historical contextualization (10-week average tracking),
A dual-timeframe analysis (15-min + daily),
A user-friendly table and visual interface.
This script helps intraday or swing traders spot abnormal volatility early in the week and adjust their strategies accordinglyโespecially in fast-moving Forex or Index markets.
Opening RangeThe Opening Range indicator highlights the high, low, and midpoint of the first hour (1H) of each trading day and the first four hours (4H) of each trading week. These ranges are displayed as rectangles, providing key support, resistance, and breakout levels.
Features
1H Daily Range: Shows the opening range for the first hour of each trading day.
4H Weekly Range: Shows the opening range for the first four hours of each trading week.
Middle Line: Displays a dotted line at the midpoint of each range for additional reference.
Labels: Marks each range with "OR.1H" or "OR.4H" for easy identification.
Customizable: Adjust colors, toggle visibility, and set the number of ranges to display.
How to Use
Use the high and low of the range as potential support and resistance levels.
Watch for breakouts above or below the range for trading opportunities.
Use the midpoint line as a reference for mean reversion or trend analysis.
Weighted Moving Range with Trend Signals (WMR-TS)Weighted Moving Range with Trend Signals (WMR-TS)
Technical analysis involves analyzing statistical trends from trading activity , such as price movement and volume, to make trading decisions. Technical indicators are mathematical calculations based on the price, volume, or open interest of a security or contract. They are used by traders to analyze price movements and predict future market behavior. The WMR-TS indicator combines weighted moving averages and range calculations to identify key trading levels and generate buy/sell signals. It dynamically adjusts to market conditions, offering traders insights into potential support, resistance, and trend reversal points. Key levels are color-coded for quick interpretation. It utilizes weighted moving averages (WMA) and range calculations to determine these levels, making it a robust tool for both trending and ranging markets.
SUMMARY
Parameters :
WMA Length : Determines the length for the primary weighted moving average.
Highest High Length : Sets the period for calculating the highest high.
Lowest Low Length : Sets the period for calculating the lowest low.
Range Corrector : Adjusts the range calculation slightly for fine-tuning.
Top Level : Multiplier for determining the top level from the calculated range.
Bottom Level : Multiplier for determining the bottom level from the calculated range.
Levels Visibility : Sets how many recent bars will display the levels.
Trading Zones :
Short Area : Highlighted zone indicating potential shorting opportunities.
Long Area : Highlighted zone indicating potential buying opportunities.
The Levels :
Wave (Yellow): Midpoint of the calculated range, adjusted by WMA.
Top Level (Red): Calculated upper boundary of the trading range.
Sell Level (Pink): Intermediate sell level.
Resistance Level (Magenta): Immediate resistance level.
Support Level (Cyan): Immediate support level.
Buy Level (Light Green): Intermediate buy level.
Bottom Level (Dark Green): Calculated lower boundary of the trading range.
Interpreting the Signals :
Hammer Signal : Red circles above bars indicate potential sell signals.
Rocket Signal : Green circles below bars indicate potential buy signals.
KEY CONCEPTS
Highest High and Lowest Low :
These values represent the highest high ( HH ) and lowest low ( LL ) over a specified number of periods.
Support Level :
This is the lower boundary of the trading range. It is a price level where demand is strong enough to prevent the price from falling further. As the price approaches the support level, it is likely to bounce back up.
Resistance Level :
This is the upper boundary of the trading range. It is a price level where supply is strong enough to prevent the price from rising further. As the price approaches the resistance level, it is likely to pull back down.
THE USE OF MULTIPLIERS :
The script uses several multipliers to adjust and fine-tune the calculated support and resistance levels, as well as to control the range and sensitivity of these levels. Here is a detailed explanation of these multipliers and their purpose:
Range Corrector : This multiplier adjusts the calculated high ( H ) and low ( L ) levels, adding flexibility to how these levels are positioned relative to the highest high and lowest low. It ranges from -1 to 1 , with a default value of 0 . The use of positive values increase the range, making the calculated levels further apart. Thus, using negative values decrease the range, bringing the calculated levels closer together.
Top Level : This multiplier adjusts the distance of the top level from the calculated high H ) level. It fluctuates from 0 to 2 , with a default value of 0.382 . Higher values will push the top level further above the high level, while lower values will bring it closer.
Bottom Level : This multiplier adjusts the distance of the bottom support level from the calculated low support level. Ranging from 0 to 2, with a default value of 0.214, the higher values will push the bottom level further below the low level, while lower values will bring it closer.
The script plots the support and resistance levels on the chart, allowing traders to visualize the trading range. Color-coded zones are used to indicate areas where buying or selling opportunities may arise based on the current price relative to the trading range. A trading range refers to the area between a price's support and resistance levels over a specific period of time. Within this range, the price of the security fluctuates up and down but does not break out above the resistance or below the support. Support and resistance levels to make trading decisions. Buying near the support level and selling near the resistance level is a common strategy. When the price moves above the resistance level, it is called a breakout . A breakout often indicates that the price may start a new upward trend . Conversely, when the price moves below the support level, it is called a breakdown . A breakdown often indicates that the price may start a new downward trend . By understanding and utilizing trading ranges, traders can make more informed decisions, optimize their trading strategies, and manage risk more effectively.
Understanding Moving Averages
A moving average (MA) is a widely used technical indicator that helps smooth out price data by creating a constantly updated average price. The main purpose of using a moving average is to identify the direction of the trend and to reduce the "noise" of random price fluctuations. The Weighted Moving Average ( WMA ) assigns different weights to each period, with more recent periods typically given more weight. A 10-day WMA might give the most recent day a weight of 10, the second most recent day a weight of 9, and so on. It is useful for traders who want to emphasize recent price data more than older data. When the price is above the moving average, it suggests an Bullish trend . A Bearish Trend is expected to take place when the price is below the moving average. Understanding the price reactions around these levels can be used to make trading decisions.
APPLYING CONCEPTS
Support and Resistance Calculations in the Script :
The script calculates dynamic support and resistance levels using weighted moving averages ( WMA s) and the highest high and lowest low over specified periods. Buy ( Rocket ) and sell ( Hammer ) signals are generated based on the crossing of the price with calculated top and bottom levels.These signals help traders identify potential entry and exit points within the trading range .
Weighted Moving Average (WMA) Application in the Script
This script calculates a special trendWMA using the close price that helps in creating a more dynamic moving average that considers both high and low price actions. This modified WMA is used in conjunction with highest high and lowest low values over specified periods to calculate dynamic support and resistance levels.
Explanation of the Levels in the Script
By understanding these levels, traders can make more informed decisions about where to enter and exit trades, manage risk, and anticipate potential market movements. The script incorporates several key levels levels that traders can use to better anticipate price movements and make more informed trading decisions. Leveraging the principles of Fibonacci retracement ratios ( 23.6%, 38.2%, 50%, 61.8%, and 100% ) to identify key support and resistance zones can also serve for gauging the overall market sentiment.
Top Level and Sell Leve l: Used to identify potential resistance zones where the price may reverse or pause.
Support Level and Buy Level : Used to identify potential support zones where the price may bounce.
Upper and Lower Pivot Values : Serve as intermediate levels for possible price retracements or extensions within the trading range.
Wave Level : Indicates the central trend direction, which can be useful for gauging the overall market sentiment.
Alerts are a crucial part of the script as they notify traders of potential buy and sell signals based on predefined conditions. There are two main alerts: one for a " Hammer " signal (sell condition) and one for a " Rocket " signal (buy condition).
Adjust the input parameters to fit your trading style and the specific asset being analyzed. Shorter lengths may be more responsive to price changes but can produce more false signals , while longer lengths provide smoother signals but may lag . Always backtest the indicator on historical data to understand its behavior and performance. Also remember that different markets may require different parameter settings for optimal performance.
Keep in mind that by nature like all moving averages, WMAs lag behind price action. This means that signals may be delayed. The indicator performs differently in various market conditions. Always consider the overall market context when interpreting signals.
Adjusting parameters like the range corrector and visibility can help tailor the indicator to specific market conditions or trading strategies, improving its effectiveness. The script uses the calculated levels to plot lines and fill zones on the chart, helping traders visualize potential support, resistance, and trend reversal points. The use of multipliers allows for dynamic adjustment of these levels, making the indicator flexible and adaptable to different market conditions.
I think traders can make more informed decisions about where to enter and exit trades, manage risk, and anticipate potential market movements following this code. Stay safe and always remember that market is always changing. Use this tool if you want, please stay informed and plan safe trades,
D.
Donchian Trend Ranges [AlgoAlpha]๐๐ Donchian Trend Ranges ๐๐
Elevate your trading game with the Donchian Trend Ranges indicator from AlgoAlpha! ๐๐ This advanced tool helps you visualize market trends and potential reversal points using Donchian channels, volatility measures, and average true range (ATR).
Key Features
โ๏ธ Customizable Parameters: Adjust the lookback period and range multiplier to fit your trading style.
๐จ Color-Coded Trends: Easily distinguish between uptrends and downtrends with customizable colors.
๐ Dynamic Channels: Visualize multiple dynamic channels based on Donchian ranges and volatility.
โ๏ธ Trend Clouds: See market strength and weakness with upper and lower trend clouds.
๐ Signal Alerts: Get notified of potential trend shifts and take profit points.
How to Use
๐ Add the Indicator: Add the indicator to favorites. Customize settings such as the lookback period and range multiplier to match your trading needs.
๐ Analyze Trends: The indicator calculates the highest and lowest prices over a specified period to create dynamic channels. It then uses standard deviation and ATR to adjust these channels for market volatility, plotting upper and lower ranges. Green bars indicate an up trend and red bars for a down trend.
๐ Set Alerts: Enable notifications for bullish and bearish trend shifts, as well as weak and strong take profit points, ensuring you never miss an opportunity.
How it Works
The Donchian Trend Ranges indicator calculates the highest and lowest prices over a specified period to create a basis line. It creates a range around the basis based on standard deviations and the clouds' width is determined by a 14 period ATR. The basis line and bar colors changes based on whether the closing price is above or below it, indicating trends. Clouds around these lines represent market reversal zones that can be used as entry levels when used in confluence with momentum indicators, visual signals ("X" and "โ") marking strong and weak take profit points are also printed when the prices revert from the clouds towards the basis. Integrated alerts notify you of significant events like trend shifts and take profit signals, keeping you informed without constant monitoring.
Unleash the power of the Donchian Trend Ranges in your trading strategy! ๐๐โจ
KNN ATR Dual Range Predictions [SS]Excited to release this indicator!
I wanted to do a machine learning, ATR based indicator for a while, but I first had to learn about machine learning algos haha.
Now that I have created a KNN based regression methodology (shared in a previous indicator), I can finally do it!
So this is a Nearest Known Neighbor or KNN regression based indicator that uses ATR (average ranges) to predict future ranges.
It operates by calculating the move from High to Open and Open to Low and performing KNN regression to look for other, similar instances of similar movements and what followed those movements.
It provides for 2 methods of KNN regression, the traditional Cluster method (where it identifies a number of clusters within a tolerance range and averages them out), or the method of last instance (where it finds the most recent identical instance and plots the result from that).
You can toggle the parameters as you wish, including the:
a) Type of Regression
b) Number of Clusters
c) Tolerance for Clusters
Others functions:
The indicator provides for the ability to view 2 different timeframe targets. The default calculation is the current timeframe you are on. So if you are on the 1 minute, 5 minute or 1 hour, it will automatically default the primary range to this timeframe. This cannot be changed.
But it permits for a second prediction to be calculated for a timeframe you can specify. The example in the chart above is the 1 hour overlaid on the 5 minute chart.
You can see how the model is performing in the statistics table. The statistics table can be removed as well if you don't want it overlaid on your chart.
You can also toggle off and on the various ranges. IF you only want to visualize 1 hour levels on a 5 minute chart, you can toggle off the bands and just view the higher tf data. Inversely, if you only want the current timeframe data and not the higher tf data, you can toggle the higher tf data off as well.
General Use Tips:
Some general use tips include:
๐ฏThe default settings are appropriate for most common tickers. Because this is performing an autoregression on itself, the parameters tend to be more tight vs. performing dual correlation between two separate tickers which are sizably different in scale (which would require a higher tolerance).
Here is an example of YM1!, which is a sizably larger ticker, however it is performing well with the current settings.
๐ฏ If you get not great results from your ranges or an error in the correlation table, something like this:
It means the parameters are too tight for what you want to do and it is having trouble identifying other, similar cases (in this case, the lookback length was significantly shortened). The first step is to:
a) Expand your lookback range (up to 500 is usually sufficient). This should resolve most issues in most cases. If not:
b) If you are using the Cluster method, try broadening your cluster tolerance by 0.5 increments.
Between those two implementations, you should get a functional model. And it actually honestly hasn't happened to me in general use, I had to force that example by significantly shortening the lookback period.
Concluding Remarks
And that's pretty much the indicator.
I hope you enjoy it! I was really excited to be finally able to do it, like I said I attempted to do this for a while but needed to research the whole KNN process and how its performed.
Enjoy and leave your comments and questions below!
The HoneyChai RSI by CoffeeShopCryptoHere is a fun new way to view the RSI. A new TradingView Indicator for you RSI enthusiasts. This is the Honey Chai RSI Indicator.
This indicator combines the RSI oscillator with additional features to enhance its functionality and visual study.
The purpose of this indicator is to provide a more comprehensive view of the RSI and aid in identifying trends, potential entry / exit points, and ranging conditions.
How it's Built.
The RSI:
The RSI is represented by its common line which you can turn on and off, as usual.
Japanese candlesticks:
In this indicator, are also Japanese candlesticks giving you their representation of the RSI. This provides a clearer visualization of the RSI movements across its Open, High, Low, and Close, unlike the OHLC of the Heiken Ashi candles in the Heiken Ashi Algo.
In addition to the RSI line and Japanese candles, there are two moving averages applied to the RSI value. For the purpose of keeping with my CoffeeShop theme, the High average line is the Honey Line and the Low average line is the Chai Line. The user can choose between Exponential Moving Average or Simple Moving average. These moving averages are calculated based on the high vs low values of the past RSI readings, with the high average acting as the leading line.
When the Honey line is above the Chai Line, it indicates an uptrend, whereas when the Honey Line is below the Chai Line, it suggests a downtrend.
If the price is moving up but the Honey line is still below the Chai line, you're technically still in a downtrend and you should trade this like a pullback.
Identifying Trends.
To identify short entries, you need to wait for the Japanese candles to open and close below the Honey line while the Honey line is below the Chai Line. Conversely, you wait for the Japanese candles to open and close above the Honey line while the Honey line is above the Chai Line. This confirmation helps in identifying potential reversal points.
Range Bound Market.
The indicator also incorporates a visual representation of a ranging area. The 60 and 40 levels of the RSI are visually differentiated to indicate this range. When the Japanese candles are opening and closing within this range and the RSI remains contained within these levels, it suggests that the price is likely in a ranging phase, and traders should wait for a breakout from this range before taking action.
In summary, this custom indicator provides a comprehensive view of the RSI oscillator by incorporating Japanese candlestick visuals, moving averages, and a visual representation of the ranging area. By analyzing these elements, traders can gain insights into trends, potential entry points, and ranging conditions in the market.
---------HOW TO TRADE-----------
LONGS AND SHORTS
An example on how to use this in a long trade is to wait for your moving averages to be high (yellow) over low (orange). For the purpose of the description in this indicator you're looking for the honey to be over the chai.
Even if the RSI and Japanese candles in the oscillator are falling, however the honey is above the Chai, you are still in an uptrend.
The positioning of the moving averages will always determine the direction of the overall price trend so in this position you're looking for long entries.
take a long position as an entry when the open and the close of the Japanese candle in the oscillator is above your honey line.
when you notice a bearish candle closing below the honey line in an uptrend position you can exit your trade.
Confluence for short trades would be just the opposite and using the moving averages in an upside down pattern. In other words the honey needs to be below the chai and your Japanese candle needs to be closing bearish however they open and the close of that candle needs to be below both of your moving averages. exit when you get a bullish candle closing in between the averages.
TRADING RANGES
Wait for your moving average to enter into the range bound 60/40 area as well as your Japanese candles to Wick above and below this area but not close above and below the area.
At this point you can mark off the high and the low of the range as it pertains to your price chart and start using your range trading strategy.
Key Intraday Range Analysis - K.I.R.A. The KIRA Indicator is a unique tool designed to provide traders with actionable insights by identifying and analyzing key intraday price ranges. Built upon a specialized methodology, it uses Fibonacci-derived levels anchored to significant opening ranges to generate trading levels for the day. Unlike other indicators that focus on broader trend analysis, KIRAโs approach provides precision, simplicity, and adaptability for intraday traders.
How It Works
KIRA takes the first 30-second range of the European market open and calculates Fibonacci projections derived solely from the golden ratio. These projections form potential areas of interest, such as support and resistance levels, that guide traders in their decision-making process.
By visualizing these levels directly on the chart, KIRA simplifies intraday trading, helping traders identify key reaction zones with high clarity.
Key Features:
-Clean and Readable Output: Generates easily identifiable levels directly on a clear chart to reduce visual clutter.
-Dynamic and Adaptive: Works across various assets, including indices, forex, and commodities, while maintaining reliability on lower timeframes.
How to Use
1. Set Up: Ensure your chart timeframe is aligned with intraday trading, ideally 1-minute or 5-minute intervals.
2. Monitor Levels: Observe how price reacts to the projected levels generated from the opening range.
3. Strategize: Use these levels as potential entries, exits, or areas to tighten risk management, depending on price action.
Unlike conventional indicators that reuse public domain methodologies or classic technical analysis tools, KIRA is based on a nuanced approach to anchoring Fibonacci projections. Its uniqueness lies in its precise application of golden ratio derivatives, specifically tailored to intraday price movements.
The chart accompanying this script provides a clean visualization of the KIRA levels applied to a 1-minute chart of . All outputs are directly from the KIRA script to ensure clarity and ease of use.