Median Proximity Percentile [AlgoAlpha]📊🚀 Introducing the "Median Proximity Percentile" by AlgoAlpha, a dynamic and sophisticated trading indicator designed to enhance your market analysis! This tool efficiently tracks median price proximity over a specified lookback period and finds it's percentile between 2 dynamic standard deviation bands, offering valuable insights for traders looking to make informed decisions.
🌟 Key Features:
Color-Coded Visuals: Easily interpret market trends with color-coded plots indicating bullish or bearish signals.
Flexibility: Customize the indicator with your preferred price source and lookback lengths to suit your trading strategy.
Advanced Alert System: Stay ahead with customizable alerts for key trend shifts and market conditions.
🔍 Deep Dive into the Code:
Choose your preferred price data source and define lookback lengths for median and EMA calculations. priceSource = input.source(close, "Source") and lookbackLength = input.int(21, minval = 1, title = "Lookback Length")
Calculate median value, price deviation, and normalized value to analyze market position relative to the median. medianValue = ta.median(priceSource, lookbackLength)
Determine upper and lower boundaries based on standard deviation and EMA. upperBoundary = ta.ema(positiveValues, lookbackLength) + ta.stdev(positiveValues, lookbackLength) * stdDevMultiplier
lowerBoundary = ta.ema(negativeValues, lookbackLength) - ta.stdev(negativeValues, lookbackLength) * stdDevMultiplier
Compute the percentile value to track market position within these boundaries. percentileValue = 100 * (normalizedValue - lowerBoundary)/(upperBoundary - lowerBoundary) - 50
Enhance your analysis with Hull Moving Average (HMA) for smoother trend identification. emaValue = ta.hma(percentileValue, emaLookbackLength)
Visualize trends with color-coded plots and characters for easy interpretation. plotColor = percentileValue > 0 ? colorUp : percentileValue < 0 ? colorDown : na
Set up advanced alerts to stay informed about significant market movements. // Alerts
alertcondition(ta.crossover(emaValue, 0), "Bullish Trend Shift", "Median Proximity Percentile Crossover Zero Line")
alertcondition(ta.crossunder(emaValue, 0), "Bearish Trend Shift", "Median Proximity Percentile Crossunder Zero Line")
alertcondition(ta.crossunder(emaValue,emaValue ) and emaValue > 90, "Bearish Reversal", "Median Proximity Percentile Bearish Reversal")
alertcondition(ta.crossunder(emaValue ,emaValue) and emaValue < -90, "Bullish Reversal", "Median Proximity Percentile Bullish Reversal")
🚨 Remember, the "Median Proximity Percentile " is a tool to aid your analysis. It’s essential to combine it with other analysis techniques and market understanding for best results. Happy trading! 📈📉
Chart
Momentum Bias Index [AlgoAlpha]Description:
The Momentum Bias Index by AlgoAlpha is designed to provide traders with a powerful tool for assessing market momentum bias. The indicator calculates the positive and negative bias of momentum to gauge which one is greater to determine the trend.
Key Features:
Comprehensive Momentum Analysis: The script aims to detect momentum-trend bias, typically when in an uptrend, the momentum oscillator will oscillate around the zero line but will have stronger positive values than negative values, similarly for a downtrend the momentum will have stronger negative values. This script aims to quantify this phenomenon.
Overlay Mode: Traders can choose to overlay the indicator on the price chart for a clear visual representation of market momentum.
Take-profit Signals: The indicator includes signals to lock in profits, they appear as labels in overlay mode and as crosses when overlay mode is off.
Impulse Boundary: The script includes an impulse boundary, the impulse boundary is a threshold to visualize significant spikes in momentum.
Standard Deviation Multiplier: Users can adjust the standard deviation multiplier to increase the noise tolerance of the impulse boundary.
Bias Length Control: Traders can customize the length for evaluating bias, enabling them to fine-tune the indicator according to their trading preferences. A higher length will give a longer-term bias in trend.
Volume Exhaustion [AlgoAlpha]Introducing the Volume Exhaustion by AlgoAlpha, is an innovative tool that aims to identify potential exhaustion or peaks in trading volume , which can be a key indicator for reversals or continuations in market trends 🔶.
Key Features:
Signal Plotting : A special feature is the plotting of 'Release' signals, marked by orange diamonds, indicating points where the exhaustion index crosses under its previous value and is above a certain boundary. This could signify critical market points 🚨.
Calculation Length Customization : Users can adjust the calculation and Signal lengths to suit their trading style, allowing for flexibility in analysis over different time periods. ☝️
len = input(50, "Calculation Length")
len2 = input(8, "Signal Length")
Visual Appeal : The script offers customizable colors (col for the indicator and col1 for the background) enhancing the visual clarity and user experience 💡.
col = input.color(color.white, "Indicator Color")
col1 = input.color(color.gray, "Background Color")
Advanced Volume Processing : At its core, the script utilizes a combination of Hull Moving Average (HMA) and Exponential Moving Average (EMA) applied to the volume data. This sophisticated approach helps in smoothing out the volume data and reducing lag.
sv = ta.hma(volume, len)
ssv = ta.hma(sv, len)
Volume Exhaustion Detection : The script calculates the difference between the volume and its smoothed version, normalizing this value to create an exhaustion index (fff). Positive values of this index suggest potential volume exhaustion.
f = sv-ssv
ff = (f) / (ta.ema(ta.highest(f, len) - ta.lowest(f, len), len)) * 100
fff = ff > 0 ? ff : 0
Boundary and Zero Line : The script includes a boundary line (boundary) and a zero line (zero), with the area between them filled for enhanced visual interpretation. This helps in assessing the relative position of the exhaustion index.
Customizable Background : The script colors the background of the chart for better readability and to distinguish the indicator’s area clearly.
Overall, Volume Exhaustion is designed for traders who focus on volume analysis. It provides a unique perspective on volume trends and potential exhaustion points, which can be crucial for making informed trading decisions. This script is a valuable addition for traders looking to enhance their trading experience with advanced volume analysis tools.
Squeeze & Release [AlgoAlpha]Introduction:
💡The Squeeze & Release by AlgoAlpha is an innovative tool designed to capture price volatility dynamics using a combination of EMA-based calculations and ATR principles. This script aims to provide traders with clear visual cues to spot potential market squeezes and release scenarios. Hence it is important to note that this indicator shows information on volatility, not direction.
Core Logic and Components:
🔶EMA Calculations: The script utilizes the Exponential Moving Average (EMA) in multiple ways to smooth out the data and provide indicator direction. There are specific lengths for the EMAs that users can modify as per their preference.
🔶ATR Dynamics: Average True Range (ATR) is a core component of the script. The differential between the smoothed ATR and its EMA is used to plot the main line. This differential, when represented as a percentage of the high-low range, provides insights into volatility.
🔶Squeeze and Release Detection: The script identifies and highlights squeeze and release scenarios based on the crossover and cross-under events between our main line and its smoothed version. Squeezes are potential setups where the market may be consolidating, and releases indicate a potential breakout or breakdown.
🔶Hyper Squeeze Detection: A unique feature that detects instances when the main line is rising consistently over a user-defined period. Hyper squeeze marks areas of extremely low volatility.
Visual Components:
The main line (ATR-based) changes color depending on its position relative to its EMA.
A middle line plotted at zero level which provides a quick visual cue about the main line's position. If the main line is above the zero level, it indicates that the price is squeezing on a longer time horizon, even if the indicator indicates a shorter-term release.
"𝓢" and "𝓡" characters are plotted to represent 'Squeeze' and 'Release' scenarios respectively.
Standard Deviation Bands are plotted to help users gauge the extremity and significance of the signal from the indicator, if the indicator is closer to either the upper or lower deviation bands, this means that statistically, the current value is considered to be more extreme and as it is further away from the mean where the indicator is oscillating at for the majority of the time. Thus indicating that the price has experienced an unusual amount or squeeze or release depending on the value of the indicator.
Usage Guidelines:
☝️Traders can use the script to:
Identify potential consolidation (squeeze) zones.
Gauge potential breakout or breakdown scenarios (release).
Fine-tune their entries and exits based on volatility.
Adjust the various lengths provided in the input for better customization based on individual trading styles and the asset being traded.
Liquidity Weighted Moving Averages [AlgoAlpha]Description:
The Liquidity Weighted Moving Averages by AlgoAlpha is a unique approach to identifying underlying trends in the market by looking at candle bars with the highest level of liquidity. This script offers a modified version of the classical MA crossover indicator that aims to be less noisy by using liquidity to determine the true fair value of price and where it should place more emphasis on when calculating the average.
Rationale:
It is common knowledge that liquidity makes it harder for market participants to move the price of assets, using this logic, we can determine the coincident liquidity of each bar by looking at the volume divided by the distance between the opening and closing price of that bar. If there is a higher volume but the opening and closing prices are near each other, this means that there was a high level of liquidity in that bar. We then use standard deviations to filter out high spikes of liquidity and record the closing prices on those bars. An average is then applied to these recorded prices only instead of taking the average of every single bar to avoid including outliers in the data processing.
Key features:
Customizable:
Fast Length - the period of the fast-moving average
Slow Length - the period of the slow-moving average
Outlier Threshold Length - the period of the outlier processing algorithm to detect spikes in liquidity
Significant Noise reduction from outliers:
Amazing Oscillator (AO) [Algoalpha]Description:
Introducing the Amazing Oscillator indicator by Algoalpha, a versatile tool designed to help traders identify potential trend shifts and market turning points. This indicator combines the power of the Awesome Oscillator (AO) and the Relative Strength Index (RSI) to create a new indicator that provides valuable insights into market momentum and potential trade opportunities.
Key Features:
Customizable Parameters: The indicator allows you to customize the period of the RSI calculations to fine-tune the indicator's responsiveness.
Visual Clarity: The indicator uses user-defined colors to visually represent upward and downward movements. You can select your preferred colors for both bullish and bearish signals, making it easy to spot potential trade setups.
AO and RSI Integration: The script combines the AO and RSI indicators to provide a comprehensive view of market conditions. The RSI is applied to the AO, which results in a standardized as well as a less noisy version of the Awesome Oscillator. This makes the indicator capable of pointing out overbought or oversold conditions as well as giving fewer false signals
Signal Plots: The indicator plots key levels on the chart, including the RSI threshold(Shifted down by 50) at 30 and -30. These levels are often used by traders to identify potential trend reversal points.
Signal Alerts: For added convenience, the indicator includes "x" markers to signal potential buy (green "x") and sell (red "x") opportunities based on RSI crossovers with the -30 and 30 levels. These alerts can help traders quickly identify potential entry and exit points.
Trend Flow Profile [AlgoAlpha]Description:
The "Trend Flow Profile" indicator is a powerful tool designed to analyze and interpret the underlying trends and reversals in a financial market. It combines the concepts of Order Flow and Rate of Change (ROC) to provide valuable insights into market dynamics, momentum, and potential trade opportunities. By integrating these two components, the indicator offers a comprehensive view of market sentiment and price movements, facilitating informed trading decisions.
Rationale:
The combination of Order Flow and ROC in the "Trend Flow Profile" indicator stems from the recognition that both factors play critical roles in understanding market behavior. Order Flow represents the net buying or selling pressure in the market, while ROC measures the rate at which prices change. By merging these elements, the indicator captures the interplay between market participants' actions and the momentum of price movements, enabling traders to identify trends, spot reversals, and gauge the strength of price acceleration or deceleration.
Calculation:
The Order Flow component is computed by summing the volume when prices move up and subtracting the volume when prices move down. This cumulative measure reflects the overall order imbalance in the market, providing insights into the dominant buying or selling pressure.
The ROC component calculates the percentage change in price over a given period. It compares the current price to a previous price and expresses the change as a percentage. This measurement indicates the velocity and direction of price movement, allowing traders to assess the market's momentum.
How to Use It?
The "Trend Flow Profile" indicator offers valuable information to traders for making informed trading decisions. It enables the identification of underlying trends and potential reversals, providing a comprehensive view of market sentiment and momentum. Here are some key ways to utilize the indicator:
Spotting Trends: The indicator helps identify the prevailing market trend, whether bullish or bearish. A consistent positive (green) histogram indicates a strong uptrend, while a consistent negative (red) histogram suggests a robust downtrend.
Reversal Signals: Reversal patterns can be identified when the histogram changes color, transitioning from positive to negative (or vice versa). These reversals can signify potential turning points in the market, highlighting opportunities for counter-trend trades.
Momentum Assessment: By observing the width and intensity of the histogram, traders can assess the acceleration or deceleration of price momentum. A wider histogram suggests strong momentum, while a narrower histogram indicates a potential slowdown.
Utility:
The "Trend Flow Profile" indicator serves as a valuable tool for traders, providing several benefits. Traders can easily identify the prevailing market trend, enabling them to align their trading strategies with the dominant direction of the market. The indicator also helps spot potential reversals, allowing traders to anticipate market turning points and capture counter-trend opportunities. Additionally, the green and red histogram colors provide visual cues to determine the optimal duration of a long or short position. Following the green histogram signals when in a long position and the red histogram signals when in a short position can assist traders in managing their trades effectively. Moreover, the width and intensity of the histogram offer insights into the acceleration or deceleration of momentum. Traders can gauge the strength of price movements and adjust their trading strategies accordingly. By leveraging the "Trend Flow Profile" indicator, traders gain a comprehensive understanding of market dynamics, which enhances their decision-making and improves their overall trading outcomes.
Bollinger Bands Percentile + Stdev Channels (BBPct) [AlgoAlpha]Description:
The "Bollinger Bands Percentile (BBPct) + STD Channels" mean reversion indicator, developed by AlgoApha, is a technical analysis tool designed to analyze price positions using Bollinger Bands and Standard Deviation Channels (STDC). The combination of these two indicators reinforces a stronger reversal signal. BBPct calculates the percentile rank of the price's standard deviation relative to a specified lookback period. Standard deviation channels operate by utilizing a moving average as the central line, with upper and lower lines equidistant from the average based on the market's volatility, helping to identify potential price boundaries and deviations.
How it Works:
The BBPct indicator utilizes Bollinger Bands, which consist of a moving average (basis) and upper and lower bands based on a specified standard deviation multiplier. By default, it uses a 20-period moving average and a standard deviation multiplier of 2. The upper band is calculated by adding the basis to the standard deviation multiplied by the multiplier, while the lower band is calculated by subtracting the same value. The BBPct indicator calculates the position of the current price between the lower and upper Bollinger Bands as a percentile value. It determines this position by comparing the price's distance from the lower band to the overall range between the upper and lower bands. A value of 0 indicates that the price is at the lower band, while a value of 100 indicates that the price is at the upper band. The indicator also includes an optional Bollinger Band standard deviation percentage (%Stdev) histogram, representing the deviation of the current price from the moving average as a percentage of the price itself.
Standard deviation channels, also known as volatility channels, aid in identifying potential buying and selling opportunities while minimizing unfavorable trades. These channels are constructed by two lines that run parallel to a moving average. The separation between these lines is determined by the market's volatility, represented by standard deviation. By designating upper and lower channel lines, the channels demarcate the borders between typical and atypical price movements. Consequently, when the market's price falls below the lower channel line, it suggests undervaluation, whereas prices surpassing the upper channel line indicate overvaluation.
Signals
The chart displays potential reversal points through the use of red and green arrows. A red arrow indicates a potential bearish retracement, signaling a possible downward movement, while a green arrow represents a potential pullback to the positive, suggesting a potential upward movement. These signals are generated only when both the BBPct (Bollinger Bands Percentage) and the STDC (Standard Deviation Channel) indicators align with bullish or bearish conditions. Consequently, traders might consider opening long positions when the green arrow appears and short positions when the red arrow is plotted.
Usage:
This indicator can be utilized by traders and investors to effectively identify pullbacks, reversals, and mean regression, thereby enhancing their trading opportunities. Notably, extreme values of the BBPct, such as below -5 or above 105, indicate oversold or overbought conditions, respectively. Moreover, the presence of extreme STDC zones occurs when prices fall below the lower channel line or cross above the upper channel line. Traders can leverage this information as a mean reversion tool by identifying instances of peak overbought and oversold values. These distinctive characteristics facilitate the identification of potential entry and exit points, thus augmenting trading decisions and enhancing market analysis.
The indicator's parameters, such as the length of the moving average, the data source, and the standard deviation multiplier, can be customized to align with individual trading strategies and preferences.
Originality:
The BBPct + STDC indicator, developed by AlgoAlpha, is an original implementation that combines the calculation of Bollinger Bands, percentile ranking, the %Stdev histogram and the STDC. While it shares some similarities with the Bollinger Bands %B indicator, the BBPct indicator introduces additional elements and customization options tailored to AlgoAlpha's methodology. The script is released under the Mozilla Public License 2.0, granting users the freedom to utilize and modify it while adhering to the license terms.
Peak & Valley Levels [AlgoAlpha]The Peak & Valley Levels indicator is a sophisticated script designed to pinpoint key support and resistance levels in the market. By utilizing candle length and direction, it accurately identifies potential reversal points, offering traders valuable insights for their strategies.
Core Components:
Peak and Valley Detection: The script recognizes peaks and valleys in price action. Peaks (potential resistance levels) are identified when a candle is longer than the previous one, changes direction, and closes lower, especially on lower volume. Valleys (potential support levels) are detected under similar conditions but with the candle closing higher.
Color-Coded Visualization:
Red lines mark resistance levels, signifying peaks in the price action.
Green lines indicate support levels, representing valleys.
Dynamic Level Adjustment: The script adapts these levels based on ongoing market movements, enhancing their relevance and accuracy.
Rejection Functions:
Bullish Rejection: Determines if a candlestick pattern rejects a level as potential support.
Bearish Rejection: Identifies if a pattern rejects a level as possible resistance.
Usage and Strategy Integration:
Visual Aid for Support and Resistance: The indicator is invaluable for visualizing key market levels where price reversals may occur.
Entry and Exit Points: Traders can use the identified support and resistance levels to fine-tune entry and exit points in their trading strategies.
Trend Reversal Signals: The detection of peaks and valleys serves as an early indicator of potential trend reversals.
Application in Trading:
Versatile for Various Trading Styles: This indicator can be applied across different trading styles, including swing trading, scalping, or trend-following approaches.
Complementary Tool: For best results, it should be used alongside other technical analysis tools to confirm trading signals and strategies.
Customization and Adaptability: Traders are encouraged to experiment with different settings and timeframes to tailor the indicator to their specific trading needs and market conditions.
In summary, the Peak & Valley Levels by AlgoAlpha is a dynamic and adaptable tool that enhances a trader’s ability to identify crucial market levels. Its integration of candlestick analysis with dynamic level adjustment offers a robust method for spotting potential reversal points, making it a valuable addition to any trader's toolkit.
Limited Growth Stock-to-Flow (LGS2F) [AlgoAlpha]Description:
The "∂ Limited Growth Stock-to-Flow (LG-S2F)" indicator, developed by AlgoAlpha, is a technical analysis tool designed to analyze the price of Bitcoin (BTC) based on the Stock-to-Flow model. The indicator calculates the expected price range of BTC by incorporating variables such as BTC supply, block height, and model parameters. It also includes error bands to indicate potential overbought and oversold conditions.
How it Works:
The LG-S2F indicator utilizes the Stock-to-Flow model, which measures the scarcity of an asset by comparing its circulating supply (stock) to its newly produced supply (flow). In this script, the BTC supply and block height data are obtained to calculate the price using the model formula. The formula includes coefficients (a, b, c) and exponentiation functions to derive the expected price.
The script incorporates error bands based on uncertainty values derived from the standard errors of the model parameters. These error bands indicate the potential range of variation in the expected price, accounting for uncertainties in the model's parameters. The upper and lower error bands visualize potential overbought and oversold conditions, respectively.
Usage:
Traders can utilize the LG-S2F indicator to gain insights into the potential price movements of Bitcoin. The indicator's main line represents the expected price, while the error bands highlight the potential range of variation. Traders may consider taking long positions when the price is near or below the lower error band and short positions when the price is close to or above the upper error band.
It's important to note that the LG-S2F indicator is specifically designed for Bitcoin and relies on the Stock-to-Flow model. Users should exercise caution and consider additional analysis and factors before making trading decisions solely based on this indicator.
Originality:
The LG-S2F indicator, developed by QuantMario and AlgoAlpha, is an original implementation that combines the Stock-to-Flow model with error bands to provide a comprehensive view of BTC's potential price range. While the concept of Stock-to-Flow analysis exists, the specific calculations, incorporation of error bands, and customization options in this script are unique to QuantMario's methodology. The script is released under Mozilla Public License 2.0, allowing users to utilize and modify it while adhering to the license terms.
Lower timeframe chartHi all!
I've made this script to help with my laziness (and to help me (and now you) with efficiency). It's purpose is to, without having to change the chart timeframe, being able to view the lower timeframe bars (and trend) within the last chart bar. The defaults are just my settings (It's based on daily bars), so feel free to change them and maybe share yours! It's also based on stocks, which have limited trading hours, but if you want to view this for forex trading I suggest changing the 'lower time frame' to a higher value since it has more trading hours.
The script prints a label chart (ASCII) based on your chosen timeframe and the trend, based on @KivancOzbilgic script SuperTrend The printed ASCII chart has rows (slots) that are based on ATR (14 bars) and empty gaps are removed. The current trend is decided by a percentage of bars (user defined but defaults to 80%, which is really big but let's you be very conservative in defining a trend to be bullish. Set to 50% to have the trend being decided equally or lower to be more conservative in defining a trend to be bearish) that must have a bullish SuperTrend, it's considered to be bearish otherwise. Big price range (based on the ATR for 14 bars) and big volume (true if the volume is bigger than a user defined simple moving average (defaults to 20 bars)) can be disabled for faster execution.
The chart displayed will consist of bars and thicker bars that has a higher volume than the defined simple moving average. The bars that has a 'big range' (user defined value of ATR (14 days) factor that defaults to 0.5) will also have a wick. The characters used are the following:
Green bar = ┼
Green bar with large volume = ╪
Green bar wick = │
Red bar = ╋
Red bar with large volume = ╬
Red bar wick = ┃
Bar with no range = ─
Bar with no range and high volume = ═
Best of trading!
Fair Value Gap ChartThe Fair Value Gap chart is a new charting method that displays fair value gap imbalances as Japanese candlesticks, allowing traders to quickly see the evolution of historical market imbalances.
The script is additionally able to compute an exponential moving average using the imbalances as input.
🔶 USAGE
The Fair Value Gap chart allows us to quickly display historical fair value gap imbalances. This also allows for filtering out potential noisy variations, showing more compact trends.
Most like other charting methods, we can draw trendlines/patterns from the displayed results, this can be helpful to potentially predict future imbalances locations.
Users can display an exponential moving average computed from the detected fvg's imbalances. Imbalances above the ema can be indicative of an uptrend, while imbalances under the ema are indicative of a downtrend.
Note that due to pinescript limitations a maximum of 500 lines can be displayed, as such displaying the EMA prevent candle wicks from being displayed.
🔶 DETAILS
🔹 Candle Structure
The Fair Value Gap Chart is constructed by keeping a record of all detected fair value gaps on the chart. Each fvg is displayed as a candlestick, with the imbalance range representing the body of the candle, and the range of the imbalance interval being used for the wicks.
🔹 EMA Source Input
The exponential moving average uses the imbalance range to get its input source, the extremity of the range used depends on whether the fvg is bullish or bearish.
When the fvg is bullish, the maximum of the imbalance range is used as ema input, else the minimum of the fvg imbalance is used.
Open Interest Chart [LuxAlgo]The Open Interest Chart displays Commitments of Traders %change of futures open interest , with a unique circular plotting technique, inspired from this publication Periodic Ellipses .
🔶 USAGE
Open interest represents the total number of contracts that have been entered by market participants but have not yet been offset or delivered. This can be a direct indicator of market activity/liquidity, with higher open interest indicating a more active market.
Increasing open interest is highlighted in green on the circular plot, indicating money coming into the market, while decreasing open interests highlighted in red indicates money coming out of the market.
You can set up to 6 different Futures Open interest tickers for a quick follow up:
🔶 DETAILS
Circles are drawn, using plot() , with the functions createOuterCircle() (for the largest circle) and createInnerCircle() (for inner circles).
Following snippet will reload the chart, so the circles will remain at the right side of the chart:
if ta.change(chart.left_visible_bar_time ) or
ta.change(chart.right_visible_bar_time)
n := bar_index
Here is a snippet which will draw a 39-bars wide circle that will keep updating its position to the right.
//@version=5
indicator("")
n = bar_index
barsTillEnd = last_bar_index - n
if ta.change(chart.left_visible_bar_time ) or
ta.change(chart.right_visible_bar_time)
n := bar_index
createOuterCircle(radius) =>
var int end = na
var int start = na
var basis = 0.
barsFromNearestEdgeCircle = 0.
barsTillEndFromCircleStart = radius
startCylce = barsTillEnd % barsTillEndFromCircleStart == 0 // start circle
bars = ta.barssince(startCylce)
barsFromNearestEdgeCircle := barsTillEndFromCircleStart -1
basis := math.min(startCylce ? -1 : basis + 1 / barsFromNearestEdgeCircle * 2, 1) // 0 -> 1
shape = math.sqrt(1 - basis * basis)
rad = radius / 2
isOK = barsTillEnd <= barsTillEndFromCircleStart and barsTillEnd > 0
hi = isOK ? (rad + shape * radius) - rad : na
lo = isOK ? (rad - shape * radius) - rad : na
start := barsTillEnd == barsTillEndFromCircleStart ? n -1 : start
end := barsTillEnd == 0 ? start + radius : end
= createOuterCircle(40)
plot(h), plot(l)
🔶 LIMITATIONS
Due to the inability to draw between bars, from time to time, drawings can be slightly off.
Bar-replay can be demanding, since it has to reload on every bar progression. We don't recommend using this script on bar-replay. If you do, please choose the lowest speed and from time to time pause bar-replay for a second. You'll see the script gets reloaded.
🔶 SETTINGS
🔹 TICKERS
Toggle :
• Enabled -> uses the first column with a pre-filled list of Futures Open Interest tickers/symbols
• Disabled -> uses the empty field where you can enter your own ticker/symbol
Pre-filled list : the first column is filled with a list, so you can choose your open interest easily, otherwise you would see COT:088691_F_OI aka Gold Futures Open Interest for example.
If applicable, you will see 3 different COT data:
• COT: Legacy Commitments of Traders report data
• COT2: Disaggregated Commitments of Traders report data
• COT3: Traders in Financial Futures report data
Empty field : When needed, you can pick another ticker/symbol in the empty field at the right and disable the toggle.
Timeframe : Commitments of Traders (COT) data is tallied by the Commodity Futures Trading Commission (CFTC) and is published weekly. Therefore data won't change every day.
Default set TF is Daily
🔹 STYLE
From middle:
• Enabled (default): Drawings start from the middle circle -> towards outer circle is + %change , towards middle of the circle is - %change
• Disabled: Drawings start from the middle POINT of the circle, towards outer circle is + OR -
-> in both options, + %change will be coloured green , - %change will be coloured red .
-> 0 %change will be coloured blue , and when no data is available, this will be coloured gray .
Size circle : options tiny, small, normal, large, huge.
Angle : Only applicable if "From middle" is disabled!
-> sets the angle of the spike:
Show Ticker : Name of ticker, as seen in table, will be added to labels.
Text - fill
• Sets colour for +/- %change
Table
• Sets 2 text colours, size and position
Circles
• Sets the colour of circles, style can be changed in the Style section.
You can make it as crazy as you want:
EquiVolume [LuxAlgo]EquiVolume is a charting method that aims to incorporate volume information to a candlestick chart. Volume is highlighted through the candle body width, with wider candles suggesting more significant volume.
Our script shows an EquiVolume chart for the visible chart range. Additionally regular volume can be plotted as a column plot with the column's width controlled by volume.
🔶 SETTINGS
🔹 Options
Chart: Shows candles with volume adjusted width.
Volume: Shows volume with volume adjusted width.
🔹 Intrabar Analysis
Enable/disable: When LTF is enabled, the script will calculate the % volume/candles in the same direction than current timeframe.
You can choose a LTF between 1 and 240 minutes.
Type %:
- Volume: sum of volume of all LTF candles, which are in the same direction.
- #bars: sum of all LTF candles, which are in the same direction.
🔹 Width Boxes (bars)
Minimum width: sets the minimum width of a box (candle/volume)
Maximum width: sets the maximum width of a box (candle/volume)
🔶 USAGE
This charting method makes it easier to spot large volume candles, against comparing candles to volume.
Another example:
Additionally, users can make the script perform an intrabar analysis on the chart candles, allowing to highlight bullish/bearish activity within a candle. The script can estimate bullish/bearish trading activity within a candle or simply use intrabar candle signs.
Example
- 15-minute candle is green
- 10 1-minute candles (LTF) IN that 15-minute candle are green -> 10/15 = 66,667%
-> The current 15-minute candle will be 66,667% filled with green color.
Note that the script will draw everything from last visible bar at the right to left, as such you can scroll backwards, and the script will show you the data of the visible chart.
Scrolling back will return the following result:
🔶 REMARKS
When the LTF is too far apart from current timeframe, you should get an error. To prevent this, the LTF will automatically rise, giving no error.
When this happens, the adjusted LTF will be displayed. Do note, due to a maximum available LTF data, sometimes boxes won't always be visible (since there is no LTF data anymore)
To solve this, just elevate your LTF:
When the set LTF is higher than current TF, you would normally get an error as well.
This script will automatically adjust the LTF to current TF, together with a visible warning (no error though).
Due to the inability to draw a line in the space between bars, sometimes a wick won't be placed exactly in the middle.
Chart Time and Price Range It is easy to loose track of time and price volatility when the chart automatically scales to the bars on the chart. This helps you keep track.
This is a very simple indicator that is designed to ensure that you're looking at a segment of the chart that is relevant to the trade you're considering in both price distance and time.
The Problem:
When looking at a chart the lowest price is at the bottom of the screen, the highest price is at the top. The time at the beginning of the chart is based on how many bars and what timeframe you're looking at.
But is the price difference between the two wide or narrow? Are you seeing minutes, hours, or days of price action?
You can get the measure tool out, but you'll change the zoom level and now its different. You change the timeframe and its different.
This Solution:
This indicator puts a table on the screen that will tell you the X/Y distance of everything that is on your chart. If your hold period is 5 minutes, why would you be looking at 3 days of price action to find s/r or make a decision on a trade?
This will show you how much price opportunity was available in the amount of time you are currently viewing. Using the PineCoders VisibleChart library, we're retrieving the time and bar_index of the beginning of the chart so that everything that is currently on the chart is measured and it adapts as that changes.
It will work with light and dark themes (you can change the colors) and can be positioned wherever you prefer to see the information.
Disclaimer: This was a quick release script. I wrote it and published the same day. There could be bugs, so send me a message or add a comment to report anything that isn't behaving correctly.
Tick based chart [DotH]Version 1.0 - 2nd January 2023
Hi All,
This is my first published indicator, although I have written several hundreds for private use.
Description
Tick based chart
I got intrigued while reading about tick based charts on this page (please note this link/website owner is not affiliated with me) , so I decided to see if it would be possible to recreate this type of chart in TradingView, and here's the results.
This is an implementation for displaying a tick based chart in Trading View. There are benefits to using ticks based candles, as each candle represents the same number of "price moves" rather than an unknown number of moves.
Tick based charts are charts with candles that are rendered in the same way as traditional candles. However, instead of rendering a new candle at a specific time period,tick based candles are rendered after a set number of ticks have occured. For example, in a 50 tick chart, each candle that you see represents exactly 50 ticks, i.e. 50 price changes/moves. Having a view of what happens on the tick level, may help some traders evaluate what is happening within very large candles, or even detect a change in trend, volatility or some other metric which otherwise may not be visible using a standard chart.
Please note that this indicator DOES NOT match/synchronize timewise with the main chart in TradingView. You must view it independently. If you need to see what times are represented in the tick chart, you can look at the custom time labels and X-Axis grid lines in it to get an idea what parts of the tick based chart correspond to the main chart.
Limitations/known issues:
Currently the indicator has been restricted to 100 candles. This is for limiting the line and box usage to a max of 300 objects.
On timeframes above 1 minute, the seconds values will always be 0. In order to be able to see seconds values in the chart scale you need to be on a second level chart, which requires a premium TradingView subscription.
Changing the parameters in the settings will cause the chart to empty and start redrawing from its first candle again. This is because the tick chart is being drawn from realtime data, unlike the standard TradingView charts.
TODOs & Bugs:
Add some moving average indicators (SMA, EMA as a minimum)
Add a corresponding tick based volume chart
Create RSI, MACD, BB variations of this indicator
If you have any ideas/suggestions or bug reports, please feel free to let me know, however keep in mind that I do not have too much spare time to add things, so updates are going to be sporadic.
ABOUT CODE REUSE:
The code is free to use/change. However, if you plan to use this code to make a derivative indicator or strategy, it would be nice to know, so let me know if you feel like it!
Portfolio Chart by fonotoFeatures:
If you are looking for a chart that can project your portfolio value as a whole over time instead of individual stocks, this can be it. This is an indicator overlaid on the main chart of your index/stock selection allowing you to compare your portfolio performance against the main index/stock visually in chart form.
UI:
The settings has UI to input your portfolio stocks and quantities. The setting also has a divide factor which you can set to divide the portfolio value by this value so Y-Axis is offset to show main index/stock chart and your portfolio chart relatively closer. Portfolio chart works on any chosen timeframe. Colors can be customized in the UI.
Limitations:
1. Number of portfolio stocks is limited to 10.
2. Chart Type is limited to Candle.
3. Exponential Moving Averages are limited to 21, 50, 100, 200 & 500.
Volume ChartVolume data can be interpreted in many different ways. This is a very basic script and novel idea to display volume as a chart. The purpose of this script is to visually help identify volume breakouts and other common chart patterns. While this indicator could be useful for finding big moves and early reversals it not reliable for determining the direction of the move.
Below is an example of a volume breakout:
Below is confirmation of the second ear in the batman pattern:
Lower highs and higher lows can give early signs of a reversal:
Below we can see retailers getting pumped and dumped on during the gaps while they sleep:
OHLC-TablesENGLISH VERSION
The command shows the opening-high-low-closing-change values of that day based on the previous value in each period.
You can set the clock in any time zone you want.
You can use the indicator by adapting it wherever you want on your screen. You can adjust its position. Top-Left-Middle Left- Bottom Left/ Top Right-Middle Right- Bottom Right.
Although it is not a command with a Buy-Sell indicator, its user-friendliness and convenience were taken into account while developing it.
The purpose of the indicator is to allow you to consider the values while focusing not only on the chart you are watching.
SuperTrend Entry(My goal creating this indicator) : Provide a way to enter the market systematically, automatically create Stop Loss Levels and Take Profit Levels, and provide the position size of each entry based on a fix Percentage of the traders account.
The Underlying Concept :
What is Momentum?
The Momentum shown is derived from a Mathematical Formula, SUPERTREND. When price closes above Supertrend Its bullish Momentum when its below Supertrend its Bearish Momentum. This indicator scans for candle closes on the current chart and when there is a shift in momentum (price closes below or above SUPERTREND) it notifies the trader with a Bar Color change.
Technical Inputs
- If you want to optimize the rate of signals to better fit your trading plan you would change the Factor input and ATR Length input. Increase factor and ATR Length to decrease the frequency of signals and decrease the Factor and ATR Length to increase the frequency of signals.
Quick TIP! : You can Sync all VFX SuperTrend Indicators together! All VFX SuperTrend indicators display unique information but its all derived from that same Momentum Formula. Keep the Factor input and ATR Length the same on other VFX SuperTrend indicators to have them operating on the same data.
Display Inputs
- The indicator has a candle overlay option you can toggle ON or OFF. If toggled ON the candles color will represent the momentum of your current chart ( bullish or bearish Momentum)
your able to change the colors that represent bullish or bearish to your preference
- You can toggle on which shows the exact candle momentum switched sides
your able to change the colors that represent a bullish switch or bearish switch to your preference
- The trader can specify which point you would like your stop loss to reference. (Low and High) Which uses the Low of the Momentum signal as the reference for your Stop Loss during buy signals and the High as the reference during sell signals. Or (Lowest Close and Highest Close) which uses the Lowest Close of the Momentum signal as the reference for your Stop Loss during buys and the Highest Close as the reference during sells.
- The colors that represent your Stop Loses and Take Profits can also be changed
Risk Management Inputs
- Your Risk MANAGMENT section is used to set up how your Stop Loss and Take Profit are calculated
- You have the option to take in account Volatility when calculating your Stop Loss. A adjusted ATR formula is used to achieve this. Increase Stop Loss Multiplier from 0 to widen stops.
- Increase Take Profit Multiplier from 0 to access visual Take Profit Levels based on your Stop Loss. This will be important for traders that Prefer trading using risk rewards. For Example: If the the Take Profit Multiplier is 3 a Take Profit level 3 times the size or your stop loss from your entry will be shown and a price number corresponding to that Take Profit Level becomes available.
- Enter your current Account size, Bet Percentage and Fixed Spread to get your Position Size for each trade
-Toggle on the Current Trade Chart and easily get the size of your Position and the exact price of your Take Profit and Stop Loss.
You can increase the Size of the Current Trade Chart= Tiny, Small, Normal, Large, Huge and change the Position of the Current
trade Chart to your preference, (Top- Right, Center, Left) (Middle- Right, Center, Left) (Bottom- Right, Center, Left).
How it can be used ?
- Enter Trades and always know where your stop is going to be
- Eliminate the need to manual calculate Position Size
- Get a consistent view of the current charts momentum
- Systematical enter trades
- Reduce information overload
Line Chart with circles on sub chart / LineChart no CandlesLine Chart with circles as a subchart. The circle will appear only after the candle has been confirmed.
Things you can change:
- Source: open, high, low, close, hl2, hlc3, ohlc4, hlcc4
- Color: change the color of the line and the circles
have fun with it!