EMA Buy/Sell Alerts with ATR-based TP/SLI wanted to fill a void in the Tradingview FREE indicators. I have searched far and wide on a moving average alert with ATR based take profits and stop loss. I have attempted a rudimentary version of what I hope to improve upon in the future. Will try and add different moving average options such as simple, hull, RMA, JMA, SSL, WMA, etc. For now, a basic EMA with 3 TP and a SL based on the current ATR should suffice.
I grow tired of the ATR take profits being hidden behind a paywall. Please use the script and add to your favorite indicators as you please.
Please leave feedback for future development.
Volatility
Adaptive Moving Average with ATR bandsThis is script is essentially "AMA" and was originally developed by Alex Everget , I just added half ATR as a band to AMA to reduce the false breakouts and
use it to confirm hidden divergence with it.
Crunchster's Real PriceThis is a simple transformation of any price series (best suited to daily timeframe) that filters out random price fluctuations and revealing the "real" price action. It allows comparison between different assets easily and is a useful confirmation of support and resistance levels, or can be used with other technical analysis.
In the default settings based on a daily chart, the daily returns are first calculated, then volatility normalised by dividing by the standard deviation of daily returns over the defined lookback period (14 periods by default).
These normalised returns are then added together over the entire price series period, to create a new "Real price" - the volatility adjusted price. This is the default presentation.
In addition, a second signal ("Normalised price series over rolling period") is available which, instead of summing the normalised returns over the entire price series, allows a user configurable, rolling lookback window over which the normalised returns are summed up. The default setting is 365 periods (ie 1 year on the daily timeframe for tickers with 24hr markets such as crypto. This can be set to 252 periods if analysing equities, which only trade 5 days per week, or any other user defined period of interest).
[EKIN] ATR Exit StrategyMy exit strategy to reduce risk via tracking price and ATR. Sets new STOP price based on how many ATR is current price above from the entry price.
I only check 5 and 20 EMAs for entry strategy. I intentionally used a simple entry strategy to further test the impact of this exit strategy.
First sets STOP at 1.5 ATR below the entry price.
If there is a 2 ATR increase, pulls STOP to the entry point to eliminate the possibility of loss.
If there is a 3 ATR increase, takes a 50% profit and moves STOP to 1 ATR above the entry price.
If there is a 4 ATR increase, moves STOP to 2 ATR above the entry price.
If there is a 5 ATR increase, moves STOP to 3 ATR above the entry price.
.
.
.
This is my first strategy attempt so I am open to any recommendations. I am planning to update this strategy overtime when I get better at pinescript and trading in general
Buyers & Sellers / RangeBuyers & Sellers / Range
Volatility oscillator that measures the relationship of Buying & Selling Pressure to True Range.
In other words, how much % Buyers and Sellers separately occupy the Bar
BSP is a part of Bar Range. Entire bar metrics will always have bigger value than its composite elements (body and wicks).
Since there will be NO chance of BP or SP being more than ATR, their ratio would serve crucial Volatility details.
Hence, we can relate each of them to the overall range.
As a result we have simultaneous measurements of proportions buyers and sellers to the bar.
Default mode shows BP/ATR and SP/ATR mirrored. When one rises, the other falls to compensate.
Buying Pressure / True Range ⬆️🟢 ⬇️🔵
Selling Pressure / True Range ⬆️🔴 ⬇️🟠
They are being averaged in 2 different ways:
Pre-average first, then relate as ratio
Related first, then Averaged
Enable "Preaveraged" to use already averaged BSP and Ranges in ratio instead of averaging the ratio of BSP to individual bar. For example, we're looking BP/ATR, in calculation of buyers / Range it will use "MA(Buying Pressure) / MA(True Range)" instead of "MA(Buying Pressure / True Range)".
Due such calculation, it is going to be more lagging than in off mode. Nevertheless, it reduces noise from the impact of individual bar change.
Second way of noise reduction is enabling "Body / Range"
BSP Body / Range where Bullish & Bearish Body = Buying & Selling Pressure - Relevant Wick
Buying Body = Buying Pressure - Lower Wick
Selling Body = Selling Pressure - Upper Wick
And only then it is divided to ATR.
Note that Balance line differs because body is less than it used to be with wicks. So change in wicks won't play any role in computing the ratio anymore. Thus, signals of their crossings will be more reliable than in default mode.
ATRLevels 1.0.0The indicator shows the average daily ATR for the past N days from the beginning of the current session. The range is displayed using levels. If the price has approached the level of 100% or -100% it means that the price has passed its average distance and it is possible to consider points for price reversal. This can be confirmed by daily or weekly horizontal resistance/support levels.
If the price has approached the levels of 25%, 50% or 75% and there are hourly or daily extrema at these levels, then we can consider situations on a false stabbing of these levels and a price pullback in the opposite direction.
*The best confirmation of a bounce/reversal is the density in the scalper's stack.
Settings:
ATR Daily length - number of periods to calculate the daily ATR
100% lines - visual design of 100% and -100% levels
50% lines - visual design of the 50% level
25% and 75% lines - visual design of 25% and 75% levels
TASC 2023.08 Channeling Your Inner Chartist█ OVERVIEW
TASC's August 2023 edition of Traders' Tips features an article written by Stella Osoba titled “Using Price Channels.” The article offers a basic look at using price channels, with a primary focus on Donchian channels . Following the article, the script provides an example of how to calculate and utilize the Donchian channel to gain insights into the price behavior and potential trend movements.
█ CONCEPTS
The use of price channels is a long-standing and fundamental charting technique commonly associated with trend-following trading strategies. Price channels help identify the trend on the chart and facilitate trading in its direction. The Donchian channel, in particular, consists of three lines. The upper line is conventionally calculated as the highest high over a specified lookback period, while the lower line is defined as the lowest low over the same period. The central line represents the midpoint between the upper and lower lines.
The Donchian channel provides a simple and intuitive visual representation of price behavior. Breaking through the lower line, for instance, can indicate weakness and selling pressure, while breaking through the upper line can signal buying pressure. By observing these breakout points, one can gain insight into potential beginnings or endings of long-term trends. However, it is important to note that breakouts often lead to price reversals, so they should be carefully evaluated
█ CALCULATIONS
To illustrate a simple Donchian trading system, this script calculates and plots the channel lines, as well as potential entry points for long positions (green triangles) and short positions (red triangles).
Pseudo-Entropy Oscillator with Standard Deviation (modified)Intuition: The Pseudo-Entropy Oscillator with Standard Deviation (PEO_SD) was created to provide traders with a way to analyze market momentum and potential reversals. It combines the concepts of entropy, standard deviation, and moving averages to offer insights into market behavior.The oscillator's core idea is to measure the pseudo-entropy of the market using standard deviation. Pseudo-entropy refers to the degree of disorder or randomness in the price data. By calculating the standard deviation of the closing prices over a specified period, the oscillator quantifies the market's volatility.To enhance the usefulness of the pseudo-entropy measurement, the oscillator incorporates moving averages. The entropy delta is calculated by applying momentum analysis to the pseudo-entropy values. This helps identify short-term changes in the entropy, indicating shifts in market sentiment or momentum.The oscillator further smoothes the pseudo-entropy values by calculating the simple moving average (SMA) over a specified length. This helps filter out noise and provides a clearer representation of the market's overall momentum.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The "Pseudo-Entropy Oscillator with Standard Deviation" (PEO_SD) is a custom indicator designed to help traders analyze market momentum and potential reversal points. It can be applied to various markets like stocks, commodities, forex, or cryptocurrencies. By using this indicator, you can gain insights into the market's behavior and make more informed trading decisions.
The PEO_SD indicator plots three lines on your chart: the fast pseudo-entropy line, the medium pseudo-entropy line, and the slow pseudo-entropy line. Each line represents the combined pseudo-entropy values, which are calculated using standard deviation and moving averages.
The lines are color-coded for easy identification. The fast line is represented by blue, the medium line by yellow, and the slow line by red. Additionally, three horizontal reference lines are plotted: the mid line (at 50), the lower bound (at 20), and the upper bound (at 80).
To use this indicator effectively, you can observe the interactions of the lines with the reference lines. For example, when any of the lines cross above the mid line, it might indicate a bullish signal, suggesting an upward price movement. Conversely, a crossover below the mid line could be a bearish signal, indicating a potential downward price movement. If the lines reach the upper bound, it might suggest that the market is overbought, and a reversal could be imminent. Conversely, reaching the lower bound may indicate that the market is oversold, possibly leading to a price reversal.
By applying the PEO_SD indicator and studying the lines' movements, you can gain valuable insights into market momentum, identify potential reversal points, and make more informed trading decisions.
Trailing Stop Loss SuperTrendThe Trailing Stop Loss SuperTrend indicator is a popular technical analysis tool used by traders to identify trends and determine optimal entry and exit points in financial markets. This indicator combines elements of the SuperTrend indicator and trailing stop loss orders to provide valuable insights into market trends and potential reversals. By incorporating Average True Range (ATR) calculations, it adapts to market volatility, making it suitable for various trading strategies. Let's explore the key use cases and benefits of the Trailing Stop Loss SuperTrend indicator:
Trend Identification:
The primary purpose of the Trailing Stop Loss SuperTrend indicator is to identify market trends. It plots two lines on the chart: an upper band (referred to as the "up" line) and a lower band (referred to as the "dn" line). The direction of these bands helps traders determine the prevailing trend. When the price is above the upper band, it suggests a bullish trend, and when it is below the lower band, it indicates a bearish trend.
Entry and Exit Signals:
The Trailing Stop Loss SuperTrend indicator generates entry and exit signals based on trend changes. When the trend changes from bearish to bullish, a buy signal is triggered, indicating a potential entry point. Conversely, when the trend changes from bullish to bearish, a sell signal is generated, suggesting a possible exit or short-selling opportunity. These signals can be used in conjunction with other trading strategies or indicators to enhance trading decisions.
Trailing Stop Loss Orders:
One of the distinguishing features of the Trailing Stop Loss SuperTrend indicator is its ability to incorporate trailing stop loss orders. Traders can use the indicator's upper and lower bands as trailing stop levels to protect profits and manage risk. For example, in a bullish trend, the stop loss level can be set at the lower band, and as the price rises, the stop loss level trails along with it, locking in profits and reducing potential losses.
Volatility Adaptation:
By incorporating the ATR (Average True Range) calculation, the Trailing Stop Loss SuperTrend indicator adjusts its sensitivity to market volatility. A higher ATR multiplier widens the distance between the price and the bands, accommodating higher volatility, while a lower multiplier tightens the bands during periods of lower volatility. This adaptability makes the indicator versatile and suitable for various market conditions.
Alerts and Notifications:
The Trailing Stop Loss SuperTrend indicator provides the ability to set alerts for specific events, such as trend changes, buy signals, and sell signals. Traders can receive real-time notifications via email, SMS, or on-platform alerts, ensuring they stay informed about potential trading opportunities and important market developments.
Conclusion:
The Trailing Stop Loss SuperTrend indicator is a valuable tool for traders seeking to identify trends, generate entry and exit signals, and effectively manage risk. Its ability to adapt to market volatility and incorporate trailing stop loss orders enhances trading strategies and decision-making. By combining the SuperTrend concept with trailing stop loss functionality, this indicator provides traders with a comprehensive approach to trend analysis and risk management. Whether used in isolation or in conjunction with other indicators, the Trailing Stop Loss SuperTrend indicator offers a powerful tool for navigating the dynamic world of financial markets.
ATR InfoWhat Is the Average True Range (ATR)?
The average true range (ATR) is a technical analysis indicator, introduced by market technician J. Welles Wilder Jr. in his book New Concepts in Technical Trading Systems, that measures market volatility by decomposing the entire range of an asset price for that period.
Each instrument per unit of time passes its average value of the true range, but there are moments when the volatility explodes or abruptly decays, these phenomena introduce large distortions into the average value of the true range.
The ATR_WPB function calculates the average value of the true range for the specified number of bars, while excluding paranormally large and paranormally small bars from the calculation of the average.
For example, if the instrument has passed a small ATR value, then it has many chances to continue moving, but if the instrument has passed its ATR value, then the chances of continuing to move are extremely low.
Breakout FilterIntroduction:
The Breakout Filter is a technical analysis indicator designed to identify potential breakout trading opportunities in the financial markets. It combines breakout conditions based on price and volume with the visualization of Exponential Moving Average (EMA) lines. This indicator can be a valuable tool for traders seeking to capture breakout movements while utilizing EMA lines for additional trend analysis.
Indicator Overview:
The Breakout Filter consists of three main filters: Filter 1, Filter 2, and Filter 3. Each filter has its own set of conditions that need to be met for a breakout signal to be generated. Additionally, the indicator plots EMA lines on the chart to provide further insights into the market trend.
Filter 1: Price & Volume Breakout (Default symbol: Tiny Yellow Triangle)
Filter 1 focuses on identifying breakouts based on both price and volume criteria. It considers the following conditions:
- Price Breakout: The close price crosses above the Donchian Channel's middle line, indicating a potential upward breakout.
- Volume Breakout: The trading volume exceeds the moving average of volume, suggesting increased market participation during the breakout.
When both the price breakout and volume breakout conditions are met, Filter 1 generates a signal indicating a potential breakout in the market. This filter helps traders identify significant price movements accompanied by higher trading volumes.
Filter 2: Upper Band Breakout
Filter 2 specifically looks for breakouts above the upper band of the Donchian Channel. This condition suggests a potential strong upward momentum in the market. When the high price exceeds the upper band, Filter 2 generates a signal, indicating a breakout above the recent price range.
Filter 3: Combined Filter 1 and Filter 2
Filter 3 combines the conditions of both Filter 1 and Filter 2. It requires that both Filter 1 and Filter 2 generate signals simultaneously. When this happens, it indicates a strong breakout signal with price and volume confirming the upward momentum.
EMA Lines:
The Breakout Filter with EMA Lines also includes the visualization of Exponential Moving Average (EMA) lines on the chart. EMA is a popular technical indicator used to identify the overall trend in the market. The indicator plots three EMA lines with different periods: EMA1, EMA2, and EMA3. Traders can choose the periods for each EMA line based on their preference and trading strategy.
The EMA lines can provide additional insights into the market trend and potential support or resistance levels. By observing the interaction between the price and the EMA lines, traders can gain a better understanding of the prevailing market sentiment and make informed trading decisions.
How to screen these filters using Trading View Screener
Insert column "DONCHIAN20 UP" and set to "EQUAL HIGH"
Conclusion:
The Breakout Filter with EMA Lines is a comprehensive indicator that combines breakout conditions based on price and volume with the visualization of EMA lines. It helps traders identify potential breakout trading opportunities while providing insights into the market trend. By using this indicator, traders can enhance their trading strategies and potentially improve their trading outcomes.
Please note that this write-up is for informational purposes only and should not be considered as financial advice. Traders should conduct their own analysis and exercise caution when making trading decisions.
Opening Range Gap + Std Dev [starclique]The ICT Opening Range Gap is a concept taught by Inner Circle Trader and is discussed in the videos: 'One Trading Setup For Life' and 2023 ICT Mentorship - Opening Range Gap Repricing Macro
ORGs, or Opening Range Gaps, are gaps that form only on the Regular Trading Hours chart.
The Regular Trading Hours gap occurs between 16:15 PM - 9:29 AM EST (UTC-4)
These times are considered overnight trading, so it is useful to filter the PA (price action) formed there.
The RTH option is only available for futures contracts and continuous futures from CME Group.
To change your chart to RTH, first things first, make sure you’re looking at a futures contract for an asset class, then on the bottom right of your chart, you’ll see ETH (by default) - Click on that, and change it to RTH.
Now your charts are filtering the price action that happened overnight.
To draw out your gap, use the Close of the 4:14 PM candle and the open of the 9:30 AM candle.
How is this concept useful?
Well, It can be used in many ways.
---
How To Use The ORG
One of the ways you can use the opening range gap is simply as support and resistance
If we extend out the ORG from the example above, we can see that there is a clean retest of the opening range gap high after breaking structure to the upside and showing acceptance outside of the gap after consolidating within it.
The ORG High (4:14 Candle Close in this case) was used as support.
We then see an expansion to the upside.
Another way to implement the ORG is by using it as a draw on liquidity (magnet for price)
In this example, if we looked to the left, there was a huge ORG to the downside, leaving a massive gap.
The market will want to rebalance that gap during the regular trading hours.
The market rallies higher, rejects, comes down to clear the current days ORG low, then closes.
That is one example of how you can combine liquidity & ICT market structure concepts with Opening Range Gaps to create a story in the charts.
Now let’s discuss standard deviations.
---
Standard Deviations
Standard Deviations are essentially projection levels for ranges / POIs (Point of Interests)
By this I mean, if you have a range, and you would like to see where it could potentially expand to, you’d place your fibonacci retracement tool on and high and low of the range, then use extension levels to find specific price points where price might reject from.
Since 0 and 1 are your Range High and Low respectively, your projection levels would be something like 1.5, 2, 2.5, and 3, for the extension from your 1 Fib Level, and -0.5, -1, -1.5, and -2 for your 0 Fib level.
The -1 and 2 level produce a 1:1 projection of your range low and high, meaning, if you expect price to expand as much as it did from the range low to range high, then you can project a -1 and 2 on your Fib, and it would show you what ICT calls “symmetrical price”
Now, how are standard deviations relevant here?
Well, if you’ve been paying attention to ICT’s recent videos, you would’ve caught that he’s recently started using Standard Deviation levels on breakers.
So my brain got going while watching his video on ORGs, and I decided to place the fib on the ORG high and low and see what it’d produce.
The results were very interesting.
Using this same example, if we place our fib on the ORG High and Low, and add some projection levels, we can see that we rejected right at the -2 Standard Deviation Level.
---
You can see that I also marked out the EQ (Equilibrium, 50%, 0.5 of Fib) of the ORG. This is because we can use this level as a take profit level if we’re using an old ORG as our draw.
In days like these, where the gap formed was within a consolidation, and it continued to consolidate within the ORG zone that we extended, we can use the EQ in the same way we’d use an EQ for a range.
If it’s showing acceptance above the EQ, we are bullish, and expect the high of the ORG to be tapped, and vice versa.
---
Using The Indicator
Here’s where our indicator comes in play.
To avoid having to do all this work of zooming in and marking out the close and open of the respective ORG candles, we created the Opening Range Gap + Standard Deviations Indicator, with the help of our dedicated Star Clique coder, a1tmaniac.
With the ORG + STD DEV indicator, you will be able to view ORG’s and their projections on the ETH (Electronic Trading Hours) chart.
---
Features
Range Box
- Change the color of your Opening Range Gap to your liking
- Enable or disable the box from appearing using the checkbox
Range Midline
- Change the color of your Opening Range Gap Equilibrium
- Enable or disable the midline from appearing using the checkbox
Std. Dev
- Add whichever standard deviation levels you’d like.
- By default, the indicator comes with 0.5, 1, 1.5, and 2 standard deviation levels.
- Ensure that you add a comma ( , ) in between each standard deviation level
- Enable or disable the standard deviations from appearing using the opacity of the color (change to 0%)
Labels / Offset
- Adjust the offset of the label for the Standard Deviations
- Enable or disable the Labels from appearing using the checkbox
Time
- Adjust the time used for the indicators range
- If you’d like to use this for a Session or ICT Killzone instead, adjust the time
- Adjust the timezone used for the time referenced
- Options are UTC, US (UTC-4, New York Local Time) or UK (UTC+1, London Time)
- By default, the indicator is set to US
Bull / Bear Market RegimeBull / Bear Market Regime
Instructions:
- A simple risk on or risk off indicator based on CBOE's Implied Correlation and VIX to highlight and indicate Bull / Bear Markets. To be used with the S&P500 index as that's the source from where the CBOE calculates and measures implied volatility & implied correlation. Can also be used with the other indices such as: Dow Jones, S&P 500, Nasdaq, & Nasdaq100, & Index ETF's such as DIA, SPY, QQQ, etc.
- Know the active regime, see the larger picture using the Daily or Weekly view, and visualize the current "Risk On (Bull) or Risk Off (Bear)" environment.
Description:
- Risk On and Risk Off simplified & visualized. Know if we are in a RISK ON or RISK OFF environment (Bull or Bear Market). (Absolute bottoms and tops will occur BEFORE a Risk On (Bull Market) or Risk Off (Bear Market) environment is confirmed!) This indicator is not meant to bottom tick or uptick market price action, but to show the active regime.
- Green: Bull Market, Risk On, low volatility, and low risk.
- Red: Bear Market, Risk Off, high volatility, and higher risk.
Buy & Sell Indicators (DAILY time frame)
- Nothing is 100% guaranteed! Can be used for short to medium term trades at the users discretion in BEAR MARKETS!!
- These signals are meant to be used during a RISK OFF / BEAR MARKET environment that tends to be accompanied with high volatility. A Risk on / Bull Market environment tends to have low volatility and endless rallies, so the signals will differ and in most instances not apply for Bull market / Risk on regime.
- The SELL signal will more often than not signal that a pullback is near in a BULL market and that a BMR-Bear Market Rally is almost over in a BEAR market.
- The BUY signal will have far more accuracy in a BEAR market-high volatility environment and can Identify short-term and major bottoms.
Always use proper sizing and risk management!
Multi-Band Breakout IndicatorThe Multi-Band Breakout Indicator was created to help identify potential breakout opportunities in the market. It combines multiple bands (ATR-Based and Donchian) and moving averages to provide valuable insights into the underlying trend and potential breakouts. By understanding the calculations, interpretation, parameter adjustments, potential applications, and limitations of the indicator, traders can effectively incorporate it into their trading strategy.
Calculation:
The indicator utilizes several calculations to plot the bands and moving averages. The length parameter determines the period used for the Average True Range (ATR), which measures volatility. A higher length captures a longer-term view of price movement, while a lower length focuses on shorter-term volatility. The multiplier parameter adjusts the distance of the upper and lower bands from the ATR. A higher multiplier expands the bands, accommodating greater price volatility, while a lower multiplier tightens the bands, reflecting lower volatility. The MA Length parameter determines the period for the moving averages used to calculate the trend and trend moving average. A higher MA Length creates a smoother trend line, filtering out shorter-term fluctuations, while a lower MA Length provides a more sensitive trend line.
The Donchian calculations in the Multi-Band Breakout Indicator play a significant role in identifying potential breakout opportunities and providing additional confirmation for trading signals. In this indicator, the Donchian calculations are applied to the trend line, which represents the average of the upper and lower bands. To calculate the Donchian levels, the indicator uses the Donchian Length parameter, which determines the period over which the highest high and lowest low are calculated. A longer Donchian Length captures a broader price range, while a shorter length focuses on more recent price action. By incorporating the Donchian calculations into the Multi-Band Breakout Indicator, traders gain an additional layer of confirmation for breakout signals.
Interpretation:
The Multi-Band Breakout Indicator offers valuable interpretation for traders. The upper and lower bands represent dynamic levels of resistance and support, respectively. These bands reflect the potential price range within which the asset is expected to trade. The trend line is the average of these bands and provides a central reference point for the overall trend. When the price moves above the upper band, it suggests a potential overbought condition and a higher probability of a pullback. Conversely, when the price falls below the lower band, it indicates a potential oversold condition and an increased likelihood of a bounce. The trend moving average further smooths the trend line, making it easier to identify the prevailing direction.
The crossover of the trend line (representing the average of the upper and lower bands) and the trend moving average holds a significant benefit for traders. This crossover serves as a powerful signal for potential trend changes and breakout opportunities in the market. When the trend line crosses above the trend moving average, it suggests a shift in momentum towards the upside, indicating a potential bullish trend. This provides traders with an early indication of a possible upward movement in prices. Conversely, when the trend line crosses below the trend moving average, it indicates a shift in momentum towards the downside, signaling a potential bearish trend. This crossover acts as an early warning for potential downward price movement. By identifying these crossovers, traders can capture the initial stages of a new trend, enabling them to enter trades at favorable entry points and potentially maximize their profit potential.
Breakout Signals:
For bullish breakouts, the indicator looks for a bullish crossover between the trend line and the trend moving average. This crossover suggests a shift in momentum towards the upside. Additionally, it checks if the current price has broken above the upper band and the previous Donchian high. This confirms that the price is surpassing a previous resistance level, indicating further upward movement.
For bearish breakouts, the indicator looks for a bearish crossunder between the trend line and the trend moving average. This crossunder indicates a shift in momentum towards the downside. It also checks if the current price has broken below the lower band and the previous Donchian low. This confirms that the price is breaking through a previous support level, signaling potential downward movement.
When a bullish or bearish breakout is detected, it suggests a potential trading opportunity. Traders may consider initiating positions in the direction of the breakout, anticipating further price movement in that direction. However, it's important to remember that breakouts alone do not guarantee a successful trade. Other factors, such as market conditions, volume, and confirmation from additional indicators, should be taken into account. Risk management techniques should also be implemented to manage potential losses.
Coloration:
The coloration in the Multi-Band Breakout Indicator is used to visually represent different aspects of the indicator and provide valuable insights to traders. Let's break down the coloration components:
-- Trend/Basis Color : The tColor variable determines the color of the bars based on the relationship between the trend line (trend) and the closing price (close), as well as the relationship between the trend line and the trend moving average (trendMA). If the trend line is above the closing price and the trend moving average is also above the closing price, the bars are colored fuchsia, indicating a potential bullish trend. If the trend line is below the closing price and the trend moving average is also below the closing price, the bars are colored lime, indicating a potential bearish trend. If neither of these conditions is met, the bars are colored yellow, representing a neutral or indecisive market condition.
-- Moving Average Color : The maColor variable determines the color of the filled area between the trend line and the trend moving average. If the trend line is above the trend moving average, the area is filled with a lime color with 70% opacity, indicating a potential bullish trend. Conversely, if the trend line is below the trend moving average, the area is filled with a fuchsia color with 70% opacity, indicating a potential bearish trend. This coloration helps traders visually identify the relationship between the trend line and the trend moving average.
-- highColor and lowColor : The highColor and lowColor variables determine the colors of the high Donchian band (hhigh) and the low Donchian band (llow), respectively. These bands represent dynamic levels of resistance and support. If the highest point in the previous Donchian period (hhigh) is above the upper band, the highColor is set to olive with 90% opacity, indicating a potential resistance level. On the other hand, if the lowest point in the previous Donchian period (llow) is below the lower band, the lowColor is set to red with 90% opacity, suggesting a potential support level. These colorations help traders quickly identify important price levels and assess their significance in relation to the bands.
By incorporating coloration, the Multi-Band Breakout Indicator provides visual cues to traders, making it easier to interpret the relationships between various components and assisting in identifying potential trend changes and breakout opportunities. Traders can use these color cues to quickly assess the prevailing market conditions and make informed trading decisions.
Adjusting Parameters:
The Multi-Band Breakout Indicator offers flexibility through parameter adjustments. Traders can customize the indicator based on their preferences and trading style. The length parameter controls the sensitivity to price changes, with higher values capturing longer-term trends, while lower values focus on shorter-term price movements. By adjusting the parameters, such as the ATR length, multiplier, Donchian length, and MA length, traders can customize the indicator to suit different timeframes and trading strategies. For shorter timeframes, smaller values for these parameters may be more suitable, while longer timeframes may require larger values.
Potential Applications:
The Multi-Band Breakout Indicator can be applied in various trading strategies. It helps identify potential breakout opportunities, allowing traders to enter trades in the direction of the breakout. Traders can use the indicator to initiate trades when the price moves above the upper band or below the lower band, confirming a potential breakout and providing a signal to enter a trade. Additionally, the indicator can be combined with other technical analysis tools, such as support and resistance levels, candlestick patterns, or trend indicators, to increase the probability of successful trades. By incorporating the Multi-Band Breakout Indicator into their trading approach, traders can gain a better understanding of market trends and capture potential profit opportunities.
Limitations:
While the Multi-Band Breakout Indicator is a useful tool, it has some limitations that traders should consider. The indicator performs best in trending markets where price movements are relatively strong and sustained. During ranging or choppy market conditions, the indicator may generate false signals, leading to potential losses. It is crucial to use the indicator in conjunction with other analysis techniques and risk management strategies to enhance its effectiveness. Additionally, traders should consider external factors such as market news, economic events, and overall market sentiment when interpreting the signals generated by the indicator.
By combining multiple bands and moving averages, this indicator offers valuable insights into the underlying trend and helps traders make informed trading decisions. With customization options and careful interpretation, this indicator can be a valuable addition to any trader's toolkit, assisting in identifying potential breakouts, capturing profitable trades, and enhancing overall trading performance.
Devs Cumulative Delta candles with Moving Average and DivergenceDELTA = BUY Volume – SELL Volumes
Delta = Positive => Aggressiveness on the Buy side
Delta = Negative => Aggressiveness on the Sell side
If delta is greater than 0 you have more buying than selling pressure. If delta is less than 0, you have more selling than buying pressure.
When there is more Buying than Selling (Delta=Positive), the price candle is Green and when there is more Selling than Buying (Delta=Negative), the price candle is Red. We use delta to understand the relationship between buying or selling pressure and price.
Let’s imagine a price bar that reached the low for the day but delta was actually positive and the bar closed higher than it opened.
In simple terms we can describe this as:
Price made a new low
The bar closed higher
Delta demonstrated more buying than selling : Volume delta is a key metric to understand when making trading decisions based on volume and order flow. However, on its own it can be too much information to interpret quickly when trading in a volatile market.
What are Delta Bars?
Delta Bars is a candlestick representation of Delta. In other words, it has an Open, High (also called Delta Max), Low (also called Delta Min) and Close point in every candle (1min, 5min, 30min etc.)
The Delta Open in every candle is always 0
The Delta Close is the cumulative BUY less cumulative SELL at the close if the candle
The Delta Max is the maximum value of Delta during the candle session (lowest Delta Max possible = 0)
The Delta Min is the minimum value of Delta during the candle session (highest Delta Min possible = 0) The Delta bars are uncorrelated to the Tick Multiplier of the symbol.
Generally you would expect Price to move UP when Delta is positive and Price to move DOWN when Delta is negative. So what happens when the above rule is not followed. We have Divergence
Divergence:
Any two parameters that should be in sync (Price and Delta in this case) towards supporting a particular move (Up or Down) but are in reality not (in sync) form a Divergence
Cumulative volume delta takes the delta values for every bar and successively adds them together to visually provide as seen in the chart.
While volume delta is great for comparing delta bar to bar, cumulative volume delta is useful when determining buying or selling pressure at different price levels such as swing highs or lows. I just gave you a details regarding delta and delta bars.
What details would you see in the indicator??
When you apply this indicator on the chart, you will find the CD(Cumulative delta) candles, which move up and down the way price moves in a chart. Moreover, in case of a divergence, you will find a change in colour of delta candles. If the price is still green but the delta is negative, you will find a bullish divergence, marked with Yellow colour and if the price is red and you have a positive delta, you will have a bearish divergence, marked with blue coloured delta candle. Usually it has been seen that a repeated divergence generally depicts end of a trend or slow down of a trend.
Moreover, I have placed 2 moving averages in the script which you can customize as per your needs. I prefer 20 and 50 day MA for better accuracy as most reversals happen at 20 and 50 day MA.
This indicator works in almost all index, stocks, currencies excepting few where the volume past is invisible. This indicator purely works taking the buying and selling volume into consideration. Sometimes when you change the timeframe in chart, you may have to manually adjust for the display in chart.
Reversion Zone IndexThe Reversion Zone Index (RZI) is an indicator that combines the Commodity Channel Index (CCI), Choppiness Index (CI), and Bollinger Bands Percentage (BBPct) to identify mean reversion signals in the market. It is plotted as an Exponential Moving Average (EMA) smoothed oscillator with overbought and oversold zones, and mean reversion signals are represented by red and green arrows.
The three indicators are combined to benefit from their complementary aspects and create a more comprehensive view of mean reversion conditions. Here's a brief overview of each indicator's benefits:
1. Commodity Channel Index (CCI): CCI measures the current price level relative to its average over a specified period. It helps identify overbought and oversold conditions, as well as potential trend retracements. By incorporating CCI, the RZI gains insights into momentum and potential turning points.
2. Choppiness Index (CI): CI quantifies the market's choppiness or trendiness by analyzing the range between the highest high and lowest low over a specific period. It indicates whether the market is in a trending or ranging phase. CI provides valuable information about the market state, which can be useful in mean reversion analysis.
3. Bollinger Bands Percentage (BBPct): BBPct measures the current price's position relative to the Bollinger Bands. It calculates the percentage difference between the current price and the bands, identifying potential overbought or oversold conditions. BBPct helps gauge the market's deviation from its typical behavior and highlights potential reversal opportunities.
The RZI combines the three indicators by taking an average of their values and applying further calculations. It smooths the combined oscillator using an EMA to reduce noise and enhance the visibility of the trends. Smoothing with EMA provides a more responsive representation of the overall trend and helps filter out short-term fluctuations.
The overbought and oversold zones are marked on the chart as reference levels. When the combined oscillator is above the overbought zone or below the oversold zone, it suggests a potential mean reversion signal. Red and green arrows are displayed to visually indicate these mean retracement signals.
The RZI is a valuable tool for identifying mean reversion opportunities in the market. It incorporates multiple indicators, each providing unique insights into different aspects of mean reversion, such as momentum, volatility, and price positioning. Traders can use this indicator to spot potential turning points and time their trades accordingly.
Temporary imbalancesThis indicator is designed to identify imbalances in order flow and market liquidity, It highlights candles with significant imbalances and draws reference lines
The indicator calculates imbalance based on changes in closing prices and volume. It uses the standard deviation to determine the significant imbalance threshold. Candles with bullish imbalances are highlighted in green, while candles with bearish imbalances are highlighted in red.
Furthermore, the indicator includes features of latency arbitrage and liquidity analysis. Latency arbitrage looks for price differences between the anchored VWAP and bid/ask quotes, targeting trading opportunities based on these differences. The liquidity analysis verifies the liquidity imbalance and calculates the VWAP anchored on this value in total using 4 VWAP.
This indicator can be adjusted according to the preferences and characteristics of the specific asset or market. It provides clear visual information and can be used as a complementary tool for technical analysis in trading strategies.
Interesting Segment Length 20,50,80,200
and Interesting lookback period 20,50,80,200
Interesting imbalance threshold 1.5, 2.4, 3.3 ,4.2
Este indicador é projetado para identificar desequilíbrios no fluxo de ordens e na liquidez do mercado, Ele destaca velas com desequilíbrios significativos e traça linhas de referência
O indicador calcula o desequilíbrio com base nas mudanças nos preços de fechamento e no volume. Ele usa o desvio padrão para determinar o limiar de desequilíbrio significativo. As velas com desequilíbrios de alta são destacadas em verde, enquanto as velas com desequilíbrios de baixa são destacadas em vermelho.
Além disso, o indicador inclui recursos de arbitragem de latência e análise de liquidez. A arbitragem de latência procura diferenças de preços entre a VWAP ancorada e as cotações de compra/venda, visando oportunidades de negociação com base nessas diferenças. A análise de liquidez verifica o desequilíbrio de liquidez e calcula a VWAP ancorada nesse valor ao total utiliza 4 VWAP.
Este indicador pode ser ajustado de acordo com as preferências e características do ativo ou mercado específico. Ele fornece informações visuais claras e pode ser usado como uma ferramenta complementar para análise técnica em estratégias de negociação.
Comprimento do Segmento interessante para usa 20,50,80,200
e Período de lookback interessante para usa 20,50,80,200
Limiar de desequilíbrio interessante para usa 1.5 ,2.4, 3.3 ,4.2
Volatility Capture RSI-Bollinger - Strategy [presentTrading]- Introduction and how it is different
The 'Volatility Capture RSI-Bollinger - Strategy ' is a trading strategy that combines the concepts of Bollinger Bands (BB), Relative Strength Index (RSI), and Simple Moving Average (SMA) to generate trading signals. The uniqueness of this strategy is it calculates which is a dynamic level between the upper and lower Bollinger Bands based on the closing price. This unique feature allows the strategy to adapt to market volatility and price movements.
The market in Crypto and Stock are highly volatile, making them suitable for a strategy that uses Bollinger Bands. The RSI can help identify overbought or oversold conditions in this often speculative market.
BTCUSD 4hr chart
(700.hk) 3hr chart
Remember, the effectiveness of a trading strategy also depends on other factors such as the timeframe used, the specific settings of the indicators, and the overall market conditions. It's always recommended to backtest and paper trade a strategy before using it in live trading.
- Strategy, How it Works
Dynamic Bollinger Band: The strategy works by first calculating the upper and lower Bollinger Bands based on the user-defined length and multiplier. It then uses the Bollinger Bands and the closing price to dynamically adjust the presentBollingBand value. In the end, it generates a long signal when the price crosses over the present Bolling Band and a short signal when the price crosses under the present Bolling Band.
RSI: If the user has chosen to use RSI for signals, the strategy also calculates the RSI and its SMA, and uses these to generate additional long and short signals. The RSI-based signals are only used if the 'Use RSI for signals' option is set to true.
The strategy then checks the chosen trading direction and enters a long or short position accordingly. If the trading direction is set to 'Both', the strategy can enter both long and short positions.
Finally, the strategy exits a position when the close price crosses under the present Bolling Band for a long position, or crosses over the present Bolling Band for a short position.
- Trade direction
The strategy also includes a trade direction parameter, allowing the user to choose whether to enter long trades, short trades, or both. This makes the strategy adaptable to different market conditions and trading styles.
- Usage
1. Set the input parameters as per your trading preferences. You can choose the price source, the length of the moving average, the multiplier for the ATR, whether to use RSI for signals, the RSI and SMA periods, the bought and sold range levels, and the trading direction.
2. The strategy will then generate buy and sell signals based on these parameters. You can use these signals to enter and exit trades.
- Default settings
1. Source: hlc3
2. Length: 50
3. Multiplier: 2.7183
4. Use RSI for signals: True
5. RSI Period: 10
6. SMA Period: 5
7. Bought Range Level: 55
8. Sold Range Level: 50
9. Trade Direction: Both
- Strategy's default Properties
1. Default Quantity Type: 'strategy.percent_of_equity'
2. commission_value= 0.1, commission_type=strategy.commission.percent, slippage= 1: These parameters set the commission and slippage for the strategy. The commission is set to 0.1% of the trade value, and the slippage (the difference between the expected price of a trade and the price at which the trade is executed) is set to 1.
3. default_qty_type = strategy.percent_of_equity, default_qty_value = 15: These parameters set the default quantity for trades. The default_qty_type is set to strategy.percent_of_equity, which means that the size of each trade will be a percentage of the account equity. The default_qty_value is set to 15, which means that each trade will be 15% of the account equity.
4. initial_capital= 10000: This parameter sets the initial capital for the strategy to $10,000.
PresentTrend - Strategy [presentTrading]- Introduction and how it is different
The PresentTrend strategy is a unique custom trend-following strategy. This combination allows the strategy to take advantage of both short-term and long-term market trends, making it suitable for various market conditions.
BTCUSDT 4hr chart
(700.hk) 3D chart
- Strategy, How it Works
RSI or MFI: The first part uses a custom indicator based on either the Relative Strength Index (RSI) or the Money Flow Index (MFI). The indicator calculates a PresentTrend value, which generates buy and sell signals based on its crossover and crossunder, indicating potential trend reversals.
ATR: The second part is a popular trend-following indicator that uses the Average True Range (ATR).
The strategy enters a long position when all buy signals from both strategies are true, and a short position when all sell signals are true. This ensures trades are entered when both short-term and long-term trends align, potentially increasing the strategy's reliability.
- Trade direction
The strategy also includes a trade direction parameter, allowing the user to choose whether to enter long trades, short trades, or both. This makes the strategy adaptable to different market conditions and trading styles.
- Usage
1. Set the input parameters for the custom trend-following strategy.
2. Choose whether to use the RSI or MFI for the custom strategy.
3. Choose the trade direction: long, short, or both.
4. The strategy will generate buy and sell signals based on the conditions of both strategies.
5. Enter a trade when a buy or sell signal is generated, depending on the chosen trade direction.
Please note that this strategy is meant to be a tool to aid in your trading decisions and not a standalone trading system. Always use proper risk management and make sure to test the strategy thoroughly before using it in live trading.
- Default settings
1. Source: 'hlc3', a balanced price level for calculations.
2. Length: 14, a common setting for many technical indicators.
3. Multiplier: 1.618 (the golden ratio), used in calculating the upper and lower thresholds.
4. RSI or MFI: Set to use MFI by default, both are momentum indicators.
5. Trade Direction: 'Both', allowing for both long and short trades.
The default settings are designed to provide a balanced approach to trend detection. However, these can be adjusted based on the user's preferences and the specific characteristics of the market being traded.
- Strategy's default Properties
1. Default Quantity Type: 'strategy.percent_of_equity'
2. commission_value= 0.1, commission_type=strategy.commission.percent, slippage= 1: These parameters set the commission and slippage for the strategy. The commission is set to 0.1% of the trade value, and the slippage (the difference between the expected price of a trade and the price at which the trade is executed) is set to 1.
3. default_qty_type = strategy.percent_of_equity, default_qty_value = 10: These parameters set the default quantity for trades. The default_qty_type is set to strategy.percent_of_equity, which means that the size of each trade will be a percentage of the account equity. The default_qty_value is set to 10, which means that each trade will be 10% of the account equity.
4. initial_capital= 10000: This parameter sets the initial capital for the strategy to $10,000.
Bollinger Bands Modified (Stormer)This strategy is based and shown by trader and investor Alexandre Wolwacz "Stormer".
Overview
The strategy uses two indicators Bollinger Bands and EMA (optional for EMA).
Calculates Bollinger Bands, EMA, highest high, and lowest low values based on the input parameters, evaluating the conditions to determine potential long and short entry signals.
The conditions include checks for crossovers and crossunders of the price with the upper and lower Bollinger Bands, as well as the position of the price relative to the EMA.
The script also incorporates the option to add an inside bar pattern check for additional information.
Entry Position
Long Position:
Price cross over the superior band of bollinger bands.
The EMA is used to add support for trend analysis, it is an optional input, when used, it checks if price is above EMA.
Short Position:
Price cross under the inferior band of bollinger bands.
The EMA is used to add support for trend analysis, it is an optional input, when used, it checks if price is under EMA.
Risk Management
Stop Loss:
The stop loss is calculated based on the input highest high (for short position) and lowest low (for long position).
It gets the length based on the input from the last candles to set which is the highest high and which is the lowest low.
Take Profit:
According to the author, the profit target should be at least 1:1.6 the risk, so to have the strategy mathematically positive.
The profit target is configured input, can be increased or decreased.
It calculates the take profit based on the price of the stop loss with the profit target input.
StdDev ChannelsThis script draws two sets of standard deviation channels on the price chart, providing a nuanced view of price volatility over different lengths.
The script starts by declaring a set of user-defined inputs allowing traders to customize the tool according to their individual requirements. The price input sets the source of the price data, defaulting to the closing price but customizable to use open, high, or low prices. The deviations parameter defines the width of the channels, with larger numbers resulting in wider channels. The length and length2 inputs represent the number of periods (in bars) that the script considers when calculating the regression line and standard deviation. Traders can also personalize the visual aspects of the indicator on the chart using the color, linewidth, and linestyle parameters.
Calculation of Standard Deviation:
The core of this script lies in calculating the regression line and standard deviation. This is where the InertiaAll function comes into play. This function calculates the linear regression line, which serves as the middle line of each channel. The function takes in two parameters: y (price data) and n (length for calculation). It returns an array containing the values for the regression line (InertiaTS), counter variable (x), slope of the line (a), and y-intercept (b). The standard deviation is then calculated using the built-in function ta.stdev, which measures the amount of variation or dispersion from the average.
After the calculation, the script proceeds to draw the channels. It creates two sets of lines (upper, middle, and lower) for each channel. These lines are initialized at the lowest price point on the chart (low). The coordinates for these lines get updated in the last section of the script, which runs only on the last bar on the chart (if barstate.islast). The functions line.set_xy1 and line.set_xy2 are used to adjust the starting and ending points for each line, forming the channels.
If the "full range" toggle is enabled, the script uses the maximum number of bars available on the chart to calculate the regression and standard deviation. This can give a broader perspective of the price's volatility over the entire available data range.
A Basic Strategy
The channels generated by this script may inform your trading decisions. If the price hits the upper line of a channel, it could suggest an 'overbought' condition indicating a potential selling opportunity. Conversely, if the price hits the lower line, it might signal an 'oversold' condition, suggesting a buying opportunity. The second channel, calculated over a different length, may serve to confirm these signals or identify longer-term trends.
Advanced Volatility-Adjusted Momentum IndexAdvanced Volatility-Adjusted Momentum Index (AVAMI)
The AVAMI is a powerful and versatile trading index which enhances the traditional momentum readings by introducing a volatility adjustment. This results in a more nuanced interpretation of market momentum, considering not only the rate of price changes but also the inherent volatility of the asset.
Settings and Parameters:
Momentum Length: This parameter sets the number of periods used to calculate the momentum, which is essentially the rate of change of the asset's price. A shorter length value means the momentum calculation will be more sensitive to recent price changes. Conversely, a longer length will yield a smoother and more stabilized momentum value, thereby reducing the impact of short-term price fluctuations.
Volatility Length: This parameter is responsible for determining the number of periods to be considered in the calculation of standard deviation of returns, which acts as the volatility measure. A shorter length will result in a more reactive volatility measure, while a longer length will produce a more stable, but less sensitive measure of volatility.
Smoothing Length: This parameter sets the number of periods used to apply a moving average smoothing to the AVAMI and its signal line. The purpose of this is to minimize the impact of volatile periods and to make the indicator's lines smoother and easier to interpret.
Lookback Period for Scaling: This is the number of periods used when rescaling the AVAMI values. The rescaling process is necessary to ensure that the AVAMI values remain within a consistent and interpretable range over time.
Overbought and Oversold Levels: These levels are thresholds at which the asset is considered overbought (potentially overvalued) or oversold (potentially undervalued), respectively. For instance, if the AVAMI exceeds the overbought level, traders may consider it as a possible selling opportunity, anticipating a price correction. Conversely, if the AVAMI falls below the oversold level, it could be seen as a buying opportunity, with the expectation of a price bounce.
Mid Level: This level represents the middle ground between the overbought and oversold levels. Crossing the mid-level line from below can be perceived as an increasing bullish momentum, and vice versa.
Show Divergences and Hidden Divergences: These checkboxes give traders the option to display regular and hidden divergences between the AVAMI and the asset's price. Divergences are crucial market structures that often signal potential price reversals.
Index Logic:
The AVAMI index begins with the calculation of a simple rate of change momentum indicator. This raw momentum is then adjusted by the standard deviation of log returns, which acts as a measure of market volatility. This adjustment process ensures that the resulting momentum index encapsulates not only the speed of price changes but also the market's volatility context.
The raw AVAMI is then smoothed using a moving average, and a signal line is generated as an exponential moving average (EMA) of this smoothed AVAMI. This signal line serves as a trigger for potential trading signals when crossed by the AVAMI.
The script also includes an algorithm to identify 'fractals', which are distinct price patterns that often act as potential market reversal points. These fractals are utilized to spot both regular and hidden divergences between the asset's price and the AVAMI.
Application and Strategy Concepts:
The AVAMI is a versatile tool that can be integrated into various trading strategies. Traders can utilize the overbought and oversold levels to identify potential reversal points. The AVAMI crossing the mid-level line can signify a change in market momentum. Additionally, the identification of regular and hidden divergences can serve as potential trading signals:
Regular Divergence: This happens when the asset's price records a new high/low, but the AVAMI fails to follow suit, suggesting a possible trend reversal. For instance, if the asset's price forms a higher high but the AVAMI forms a lower high, it's a regular bearish divergence, indicating potential price downturn.
Hidden Divergence: This is observed when the price forms a lower high/higher low, but the AVAMI forms a higher high/lower low, suggesting the continuation of the prevailing trend. For example, if the price forms a lower low during a downtrend, but the AVAMI forms a higher low, it's a hidden bullish divergence, signaling the potential continuation of the downtrend.
As with any trading tool, the AVAMI should not be used in isolation but in conjunction with other technical analysis tools and within the context of a well-defined trading plan.
Average Range PercentageIt is indicator for average percent range (range from high to low of stock/index price) of N days,
This will help to find high percentage moving stock/index for intraday.