Average Up and Down Candles Streak with Predicted Next CandleThis indicator is designed to analyze price trends by examining the patterns of up and down streaks (consecutive bullish or bearish candles) over a defined period. It uses this data to provide insights on whether the next candle is likely to be bullish or bearish, and it visually displays relevant information on the chart.
Hereโs a breakdown of what the indicator does:
1. Inputs and Parameters
Period (Candles): Defines the number of candles used to calculate the average length of bullish and bearish streaks. For example, if the period is set to 20, the indicator will analyze the past 20 candles to determine average up and down streak lengths.
Bullish/Bearish Bias Signal Toggle: These options allow users to show or hide visual signals (green or red circles) when thereโs a bullish or bearish bias in the trend based on the indicatorโs calculations.
2. Streak Calculation
The indicator looks at each candle within the period to identify if it closed up (bullish) or down (bearish).
Up Streak: The indicator counts consecutive bullish candles. When thereโs a bearish candle, it resets the up streak count.
Down Streak: Similarly, it counts consecutive bearish candles and resets when a bullish candle appears.
Averages: Over the defined period, the indicator calculates the average length of up streaks and average length of down streaks. This provides a baseline to assess whether the current streak is typical or extended.
3. Current and Average Streak Display
The indicator displays the current up and down streak lengths alongside the average streak lengths for comparison. This data appears in a table on the chart, allowing you to see at a glance:
The current streak length (for both up and down trends)
The average streak length for up and down trends over the chosen period
4. Trend Prediction for the Next Candle
Next Candle Prediction: Based on the current streak and its comparison to the average, the indicator predicts the likely direction of the next candle:
Bullish: If the current up streak is shorter than the average up streak, suggesting that the bullish trend could continue.
Bearish: If the current down streak is shorter than the average down streak, indicating that the bearish trend may continue.
Neutral: If the current streak length is near the average, which could signal an upcoming reversal.
This prediction appears in a table on the chart, labeled as โNext Candle.โ
5. Previous Candle Analysis
The Previous Candle entry in the table reflects the last completed candle (directly before the current candle) to show whether it was bullish, bearish, or neutral.
This data gives a reference point for recent price action and helps validate the next candle prediction.
6. Visual Signals and Reversal Zones
Bullish/Bearish Bias Signals: The indicator can plot green circles on bullish bias and red circles on bearish bias to highlight points where the trend is likely to continue.
Reversal Zones: If the current streak length reaches or exceeds the average, it suggests the trend may be overextended, indicating a potential reversal zone. The indicator highlights these zones with shaded backgrounds (green for possible bullish reversal, red for bearish) on the chart.
Summary of What You See on the Chart
Bullish and Bearish Bias Signals: Green or red circles mark areas of expected continuation in the trend.
Reversal Zones: Shaded areas in red or green suggest that the trend might be about to reverse.
Tables:
The Next Candle prediction table displays the trend direction of the previous candle and the likely trend of the next candle.
The Streak Information table shows the current up and down streak lengths, along with their averages for easy comparison.
Practical Use
This indicator is helpful for traders aiming to understand trend momentum and potential reversals based on historical patterns. Itโs particularly useful for swing trading, where knowing the typical length of bullish or bearish trends can help in timing entries and exits.
Cari dalam skrip untuk "bear"
Cumulative Buying and Selling Volume with 3 Lookback PeriodsScript Overview:
This script is designed to help traders identify market momentum by analyzing buying and selling volume. It calculates the cumulative buying and selling pressure over three different lookback periods, providing insights into whether the bulls or bears are dominating at any given time. The script does this by computing the cumulative buying and selling volume for each period and comparing them through exponential moving averages (EMA) to smooth out short-term fluctuations.
Purpose and Use:
The primary goal of this script is to highlight shifts in market sentiment based on volume dynamics. Volume is a critical component in market analysis, often signaling the strength behind price movements. By focusing on cumulative buying and selling pressure, the script gives traders an idea of whether the market is trending towards more buying or selling during specific periods. Traders can use this tool to:
Identify potential entry points when buying pressure is strong.
Recognize potential selling opportunities when selling pressure is increasing.
Detect periods of indecision when neither buying nor selling dominates.
Key Concepts:
1. Buying Volume (BV):
The buying volume is calculated based on the price range of each candle. It represents the volume allocated to the bullish side of the market:
When the close is near the high, the buying volume is higher.
Formula: BV = volume * (close - low) / (high - low).
2. Selling Volume (SV):
Similarly, selling volume is derived based on the position of the close relative to the low:
When the close is near the low, selling volume is higher.
Formula: SV = volume * (high - close) / (high - low)
3. Lookback Periods:
The script allows users to define three different lookback periods (5, 10, and 20 by default). These periods smooth out the cumulative buying and selling volumes using EMA calculations:
Shorter periods capture more immediate changes in volume dynamics.
Longer periods provide a broader perspective on market trends.
4. Cumulative Volume Calculation:
For each lookback period, cumulative buying and selling volumes are tracked separately and then smoothed with EMA:
emaBuyVol and emaSellVol are the smoothed values for buying and selling volumes over the lookback periods.
5. Market Pressure Comparison:
Buying Pressure: If the EMA of buying volume is greater than the EMA of selling volume for a particular lookback period, the script considers that buying pressure dominates for that period.
Selling Pressure: Conversely, if selling volume dominates over buying volume for a period, the script registers selling pressure.
6. Overall Market Pressure:
The script aggregates the buying and selling pressures from the three lookback periods to determine the overall market sentiment:
If the majority of periods show buying pressure, the market is bullish.
If the majority show selling pressure, the market is bearish.
If neither side dominates, it suggests a neutral or indecisive market.
Visual Cues:
The script provides visual feedback to help traders quickly interpret the market pressure:
Background Color:
Green (#2bff00) when buying pressure dominates.
Red (#ff0000) when selling pressure dominates.
Gray (#404040) when there is no clear dominance.
Bar Color: The script also colors the price bars based on the dominant market pressure:
Green for buying pressure.
Red for selling pressure.
Gray for neutral or balanced market pressure.
Reset Mechanism:
At the start of each new candle, the cumulative volumes for all three periods are reset to zero. This ensures that the cumulative volumes are only measured for the current candle, preventing carryover from previous periods that could distort the analysis.
How Traders Can Use This Script:
Trend Confirmation: Traders can use the script as a trend confirmation tool. When the background turns green (buying dominance), it suggests bullish momentum. When red, bearish momentum is likely. This information can be used to confirm existing positions or signal new trades in the direction of the market pressure.
Reversal Detection: A sudden shift in the background color (from green to red or vice versa) can indicate a potential reversal. This can be particularly useful when combined with other technical indicators such as price action or support/resistance levels.
Multiple Timeframes: Since the script supports three different lookback periods, it provides a comprehensive view of market pressure across short-term, medium-term, and long-term perspectives. Traders can tailor the lookback periods based on their preferred timeframe to match their trading style, whether itโs intraday trading or longer-term swing trading.
Risk Management: The script's clear visual cues help traders manage risk by highlighting when selling pressure increases, allowing them to consider reducing long positions or tightening stop-losses.
Prometheus Topological Persistent EntropyPersistence Entropy falls under the branch of math topology. Topology is a study of shapes as they twist and contort. It can be useful in the context of markets to determine how volatile they may be and different from the past.
The key idea is to create a persistence diagram from these log return segments. The persistence diagram tracks the "birth" and "death" of price features:
A birth occurs when a new price pattern or feature emerges in the data.
A death occurs when that pattern disappears.
By comparing prices within each segment, the script tracks how long specific price features persist before they die out. The lifetime of each feature (difference between death and birth) represents how robust or fleeting the pattern is. Persistent price features tend to reflect stable trends, while shorter-lived features indicate volatility.
Entropy Calculation: The lifetimes of these patterns are then used to compute the entropy of the system. Entropy, in this case, measures the amount of disorder or randomness in the price movements. The more varied the lifetimes, the higher the entropy, indicating a more volatile market. If the price patterns exhibit longer, more consistent lifetimes, the entropy is lower, signaling a more stable market.
Calculation:
We start by getting log returns for a user defined look back value. In the compute_persistent_entropy function we separate the overall log returns into windows. We then compute persistence diagrams of the windows. It tracks the birth and death of price patterns to see how persistent they are. Then we calculate the entropy of the windows.
After we go through that process we get an array of entropies, we then smooth it by taking the sum of all of them and dividing it by how many we have so the indicator can function better.
// Calculate log returns
log_returns = array.new()
for i = 1 to lgr_lkb
array.push(log_returns, math.log(close / close ))
// Function to compute a simplified persistence diagram
compute_persistence_diagram(segment) =>
n = array.size(segment)
lifetimes = array.new()
for i = 0 to n - 1
for j = i + 1 to n - 1
birth = array.get(segment, i)
death = array.get(segment, j-1)
if birth != death
array.push(lifetimes, math.abs(death - birth))
lifetimes
// Function to compute entropy of a list of values
compute_entropy(values) =>
n = array.size(values)
if n == 0
0.0
else
freq_map = map.new()
total_sum = 0.0
for i = 0 to n - 1
value = array.get(values, i)
//freq_map := freq_map.get(value, 0.0) + 1
map.put(freq_map, value, value + 1)
total_sum += 1
entropy = 0.0
for in freq_map
p = count / total_sum
entropy -= p * math.log(p)
entropy
compute_persistent_entropy(log_returns, window_size) =>
n = (lgr_lkb) - (2 * window_size) + 1
entropies = array.new()
for i = 0 to n - 1
segment1 = array.new()
segment2 = array.new()
for j = 0 to window_size - 1
array.push(segment1, array.get(log_returns, i + j))
array.push(segment2, array.get(log_returns, i + window_size + j))
dgm1 = compute_persistence_diagram(segment1)
dgm2 = compute_persistence_diagram(segment2)
combined_diagram = array.concat(dgm1, dgm2)
entropy = compute_entropy(combined_diagram)
array.push(entropies, entropy)
entropies
//---------------------------------------------
//---------------PE----------------------------
//---------------------------------------------
// Calculate Persistent Entropy
entropies = compute_persistent_entropy(log_returns, window_size)
smooth_pe = array.sum(entropies) / array.size(entropies)
This image illustrates how the indicator works for traders. The purple line is the actual indicator value. The line that changes from green to red is a SMA of the indicator value, we use this to determine bullish or bearish. When the smoothed persistence entropy is above itโs SMA that signals bearishness.
The indicator tends to look prettier on higher time frames, we see NASDAQ:TSLA on a 4 hour here and below we see it on the 5 minute.
On a lower time frame it looks a little weird but still functions the same way.
Prometheus encourages users to use indicators as tools along with their own discretion. No indicator is 100% accurate. We encourage comments about requested features and criticism.
Engulfing Candles Alert - Multi Symbol (Miu)This indicator plots triangle shapes on each engulfing candles (bullish or bearish) on current chart.
The main use for this indication is to set alerts on multiple symbols at once.
Please follow steps below to set your alarms:
1) Add indicator to the chart
2) Go to settings
3) Check symbols you want to receive alerts (choose up to 8 different symbols)
4) Check if you want only bullish or bearish alerts or both
5) Once all is set go back to the chart and click on 3 dots to set alert in this indicator, rename your alert and confirm
6) You can remove indicator after alert is set and it'll keep working as expected
What does this indicator do?
This indicator will generate alerts anytime a candle closes and reaches bullish or bearish engulfing condition for any of symbol set.
Alert messages example: "Bullish alert on {Symbol}"
This script requests open and close information for each symbol through request.security() built-in function.
Detailed indicator description:
If current bar open is less than or equal to the previous bar close AND current bar open is less than previous bar open AND current bar close is greater than previous bar open THEN True
bullishEngulfing = (openBarCurrent <= closeBarPrevious) and (openBarCurrent < openBarPrevious) and (closeBarCurrent > openBarPrevious)
The opposite condition will be bearishEngulfing
Feel free to give feedbacks on comments section below. Enhancement suggestions are welcome =).
Enjoy!
ADX Trend Strength Analyzerโ โOVERVIEW
This script implements the Average Directional Index (ADX), a powerful tool used to measure the strength of market trends. It works alongside the Directional Movement Index (DMI), which breaks down the directional market pressure into bullish (+DI) and bearish (-DI) components. The purpose of the ADX is to indicate when the market is in a strong trend, without specifying the direction. This indicator can be especially useful for identifying market trends early and validating trading strategies based on trend-following systems.
The ADX component in this script is based on two key parameters:
ADX Smoothing Length (adxlen), which determines the degree of smoothing for the trend strength.
DI Length (dilen), which defines the look-back period for calculating the directional index values.
Additionally, a horizontal line is plotted at the 30 level, providing a widely used threshold that signifies when a trend is considered strong (above 30).
โ โCONCEPTS
Directional Movement (DM): The core idea behind this indicator is the calculation of price movement in terms of bullish and bearish forces. By evaluating the change in highs and lows, the script distinguishes between bullish movement (+DM) and bearish movement (-DM). These values are normalized by dividing them by the True Range (TR), creating the +DI and -DI values.
True Range (TR): The True Range is calculated using the Average True Range (ATR) formula, and it serves to smooth out volatility, ensuring that short-term fluctuations don't distort the long-term trend signal.
ADX Calculation: The ADX is derived from the absolute difference between the +DI and -DI. By smoothing this difference and normalizing it, the ADX is able to measure the overall strength of the trend without regard to whether the market is moving up or down. A rising ADX indicates increasing trend strength, while a falling ADX signals weakening trends.
โ โMETHODOLOGY
Directional Movement Calculation: The script first determines the upward and downward price movement by comparing changes in the high and low prices. If the upward movement is greater than the downward movement, it registers a bullish signal and vice versa for bearish movement.
True Range Adjustment: The script then applies a smoothing function to normalize these movements by dividing them by the True Range (ATR). This ensures that the trend signal is based on relative, rather than absolute, price movements.
ADX Signal Generation: The final step is to calculate the ADX by applying the Relative Moving Average (RMA) to the difference between +DI and -DI. This produces the ADX value, which is plotted in red, making it easy to visualize shifts in market momentum.
Threshold Line: A blue horizontal line is plotted at 30, which serves as a key reference point. When the ADX is above this line, it indicates a strong trend, whether bullish or bearish.
โ โHOW TO USE
Trend Strength: Traders typically use the 30 level as a critical threshold. When the ADX is above 30, it signifies a strong trend, making it a favorable environment for trend-following strategies. Conversely, ADX values below 30 suggest a weak or non-trending market.
+DI and -DI Relationship: The indicator also provides insight into whether the trend is bullish or bearish. When +DI is greater than -DI, the market is considered bullish. When -DI is greater than +DI, the market is considered bearish. While this script focuses on the ADX value itself, the underlying +DI and -DI help interpret the trend direction.
Market Conditions: This indicator is effective in trending markets, but not ideal for choppy or sideways conditions. Traders can use it to determine the best entry and exit points when trends are strong, or to avoid trading in periods of low volatility.
Combining with Other Indicators: The ADX is commonly used in conjunction with oscillators like RSI or moving averages, to confirm the trend strength and avoid false signals.
โ โMETHOD VARIANTS
This script applies the standard approach for calculating the ADX, but could be adapted with the following variants:
Different Timeframes: The script could be modified to calculate ADX values across higher or lower timeframes, depending on the trader's strategy.
Custom Thresholds: Instead of using the default 30 threshold, traders could adjust the horizontal line to suit their own risk tolerance or market conditions.
Options Series - MTF 1 and 3 Minute
Objective:
The indicator is named "Options Series - MTF 1 and 3 Minute", suggesting it's designed to analyze options series with multiple time frames (MTF), particularly focusing on 1-minute and 3-minute intervals.
OHLC Values Of Candle:
The code fetches the Open, High, Low, and Close (OHLC) values of the current candle for the specified ticker and timeframes (current, 1 minute, and 3 minutes). Additionally, it calculates the 200-period Simple Moving Average (SMA) of the closing prices for each timeframe.
Bull vs. Bear Condition:
It defines conditions for Bullish and Bearish scenarios based on comparing the current close price with the previous 200-period SMA close price for both 1-minute and 3-minute timeframes. If the current close price is higher than the previous 200-period SMA close price, it's considered Bullish, and if it's lower, it's considered Bearish.
Final Color Condition and Plot:
It determines the color of the candlestick based on the Bullish or Bearish condition. If the conditions for a Bullish scenario are met, the candlestick color is set to green (GreenColorCandle). If the conditions for a Bearish scenario are met, the candlestick color is set to red (RedColorCandle). If neither condition is met (i.e., the candle is neither Bullish nor Bearish), the color remains gray.
The code then plots the 200-period SMA values for both 1-minute and 3-minute timeframes and colors them based on the candlestick color. It also colors the bars based on the candlestick color.
Insights:
This indicator focuses on comparing current close prices with the 200-period SMA close prices to determine market sentiment (Bullish or Bearish).
It utilizes multiple time frames (1 minute and 3 minutes) to provide a broader perspective on market movements.
The color-coded candlesticks and bars make it visually easy to identify Bullish and Bearish trends.
This indicator can be used as part trading based on the identified market sentiment.
Swiss Knife [MERT]Introduction
The Swiss Knife indicator is a comprehensive trading tool designed to provide a multi-dimensional analysis of the market. By integrating a wide array of technical indicators across multiple timeframes, it offers traders a holistic view of market sentiment, momentum, and potential reversal points. This indicator is particularly useful for traders looking to combine trend analysis, momentum indicators, volume data, and price action into a single, easy-to-read format.
---
Key Features
Multi-Timeframe Analysis : Evaluates indicators on Daily , 4-Hour , 1-Hour , and 15-Minute timeframes.
Comprehensive Indicator Suite : Incorporates MACD , Awesome Oscillator (AO) , Parabolic SAR , SuperTrend , DPO , RSI , Stochastic Oscillator , Bollinger Bands , Ichimoku Cloud , Chande Momentum Oscillator (CMO) , Donchian Channels , ADX , volume-based momentum indicators, Fractals , and divergence detection.
Market Sentiment Scoring : Aggregates signals from multiple indicators to provide an overall sentiment score.
Visual Aids : Displays EMA lines, trendlines, divergence signals, and a sentiment table directly on the chart.
Super Trend Reversal Signals : Identifies potential market reversal points by assessing the momentum of automated trading bots.
---
Explanation of Each Indicator
Moving Average Convergence Divergence (MACD)
- Purpose : Measures the relationship between two moving averages of price.
- Interpretation : A positive histogram suggests bullish momentum; a negative histogram indicates bearish momentum.
Awesome Oscillator (AO)
- Purpose : Gauges market momentum by comparing recent market movements to historic ones.
- Interpretation : Above zero indicates bullish momentum; below zero indicates bearish momentum.
Parabolic SAR (SAR)
- Purpose : Identifies potential reversal points in price direction.
- Interpretation : Dots below price suggest an uptrend; dots above price suggest a downtrend.
SuperTrend
- Purpose : Determines the prevailing market trend.
- Interpretation : Provides buy or sell signals based on price movements relative to the SuperTrend line.
Detrended Price Oscillator (DPO)
- Purpose : Removes trend from price to identify cycles.
- Interpretation : Values above zero suggest price is above the moving average; values below zero indicate it is below.
Relative Strength Index (RSI)
- Purpose : Measures the speed and change of price movements.
- Interpretation : Values above 50 indicate bullish momentum; values below 50 indicate bearish momentum.
Stochastic Oscillator
- Purpose : Compares a particular closing price to a range of its prices over a certain period.
- Interpretation : Values above 50 indicate bullish conditions; values below 50 indicate bearish conditions.
Bollinger Bands (BB)
- Purpose : Measures market volatility and provides relative price levels.
- Interpretation : Price above the middle band suggests bullishness; below the middle band suggests bearishness.
Ichimoku Cloud
- Purpose : Provides support and resistance levels, trend direction, and momentum.
- Interpretation : Bullish signals when price is above the cloud; bearish signals when price is below the cloud.
Chande Momentum Oscillator (CMO)
- Purpose : Measures momentum on both up and down days.
- Interpretation : Values above 50 indicate strong upward momentum; values below -50 indicate strong downward momentum.
Donchian Channels
- Purpose : Identifies volatility and potential breakouts.
- Interpretation : Price above the upper band suggests bullish breakout; below the lower band suggests bearish breakout.
Average Directional Index (ADX)
- Purpose : Measures the strength of a trend.
- Interpretation : DI+ above DI- indicates bullish trend; DI- above DI+ indicates bearish trend.
Volume Momentum Indicators (VolMom, CumVolMom, POCMom)
- Purpose : Analyze volume to assess buying and selling pressure.
- Interpretation : Positive values suggest bullish volume momentum; negative values indicate bearish volume momentum.
Fractals
- Purpose : Identify potential reversal points in the market.
- Interpretation : Up fractals may indicate a future downtrend; down fractals may indicate a future uptrend.
Divergence Detection
- Purpose : Identifies divergences between price and various indicators (RSI, MACD, Stochastic, OBV, MFI, A/D Line).
- Interpretation : Bullish divergences suggest potential upward reversal; bearish divergences suggest potential downward reversal.
- Note : This functionality utilizes the library from Divergence Indicator .
---
Coloring Scheme
Background Color
- Purpose : Reflects the overall market sentiment by combining sentiment scores from all indicators across different timeframes.
- Interpretation :
- Green Shades : Indicate bullish market sentiment.
- Red Shades : Indicate bearish market sentiment.
- Intensity : The strength of the color corresponds to the strength of the sentiment score.
Sentiment Table
- Purpose : Displays the status of each indicator across different timeframes.
- Interpretation :
- Green Cell : The indicator suggests a bullish signal.
- Red Cell : The indicator suggests a bearish signal.
- Percentage Score : Indicates the overall bullish or bearish sentiment on that timeframe.
Exponential Moving Averages (EMAs)
- Purpose : Provide dynamic support and resistance levels.
- Colors :
- EMA 10 : Lime
- EMA 20 : Yellow
- EMA 50 : Orange
- EMA 100 : Red
- EMA 200 : Purple
Trendlines
- Purpose : Visual representation of support and resistance levels based on pivot points.
- Interpretation :
- Upward Trendlines : Colored green , indicating support levels.
- Downward Trendlines : Colored red , indicating resistance levels.
- Note : Trendlines are drawn using the library from Simple Trendlines .
---
Utility of Market Sentiment
The indicator aggregates signals from multiple technical indicators across various timeframes to compute an overall market sentiment score . This comprehensive approach helps traders understand the prevailing market conditions by:
Confirming Trends : Multiple indicators pointing in the same direction can confirm the strength of a trend.
Identifying Reversals : Divergences and fractals can signal potential turning points.
Timeframe Alignment : Aligning signals across different timeframes can enhance the probability of successful trades.
---
Divergences
Divergence occurs when the price of an asset moves in the opposite direction of a technical indicator, suggesting a potential reversal.
- Bullish Divergence : Price makes a lower low, but the indicator makes a higher low.
- Bearish Divergence : Price makes a higher high, but the indicator makes a lower high.
The indicator detects divergences for:
RSI
MACD
Stochastic Oscillator
On-Balance Volume (OBV)
Money Flow Index (MFI)
Accumulation/Distribution Line (A/D Line)
By identifying these divergences, traders can spot early signs of trend reversals and adjust their strategies accordingly.
---
Trendlines
Trendlines are essential tools for identifying support and resistance levels. The indicator automatically draws trendlines based on pivot points:
- Upward Trendlines (Support) : Connect higher lows, indicating an uptrend.
- Downward Trendlines (Resistance) : Connect lower highs, indicating a downtrend.
These trendlines help traders visualize the trend direction and potential breakout or reversal points.
---
Super Trend Reversals (ST Reversal)
The core idea behind the Super Trend Reversals indicator is to assess the momentum of automated trading bots (often referred to as 'Supertrend bots') that enter the market during critical turning points. Specifically, the indicator is tuned to identify when the market is nearing bottoms or peaks, just before it shifts direction based on the triggered Supertrend signals. This approach helps traders:
Engage Early : Enter the market as reversal momentum builds up.
Optimize Entries and Exits : Enter under favorable conditions and exit before momentum wanes.
By capturing these reversal points, traders can enhance their trading performance.
---
Conclusion
The Swiss Knife indicator serves as a versatile tool that combines multiple technical analysis methods into a single, comprehensive indicator. By assessing various aspects of the marketโincluding trend direction, momentum, volume, and price actionโit provides traders with valuable insights to make informed trading decisions.
---
Citations
- Divergence Detection Library : Divergence Indicator by DevLucem
- Trendline Drawing Library : Simple Trendlines by HoanGhetti
---
Note : This indicator is intended for informational purposes and should be used in conjunction with other analysis techniques. Always perform due diligence before making trading decisions.
---
Breadth Indicators NYSE Percent Above Moving AverageBreadth Indicators NYSE - transmits the processed data from the Barchart provider
NYSE - Breadth Indicators
S&P 500 - Breadth Indicators
DOW - Breadth Indicators
RUSSEL 1000 - Breadth Indicators
RUSSEL 2000 - Breadth Indicators
RUSSEL 3000 - Breadth Indicators
Moving Average - 5, 20, 50, 100, 150, 200
The "Percentage above 50-day SMA" indicator measures the percentage of stocks in the index trading above their 50-day moving average. It is a useful tool for assessing the general state of the market and identifying overbought and oversold conditions.
One way to use the "Percentage above 50-day SMA" indicator in a trading strategy is to combine it with a long-term moving average to determine whether the trend is bullish or bearish. Another way to use it is to combine it with a short-term moving average to identify pullbacks and rebounds within the overall trend.
The purpose of using the "Percentage above 50-day SMA" indicator is to participate in a larger trend with a better risk-reward ratio. By using this indicator to identify pullbacks and bounces, you can reduce the risk of entering trades at the wrong time.
Bull Signal Recap:
150-day EMA of $SPXA50R crosses above 52.5 and remains above 47.50 to set the bullish tone.
5-day EMA of $SPXA50R moves below 40 to signal a pullback
5-day EMA of $SPXA50R moves above 50 to signal an upturn
Bear Signal Recap:
150-day EMA of $SPXA50R crosses below 47.50 and remains below 52.50 to set the bearish tone.
5-day EMA of $SPXA50R moves above 60 to signal a bounce
5-day EMA of $SPXA50R moves below 50 to signal a downturn
Tweaking
There are numerous ways to tweak a trading system, but chartists should avoid over-optimizing the indicator settings. In other words, don't attempt to find the perfect moving average period or crossover level. Perfection is unattainable when developing a system or trading the markets. It is important to keep the system logical and focus tweaks on other aspects, such as the actual price chart of the underlying security.
What do levels above and below 50% signify in the long-term moving average?
A move above 52.5% is deemed bullish, and below 47.5% is deemed bearish. These levels help to reduce whipsaws by using buffers for bullish and bearish thresholds.
How does the short-term moving average work to identify pullbacks or bounces?
When using a 5-day EMA, a move below 40 signals a pullback, and a move above 60 signals a bounce.
How is the reversal of pullback or bounce identified?
A move back above 50 after a pullback or below 50 after a bounce signals that the respective trend may be resuming.
How can you ensure that the uptrend has resumed?
Itโs important to wait for the surge above 50 to ensure the uptrend has resumed, signaling improved breadth.
Can the system be tweaked to optimize indicator settings?
While there are various ways to tweak the system, seeking perfection through over-optimizing settings is advised against. It's crucial to keep the system logical and focus tweaks on the price chart of the underlying security.
RUSSIAN \ ะ ัััะบะฐั ะฒะตััะธั.
ะะฝะดะธะบะฐัะพั "ะัะพัะตะฝั ะฒััะต 50-ะดะฝะตะฒะฝะพะน ัะบะพะปัะทััะตะน ััะตะดะฝะตะน" ะธะทะผะตััะตั ะฟัะพัะตะฝั ะฐะบัะธะน, ัะพัะณัััะธั
ัั ะฒ ะธะฝะดะตะบัะต ะฒััะต ะธั
50-ะดะฝะตะฒะฝะพะน ัะบะพะปัะทััะตะน ััะตะดะฝะตะน. ะญัะพ ะฟะพะปะตะทะฝัะน ะธะฝััััะผะตะฝั ะดะปั ะพัะตะฝะบะธ ะพะฑัะตะณะพ ัะพััะพัะฝะธั ััะฝะบะฐ ะธ ะฒััะฒะปะตะฝะธั ััะปะพะฒะธะน ะฟะตัะตะบัะฟะปะตะฝะฝะพััะธ ะธ ะฟะตัะตะฟัะพะดะฐะฝะฝะพััะธ.
ะะดะธะฝ ะธะท ัะฟะพัะพะฑะพะฒ ะธัะฟะพะปัะทะพะฒะฐะฝะธั ะธะฝะดะธะบะฐัะพัะฐ "ะัะพัะตะฝั ะฒััะต 50-ะดะฝะตะฒะฝะพะน ัะบะพะปัะทััะตะน ััะตะดะฝะตะน" ะฒ ัะพัะณะพะฒะพะน ัััะฐัะตะณะธะธ - ััะพ ะพะฑัะตะดะธะฝะธัั ะตะณะพ ั ะดะพะปะณะพััะพัะฝะพะน ัะบะพะปัะทััะตะน ััะตะดะฝะตะน, ััะพะฑั ะพะฟัะตะดะตะปะธัั, ัะฒะปัะตััั ะปะธ ััะตะฝะด ะฑัััะธะผ ะธะปะธ ะผะตะดะฒะตะถัะธะผ. ะััะณะพะน ัะฟะพัะพะฑ ะธัะฟะพะปัะทะพะฒะฐัั ะตะณะพ - ะพะฑัะตะดะธะฝะธัั ั ะบัะฐัะบะพััะพัะฝะพะน ัะบะพะปัะทััะตะน ััะตะดะฝะตะน, ััะพะฑั ะฒััะฒะธัั ะพัะบะฐัั ะธ ะพััะบะพะบะธ ะฒ ัะฐะผะบะฐั
ะพะฑัะตะณะพ ััะตะฝะดะฐ.
ะฆะตะปั ะธัะฟะพะปัะทะพะฒะฐะฝะธั ะธะฝะดะธะบะฐัะพัะฐ "ะัะพัะตะฝั ะฒััะต 50-ะดะฝะตะฒะฝะพะน ัะบะพะปัะทััะตะน ััะตะดะฝะตะน" - ััะฐััะฒะพะฒะฐัั ะฒ ะฑะพะปะตะต ัะธัะพะบะพะผ ััะตะฝะดะต ั ะปัััะธะผ ัะพะพัะฝะพัะตะฝะธะตะผ ัะธัะบะฐ ะธ ะฟัะธะฑัะปะธ. ะัะฟะพะปัะทัั ััะพั ะธะฝะดะธะบะฐัะพั ะดะปั ะฒััะฒะปะตะฝะธั ะพัะบะฐัะพะฒ ะธ ะพััะบะพะบะพะฒ, ะฒั ะผะพะถะตัะต ัะฝะธะทะธัั ัะธัะบ ะฒั
ะพะดะฐ ะฒ ัะดะตะปะบะธ ะฒ ะฝะตะฟะพะดั
ะพะดััะตะต ะฒัะตะผั.
ะัะฐัะบะพะต ะพะฟะธัะฐะฝะธะต ะฑัััะตะณะพ ัะธะณะฝะฐะปะฐ:
150-ะดะฝะตะฒะฝะฐั ะะะ ะฝะฐ ััะพะฒะฝะต $SPXA50R ะฟะตัะตัะตะบะฐะตั ะพัะผะตัะบั 52,5 ะธ ะพััะฐะตััั ะฒััะต 47,50, ััะพ ะทะฐะดะฐะตั ะฑััะธะน ะฝะฐัััะพะน.
5-ะดะฝะตะฒะฝะฐั ะะะ ะฝะฐ ััะพะฒะฝะต $SPXA50R ะพะฟััะบะฐะตััั ะฝะธะถะต 40, ัะธะณะฝะฐะปะธะทะธััั ะพะฑ ะพัะบะฐัะต
5-ะดะฝะตะฒะฝะฐั ะะะ ะฝะฐ ััะพะฒะฝะต $SPXA50R ะฟะพะดะฝะธะผะฐะตััั ะฒััะต 50, ัะธะณะฝะฐะปะธะทะธััั ะพ ัะพััะต
ะะฑะทะพั ะผะตะดะฒะตะถัะธั
ัะธะณะฝะฐะปะพะฒ:
150-ะดะฝะตะฒะฝะฐั ะะะ ะฝะฐ ััะพะฒะฝะต $SPXA50R ะฟะตัะตัะตะบะฐะตั ััะพะฒะตะฝั ะฝะธะถะต 47,50 ะธ ะพััะฐะตััั ะฝะธะถะต 52,50, ััะพ ัะบะฐะทัะฒะฐะตั ะฝะฐ ะผะตะดะฒะตะถะธะน ะฝะฐัััะพะน.
5-ะดะฝะตะฒะฝะฐั ะะะ ะฝะฐ ััะพะฒะฝะต $SPXA50R ะฟะพะดะฝะธะผะฐะตััั ะฒััะต 60, ัะธะณะฝะฐะปะธะทะธััั ะพ ะพััะบะพะบะต
5-ะดะฝะตะฒะฝะฐั ะะะ ะฝะฐ ััะพะฒะฝะต $SPXA50 ะพะฟััะบะฐะตััั ะฝะธะถะต 50, ััะพ ัะธะณะฝะฐะปะธะทะธััะตั ะพ ัะฟะฐะดะต
ะะพััะตะบัะธัะพะฒะบะฐ
ะกััะตััะฒัะตั ะผะฝะพะถะตััะฒะพ ัะฟะพัะพะฑะพะฒ ะฝะฐัััะพะธัั ัะพัะณะพะฒัั ัะธััะตะผั, ะฝะพ ะณัะฐัะพะปะพะณะฐะผ ัะปะตะดัะตั ะธะทะฑะตะณะฐัั ััะตะทะผะตัะฝะพะน ะพะฟัะธะผะธะทะฐัะธะธ ะฝะฐัััะพะตะบ ะธะฝะดะธะบะฐัะพัะฐ. ะััะณะธะผะธ ัะปะพะฒะฐะผะธ, ะฝะต ะฟััะฐะนัะตัั ะฝะฐะนัะธ ะธะดะตะฐะปัะฝัะน ะฟะตัะธะพะด ัะบะพะปัะทััะตะน ััะตะดะฝะตะน ะธะปะธ ััะพะฒะตะฝั ะฟะตัะตัะตัะตะฝะธั. ะกะพะฒะตััะตะฝััะฒะพ ะฝะตะดะพััะธะถะธะผะพ ะฟัะธ ัะฐะทัะฐะฑะพัะบะต ัะธััะตะผั ะธะปะธ ัะพัะณะพะฒะปะต ะฝะฐ ััะฝะบะฐั
. ะะฐะถะฝะพ ะฟะพะดะดะตัะถะธะฒะฐัั ะปะพะณะธะบั ัะธััะตะผั ะธ ัะดะตะปััั ะพัะพะฑะพะต ะฒะฝะธะผะฐะฝะธะต ะดััะณะธะผ ะฐัะฟะตะบัะฐะผ, ัะฐะบะธะผ ะบะฐะบ ะณัะฐัะธะบ ัะฐะบัะธัะตัะบะพะน ัะตะฝั ะฑะฐะทะพะฒะพะน ัะตะฝะฝะพะน ะฑัะผะฐะณะธ.
ะงัะพ ะพะทะฝะฐัะฐัั ััะพะฒะฝะธ ะฒััะต ะธ ะฝะธะถะต 50% ะฒ ะดะพะปะณะพััะพัะฝะพะน ัะบะพะปัะทััะตะน ััะตะดะฝะตะน?
ะะฒะธะถะตะฝะธะต ะฒััะต 52,5% ััะธัะฐะตััั ะฑัััะธะผ, ะฐ ะฝะธะถะต 47,5% - ะผะตะดะฒะตะถัะธะผ. ะญัะธ ััะพะฒะฝะธ ะฟะพะผะพะณะฐัั ัะฝะธะทะธัั ัะธัะบะธ, ะธัะฟะพะปัะทัั ะฑััะตัั ะดะปั ะฑัััะธั
ะธ ะผะตะดะฒะตะถัะธั
ะฟะพัะพะณะพะฒ.
ะะฐะบ ะบัะฐัะบะพััะพัะฝะฐั ัะบะพะปัะทััะฐั ััะตะดะฝัั ะฟะพะผะพะณะฐะตั ะธะดะตะฝัะธัะธัะธัะพะฒะฐัั ะพัะบะฐัั ะธะปะธ ะพััะบะพะบะธ?
ะัะธ ะธัะฟะพะปัะทะพะฒะฐะฝะธะธ 5-ะดะฝะตะฒะฝะพะน ะะะ ะดะฒะธะถะตะฝะธะต ะฝะธะถะต 40 ัะบะฐะทัะฒะฐะตั ะฝะฐ ะพัะบะฐั, ะฐ ะดะฒะธะถะตะฝะธะต ะฒััะต 60 ัะบะฐะทัะฒะฐะตั ะฝะฐ ะพััะบะพะบ.
ะะฐะบ ะพะฟัะตะดะตะปัะตััั ัะฐะทะฒะพัะพั ะพัะบะฐัะฐ ะธะปะธ ะพััะบะพะบะฐ?
ะะฒะธะถะตะฝะธะต ะฒััะต 50 ะฟะพัะปะต ะพัะบะฐัะฐ ะธะปะธ ะฝะธะถะต 50 ะฟะพัะปะต ะพััะบะพะบะฐ ัะธะณะฝะฐะปะธะทะธััะตั ะพ ะฒะพะทะผะพะถะฝะพะผ ะฒะพะทะพะฑะฝะพะฒะปะตะฝะธะธ ัะพะพัะฒะตัััะฒัััะตะณะพ ััะตะฝะดะฐ.
ะะฐะบ ะฒั ะผะพะถะตัะต ะณะฐัะฐะฝัะธัะพะฒะฐัั, ััะพ ะฒะพัั
ะพะดััะธะน ััะตะฝะด ะฒะพะทะพะฑะฝะพะฒะธะปัั?
ะะฐะถะฝะพ ะดะพะถะดะฐัััั ัะบะฐัะบะฐ ะฒััะต 50, ััะพะฑั ัะฑะตะดะธัััั ะฒ ะฒะพะทะพะฑะฝะพะฒะปะตะฝะธะธ ะฒะพัั
ะพะดััะตะณะพ ััะตะฝะดะฐ, ัะธะณะฝะฐะปะธะทะธััััะตะณะพ ะพ ัะฐััะธัะตะฝะธะธ ะดะธะฐะฟะฐะทะพะฝะฐ.
ะะพะถะฝะพ ะปะธ ะฝะฐัััะพะธัั ัะธััะตะผั ะดะปั ะพะฟัะธะผะธะทะฐัะธะธ ะฝะฐัััะพะตะบ ะธะฝะดะธะบะฐัะพัะฐ?
ะฅะพัั ัััะตััะฒััั ัะฐะทะปะธัะฝัะต ัะฟะพัะพะฑั ะฝะฐัััะพะนะบะธ ัะธััะตะผั, ะฝะต ัะตะบะพะผะตะฝะดัะตััั ัััะตะผะธัััั ะบ ัะพะฒะตััะตะฝััะฒั ั ะฟะพะผะพััั ััะตะทะผะตัะฝะพะน ะพะฟัะธะผะธะทะฐัะธะธ ะฝะฐัััะพะตะบ. ะัะฐะนะฝะต ะฒะฐะถะฝะพ ัะพั
ัะฐะฝะธัั ะปะพะณะธัะฝะพััั ัะธััะตะผั ะธ ััะพะบััะธัะพะฒะฐัั ะธะทะผะตะฝะตะฝะธั ะฝะฐ ัะตะฝะพะฒะพะผ ะณัะฐัะธะบะต ะฑะฐะทะพะฒะพะน ัะตะฝะฝะพะน ะฑัะผะฐะณะธ.
Unmitigated Liquidity Imbalances [AlgoAlpha]๐ Introducing the Unmitigated Liquidity Imbalance Indicator by AlgoAlpha! ๐
Dive into the depths of market analytics with our "Unmitigated Liquidity Imbalance" indicator. This tool harnesses unique algorithms to detect liquidity imbalances between bulls and bears, helping traders spot trends and potential entry and exit points with greater accuracy. ๐๐
๐ Key Features:
๐ Advanced Analysis : Analyses candle direction and length to forecast market peaks and valleys.
๐จ Customizable Visuals : Tailor the chart with your choice of bullish green or bearish red to reflect different market conditions.
๐ Real-Time Updates : Continuously updates to reflect live market changes.
๐ Configurable Alerts : Set up alerts for key trading signals such as bullish and bearish reversals, as well as trend shifts.
๐ How to Use:
๐ Add the Indicator : Add the indicator to your favourites and customize the settings to suite your needs.
๐ Market Analysis : Monitor the oscillator threshold; readings above 0.5 suggest bullish sentiment, while below 0.5 indicate bearish conditions. And reversal signals are displayed to show potential entry points.
๐ Set Alerts : Enable notifications for reversal conditions or trend changes to seize trading opportunities without constant chart watching.
๐ง How It Works:
The core mechanism of the indicator is based on detecting changes in candlestick size and direction to identify bullish and bearish liquidity levels from the peak & valley indicator's logic. By comparing the length of a current candle to the previous one and checking the change in direction, it pinpoints moments where market sentiment could be shifting, indicating if the liquidity at that point is bullish or bearish. The script then looks at what percentage of the past few unmitigated levels are bullish or bearish based on a customizable lookback and determines the liquidity imbalance which can then be interpreted as trend.
Empower your trading with the Unmitigated Liquidity Imbalance indicator and navigate the markets with confidence and precision. ๐๐น
Happy trading, and may your charts be ever in your favour! ๐ฅณโจ
๐ Related Indicator
Xen's Flag Pattern Scalper1. Input Parameters:
FlagLength: Determines the length of the flag pattern.
TakeProfit1Ratio, takeProfit2Ratio, takeProfit3Ratio: Define the ratios for calculating
the take-profit levels relative to the entry price.
RiskRewardRatio: Specifies the risk-reward ratio for calculating the stop-loss level
relative to the entry price.
2 Flag Conditions:
BullishFlag: Checks if the current bar meets the conditions for a bullish flag pattern. It
evaluates to true if the low of the current bar is lower than the low flagLength bars
ago, and the close of the current bar is higher than the high flagLength bars ago.
BearishFlag: Checks if the current bar meets the conditions for a bearish flag pattern. It evaluates to true if the high of the current bar is higher than the high flagLength bars
ago, and the close of the current bar is lower than the low flagLength bars ago.
3. Entry Price:
EntryPrice: Calculates the entry price based on whether a bullish or bearish flag
pattern is identified. For a bullish flag, the entry price is set to the low of the current bar.
For a bearish flag, the entry price is set to the high of the current bar.
4. Stop Loss:
StopLoss: Determines the stop-loss level based on the entry price and the specified
riskRewardRatio . For a bullish flag, the stop-loss level is calculated by subtracting the
difference between the high and low of the current bar multiplied by the riskRewardRatio from the low of the current bar. For a bearish flag, the stop-loss level
is calculated similarly but added to the high of the current bar.
5. Take Profit Levels:
Three take-profit levels ( takeProfit1, takeProfit2, takeProfit3 ) are calculated based on
the entry price, stop-loss level, and specified take-profit ratios ( takeProfit1Ratio,
takeProfit2Ratio, takeProfit3Ratio ).
6. Plotting Signals and Levels:
Bullish and bearish flag patterns are plotted using triangle shapes ( shape.triangleup for
bullish and shape.triangledown for bearish) above or below the bars, respectively.
Entry, stop-loss, and take-profit levels are plotted using horizontal lines ( line.new )
with different colors and styles. Entry and stop-loss levels are labeled with "Entry" and "SL",
respectively, while take-profit levels are labeled with "TP 1", "TP 2", and "TP 3".
The colors for bullish flags are white for entry, red for stop-loss, and green for take-profit levels. For bearish flags, the colors are the same, but the labels are plotted above the bars.
7. Label Placement:
Labels for entry, stop-loss, and take-profit levels are placed a distance of 4 bars to the right
of the entry price using bar_index + 4 .
This indicator is intended to help traders identify flag patterns on price charts and visualize potential entry, stop-loss, and take-profit levels associated with these patterns.
Please use risk management and when TP1 is hit, move stoploss to breakeven .
Open Interest Inflows & Outflows [LuxAlgo]The Open Interest Inflows & Outflows indicator focuses on highlighting alterations in the overall count of active contracts associated with a specific financial instrument.
The indicator also includes an oscillator highlighting the price sentiment to use in conjunction with the open interest flow sentiment and also includes a rolling correlation of the open interest flow sentiment with a user-selected source.
๐ถ USAGE
Open Interest (OI) indicates the total number of active contracts, encompassing both long and short positions, for a specific financial instrument at any given moment. This key indicator helps traders and analysts assess market activity and sentiment.
An increase in open interest generally indicates new money flowing into the market, suggesting increased activity and the potential for a trending market. Conversely, a decrease in open interest indicates that traders are closing their positions, suggesting less interest in that particular contract.
Open Interest Flow Sentiment assesses the correlation between the initiation of new positions (inflows) and the closure of existing positions (outflows) for a particular instrument. Positive values suggest a prevalence of inflows, while negative values signify a prevalence of outflows.
The magnitude of the deviation from zero reflects the extent of dominance, either in inflows or outflows.
Price Sentiment estimates the relationship between the strength of bulls (buyers) and bears (sellers) on an instrument. Positive values indicate higher bull power and negative values indicate higher bear power.
The correlation feature is a key component of the indicator and helps analyze the relationship between trading volume and Open Interest changes. If volume increases along with rising Open Interest, it supports the validity of the price trend.
A divergence between price movement, volume, and Open Interest may signal potential reversals.
๐ถ DETAILS
This indicator, based on Dr. Alexander Elder's acclaimed Elder-Ray concept, aids traders in evaluating the strength of both bulls and bears by delving beneath the surface of the markets. It uncovers data not immediately apparent from a superficial glance at prices. The indicator comprises two components: Bull Power and Bear Power.
Considering that the high price of any candle signifies the maximum power of buyers and the low price represents the maximum power of sellers, Elder employs the 13-period Exponential Moving Average (EMA) to depict the average consensus of price value. Bull Power assesses whether buyers can drive prices above the average consensus of value, while Bear Power assesses whether sellers can push prices below this average.
Here are the formulas for Bull Power and Bear Power:
bull_power = high - ema(close, 13)
bear_power = low - ema(close, 13)
This concept is utilized to calculate Open Interest Flow Sentiment and Price Sentiment. The Open Interest Flow Sentiment estimates the relationship between new positions (inflows) and positions being closed (outflows), providing insights into market dynamics. The Price Sentiment, on the other hand, gauges the correlation between price movements and the Elder-Ray components, aiding traders in identifying potential shifts in market sentiment and momentum.
๐ถ SETTINGS
๐นOpen Interest Inflows & Outflows
OI Sentiment Correlation: toggles the visibility of Open Interest correlation with a variety of sources.
Money Flow Estimates: toggles the visibility of Money Flow Estimates calculated for the last bar.
๐นStyle
OI Flow Sentiment: toggles the visibility of Open Interest Flow Sentiment, along with color customization options.
Price Sentiment: toggles the visibility of Price Sentiment, along with color customization options.
Correlation Colors: color customization option for the Correlation Area.
๐นOthers
Smoothing: smoothing length applicable for Open Interest Flow Sentiment and Price Sentiment.
๐ถ RELATED SCRIPTS
Open-Interest-Chart
Liquidation-Estimates
Thanks to our community for recommending this script. For more conceptual scripts and related content, we welcome you to explore by visiting >>> LuxAlgo-Scripts .
Reversal and Breakout Signals [AlgoAlpha]๐๐ Introducing the Reversal and Breakout Signals by AlgoAlpha ๐๐
This innovative tool is crafted to enhance your chart analysis by identifying potential reversal and breakout opportunities directly on your charts. It's designed with both novice and experienced traders in mind, providing intuitive visual cues for better decision-making. Let's dive into the key features and how it operates:
### Key Features:
๐ถ Dynamic Period Settings: Customize the sensitivity of the indicator with user-defined periods for both the indicator and volume strength.
๐ Volume Threshold: Set a threshold to define what constitutes strong volume, enabling the identification of significant market movements.
๐ก Trend Coloring: Option to color candles during trends, making it easier to visualize bullish and bearish market conditions.
๐ Customizable Visuals: Choose your preferred colors for bullish, bearish, and breakout signals, personalizing the chart to your liking.
๐จ Advanced Alert System: Configure alerts for reversal and breakout signals, ensuring you never miss a potential trading opportunity.
### How to Use:
To maximize the effectiveness of the Reversal and Breakout Signals tool, follow these steps:
1. ๐ง Set Up Your Preferences:
- Adjust the Indicator Period and Volume Strength Period to match the timeframe of your trading strategy. This fine-tuning allows the indicator to better align with your specific market analysis needs.
- Define the Strong Volume Threshold to distinguish between ordinary and significant volume movements. This helps in identifying breakout or reversal signals with higher confidence.
2. ๐จ Customize Visuals:
- Choose colors for Bullish , Bearish , and Breakout Signals to visually differentiate between different types of market activities. This customization facilitates quicker decision-making while scanning charts.
3. ๐ Reversal Signals:
- Bullish Reversal : Look for a triangle below the bar indicating a potential upward movement. It's identified when the price dips below the lower level but closes above it, suggesting a rejection of lower prices.
- Bearish Reversal : A triangle above the bar signals a potential downward movement. This occurs when the price spikes above the upper level but closes below, indicating a rejection of higher prices.
4. ๐ Trend and Breakout Signals:
- Diamonds represent breakout signals. A bullish breakout is marked below the bar when the price closes above the upper level, suggesting strong buying pressure. Conversely, a bearish breakout above the bar indicates strong selling pressure as the price closes below the lower level.
- The tool also features a Trend Tracker that highlights the current market trend using the Hull Moving Average (HMA). This can help you stay aligned with the overall market direction for your trades.
By integrating these steps into your trading strategy, the Reversal and Breakout Signals tool can provide actionable insights to help identify potential entry and exit points, enhancing your trading decisions with visual cues and alerts for market reversals and breakouts.
### How It Works:
The core logic revolves around calculating weighted moving averages of high and low prices over a user-defined period, identifying the highest and lowest points within this period to establish potential breakout or breakdown levels while reducing the amount of noise, hence the use of moving averages.
1. Weighted Moving Averages Calculation:
sh = ta.wma(high, len)
sl = ta.wma(low, len)
h = ta.highest(sh, len)
l = ta.lowest(sl, len)
2. Breakout and Reversal Detection:
The script then employs logic to detect bullish and bearish breakouts and reversals based on the closing price's position relative to these levels, combined with volume analysis to confirm the strength of the move.
if not (h < h or h > h )
hstore := h
if not (l < l or l > l )
lstore := l
bullishbreakout := (breakout or ((breakout or breakout or breakout or breakout ) and candledir == 1)) and strongvol and not (bullishbreakout or bullishbreakout or bullishbreakout )
bearishbreakout := (breakdown or ((breakdown or breakdown or breakdown or breakdown ) and candledir == -1)) and strongvol and not (bearishbreakout or bearishbreakout or bearishbreakout )
3. Visual Indicators and Alerts:
Visual cues such as triangle shapes for reversals and diamonds for breakouts, along with colored bars, make it easy to spot these opportunities. Additionally, alerts can be set up for these events, ensuring traders can react promptly to potential trading setups.
plotshape(bullishrej and not (state ==- 1) ? low * 0.9995 : na, " Bullish Reversal ", shape.triangleup, location.belowbar, color.new(green, 0), size = size.tiny, text = "๐ก", textcolor = color.gray)
plotshape(bearishrej and not (state == 1) ? high * 1.0005 : na, " Bearish Reversal ", shape.triangledown, location.abovebar, color.new(red, 0), size = size.tiny, text = "๐ก", textcolor = color.gray)
plotshape(bullishbreakout ? low * 0.999 : na, " Bullish Breakout ", shape.diamond, location.belowbar, color.new(yellow, 0), size = size.tiny, text = "๐", textcolor = color.gray)
plotshape(bearishbreakout ? high * 1.001 : na, " Bearish Breakout ", shape.diamond, location.abovebar, color.new(yellow, 0), size = size.tiny, text = "๐", textcolor = color.gray)
This script is a versatile tool designed to aid in the identification of key reversal and breakout points, helping traders to make informed decisions based on technical analysis. Its customization options allow for a tailored analysis experience, fitting the unique needs and strategies of each trader.
Supertrend with Target Price & ATREE [SS]Hey everyone,
Releasing this supertrend mashup indicator.
This is your basic supertrend, but with two additions:
1. The integration of the ATREE technical probability modeller; and
2. The use of ATR price targets for crossovers
ATREE
ATREE stands for Advanced Technical Range Expectancy Estimator. It has its very own indicator available here . If you are not that familiar with it, I would suggest heading over to that page and reading about it, because it gives you the in-depth details.
But for a recap, ATREE uses technical indicators such as RSI, Stochastics or Z-Score to predict the likely sentiment, whether it be bullish or bearish. The indicator allows you to select the ATREE model type and supports 3 separate probability models based on either:
1. RSI
2. Stochastics; or
3. Z-Score
If you want to know which model is most effective for the ticker and timeframe you are using, you can launch up the native ATREE indicator and review the backtesting results to ascertain which model performs optimally for that particular ticker on that particular timeframe.
When ATREE assesses the sentiment as bearish, you will get a red fill. When it assesses the sentiment as bullish, you will get a green fill. This will help you adjust your bias to focus on either dip buying or rip shorting.
The ATREE timeframe is also customizable, so you can pull data from higher timeframes than you are on.
ATR Price Targets
As with my EMA 9/21 crossover with the target price, this is essentially the same concept. When the trend shifts to bullish or bearish, bull and bear targets will be printed so you know where to look for potential reversal and you can also set realistic target prices if you are scalping or day trading.
Supertrend
The last and base feature is the supertrend. The supertrend settings are customizeable.
It will provide a green line for uptrend and a redline for downtrend, the basic supertrend functionality.
And that's the indicator!
Let me know what you think and hope you enjoy!
Safe trades as always!
Standardized Orderflow [AlgoAlpha]Introducing the Standardized Orderflow indicator by AlgoAlpha. This innovative tool is designed to enhance your trading strategy by providing a detailed analysis of order flow and velocity. Perfect for traders who seek a deeper insight into market dynamics, it's packed with features that cater to various trading styles. ๐๐
Key Features:
๐ Order Flow Analysis: At its core, the indicator analyzes order flow, distinguishing between bullish and bearish volume within a specified period. It uses a unique standard deviation calculation for normalization, offering a clear view of market sentiment.
๐ Smoothing Options: Users can opt for a smoothed representation of order flow, using a Hull Moving Average (HMA) for a more refined analysis.
๐ช๏ธ Velocity Tracking: The indicator tracks the velocity of order flow changes, providing insights into the market's momentum.
๐จ Customizable Display: Tailor the display mode to focus on either order flow, order velocity, or both, depending on your analysis needs.
๐ Alerts for Critical Events: Set up alerts for crucial market events like crossover/crossunder of the zero line and overbought/oversold conditions.
How to Use:
1. Setup: Easily configure the indicator to match your trading strategy with customizable input parameters such as order flow period, smoothing length, and moving average types.
2. Interpretation: Watch for bullish and bearish columns in the order flow chart, utilize the Heiken Ashi RSI candle calculation, and look our for reversal notations for additional market insights.
3. Alerts: Stay informed with real-time alerts for key market events.
Code Explanation:
- Order Flow Calculation:
The core of the indicator is the calculation of order flow, which is the sum of volumes for bullish or bearish price movements. This is followed by normalization using standard deviation.
orderFlow = math.sum(close > close ? volume : (close < close ? -volume : 0), orderFlowWindow)
orderFlow := useSmoothing ? ta.hma(orderFlow, smoothingLength) : orderFlow
stdDev = ta.stdev(orderFlow, 45) * 1
normalizedOrderFlow = orderFlow/(stdDev + stdDev)
- Velocity Calculation:
The velocity of order flow changes is calculated using moving averages, providing a dynamic view of market momentum.
velocityDiff = ma((normalizedOrderFlow - ma(normalizedOrderFlow, velocitySignalLength, maTypeInput)) * 10, velocityCalcLength, maTypeInput)
- Display Options:
Users can choose their preferred display mode, focusing on either order flow, order velocity, or both.
orderFlowDisplayCond = displayMode != "Order Velocity" ? display.all : display.none
wideDisplayCond = displayMode != "Order Flow" ? display.all : display.none
- Reversal Indicators and Divergences:
The indicator also includes plots for potential bullish and bearish reversals, as well as regular and hidden divergences, adding depth to your market analysis.
bullishReversalCond = reversalType == "Order Flow" ? ta.crossover(normalizedOrderFlow, -1.5) : (reversalType == "Order Velocity" ? ta.crossover(velocityDiff, -4) : (ta.crossover(velocityDiff, -4) or ta.crossover(normalizedOrderFlow, -1.5)) )
bearishReversalCond = reversalType == "Order Flow" ? ta.crossunder(normalizedOrderFlow, 1.5) : (reversalType == "Order Velocity" ? ta.crossunder(velocityDiff, 4) : (ta.crossunder(velocityDiff, 4) or ta.crossunder(normalizedOrderFlow, 1.5)) )
In summary, the Standardized Orderflow indicator by AlgoAlpha is a versatile tool for traders aiming to enhance their market analysis. Whether you're focused on short-term momentum or long-term trends, this indicator provides valuable insights into market dynamics. ๐๐๐
Trend Change IndicatorThe Trend Change Indicator is an all-in-one, user-friendly trend-following tool designed to identify bullish and bearish trends in asset prices. It features adjustable input values and a built-in alert system that promptly notifies investors of potential shifts in both short-term and long-term price trends. This alert system is crucial for helping less active investors correctly position themselves ahead of major trend shifts and assists in risk management after a trend is established. It's important to note that this indicator is most effective with assets that historically exhibit strong trends.
At the heart of this tool is the interaction between the 30-day and 60-day Exponential Moving Averages (EMA). A bullish trend is indicated in green when the 30-day EMA is above the 60-day EMA, while a bearish trend is signaled in red when the 30-day EMA is below the 60-day EMA. The appearance of gray alerts users to potential shifts in the current trend as the EMAs converge, falling below the Average True Range (ATR) safety margin. This analysis is conducted across both hourly and daily timeframes, with the 4-hour timeframe providing early signals for daily trend changes. The band visually represents the interaction between the daily EMAs and is also displayed in the second row of the table, with the first row showing the same EMA interaction on the 4-hour timeframe.
This indicator also includes a 140-day (20-week) Simple Moving Average (SMA), visually represented by a line with predictive dots. This feature significantly enhances the investor's ability to understand long-term trends in asset prices, offering forward-looking insights by projecting the SMA value 10 days into the future. The value of this forecast lies in interpreting the slope of the dots; upward trending dots suggest a bullish underlying trend, while downward trending dots indicate a bearish trend. Generally, prices above the SMA signal bullishness, and prices below indicate bearishness.
In summary, the Trend Change Indicator is a comprehensive solution for identifying price trends and managing risk. Its intuitive, color-coded design makes it an indispensable tool for traders and investors who aim to be well-positioned ahead of trend shifts and manage risk once a trend has been established. While it has proven historically valuable in trending markets such as cryptocurrencies, tech stocks, and commodities, it is advisable to use this indicator in conjunction with other technical analysis tools for a more comprehensive and well-rounded decision-making process.
Algoflow's Levels PlotterAlgoflow's Levels Plotter - Indicator
Release Date: Jan. 15, 2024
Release version: v3 r1
Release notes date: Jan. 15, 2024
Overview
Parses user's input of levels to be plotted and labeled on the chart for NQ & ES futures
Features
Quick plotting of predetermined price levels.
- Type or copy from another source of values in a predetermined output format.
Supports separate line plotting for Weekly, OVN and RTH values
- Plot only Weekly, OVN or RTH levels, or all
- Configure colors separately for Inflection Points, Weekly, OVN & RTH levels
- Shift/place price labels separately to easily identify levels
User Impacts of Changes
Requires users to remove previous version and re-add indicator "Algoflow's Levels Plotter", then re-add values. Colors and shift values will need to be re-entered and/or reconfigured
Support
Questions, feedbacks, and requests are welcomed. Please feel free to use Comments or direct private message via TradingView.
Quick usage notes:
The indicator allows you to enter data for both ES & NQ at the same time. This is useful in single chart window/layout situations, like viewing on the phone. When you switch between futures, the data is already there.
If you leave the entries blank, nothing will be plotted. This is useful if you want to have separate charts for ES & NQ. So you can just enter only the relevant data of either.
As an indicator, input values are saved within it, until it is removed from the chart. Input for one chart will not update other charts of the same ticker, even in the same layout.
The easiest and quickest way to share the inputs across all charts and layouts is to use the Indicator Templates feature.
- After input values are entered (for both ES & NQ futures) via the indicator's Settings, select ""Save as Default"".
- Click on ""Indicator Templates"" (4 squares icon), and click on ""Save Indicator template...""
- Remove the previous version of the indicator in other charts.
- Click on ""Indicator Templates"" icon, and select the newly created template. Repeat this for other charts of the same futures ticker
The labels can be disabled in settings > Style tab. Use the Inputs tab to configure orientation (left or right of current bar on chart), and how much spacing from the current (in distance of bars)
Format example:
Primary directional inflection point: 1234
For Bulls: 1244.25, 1254, 1264.50
For Bears: 1224, 1214, 1204
Changes
v3 r1 - Fixed erroneous default values in Weekly input sections. Added options to en/disable display of each set (session) of levels. Default label text size to normal, from small.
- Jan 15, 2024
v2 r9 - Added support for USTEC & US500.
- Dec. 10, 2023
v2 r8 - Added configuration features for users to modify the labels' text colors and size. Simplified code further by moving inputs processing modules into a single user function.
- Oct. 31, 2023
v2 r7 - Added support for the micro NQ & ES. Modified to ignore string case in inputs
- Oct 18, 2023
v2 r4 - Added support of weekly lines and labels features. Began the process of optimizing/simplifying code
- Oct. 15, 2023
v2 r3 - Made Inflection Point levels' colors configurable
- Oct. 04, 2023
v2 r2 - Removed comments & debug codes from development build revision #518
- Oct. 04, 2023
v2 r1 - Released from development revision #518. Major rewrite to fix previous and overlapping plots of lines and labels.
- Oct. 04, 2023
v1 r2 - First release of indicator
- Oct. 02, 2023
MADALGO`s Enhanced OBV DivergencesDescription:
MADALGO's Enhanced OBV Divergences indicator is a unique tool designed for traders to visualize the divergences between price action and On Balance Volume (OBV), a fundamental aspect often indicative of underlying strength or weakness in the market. By keenly identifying these divergences, traders are better positioned to anticipate potential trend reversals or trend continuations, making this script an invaluable addition to their technical analysis toolkit.
This script meticulously scans for both regular and hidden bullish/bearish divergences, providing a comprehensive view of market sentiment. The core of this indicator is built around the OBV, which cumulatively adds or subtracts volume based on the price movement per period, thus providing a running total of volume and portraying the force behind the price movements.
The regular divergences are classic indicators of a potential reversal in the current trend, while hidden divergences are often indicative of trend continuation. These divergences are pinpointed based on the relative positions of the OBV and price highs/lows, over customizable lookback periods and within specified lookback ranges.
Features:
Regular and Hidden Divergences: Clearly marked bullish and bearish divergences provide insights into potential market turning points.
On Balance Volume (OBV) Line: Visualize the continuous flow of buying and selling pressure, enabling the identification of accumulation or distribution phases essential for understanding the market's strength or weakness.
Moving Average of OBV: An optional feature to smooth the OBV line, aiding in the identification of the overarching trend.
Dynamic Statistics Label: A floating label provides real-time updates on essential statistics like the Rate of Percentage Change (RPC) of OBV, the last divergences, and bars since the last divergences.
Inputs:
Pivot Lookback Right and Pivot Lookback Left: Define the lookback periods for identifying pivot points in the OBV line.
Max of Lookback Range and Min of Lookback Range: Define the range for considering divergences.
RPC Period: Defines the period for calculating the Rate of Percentage Change of the OBV.
MA Period: Defines the period for the optional moving average of the OBV.
Plot Bullish, Plot Hidden Bullish, Plot Bearish, Plot Hidden Bearish: Toggle visibility of respective divergences.
Plot Moving Average: Toggle visibility of the OBV moving average.
Usage:
Add the script to your TradingView chart.
Tailor the input parameters in the settings panel to align with your analysis requirements.
The divergences, OBV line, and optional moving average will be plotted on your chart, with a dynamic label displaying real-time statistics.
Set up alerts to be notified of identified divergences, enabling timely decision-making.
Alerts:
Regular bullish/bearish divergence in OBV found: Triggered when a regular bullish or bearish divergence is identified.
Hidden bullish/bearish divergence in OBV found: Triggered when a hidden bullish or bearish divergence is identified.
Underlying Concepts:
The OBV Divergences indicator is rooted in the principle that volume precedes price movement. When prices are rising with increased volume, it suggests that buying pressure is prevailing and may lead to continued upward momentum. Conversely, rising prices with decreasing volume might indicate a lack of buying conviction and could signal a potential price reversal. The identification of divergences between price and OBV can therefore serve as a powerful signal for traders. These examples can be seen below in the image
The Moving Average of the OBV further aids in understanding the prevailing trend by smoothing out the OBV line, providing a clearer picture of the market's longer-term momentum. The Rate of Percentage Change (RPC) provides insight into the momentum of volume, offering an additional layer of analysis. Together, these additional features enhance the core OBV analysis, enabling a more nuanced understanding of volume dynamics fundamental for making more informed trading decisions.
License:
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at Mozilla Public License 2.0.
TrendLine CrossThis indicator "TrendLine Cross", is designed to plot trend lines so you can spot potential trend reversal points on the charts. The main function is to draw several lines on the chart and identify the crossings between these lines, which can be significant indicators for trading. The lines are based on different periods which can be changed in the settings tabs.
Let's see the characteristics of the trend lines:
_Low Line Color(Green Line): This line connects the lowest point of low prices in the "low_time" period with the lowest point of low prices in the "high_time" period. Indicates a possible short-term support level on the chart.
_Liquidity Up Line Color (Golden Line): This line connects the lowest point of low prices in the "low_time" period with the highest point of low prices in the same period. It represents a liquidity zone and an important resistance in the chart.
_Lower Line Color (Blue Line): This horizontal line connects the lowest point of low prices in the "LowerLine_period" with the lowest point of low prices in the "high_time" period. Indicates a possible long-term support level.
_Upper Line Colorr: This line represents a connection between the highest points of the "high_time" period and the lowest point of the "LowerLine_period". Indicates a possible long-term resistance level.
_Up Line Color (Red Line): This line connects the highest point of high prices in the "high_time" period with the highest point of high prices in the "LowerLine_period". It represents a possible long-term resistance level.
_Liquidity Down Line Color(Golden Line): This line connects the highest point of high prices in the "high_time" period with the highest point of low prices in the "low_time" period. It represents a liquidity point and an important support zone.
The indicator becomes particularly interesting when the lines make crossings. These crossovers could suggest a potential trend change in the market. For example:
Change from Bearish to Bullish: If the "long-term" line (black) crosses the "short- or long-term" line (green or blue) from top to bottom, it could indicate a shift from a bearish to a bullish market , suggesting the opportunity for long positions.
_Changing from Bullish to Bearish: If the "long-term" line (blue) crosses the "short-term" line (red or black) from bottom to top, it could indicate a shift from a bullish to a bearish market, suggesting the opportunity for short positions.
Generally speaking, crossings between these lines can be key points of interest for traders, as they can signal significant changes in price direction.
Machine Learning: Support and Resistance [YinYangAlgorithms]Overview:
Support and Resistance is normally based upon Pivot Points and Highest Highs and Lowest Lows. Many times coders even incorporate Volume, RSI and other factors into the equation. However there may be a downside to doing a pure technical approach based on historical levels. We live in a time where Machine Learning is becoming more and more used; thus we have decided to create a Machine Learning Support and Resistance Projection based Indicator. Rather than using traditional Support and Resistance calculations using historical data, we have taken a rather different approach. This Indicator instead attempts to Predict and Project where Support and Resistance locations will be based on a Machine Learning Model using a form of KNN (k-Nearest Neighbors).
Since this indicator creates a Projection of where it deems Support and Resistance will be, it has the ability to move its Support and Resistance before the price even gets to it if it believes it will surpass its projections. This may create a more accurate placement of Support and Resistance as theyโre not based on historical levels.
This Indicator does not Repaint.
How it works:
This Indicator makes its projections based on the source you provide (by default close) of the previous bar and submits the source, RSI and EMA to our Projection Function to get its projection of the current bar.
The Projection function essentially calculates potential movement after finding the differences between the source the MA from the current bar, previous bar and average over the span of Machine Learning Length.
Potential movement is defined as:
Average Difference + Average(Machine Learning Average, Average Last Distance)
Average Difference: (Absolute value of Current Source - Current MA) - (Absolute value of Machine Learning Average - Machine Learning MA)
Average Last Distance: Average(Current Source - Current MA, Previous Source - Previous MA)
It then predicts the next bars directional movement (bullish or bearish bar) using several factors:
Previous Source > Previous MA
Current Source - Current MA > Average Source - Average MA
Current RSI > Previous RSI
Current RSI > 30 and Previous RSI <= 30
Current RSI < 70 and Previous RSI >= 70
This helps us to predict the direction the next bar may move.
We then calculate a multiplier that we apply to our Potential Movement value to get our final result which is our Current Bars Close Projection.
Our multiplier is calculated using:
(Current RSI > 30 and Previous RSI <= 30) OR (Current RSI < 70 and Previous RSI >= 70)
Current Source - Current MA > Previous Source - Previous MA
We then create an array and fill it with the previous X projections (Machine Learning Length) and send it to another function. This function, if told to, will sort the data accordingly and then output the KNN average of the length given.
We calculate and plot various KNN lengths to create different Zones:
Strong Support: Length of 2 but sort the data Ascending (low to high)
Strong Resistance: Length of 2 but sort the data Descending (high to low)
Support: Length of Machine Length Length / 10 or Min of 2 sorted by Ascending
Resistance: Length of Machine Length Length / 10 or Min of 2 sorted by Descending
There are also 4 other plots you may be wondering what they are, there is your AVG, VWMA, Long Term Memory and Current Projection.
By default your Current Projection is disabled in settings but you can enable it if you are curious to see how the projections for each close are calculated. It is, however, not a crucial point of interest (white line).
The average is simply the average value of the Machine Learning Data (purple line).
The VWMA is a VWMA calculation applied to our Data over a length specified in settings (by default 1)(blue line). The VWMA is crucial when combined with the Avg as they can cross over and under each other. These crosses represent potential Bullish and Bearish zones.
Lastly, but certainly not least, we have the Long Term Memory (maroon line). The Long Term Memory can be displayed either as an โAverageโ, โHard Lineโ or โNoneโ. The Long Term Average is only updated every Machine Learning Length Bar Indexโs and is populated with the average of the Machine Learning Data. For Instance, if Machine Learning Length is set to 100, the Long Term Memory is only updated every 100 bars, and since its length is the same as the Machine Learning Length, that means its data is composed of 10,000 bars worth of data. The Long Term Memory may be very beneficial for determining where Support and Resistance lie over the Long Term within a Machine Learning Algorithm. When set to โAverageโ it plots the connection lines diagonally, and although they may be more visually appealing, theyโre less useful when it comes to actually seeing support and resistance as generally speaking, support and resistance lie on the horizontal. When set to โHard Lineโ the Long Term Memory is connected with hard lines and holds the price value until the next time it is updated. This makes it much more useful for potentially identifying Support and Resistance.
Tutorial:
Here is an overview of what the Indicator looks like, now let's start to dissect it.
In the example above we can see how all of the lines between the Major Support and Resistance zones may act as BOTH Support and Resistance depending on which side the price is currently on. In the circle on the left, we can see how it can fluctuate between the two. If you look at the circle on the right, we can see how the Average line acts as a strong support before it fails to maintain it. Generally speaking, most Support and Resistance locations may potentially fail to hold after 3 tests, as the Average did in this example.
As you can see, the Support and Resistance doesnโt wait to be tested before adjusting, which is why there are 2 lines which create their zones. The inner line is the Support/Resistance and the outer line is the Strong Support/Resistance. The Yellow Circle shows the inner line was able to calculate the moving resistance correctly and then adjusted accordingly as it was projecting the price to keep increasing. However, if you look at the White Circle, you can see that since there was first a crash, and then parabolic movement, that the inner zone could not move and predict the resistance as well as the outer zone could.
We consider the price to be โOvervaluedโ when it is above the VWMA (blue line) and โUndervaluedโ when it is below the VWMA. It is considered โfairโ price when it is within the VWMA to Average zone (between the blue and purple lines). If you look at the example above, youโll notice where the two yellow circles are, it is not only considered โOvervaluedโ, but it then proceeds to ride the inner resistance line upwards. This is common when the market is overly bullish and vice versa when it is bearish. Please keep in mind, although it is common, it doesnโt mean a correction canโt happen.
In this example above we look at the last bull run that may have started due to the halving. This bull run was very bullish as you can see in the example above. The price was constantly sitting within the Resistance Zone and the VWMA that was very close to it was constantly acting as a Support. Naturally, due to the Algorithm used in this Indicator, as the momentum starts to slow down, the VWMA (blue line) will start to space out more and more from the Resistance Zone. This doesnโt mean the momentum is gone, it just means it may be slowing down.
Unfortunately we have to study the Bear Market with a different perspective than the Bull Market. However, there are still some similarities within the two. If you refer to the example above and the previous example, you can clearly see that the Bull Market loves to stay with the Resistance Zone and use the VWMA as a Support. However, the Bear Market does not. This is a normal occurrence, however we can see from the example above you may see a correction / horizontal movement when the Outer Support Line is touched. If you look at all 3 yellow circles, the Outer Support Line was touched, then either a small correction or horizontal consolidation occurred.
We will conclude our Tutorial here, hopefully youโll be able to benefit from a moving Support and Resistance calculated with Machine Learning that projects its locations, rather than using traditional calculations.
Settings:
Source: This source is the base for all our calculations
Machine Learning Length: How much projection data are we storing and using to make calculations.
Smoothing Length: We need to smooth calculations such as RSI, EMA and VWMA. What length are we smoothing it with?
VWMA ML Projection Length: How far into our Machine Learning data should we average for our VWMA. Please note the 'Smoothing Length' is still applied here after getting the Projection Average.
Long Term Memory: Long term memory has the same storage length but is only updated once per Machine Learning Length. For instance, if Machine Learning Length is 100, it will save the Average of our data once every 100 bars. This means its memory is an average of 10,000 bars of Machine Learning. 'Average' connects its values diagonally whereas 'Hard Line' holds its value until it changes.
Use Average Last Distance In Potential Movement: This can help accuracy but generally also displaces the Support and Resistance by projecting it further.
Show Current Projection: Projections occur for each bar, and our Machine Learning utilizes these projections by storing and evaluating them. This toggle will display the Current Projection Line which is used to create all our Projections.
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
Supply Demand Profiles [LuxAlgo]The Supply Demand Profiles is a charting tool that measures the traded volume at all price levels on the market over a specified time period and highlights the relationship between the price of a given asset and the willingness of traders to either buy or sell it, in other words, highlights key concepts as significant supply & demand zones, the distribution of the traded volume, and market sentiment at specific price levels within a specified time period, allowing traders to reveal dominant and/or significant price levels and to analyze the trading activity of a particular user-selected range.
In other words, this tool highlights key concepts as significant supply & demand zones, the distribution of the traded volume, and market sentiment at specific price levels within a specified time period, allowing traders to reveal dominant and/or significant price levels and to analyze the trading activity of a particular user-selected range.
Besides having the tool as a combo tool, the uniqueness of this version of the tool compared to its early versions is its ability to benefit from different volume data sources and its ability to use a variety of different polarity methods, where polarity is a measure used to divide the total volume into either up volume (trades that moved the price up) or down volume (trades that moved the price down).
๐ถ USAGE
Supply & demand zones are presented as horizontal zones across the selected range, hence adding the ability to visualize the price interaction with them
By default, the right side of the profile is the volume profile which highlights the distribution of the traded activity at different price levels, emphasizing the value area, the range of price levels in which the specified percentage of all volume was traded during the time period, and levels of significance, such as developing point of control line, value area high/low lines, and profile high/low labels
The left side of the profile is the sentiment profile which highlights the market sentiment at specific price levels
๐ถ DETAILS
๐น Volume data sources
The users have the option to select volume data sources as either 'volume' (regular volume) or 'volume delta', where volume represents all the recorded trades that occur at a given bar and volume delta is the difference between the buying and the selling volume, that is, the net demand at a given bar
๐น Polarity methods
The users are able to choose the methods of how the tool to take into consideration the polarity of the bar (the direction of a bar, green (bullish) or red (bearish) bar) among a variety of different options, such as 'bar polarity', 'bar buying/selling pressure', 'intrabar (chart bars at a lower timeframe than the chart's) polarity', 'intrabar buying/selling pressure', and 'heikin ashi bar polarity'.
Finally, the interactive mode of the tool is activated, as such users can easily modify the intervals of their interest just by selecting the indicator and moving the points on the chart
๐ถ SETTINGS
The script takes into account user-defined parameters and plots the profiles and zones
๐น Calculation Settings
Volume Data Source and Polarity: This option is to set the desired volume data source and polarity method
Lower Timeframe Precision: This option is applicable in case any of the 'Intrabar (LTF)' options are selected, please check the tooltip for further details
Value Area Volume %: Specifies the percentage for the value area calculation
๐น Presentation Settings
Supply & Demand Zones: Toggles the visibility of the supply & demand zones
Volume Profile: Toggles the visibility of the volume profile
Sentiment Profile: Toggles the visibility of the sentiment profile
๐น Presentation, Others
Value Area High (VAH): Toggles the visibility of the VAH line and color customization option
Point of Control (POC): Toggles the visibility of the developing POC line and color customization option
Value Area Low (VAL): Toggles the visibility of the VAL line and color customization option
๐น Supply & Demand, Others
Supply & Demand Threshold %: This option is used to set the threshold value to determine supply & demand zones
Supply/Demand Zones: Color customization option
๐น Volume Profile, Others
Profile, Up/Down Volume: Color customization option
Value Area, Up/Down Volume: Color customization option
๐น Sentiment Profile, Others
Sentiment, Bullish/Bearish: Color customization option
Value Area, Bullish/Bearish: Color customization option
๐น Others
Number of Rows: Specify how many rows the profile will have
Placment: Specify where to display the profile
Profile Width %: Alters the width of the rows in the profile, relative to the profile range
Profile Price Levels: Toggles the visibility of the profile price levels
Profile Background, Color: Fills the background of the profile range
Value Area Background, Color: Fills the background of the value area range
Start Calculation/End Calculation: The tool is interactive, where the user may modify the range by selecting the indicator and moving the points on the chart or can set the start/end time using these options
๐ถ RELATED SCRIPTS
Volume-Profile
Volume-Profile-Maps
Volume-Delta
Multi-Timeframe Trend Detector [Alifer]Here is an easy-to-use and customizable multi-timeframe visual trend indicator.
The indicator combines Exponential Moving Averages (EMA), Moving Average Convergence Divergence (MACD), and Relative Strength Index (RSI) to determine the trend direction on various timeframes: 15 minutes (15M), 30 minutes (30M), 1 hour (1H), 4 hours (4H), 1 day (1D), and 1 week (1W).
EMA Trend : The script calculates two EMAs for each timeframe: a fast EMA and a slow EMA. If the fast EMA is greater than the slow EMA, the trend is considered Bullish; if the fast EMA is less than the slow EMA, the trend is considered Bearish.
MACD Trend : The script calculates the MACD line and the signal line for each timeframe. If the MACD line is above the signal line, the trend is considered Bullish; if the MACD line is below the signal line, the trend is considered Bearish.
RSI Trend : The script calculates the RSI for each timeframe. If the RSI value is above a specified Bullish level, the trend is considered Bullish; if the RSI value is below a specified Bearish level, the trend is considered Bearish. If the RSI value is between the Bullish and Bearish levels, the trend is Neutral, and no arrow is displayed.
Dashboard Display :
The indicator prints arrows on the dashboard to represent Bullish (โฒ Green) or Bearish (โผ Red) trends for each timeframe.
You can easily adapt the Dashboard colors (Inputs > Theme) for visibility depending on whether you're using a Light or Dark theme for TradingView.
Usage :
You can adjust the indicator's settings such as theme (Dark or Light), EMA periods, MACD parameters, RSI period, and Bullish/Bearish levels to adapt it to your specific trading strategies and preferences.
Disclaimer :
This indicator is designed to quickly help you identify the trend direction on multiple timeframes and potentially make more informed trading decisions.
You should consider it as an extra tool to complement your strategy, but you should not solely rely on it for making trading decisions.
Always perform your own analysis and risk management before executing trades.
The indicator will only show a Dashboard. The EMAs, RSI and MACD you see on the chart image have been added just to demonstrate how the script works.
DETAILED SCRIPT EXPLANATION
INPUTS:
theme : Allows selecting the color theme (options: "Dark" or "Light").
emaFastPeriod : The period for the fast EMA.
emaSlowPeriod : The period for the slow EMA.
macdFastLength : The fast length for MACD calculation.
macdSlowLength : The slow length for MACD calculation.
macdSignalLength : The signal length for MACD calculation.
rsiPeriod : The period for RSI calculation.
rsiBullishLevel : The level used to determine Bullish RSI condition, when RSI is above this value. It should always be higher than rsiBearishLevel.
rsiBearishLevel : The level used to determine Bearish RSI condition, when RSI is below this value. It should always be lower than rsiBullishLevel.
CALCULATIONS:
The script calculates EMAs on multiple timeframes (15-minute, 30-minute, 1-hour, 4-hour, daily, and weekly) using the request.security() function.
Similarly, the script calculates MACD values ( macdLine , signalLine ) on the same multiple timeframes using the request.security() function along with the ta.macd() function.
RSI values are also calculated for each timeframe using the request.security() function along with the ta.rsi() function.
The script then determines the EMA trends for each timeframe by comparing the fast and slow EMAs using simple boolean expressions.
Similarly, it determines the MACD trends for each timeframe by comparing the MACD line with the signal line.
Lastly, it determines the RSI trends for each timeframe by comparing the RSI values with the Bullish and Bearish RSI levels.
PLOTTING AND DASHBOARD:
Color codes are defined based on the EMA, MACD, and RSI trends for each timeframe. Green for Bullish, Red for Bearish.
A dashboard is created using the table.new() function, displaying the trend information for each timeframe with arrows representing Bullish or Bearish conditions.
The dashboard will appear in the top-right corner of the chart, showing the Bullish and Bearish trends for each timeframe (15M, 30M, 1H, 4H, 1D, and 1W) based on EMA, MACD, and RSI analysis. Green arrows represent Bullish trends, red arrows represent Bearish trends, and no arrows indicate Neutral conditions.
INFO ON USED INDICATORS:
1 โ EXPONENTIAL MOVING AVERAGE (EMA)
The Exponential Moving Average (EMA) is a type of moving average (MA) that places a greater weight and significance on the most recent data points.
The EMA is calculated by taking the average of the true range over a specified period. The true range is the greatest of the following:
The difference between the current high and the current low.
The difference between the previous close and the current high.
The difference between the previous close and the current low.
The EMA can be used by traders to produce buy and sell signals based on crossovers and divergences from the historical average. Traders often use several different EMA lengths, such as 10-day, 50-day, and 200-day moving averages.
The formula for calculating EMA is as follows:
Compute the Simple Moving Average (SMA).
Calculate the multiplier for weighting the EMA.
Calculate the current EMA using the following formula:
EMA = Closing price x multiplier + EMA (previous day) x (1-multiplier)
2 โ MOVING AVERAGE CONVERGENCE DIVERGENCE (MACD)
The Moving Average Convergence Divergence (MACD) is a popular trend-following momentum indicator used in technical analysis. It helps traders identify changes in the strength, direction, momentum, and duration of a trend in a financial instrument's price.
The MACD is calculated by subtracting a longer-term Exponential Moving Average (EMA) from a shorter-term EMA. The most commonly used time periods for the MACD are 26 periods for the longer EMA and 12 periods for the shorter EMA. The difference between the two EMAs creates the main MACD line.
Additionally, a Signal Line (usually a 9-period EMA) is computed, representing a smoothed version of the MACD line. Traders watch for crossovers between the MACD line and the Signal Line, which can generate buy and sell signals. When the MACD line crosses above the Signal Line, it generates a bullish signal, indicating a potential uptrend. Conversely, when the MACD line crosses below the Signal Line, it generates a bearish signal, indicating a potential downtrend.
In addition to the MACD line and Signal Line crossovers, traders often look for divergences between the MACD and the price chart. Divergence occurs when the MACD is moving in the opposite direction of the price, which can suggest a potential trend reversal.
3 โ RELATIVE STRENGHT INDEX (RSI):
The Relative Strength Index (RSI) is another popular momentum oscillator used by traders to assess the overbought or oversold conditions of a financial instrument. The RSI ranges from 0 to 100 and measures the speed and change of price movements.
The RSI is calculated based on the average gain and average loss over a specified period, commonly 14 periods. The formula involves several steps:
Calculate the average gain over the specified period.
Calculate the average loss over the specified period.
Calculate the relative strength (RS) by dividing the average gain by the average loss.
Calculate the RSI using the following formula: RSI = 100 - (100 / (1 + RS))
The RSI oscillates between 0 and 100, where readings above 70 are considered overbought, suggesting that the price may have risen too far and could be due for a correction. Readings below 30 are considered oversold, suggesting that the price may have dropped too much and could be due for a rebound.
Traders often use the RSI to identify potential trend reversals. For example, when the RSI crosses above 30 from below, it may indicate the start of an uptrend, and when it crosses below 70 from above, it may indicate the start of a downtrend. Additionally, traders may look for bullish or bearish divergences between the RSI and the price chart, similar to the MACD analysis, to spot potential trend changes.
ICT Daily Bias Finder [DTCC]What is This?
The ICT Daily Bias Finder uses a method called "DTCC" to identify the London and New York session's bias, bullish or bearish. This indicator should only be relied on for 5 minute, and not other timeframes.
How do I use it?
Look at the previous days two boxes (labeled DTCC Bear/DTCC Bull), if both are bullish or both are bearish it is NOT recommended to rely on DTCC for that day. If the first one is bullish and second one is bearish, the DTCC for the next day says that London session will turn ABOVE midnight opening price, while New York will turn UNDER midnight opening price (longs in London, shorts in New York). If the second one is bearish and the first is bullish, the DTCC for the next day says that London session will turn UNDER midnight opening price, while New York will turn ABOVE midnight opening price (shorts in London, longs in New York)
Emoji guide to DTCC indicator:
๐ข๐ข: Don't trust DTCC for that day
๐ด๐ด: Don't trust DTCC for that day
๐ข๐ด: Longs in London above Midnight Opening Price, Shorts in New York under Midnight Opening Price
๐ด๐ข: Shorts in London under Midnight Opening Price, Longs in New York under Midnight Opening Price
Reminder: NEVER rely solely on DTCC, DTCC can be wrong and is not right 100% of times.
cphelperLibrary "cphelper"
ACPU helper library - for private use. Not so meaningful for others.
calculate_rr(targetArray, rrArray, breakevenOnTarget1)
โโcalculates risk reward for given targets
โโParameters:
โโโโ targetArray (float ) : array of targets
โโโโ rrArray (float ) : array of risk reward
โโโโ breakevenOnTarget1 (simple bool) : option to breakeven
โโReturns: array rrArray
trendPairs(l1StartX, l1StartY, l1EndX, l1EndY, l2StartX, l2StartY, l2EndX, l2EndY, zgColor)
โโcreates trendline pairs
โโParameters:
โโโโ l1StartX (int) : startX of first line
โโโโ l1StartY (float) : startY of first line
โโโโ l1EndX (int) : endX of first line
โโโโ l1EndY (float) : endY of first line
โโโโ l2StartX (int) : startX of second line
โโโโ l2StartY (float) : startY of second line
โโโโ l2EndX (int) : endX of second line
โโโโ l2EndY (float) : endY of second line
โโโโ zgColor (color) : line color
โโReturns:
find_type(l1t, l2t, channelThreshold)
โโFinds type based on trendline pairs
โโParameters:
โโโโ l1t (line) : line1
โโโโ l2t (line) : line2
โโโโ channelThreshold (simple float) : theshold for channel identification
โโReturns: pattern type and flags
getFlags(flags)
โโFlatten flags
โโParameters:
โโโโ flags (bool ) : array of flags
โโReturns: - flattened flags isChannel, isTriangle, isWedge, isExpanding, isContracting, isFlat, isRising, isFalling
getType(typeNum)
โโGet type based on type number
โโParameters:
โโโโ typeNum (int) : number representing type
โโReturns: String value of type
getStatus(status, maxStatus)
โโGet status based on integer value representations
โโParameters:
โโโโ status (int) : integer representing current status
โโโโ maxStatus (int) : integer representing max status
โโReturns: String status value
calculate_simple_targets(trendLines, settingsMatrix, patternTypeMapping, patternType)
โโCalculate targets based on trend lines
โโParameters:
โโโโ trendLines (line ) : trendline pair array
โโโโ settingsMatrix (matrix) : matrix containing settings
โโโโ patternTypeMapping (string ) : array containing pattern type mapping
โโโโ patternType (int) : pattern type
โโReturns: arrays containing long and short calculated targets
recalculate_position(patternTypeAndStatusMatrix, targetMatrix, index, pIndex, status, maxStatus, targetValue, stopValue, dir, breakevenOnTarget1)
โโRecalculate position values
โโParameters:
โโโโ patternTypeAndStatusMatrix (matrix) : matrix containing pattern type and status
โโโโ targetMatrix (matrix) : matrix containing targets
โโโโ index (int) : current index
โโโโ pIndex (int) : pattern index
โโโโ status (int) : current status
โโโโ maxStatus (int) : max status reached
โโโโ targetValue (float) : current target value
โโโโ stopValue (float) : current stop value
โโโโ dir (int) : direction
โโโโ breakevenOnTarget1 (simple bool) : flag to breakeven upon target1
โโReturns: new status and maxStatus values
draw_targets(longTargets, shortTargets, index, labelColor, patternName, positionIndex, longMaxStatus, longStatus, shortMaxStatus, shortStatus, tempBoxes, tempLines, tempLabels)
โโDraw targets on chart
โโParameters:
โโโโ longTargets (matrix) : matrix containing long targets
โโโโ shortTargets (matrix) : matrix containing short targets
โโโโ index (int) : current index
โโโโ labelColor (color) : color of lines and labels
โโโโ patternName (string) : Pattern name
โโโโ positionIndex (int) : position on the chart
โโโโ longMaxStatus (int) : max status for long
โโโโ longStatus (int) : long status value
โโโโ shortMaxStatus (int) : max status for short
โโโโ shortStatus (int) : short status value
โโโโ tempBoxes (box ) : temporary box array
โโโโ tempLines (line ) : temporary lines array
โโโโ tempLabels (label ) : temporary labels array
โโReturns: void
populate_open_stats(patternIdArray, barMatrix, patternTypeAndStatusMatrix, patternColorArray, longTargets, shortTargets, patternRRMatrix, OpenStatPosition, lblSizeOpenTrades)
โโPopulate open stats table
โโParameters:
โโโโ patternIdArray (int ) : pattern Ids
โโโโ barMatrix (matrix) : matrix containing bars
โโโโ patternTypeAndStatusMatrix (matrix) : matrix containing pattern type and status
โโโโ patternColorArray (color ) : array containing current patter colors
โโโโ longTargets (matrix) : matrix of long targets
โโโโ shortTargets (matrix) : matrix of short targets
โโโโ patternRRMatrix (matrix) : pattern risk reward matrix
โโโโ OpenStatPosition (simple string) : table position
โโโโ lblSizeOpenTrades (simple string) : text size
โโReturns: void
draw_pattern_label(trendLines, patternFlagMatrix, patternTypeAndStatusMatrix, patternColorArray, patternFlags, patternLabelArray, zgColor, patternType, drawLabel, clearOldPatterns, safeRepaint, maxPatternsReference)
โโParameters:
โโโโ trendLines (line )
โโโโ patternFlagMatrix (matrix)
โโโโ patternTypeAndStatusMatrix (matrix)
โโโโ patternColorArray (color )
โโโโ patternFlags (bool )
โโโโ patternLabelArray (label )
โโโโ zgColor (color)
โโโโ patternType (int)
โโโโ drawLabel (simple bool)
โโโโ clearOldPatterns (simple bool)
โโโโ safeRepaint (simple bool)
โโโโ maxPatternsReference (simple int)
populate_closed_stats(patternTypeAndStatusMatrix, bullishCounts, bearishCounts, bullishRetouchCounts, bearishRetouchCounts, bullishSizeMatrix, bearishSizeMatrix, bullishRR, bearishRR, ClosedStatsPosition, lblSizeClosedTrades, showSelectivePatternStats, showPatternStats, showStatsInPercentage)
โโParameters:
โโโโ patternTypeAndStatusMatrix (matrix)
โโโโ bullishCounts (matrix)
โโโโ bearishCounts (matrix)
โโโโ bullishRetouchCounts (matrix)
โโโโ bearishRetouchCounts (matrix)
โโโโ bullishSizeMatrix (matrix)
โโโโ bearishSizeMatrix (matrix)
โโโโ bullishRR (matrix)
โโโโ bearishRR (matrix)
โโโโ ClosedStatsPosition (simple string)
โโโโ lblSizeClosedTrades (simple string)
โโโโ showSelectivePatternStats (simple bool)
โโโโ showPatternStats (simple bool)
โโโโ showStatsInPercentage (simple bool)