Dynamic Gradient Filter
Sigmoid Functions:
History and Mathematical Basis:
Sigmoid functions have a rich history in mathematics and are widely used in various fields, including statistics, machine learning, and signal processing.
The term "sigmoid" originates from the Greek words "sigma" (meaning "S-shaped") and "eidos" (meaning "form" or "type").
The sigmoid curve is characterized by its smooth S-shaped appearance, which allows it to map any real-valued input to a bounded output range, typically between 0 and 1.
The most common form of the sigmoid function is the logistic function:
Logistic Function (σ):
Defined as σ(x) = 1 / (1 + e^(-x)), where:
'x' is the input value,
'e' is Euler's number (approximately 2.71828).
This function was first introduced by Belgian mathematician Pierre François Verhulst in the 1830s to model population growth with limiting factors.
It gained popularity in the early 20th century when statisticians like Ronald Fisher began using it in regression analysis.
Specific Sigmoid Functions Used in the Indicator:
sig(val):
The 'sig' function in this indicator is a modified version of the logistic function, clamping a value between 0 and 1 on the sigmoid curve.
siga(val):
The 'siga' function adjusts values between -1 and 1 on the sigmoid curve, offering a centered variation of the sigmoid effect.
sigmoid(val):
The 'sigmoid' function provides a standard implementation of the logistic function, calculating the sigmoid value of the input data.
Adaptive Smoothing Factor:
The ' adaptiveSmoothingFactor(gradient, k)' function computes a dynamic smoothing factor for the filter based on the gradient of the price data and the user-defined sensitivity parameter 'k' .
Gradient:
The gradient represents the rate of change in price, calculated as the absolute difference between the current and previous close prices.
Sensitivity (k):
The 'k' parameter adjusts how quickly the filter reacts to changes in the gradient. Higher values of 'k' lead to a more responsive filter, while lower values result in smoother outputs.
Usage in the Indicator:
The "close" value refers to the closing price of each period in the chart's time frame
The indicator calculates the gradient by measuring the absolute difference between the current "close" price and the previous "close" price.
This gradient represents the strength or magnitude of the price movement within the chosen time frame.
The "close" value plays a pivotal role in determining the dynamic behavior of the "Dynamic Gradient Filter," as it directly influences the smoothing factor.
What Makes This Special:
The "Dynamic Gradient Filter" indicator stands out due to its adaptive nature and responsiveness to changing market conditions.
Dynamic Smoothing Factor:
The indicator's dynamic smoothing factor adjusts in real-time based on the rate of change in price (gradient) and the user-defined sensitivity '(k)' parameter.
This adaptability allows the filter to respond promptly to both minor fluctuations and significant price movements.
Smoothed Price Action:
The final output of the filter is a smoothed representation of the price action, aiding traders in identifying trends and potential reversals.
Customizable Sensitivity:
Traders can adjust the 'Sensitivity' parameter '(k)' to suit their preferred trading style, making the indicator versatile for various strategies.
Visual Clarity:
The plotted "Dynamic Gradient Filter" line on the chart provides a clear visual guide, enhancing the understanding of market dynamics.
Usage:
Traders and analysts can utilize the "Dynamic Gradient Filter" to:
Identify trends and reversals in price movements.
Filter out noise and highlight significant price changes.
Fine-tune trading strategies by adjusting the sensitivity parameter.
Enhance visual analysis with a dynamically adjusting filter line on the chart.
Literature:
en.wikipedia.org
medium.com
en.wikipedia.org
Concept
Cryptocurrency Altcoin Screener
This indicator works as a screener for bullish/bearish moves. There are two versions showing two different sets of Altcoins, just choose version 1 or 2. Load up any chart and it will show all selected pairs and their current state regardless of asset or timeframe. Assets can be shown/unshown and longs/shorts can be shown/unshown.
It shows (asset) +1 if it considers it bullish
(asset) -1 if it considers it bearish
(asset) 0 if considers the asset to be neutral/choppy
You can see how effective the indicator is by loading up the asset you're looking at, this will show the true history of the markers for that asset.
This script utilises MACD and RSI on the daily timeframe on both USDT and BTC pairs in order to identify a trend.
The main purpose of the script is to easily identify strong trends that allow you to do TA with rather than manually looking at every asset
itradesize /\ Silver Bullet x Macro x KillzoneThis indicator shows the best way to annotate ICT Killzones, Silver Bullet and Macro times on the chart. With the help of a new pane, it will not distract your chart and will not cause any distractions to your eye, or brain but you can see when will they happen.
The indicator also draws everything beforehand when a proper new day starts.
You can customize them how you want to show up.
Collapsed or full view?
You can hide any of them and keep only the ones you would like to.
All the colors can be customized, texts & sizes or just use shortened texts and you are also able to hide those drawings which are older than the actual day.
You should minimize the pane where the script has been automatically drawn to therefore you will have the best experience and not show any distractions.
The script automatically shows the time-based boxes, based on the New York timezone.
Killzone Time windows ( for indices ):
London KZ 02:00 - 05:00
New York AM KZ 07:00 - 10:00
New York PM KZ 13:30 - 16:00
Silver Bullet times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro times:
02:33 - 03:00
04:03 - 04:30
08:50 - 0910
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
"Daily Range with Filtre [Hunter_Algo]
- The script calculates the high and low ranges based on the specified session time, such as the Asia Liquidity session.
- It uses the timeinrange function to determine if the current bar is within the specified session.
- High and low values are updated based on whether the current high or low surpasses the previous values within the specified session.
- The script includes functions to convert day strings to integers and style strings to enumeration values.
- There are additional inputs related to the start and end of the day range, as well as colors and styles for various elements.
- The script calculates daily high (Dh), daily low (Dl), and other variables based on certain conditions, including the day of the week.
Oops!Oops! is based on an overemotional response, then a quick reversal of the concomitant overreaction of price. The overreaction we are looking for to give us a buy signal is an opening that is below the previous day's low. The entry comes when, following the lower open, price then rallies back to the previous day's low (selling pressures have been abated and a market rally should follow). A sell signal is just the opposite. We will be looking for an open greater than the prior day's high. Our entry then comes from price falling back to the prior high, giving us a strong short-term suggestion of lower prices to come.
Cycle OscillatorThe Cycle Oscillator is a tool developed to help traders analyze market cycles thanks to a simplified version of the Hurst theory and the easy visualization provided by the detrended cycle.
This indicator has two functions:
- The first one is the plotting of a line that oscillates above and below the zero line, which can be used to find the cycle direction and momentum
- The second feature is the next-cycle bottom forecaster, useful for estimating the timing of the future pivot low based on the pivot low of the oscillator.
This last feature shows graphically the period in which the next low will probably happen, using as a calculation method the timing of the previous indicator's lows.
Additionally, the user can choose to modify the cycle length to analyze bigger or smaller price movements.
This indicator can be greatly used in combination with other Cycle Indicators to gain more confluence in the plotted time areas.
Cycle IndicatorThe Cycle Indicator is a tool developed to help traders analyze market cycles thanks to a simplified version of the Hurst theory.
This indicator has two functions:
- The first one is the plotting of a line that can be used to find the cycle direction and momentum
- The second feature is the next-cycle bottom forecaster, useful for estimating the timing of the future pivot low.
This last feature shows graphically the period in which the next low will probably happen, using as a calculation method the timing of the previous lows.
Additionally, the user can choose to extend this time zone or to limit them to the range between the last pivot high and low.
NormInvTargetSeekerNormInvTargetSeeker
The NormInvTargetSeeker is a trading tool designed to aid traders in identifying and capitalizing on Distribution and Accumulation zones, highlighting specific price levels that could serve as targets for future price movements. Although the indicator itself is not multi-timeframe, an effective trading strategy might involve signal validation across multiple timeframes.
🔶 USAGE
The indicator identifies Distribution and Accumulation zones, providing potential targets for future price moves.
Traders are encouraged to use these zones as profit targets or potential reversal points.
Confluence Zones
These zones are identified as regions where various factors or levels converge, signaling an increased probability of price reaction.
They can be used to reinforce signals or identify levels where price might encounter significant resistance or support.
🔹 Trading Strategy
First, identify a signal on your primary trading timeframe.
Manually check higher timeframes to ensure the signal aligns with them.
Use the identified zones, whether Distribution or Accumulation, as target zones for your trades.
🔶 Order Blocks
The NormInvTargetSeeker identifies "Order Blocks" by examining a specified number of consecutive candles with a specific condition: the current candle must completely engulf the previous candle. This means that both the high and low of the current candle are higher and lower, respectively, than the high and low of the previous candle, signifying a dominant move in the direction of the current candle.
🔹 Trading Strategy
Target Confirmation: Order Blocks can serve to confirm target points, providing additional validation for identified levels.
Market Insight: They offer crucial insights into whether "big hands" or institutional players are positioned as buyers or sellers in the market.
Traders can use Order Blocks as a means to validate targets or key price levels, observing if the price reacts significantly upon reaching these blocks.
They can also provide insights into the general market direction or underlying market strength by identifying where the major market players are placing their orders.
🔶 SETTINGS
The indicator allows users to adjust various parameters to customize the display and logic of the tool to fit their needs.
🔹 Display Settings
Users can customize the colors and displays of various zones and labels to match their preferences.
🔶 LICENSE AND CREDITS
This work is licensed under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). More information here: creativecommons.org
This indicator utilizes a TypeScript implementation of the Normal Inverse function as a reference, which can be found here : github.com
Special thanks to the authors of the referenced code for providing a foundation upon which this indicator was built.
🔶 UPDATES
Current Version: 1.0.0
For future updates, please check the comment section.
🔶 CONTACT
For any questions or suggestions, please feel free to contact @RickSimpson on TradingView.
Earnings LevelsI am proud to announce that the formerly secret "Key Earnings Levels" graphing tool will be freely available to TradingView users whereas before it was only available by monthly or annual subscription since its invention here at TradingView many years ago by Tim West. TradingView code writers wrote the original code for using this powerful tool and then Johannes Falkenburg re-wrote the code several years ago.
The most important FOUR days a year in a stock chart are the days that the company gives its quarterly update. Since the GRAND majority of companies have earnings, the indicator is called the "Key Earnings Level", or KEL for short. The unique part of the release of the quarterly update is that it can be "before the open" or "after the close" and the price action leading up to the earnings and immediately after the earnings are useful for future reference, as you'll see shortly.
The Key Earnings indicator plots a triangle for the range around the day before and the day after earnings and draws a mid-point line to capture the over/under level for that report. That mid-point line is then extended into the future for a minimum of one quarter until the next earnings report and as long as a year with the current code.
This triangle plot allows you to see how a stock is trading RELATIVE TO where it was trading when earnings were announced and when a glimpse into the current quarter along with projections for the upcoming year.
Simply put: Key Earnings Levels are the easiest way to see how a stock is doing relative to the most important four days a year.
You can devise your own trading strategies around these levels, but I want you to have this information so you can see it and know it too. I've kept this little secret of Key Hidden Levels to myself and my followers in the Key Hidden Levels Chat Room here at TradingView for far too long. I have occasionally published charts with the Key Earnings Levels but have not made the code freely available to TradingView subscribers.
If anyone has paid me for access to these indicators and wants a refund, I will be glad to do that. This is too important to keep from everyone any longer. I think it is essential to make this available to everyone to make sure we all have the most advantage we can get when investing and trading in the markets.
I hope you can all find the powerful benefit from using Key Earnings Levels and please thank Johannes Falkenburg aka @Vollchaot here at TradingView for writing the latest version of this code.
The idea itself came from using TradingView and the powerful graphing and layout features here to track our observations and to do research. Thank you TradingView for such a great product.
I look forward to answering any questions.
Sincerely,
Tim West
3M_RANGE/ErkOzi/Hello Dear Investors,
Today, I'd like to introduce you to an indicator called "3M Range" and explain how this indicator is calculated, as well as the kind of strategy it can offer.
What is the 3M Range Indicator?
"3M Range" is an analytical tool designed to identify and visualize market movements within three-month periods. This indicator employs specific levels and Fibonacci levels to assist investors in understanding market trends.
How is it Calculated?
The indicator utilizes the opening, highest, and lowest prices of three-month periods starting on Mondays. By using these prices, the indicator tracks weekly opening prices and marks the opening prices every Monday.
How Does the Indicator's Strategy Work?
Using this indicator, you can refine your long-term investment strategies:
Identify Three-Month Periods: The indicator follows the opening, highest, and lowest prices in three-month periods. This allows for a clearer understanding of long-term trends.
Utilize Fibonacci Levels: The indicator calculates Fibonacci levels to show support and resistance levels. These levels can help predict potential reversals or ongoing movements.
Observe Monday Opening Prices: The indicator distinctly marks Monday opening prices. This helps you capture potential movements at the beginning of the week.
Evaluate Trends and Opportunities: By using the indicator, you can observe long-term trends and potential market opportunities more clearly.
In Conclusion,
The "3M Range" indicator provides long-term investors with a better analytical tool by showcasing market movements within three-month periods. The indicator marks Monday opening prices and allows for analysis supported by Fibonacci levels. By using this indicator, you can shape your long-term investment strategies more consciously.
Always remember that, as with anything, making careful and informed decisions is crucial when investing. I hope this indicator helps you better navigate your long-term investments.
Note: Understanding market risks and utilizing analytical tools carefully is always important. Best of luck!
Baha'i Reversal Points [CC]The Baha'i Reversal Points is a custom creation that combines some of my favorite passions, creating stock indicator scripts and my faith. The Baha'i Faith believes in the oneness of God and all religions, and sees the number 9 as significant because that is the number of major world religions as well as the Baha'i symbol is a nine-pointed star. The number 19 is also seen as significant because in the Baha'i calendar, there are 19 months, and each month is made up of 19 days. Anyway, with all that being explained, I created these reversal points to find the points where the last 19 highs or lows are higher or lower, respectively than the previous high or low nine days ago. As with many indicators, this does have some hits and misses but does a pretty good job of finding reversal points based on these criteria.
There are a few different ways to analyze this data to determine when to buy or sell. I have set the default behavior for when we encounter the first time that the amount of highs or lows is greater than or equal to the length amount using a crossover or crossunder alert. You could also ignore the crossover or crossunder alerts and buy when the count is greater than or equal to the length, which can happen for extended periods depending on the underlying trend. Overall, buy when the buy label appears and sell when the sell label appears.
Let me know if there are any other custom indicators or scripts you would like to see me publish!
KeitoFX Dynamic Indicator Free vers.This script represents a versatile dynamic indicator called "KeitoFX Dynamic Indicator Free version." It is developed by the author "KeitoFX" and operates as a custom indicator overlaying on financial charts. The indicator utilizes a unique algorithm to dynamically identify bullish and bearish candlestick patterns with specific criteria.
Key Features:
- The indicator visually marks bullish and bearish candlestick patterns using triangle shapes, providing quick visual cues to traders.
- Bullish patterns are detected when the closing price is higher than the opening price and the high and low prices of the candlestick form a narrow range.
- Bearish patterns are identified when the closing price is lower than the opening price, and the high and low prices also form a narrow range.
The indicator incorporates flexible settings that users can customize to fit their trading preferences:
- Users can choose the table's placement, either at the "Top Right," "Middle Right," or "Bottom Right" of the chart.
- Customizable dimensions for the width and height of the table are available.
- Adjustable text size settings ranging from "Auto" to "Huge" are provided for the displayed text.
- A descriptive table containing trading rules and conditions is optionally displayed below the price chart.
Additional Information:
- The indicator's color scheme is harmonious, with shades of purple and neutral tones.
- The "Require FVG" setting influences the pattern detection's sensitivity.
- A dynamic standard deviation is calculated based on the selected displacement settings and historical candle ranges.
- A "FVG" condition enhances pattern accuracy.
- Bullish and bearish pattern detection includes overlapping with other predefined arrays to increase pattern significance.
Note:
This indicator is provided under the Mozilla Public License 2.0, as indicated by the source code comment at the beginning of the script. Users are encouraged to review and comply with the license terms when using this indicator in their trading activities.
AFRHi everyone! Sorry for not posting anything for so long again. I will be active in July, after passing my university exams. I bought some S&C magazine archives, so await my new post strategies and indicator in July, as things are gonna get real interesting! But for now let me hand you some new and interesting stuff — AFR indicator.
Actually, this is my third time republishing this indicator after a big timeout because of the battles with TV mods on reference politics (which I lost).
This is indicator was originaly made by some user from other trading website, which I can't mention because of TV reference politics.
Which principles are behind AFR?
First we define our own low and high (OL and OH respectively), which are equal to:
OL = open - ATR * ATR_Factor
OH = open + ATR * ATR_Factor,
where ATR — Average True Range,
ATR_Factor — "Factor" in the settings — multiplier for ATR.
On each tick we remember AFR's value from previous bar, if it is not 0.
When OL is greater then AFR, then AFR is equal to OL. It means that there is probably an uptrend, so we adjust AFR accordingly.
When OH is lower then AFR, then AFR is equal to OH. It means that there is probably a downtrend, so we adjust AFR accordingly.
How to use?
Green AFR — bullish trend.
Red AFR — bearish trend.
Green AFR's triangle up — buy signal — appears when AFR changes it's colour from red to green.
Red AFR's triangle down— sell signal — appears when AFR changes it's colour from green to red.
ALERTS INCLUDED!
My personal ecommendations
- You can AFR as a tool to find short-term and middle-term trends, as it does it's best to find such trends;
- If are a scalper, then you probably should try AFR on low factor settings, as AFR alone can find good scalping entries.
- As AFR is a trend indicator, please use it with other confirmation indicator to make better entries.
Hope you will find this script useful.
Take your profits!
- Tarasenko Fyodor
Volume Spread Analysis Candle PatternsVolume Spread Analysis (VSA) is a methodology used in trading and investing to analyze the relationship between volume, price spread, and price movement in financial markets. It was developed by Richard Wyckoff, a prominent trader and market observer.
The core principle of VSA is that changes in volume can provide insights into the strength or weakness of price movements and indicate the intentions of market participants. By examining the interplay between volume and price, traders aim to identify the behavior of smart money (informed institutional investors) versus less-informed market participants.
Key concepts in Volume Spread Analysis include:
1. Volume: VSA places significant emphasis on volume as a leading indicator. It suggests that changes in volume precede price movements and can provide clues about the market's sentiment.
2. Spread: The spread refers to the price range between the high and low of a given trading period (e.g., a candlestick or bar). VSA considers the relationship between volume and spread to gauge the strength of price action.
3. Upthrust and Springs: These are VSA candle patterns that indicate potential market reversals. An upthrust occurs when prices briefly move above a resistance level but fail to sustain the upward momentum. Springs, on the other hand, happen when prices briefly dip below a support level but quickly rebound.
4. No Demand and No Supply: These patterns suggest a lack of interest or participation from buyers (no demand) or sellers (no supply) at a particular price level. These conditions may foreshadow a potential price reversal or consolidation.
5. Hidden Buying and Selling: Hidden buying occurs when prices close near the high of a bar, indicating the presence of buyers even though the market appears weak. Hidden selling is the opposite, where prices close near the low of a bar, suggesting the presence of sellers despite apparent strength.
By combining these VSA concepts with other technical analysis tools, traders seek to identify potential trading opportunities with favorable risk-reward ratios. VSA can be applied to various financial markets, including stocks, futures, forex, and cryptocurrencies.
It's important to note that while VSA provides a framework for analyzing volume and price, its interpretation and application require experience, skill, and subjective judgment. Traders often use VSA in conjunction with other technical indicators and chart patterns to make well-informed trading decisions.
DZ Strategy ICTThe script presented is a trading strategy called "Breaker Block Strategy with Price Channel". This strategy uses multiple time frames (1 minute, 5 minutes, 15 minutes, 1 hour, and 4 hours) to detect support and resistance areas on the chart.
The strategy uses parameters such as length, deviations, multiplier, Fibonacci level, move lag and volume threshold for each time frame. These parameters are adjustable by the user.
The script then calculates support and resistance levels using the simple moving average (SMA) and standard deviation (STDEV) of closing prices for each time frame.
It also detects "Breaker Blocks" based on price movement from support and resistance levels, as well as trade volume. A Breaker Block occurs when there is a significant breakout of a support or resistance level with high volume.
Buy and sell signals are generated based on the presence of a Breaker Block and price movement from support and resistance levels. When a buy signal is generated, a buy order is placed, and when a sell signal is generated, a sell order is placed.
The script also plots price channels for each time frame, representing resistance and support levels.
Profit limit levels are set for each time range, indicating that the price levels assigned to positions should be closed with a profit. Stop-loss levels are also set to limit losses in the event of canceled price movements.
In summary, this trading strategy uses a combination of Breaker Block detection, support and resistance levels, price channels and profit limit levels to generate buy and sell signals and manage positions on different time ranges.
Market Structure and Liquidity IndicatorThis indicator tracks the market structure by identifying the highest high and lowest low. It then calculates the area of interest by taking the average of these levels. Additionally, it calculates liquidity by dividing the volume by the range between the highest high and lowest low.
Please note that this is a basic example, and you can modify and enhance it according to your specific requirements and trading strategy. Remember to thoroughly backtest and validate any trading strategy or indicator before using it in live trading.
PSESS1 - Learn PineScript InputsThis is a script written exclusively for people who are trying to learn Pine Script.
PSESS stands for "Pine Script Educational Script Series" which is a series of scripts that helps Pine Script programmers in 2 ways:
1. Learn Pine Script at more depth by an interactive environment where they can immediately see the effects of any change in the pre-written code and also comparing different lines code having tiny differences so they can grasp the details.
2. Have this script open while coding in order to copy the line they find useful
Pine Script Library couldn't be used for this purpose since this script has educational aspect and needs to be executable individually.
This is Script 1 of PSESS and focuses on inputs in Pine Script.
The script is densly commented in order to make it understandable. here is the outline of the script:
1. Inputs that can be received through the indicator() function
2. 12 possible types of input
3. Input() function arguments: defval - title - tooltip - inline - group - confirm
4. The different display of tooltip when inputs are inline
5. Multiple price and time inputs (on single request or multiple requests)
6. What happens when title argument is not specified
7. References and key points from them
Sushi Trend [HG]🍣 The Sushi Roll, a trading concept conceived at a restaurant by Mark Fisher.
While the indicator itself goes by Sushi Trend, it is completely backed by the idea of Mark Fisher's Sushi Roll Reversal Pattern. No, it has nothing to do with raw fish, it just so happens that somebody was ordering sushi during the discussion of the idea, and that's how it got its name.
📝 Origin
First mentioned in his book, The Logical Trader --- the idea of the Sushi Roll is to serve as an early warning system to identify reversals in the market. Fisher defines the pattern as a series of 10 bars, split into two different sections, seen as 5 and 5. In order for the pattern to be emitted, the 5 bars to the right must completely engulf the 5 bars to the left. It's not a super complex system and is in fact extremely simple to grasp.
📈 Supertrend Similarities
Instead of displaying the pattern in the way Fisher meant for it to be portrayed (as seen in the photo above), I instead turned it into an indicator similar to that of Supertrend while also inheriting the same concepts from the pattern. I did this because the pattern itself has inconsistencies which can be quite noticeable when trading with it after a while. For example, these patterns can occur even during consolidating periods, and even though the pattern is meant to be recognized during trending markets, the engulfing bars can sometimes be left with indecisive directions.
➡️ The Result
Here is the result, visualized to be better in a trending format. (The indicator will not contain the boxes.)
While Fisher does mention the pattern to include 10 bars, you can actually use this pattern with any number of bars. At the end of the day, it's a concept derived from a discussion at a Japanese restaurant, and a pattern that has been around for years that has seen results. Due to this, I added an input option to control the series of bars for right-bar engulf detection.
To reassure the meaning of the pattern --> "A series of 10 bars" means 5 left bars and 5 right bars. So if you want to check if 5 right bars are engulfing the previous 5 bars (as seen in the photo above), you would want to select 5 in the input settings.
You can learn more about it from the following links
Market Reversals and the Sushi Roll Technique
The Logical Trader
Swing BoxesHey, folks!
Sorry for not posting anything for such a long time. Don't have enough ideas and resources to get inspiration, so trying to brainstorm good stuff in my free time from university studies.
But despite my absence more I now have 300+ people subscribed to me! Thanks, guys, for keeping interest for my work, as I still do value each boost on my script, for real :)
So here is new script , enjoy!
Swing Boxes is pretty simple indicator, which plots signals with "boxes", that help you determine price targets.
What is the idea behind?
I wanted to make indicator, that could help me make swing trades with nice accuracy (as all we want, lol), and for signal criteria I decided to use highs and lows of the price . Then I started coding some ideas to see which of them could be worthy. And, actually, Swing Boxes appeared to be good. But the thing is, that I didn't intend to build them, they appeared as an anomaly from my code :)
I started to explore this anomaly (it looked super cool, but was repainting hard) to fix it and I succeeded, now Swng Boxes don't repaint.
The main idea is that when price goes above it's highest value of p-bars back or below it's lowest value p-bars back, then there is a some god probability, that price will continue to follow current direction.
And the things about Swing Boxes is that when there is a good trend movement, the boxes become super small to track price movement and when price breaks out in the counter-trend direction, then you will be able to almost perfectly catch a top or a bottom! But most of the signals won't be so high-quality, so don't think that is this some holy grail to trade swing-trading, because it is not.
Signal logic
Quick hint:
- epsilon(variable e ) = ATR * ATR_Factor . It is used to determine box's sensitivity to price changes.
If previous close is higher than variable, which contains previous HIGHEST value (variable h in the code), then update the this variable by taking up-to-date highest value and add epsilon( e ) to it;
If previous close is lower than variable, which contains previous LOWEST value (variable l in the code), then update the this variable by taking up-to-date lowest value and substract epsilon( e ) from it.
Variables decribed above ( h and l ) are box's top and bottom respectively, so if price cross them, it is logical to update it is value.
Settings and what is what
Swing Box Period - numbers fo bars in the past to find highest and lowest price from. The bigger the input, the bigger the boxes will be;
ATR Period;
ATR Factor - multiplier for ATR, determines sensitivity for price changes. The bigger this input, the more accurate signals will be, but less the probability that the signal will be on the top or a bottom.
Show Boxes? - when chosen, plots box's top and bottom. Used to determine price targets.
Show Baseline? - when chosen, plot's baseline, which midline between box's top and bottom.
How to use?
This indicator plots green and red triangles by default.
- Green triangle --> Buy ;
- Red triangle --> Sell ;
As I've said before, many signals from indicator will probably be garbage, so you need to tune settings for youself, so it could satisfy you .
You can enable showing boxes to see box's top and bottom. Box's bottom --> your entry, top --> your profit target.
If you find a way to sort bad signals, you will be able to trade with super cool RR, because the signal from Swing Boxes appear to be a good one, there is almost 95% probability, that price will not even come close to your stop loss, so you can trade with super small stop-losses! Smaller stop-loss --> smaller risk --> smaller loss --> bigger profit, it is that easy.
Also you can enable baseline to use at as your 1st TP, and box's top/bottom as 2nd TP, closing 25% on TP1 and the rest on TP2 (but that is just mine recommendation, you can use different RM (risk-management), if you want).
Also you can use baseline as your S/R (Support/Resistance) line, test it out on your charts.
And please, hear me out: as all other indicators out here on the TradingView, Swing Boxes ARE NOT meant to be traded in solo! Many bad signal can go in a row, so PLEASE find your way to filter out bad signals with other indicators.
You can see here the example of a garabge-class signal in a row, so be don't be deluded!
I do hope that somebody will suggest and idea to improve this thing, as I personally don't have enough time to think about it because of my university studies, but I will probably try it make this thing better throughout the time.
And that's it for now, folks! If you have any ideas for scripts, strategies or anything else, feel free to DM me or leave a comment, I will check it.
Hope you will find this script useful.
Take your profits!
- Tarasenko Fyodor
ICT Market Structure and OTE ZoneThis indicator is based on the ICT (Inner Circle Trader) concepts, and it helps identify daily market structure and the optimal trade entry (OTE) zone based on Fibonacci retracement levels.
To read and interpret this indicator, follow these steps:
Daily High and Low: The red line represents the daily high, while the green line represents the daily low. These lines help you understand the market structure and the range within which the price has moved during the previous day.
OTE Zone: The gray area between two gray lines represents the optimal trade entry (OTE) zone. This zone is calculated using Fibonacci retracement levels (in this case, 61.8% and 78.6%) applied to the previous day's high and low. The OTE zone is an area where traders might expect a higher probability of a price reversal, following the ICT concepts.
To use this indicator for trading decisions, you should consider the following:
Identify the market structure and overall trend (uptrend, downtrend, or ranging).
Watch for price action to enter the OTE zone. When the price reaches the OTE zone, it may indicate a higher probability of a price reversal.
Combine the OTE zone with other confluences, such as support and resistance levels, candlestick patterns, or additional ICT concepts like order blocks and market maker profiles, to strengthen your trading decisions.
Always use proper risk management and stop-loss orders to protect your capital in case the market moves against your trade.
Keep in mind that the provided indicator is a simple example based on the ICT concepts and should not be considered financial advice. The ICT methodology is vast, and traders often combine multiple concepts to develop their trading strategies. The provided indicator should be treated as a starting point to explore and implement the ICT concepts in your trading strategy.
Entry Percent: EssamThis Pine Script code is designed to perform the task of computing and showcasing the profit percentage, profit value, and the duration for which a specific asset is held, all in real-time. The script effectively leverages the built-in resources to provide a seamless and robust experience, as it presents the calculated figures in an easily readable format on the chart, without causing any lag or disruptions to the chart.
RAhul RAJ Out of Range Trade IndicatorThis indicator is for intraday with the basic logic that any script will always trade in its range.
So , if any script moves away from its range, it will try to come back to its normal range movement.
Suppose average movement of any share is 100 points, and share has moved more than 150 points there is high probability that it will move in opposite direction in order to have average movement of price of 100.
For Stocks please use average period as 15 days for index 30 days.
If share price(YELLOW LINE) moves away from higher or lower blue line, then with the help of volume confirmation a trade can be initiated in opposite direction.
Please note direction needs to be opposite of what has happened in the day.
for eg. upper blue line could be broken , in both situation i.e.. share price is rising or falling,
so if share price is rising and upper blue line is broken:
Bearsish trade can be initiated with the help of price action n volume .
if share price has falledn and upper blue is broken:
Bullish trade can be initiated with the help of volume n price action confirmation.
Release Notes:
Remove dead code
update average period m fib level
RAHUL ATR + Volume SpikesNew Volume Spikes Strategy.
The Average True Range (ATR) indicator is a technical analysis tool that measures the volatility of an asset. It can be used to create a trading strategy by identifying periods of high volatility and making trades based on those conditions.
Here is an example of a simple ATR trading strategy:
Calculate the ATR for the asset you are trading. This can typically be done using a charting platform or software.
Identify the average ATR over a period of time (such as 14 days). This will be your "threshold" for determining high volatility.
When the current ATR is above the threshold, enter a long position (buy) in the asset.
When the current ATR is below the threshold, exit the long position (sell) and wait for the next period of high volatility.
Repeat the process for the next period of time.
This is a basic example of an ATR strategy and can be adjusted as per one's preference, you can add other indicators or market conditions to filter out trades and also use different time frame to check the ATR values. ATR can also be used in combination with other indicators and strategies to improve the accuracy of your trades.
It's always important to backtest any strategy before actually trading with real money, and also to consider the risk management, stop loss and profit taking levels, and adjust the strategy accordingly