Percentile Nearest Rank Without Arrays [CHE] Presentation of the "Percentile Nearest Rank Without Arrays " Indicator
The "Percentile Nearest Rank Without Arrays " is a robust trading indicator designed to calculate the percentile value of a specific price within a defined time frame. This indicator provides traders with a visual representation that helps identify market trends and potential turning points.
Key Features and Functions:
- Percentile Calculation: The indicator calculates the percentile of the closing price within a specified period (default length is 15 periods). This allows traders to view the current price in the context of its historical distribution.
- Customizable Parameters: Traders can adjust the length of the observed period and the desired percentile value, making the analysis more tailored to their trading strategies.
- Color-Coded Visualization: The indicator uses color coding to signal whether the current closing price is above (green) or below (red) the calculated percentile value, providing visual clarity and quick decision-making.
- Efficiency Without Arrays: By avoiding the use of arrays, the indicator is more efficient in terms of computation and memory usage. This results in faster performance, especially when dealing with large datasets or real-time data.
Importance for Traders:
1. Trend Identification: By analyzing whether the current price is above or below a specific percentile value, traders can identify trends early and act accordingly.
2. Risk Management: The indicator helps traders better understand volatility and price distribution, leading to more effective risk management.
3. Trading Strategies: It can be used as part of trading strategies to identify entry and exit points based on statistical distributions.
4. Simplicity and Efficiency: As the indicator operates without the use of arrays, it is more efficient and simpler to implement, reducing computation time and improving the performance of the trading platform.
Scientific Explanation of Percentile Nearest Rank:
The Percentile Nearest Rank method is a statistical technique used to determine the relative standing of a value within a data set. For a given dataset of length \( n \) and a desired percentile \( p \), the method follows these steps:
1. Index Calculation: The index corresponding to the desired percentile is calculated using the formula:
index = ( p / 100 n ) -1
where "ceiling" denotes rounding up to the nearest integer.
2. Value Sorting: The values in the dataset are conceptually sorted from smallest to largest.
3. Count Comparison: For each value in the dataset, count how many values are smaller. When the count matches the calculated index, the value at this position is the percentile value.
4. Result Assignment: The value identified as the percentile value is then used for further analysis or plotting.
This method is advantageous for trading because it provides a non-parametric way to understand price distributions, making it less sensitive to outliers and more robust in volatile markets.
Scientific Context and Utility:
- Statistical Robustness: Unlike mean and median, the percentile provides a robust measure of the data distribution, less influenced by extreme values. This robustness is crucial for traders dealing with volatile markets.
- Non-Parametric Analysis: Percentiles do not assume any underlying distribution (e.g., normal distribution) of the data, making the analysis more flexible and broadly applicable.
- Quantitative Decision Making: By using percentiles, traders can make data-driven decisions based on the relative standing of current prices within historical data, enhancing the objectivity of their strategies.
- Efficiency Without Arrays: Avoiding the use of arrays reduces memory consumption and computational overhead, making the indicator more suitable for real-time applications and large datasets. This improves overall performance and responsiveness on trading platforms, which is crucial for making timely trading decisions.
In summary, the "Percentile Nearest Rank Without Arrays " indicator is a powerful tool for traders seeking to integrate statistical price distribution insights into their trading strategies. It provides a robust, non-parametric, and visually intuitive method to analyze market trends and volatility, while offering enhanced computational efficiency by avoiding the use of arrays.
Циклический анализ
MTF WaveTrend [CryptoSea]The MTF WaveTrend Indicator is a sophisticated tool designed to enhance market analysis through multi-timeframe WaveTrend calculations. This tool is built for traders who seek to identify market momentum and potential reversals with higher accuracy.
In the example below, we can see all the choosen timeframes agree on bearish momentum.
Key Features
Multi-Timeframe WaveTrend Analysis: Tracks WaveTrend values across multiple timeframes to provide a comprehensive view of market momentum.
Customizable Colour Rules: Offers three different colour rules (Traditional, WT1 0 Rule, WT1 & WT2 0 Rule) to suit various trading strategies.
Timeframe Visibility Control: Allows users to enable or disable specific timeframes, providing flexibility in analysis.
Clear Visual Indicators: Uses color-coded squares and labels to clearly display WaveTrend status across different timeframes.
Candle Colouring Option: Includes a setting for neutral candle coloring to enhance chart readability.
This example shows what can happen when all timeframes start alligning with eachother.
How it Works
WaveTrend Calculation: Computes the WaveTrend oscillator by applying a series of exponential moving averages and scaling calculations.
Multi-Timeframe Data Aggregation: Utilizes the `request.security` function to gather and display WaveTrend values from various timeframes without repainting issues.
Conditional Plotting: Displays visual cues only when higher timeframes align with the selected timeframe, ensuring relevant and reliable signals.
Dynamic Colour Rules: Adjusts the indicator colors based on the chosen rule, whether it's a traditional crossover, WT1 crossing zero, or both WT1 & WT2 crossing zero.
Traditional: Colors are determined by the relationship between WT1 and WT2. If WT1 is greater than WT2, it is bullish (bullColour), otherwise bearish (bearColour).
WT1 0 Rule: Colors are based on whether WT1 is above or below zero. WT1 above zero is bullish (bullColour), below zero is bearish (bearColour).
WT1 & WT2 0 Rule: A more complex rule where both WT1 and WT2 need to be above zero for a bullish signal (bullColour) or both below zero for a bearish signal (bearColour). If WT1 and WT2 are not in agreement, a neutral color (neutralColour) is displayed.
This indicator will make sure that the lowest timeframe you can see data from will be the timeframe you are on. This is to avoid false signals as you cannot display 3 x 5 minute candles whilst looking at the 15 minute candle.
Application
Strategic Decision-Making: Assists traders in making informed decisions by providing detailed analysis of WaveTrend movements across different timeframes.
Trend Confirmation: Reinforces trading strategies by confirming potential reversals with multi-timeframe WaveTrend analysis.
Customized Analysis: Adapts to various trading styles with extensive input settings that control the display and sensitivity of WaveTrend data.
The MTF WaveTrend Indicator by is an invaluable addition to a trader's toolkit, offering depth and precision in market trend analysis to navigate complex market conditions effectively.
RSI Sector analysis
Screening tool that produces a table with the various sectors and their RSI values. The values are shown in 3 rows, each with a user-defined length, and can be averaged out and displayed as a single value. The chart is color coded as well. Each ETF representing a sector can be looked at individually, with the top holdings in each preprogrammed, but users can define their own if they wish. The left most ticker is the "benchmark"; SPY is the benchmark for the various sectors, and the ETF is the benchmark for the tickers within.
Symbols are color coded: light blue text indicates that a symbol has greater RSI values in all three timeframes than the benchmark (the leftmost symbol). Orange text indicates that a symbol has a lower RSI value for all three timeframes. In the first row, light blue text indicates the largest RSI increase from the third row to the first row. Orange text indicates the largest RSI decrease from the third row to the first row.
A blue highlight indicates that the value is the highest among the tickers, excluding the benchmark, and an orange highlight indicates that the value is the lowest among the tickers, also excluding the benchmark. A blue highlight on the ticker indicates that it has the highest average value of the 3 rows, and a orange highlight on the ticker indicates that it has the lowest average value of the 3 rows.
HTF Dynamic EMA Smoothing Indicator [CHE] with Kernel SelectionThe Dynamic EMA Smoothing Indicator with Kernel Selection is a powerful Pine Script indicator for TradingView designed to smooth moving averages and identify market trends more clearly. Here is a detailed description of its functionalities and settings:
Main Functions:
1. Time Period Display:
- Option to show or hide an info box displaying the current time period.
- Customizable info box: Users can adjust the size, position, and colors of the info box to suit their preferences.
2. Timeframe Type Selection:
- Auto Timeframe: Automatically calculates the best timeframe based on the current resolution.
- Multiplier: Allows using an alternate timeframe as a multiple of the current resolution.
- Manual Resolution: Users can manually set a specific timeframe.
3. Colors:
- Custom colors for various graphical elements, including EMA lines and signals.
4. Basic Settings:
- EMA and Signal Periods: Defines the periods for the exponential moving averages (EMA) and signal lines.
- Smoothing Length and Kernel Type: Allows selecting the smoothing length and the type of kernel used for weighting the EMAs.
- ATR Multiplier: Defines the multiplier for the ATR (Average True Range) to identify relevant price ranges.
5. EMA Calculations:
- The indicator calculates a weighted EMA using several methods like Linear, Exponential, Epanechnikov, Triangular, and Cosine kernels.
- Smoothing is achieved by adding and removing values in a float array that stores the EMA values.
6. Plotting EMA and Signal Lines:
- The indicator plots the smoothed EMA and signal lines on the chart. The line colors change according to the trend direction (green for uptrend, red for downtrend).
7. Trading Signals:
- Long Signals: An upward arrow is displayed when the smoothed EMA indicates an uptrend.
- Short Signals: A downward arrow is displayed when the smoothed EMA indicates a downtrend.
- Alert Conditions: Alerts are triggered when long or short signals are detected.
8. ATR Bands:
- The indicator shows upper and lower ATR bands to identify potential support and resistance zones.
9. Time Period Display on Chart:
- A table is used to display the selected time period on the chart when the corresponding option is enabled.
This indicator offers extensive customization and allows traders to conduct complex market analyses using smoothed EMAs and custom timeframes. The integration of various kernels for smoothing makes it a versatile tool adaptable to different trading strategies.
Prometheus Polarized Fractal Efficiency (PFE)This indicator uses market data to calculate Polarized Fractal Efficiency (PFE) on an asset, so traders can have a better idea of which direction it may go.
Users can control the lookback length for the fractal calculation, the lookback length for the Exponential Moving Average (EMA), and whether or not to display lines at the -50 and 50 level, or -25 and 25 level.
Polarized Fractal Efficiency:
The Polarized Fractal Efficiency (PFE) indicator is a value between -100 and 100 with 0 as a midpoint.
A PFE above 0 indicates the asset may trend higher, a PFE below 0 indicates the asset may trend lower.
There are many ways to trade with PFE, the intuitive trend riding as described above, or reversals.
Even when the PFE is above 0, if it gets high enough, it may also be an indication of a reversal. A PFE of 90 - 100, or -100 - -90, may indicate price is ready to revert the other direction. Furthermore, traders already in a position may look to breaks of other levels to be their take profit or stop out spot.
Calculation:
Pi = 100 x (Price - Price )2 + N2 / Summation, j= 0, to N-2 (Price - Price )2 + 1
If Close < Close Pi = -Pi
PFEi = EMA(Pi, M)
Where:
N = period of indicator
M = smoothing period
Citation: www.investopedia.com
Scenarios:
Inputs are (9, 5) and every display option is on.
Trend example
Step 1: A short trade appears as PFE crosses below -25. We reach a safe take profit as PFE crosses below -50. Traders can use these levels to exit as well as enter.
Step 2: On the cross above 25 there is a safe long. As the PFE value breaks 0 a safe, early take profit could be appropriate for this trade. No guarantee we would see 50.
Step 3: Long scenario at break of 25, straight to 50. Simple, straightforward setup.
Step 4: This long results in a stop loss. Once again entry as PFE crosses 25, but as we cross the 0 line it is for a loss.
Step 5: The last trade in this example is reminiscent of step 3. This is a short trade entry at break of 25 and exit at break of 50.
Traders have liberty to use the PFE value to determine spots to enter and exit trades, long or short. 25 and 50 were chosen arbitrarily, values like 10 and 60 may work as well, we encourage traders to use their own discretion along with tools.
Reversal example
Step 1: PFE is around -100, crossing below it at one point! Strong zone for a potential reversal.
Step 2: PFE crosses above 25 adding conviction.
Step 3: Option to exit at 70.
Step 4: Option to exit at 90.
There is no “one size fits all method”, this approach may be more intuitive for some users and is just as feasible as the first.
Longer trend example
Step 1: Using -50 and 50 this time instead of -25 and 25 to be safer on our entries we see a short here. Was a good entry and as the value gets closer to -70 we can safely close.
Step 2: On this candle we see a long for the break of 50. On the next candle we break the 0 line, but because of our safe entry at 50, we could hold this and only stop out at a break of -25. We get close but stay in it and close at 70.
Step 3: Break of 50 for a long once again. This time the break of 0 line occurs as we are in profit, not letting a green trade go red is a golden rule of trading, so an early exit here.
Step 4: Same at step 2, break of 50 to long and stay in it, not stopping out at break of 0 line. The PFE value eventually reaches 70 and there is a good exit.
Quicker Reversal example
Step 1: Notice a close with PFE below -90, enter long for the reversal. Then close for profit when the PFE crosses above 70.
Step 2: When the PFE breaks above 90 we have a short entry. Like the long closing it when it crosses below -70.
Step 3: This step is the same setup as step 2. As PFE breaks above 90 we have a short entry. Closing it when it crosses below -70.
Recap:
Described above are 4 different examples with many different trades. Both trend and reversal trades. The PFE value is an indicator that can be used by traders in many different ways and Prometheus encourages traders to use their own discretion along with tools and not follow indicators blindly.
Options:
Users can control the input for the lookback of the indicator. The default is 9.
The smoothing factor for the EMA is also changeable, default is 5.
Users have options to display lines at -50, -25, 25, and 50.
New day started with DSTNew Day Started with DST Indicator
Description:
The "New Day Started with DST" indicator is designed for intraday charts and highlights the first bar of each new trading day, accounting for Germany's timezone and daylight saving time (DST) adjustments. This is particularly useful for traders who follow the German market or need precise day start indications based on Central European Time (CET) and Central European Summer Time (CEST).
Features:
- Timezone Adjustment: Automatically adjusts the time to CET (UTC+1) during standard time and CEST (UTC+2) during daylight saving time.
- Daylight Saving Time (DST) Handling: Correctly identifies the start and end of DST based on the last Sunday in March and October.
- New Day Highlight: Highlights the first bar of each new day, allowing traders to easily identify the start of a new trading day.
How It Works:
- Timezone Calculation: The script calculates the current time in Germany by adding the appropriate timezone offset to the UTC time.
- DST Rules: The script manually checks the conditions to determine if the current date falls within the DST period.
- New Day Detection: By checking the hour and minute of the corrected German time, the script determines if a new day has started and highlights the first bar accordingly.
Benefits:
- Enhanced Accuracy: Ensures that the start of a new day is accurately reflected according to German trading hours, considering both CET and CEST.
- Visual Aid: Provides a clear visual indication of the start of a new trading day, improving chart readability and trading precision.
- Customizable: Can be easily modified to adjust for other timezones and DST rules if needed.
Usage:
Apply this indicator to your intraday charts to automatically highlight the first bar of each new trading day, taking into account the timezone and DST adjustments for Germany. This tool is essential for traders operating in or tracking the German market, offering a reliable and precise method to monitor daily trading activity.
Example:
! (URL-to-your-screenshot)
This indicator ensures that you never miss the start of a new trading day, helping you to make timely and informed trading decisions.
---
How the Script Works:
1. Timezone Offset Calculation:
- The script begins by setting the base offset to 1 hour (CET is UTC+1).
- It initializes the DST offset to 0.
2. Determining the Current Month and Day:
- It retrieves the current month and day of the month from the `time` variable.
3. Checking DST Conditions:
- For months between April and September (inclusive), the DST offset is set to 1 hour (CEST is UTC+2).
- For March, it checks if the current date is after the last Sunday of March and if the time is past 2:00 AM to determine if DST should start.
- For October, it checks if the current date is before the last Sunday of October and if the time is before 2:00 AM to determine if DST should end.
4. Adjusting the Time for Germany:
- The script calculates the corrected German time by adding the base offset and DST offset to the UTC time.
5. Detecting the Start of a New Day:
- It checks if the hour and minute of the corrected German time are both zero (00:00), indicating the start of a new day.
6. Highlighting the First Bar:
- If the script detects a new day, it highlights the first bar of the new day with a green background color.
This approach ensures that the script accurately reflects the start of a new trading day according to German trading hours, including adjustments for daylight saving time.
Daye's Quarterly TheoryDaye's Quarterly Theory Indicator
Description
The Daye's Quarterly Theory Indicator divides trading time into smaller units to help traders identify potential accumulation, manipulation, distribution, and reversal/continuation phases within a day. It applies these time divisions to your charts, offering visual guidance aligned with ICT's PO3 concept:
Accumulation (A): The phase where positions are accumulated.
Manipulation (M): The phase where the market moves against the prevailing trend to trap traders.
Distribution (D): The phase where accumulated positions are distributed.
Reversal/Continuation (X): The phase indicating either a reversal or continuation of the trend.
This indicator breaks down time into quarters at different levels:
Daily Quarters:
Q1: 18:00 - 00:00 (Asia)
Q2: 00:00 - 06:00 (London)
Q3: 06:00 - 12:00 (NY AM)
Q4: 12:00 - 18:00 (NY PM)
90-Minute Quarters:
Q1: 18:00 - 19:30
Q2: 19:30 - 21:00
Q3: 21:00 - 22:30
Q4: 22:30 - 00:00
Micro Quarters (22.5 minutes) (Displayed on 7-minute TF or lower):
Q1: 18:00 - 18:22:30
Q2: 18:22:30 - 18:45
Q3: 18:45 - 19:07:30
Q4: 19:07:30 - 19:30
Features
Time Box Visualization: Highlights different quarters of the trading day to help visualize market phases.
Customizable Colors: Allows users to set different colors for daily, 90-minute, and micro quarters.
Flexible Settings: Designed to work out-of-the-box on both light and dark background charts.
ICT PO3 Alignment: Helps traders align their strategies with ICT's Accumulation, Manipulation, Distribution, and Reversal/Continuation phases.
Usage
Apply this indicator to your NQ1! or ES1! charts and observe the confluence with ICT's macro times. Use it to predict potential market phases and optimize your trading strategy by buying after manipulation down or selling after manipulation up.
Note: The indicator's display may vary based on the timeframe viewed and broker feeds. Back-test and research for best results on your preferred assets.
Strong Support and Resistance with EMAs @viniciushadek
### Strategy for Using Continuity Points with 20 and 9 Period Exponential Moving Averages, and Support and Resistance
This strategy involves using two exponential moving averages (EMA) - one with a 20-period and another with a 9-period - along with identifying support and resistance levels on the chart. Combining these tools can help determine trend continuation points and potential entry and exit points in market operations.
### 1. Setting Up the Exponential Moving Averages
- **20-Period EMA**: This moving average provides a medium-term trend view. It helps smooth out price fluctuations and identify the overall market direction.
- **9-Period EMA**: This moving average is more sensitive and reacts more quickly to price changes, providing short-term signals.
### 2. Identifying Support and Resistance
- **Support**: Price levels where demand is strong enough to prevent the price from falling further. These levels are identified based on previous lows.
- **Resistance**: Price levels where supply is strong enough to prevent the price from rising further. These levels are identified based on previous highs.
### 3. Continuity Points
The strategy focuses on identifying trend continuation points using the interaction between the EMAs and the support and resistance levels.
### 4. Buy Signals
- When the 9-period EMA crosses above the 20-period EMA.
- Confirm the entry if the price is near a support level or breaking through a resistance level.
### 5. Sell Signals
- When the 9-period EMA crosses below the 20-period EMA.
- Confirm the exit if the price is near a resistance level or breaking through a support level.
### 6. Risk Management
- Use appropriate stops below identified supports for buy operations.
- Use appropriate stops above identified resistances for sell operations.
### 7. Validating the Trend
- Check if the trend is validated by other technical indicators, such as the Relative Strength Index (RSI) or Volume.
### Conclusion
This strategy uses the combination of exponential moving averages and support and resistance levels to identify continuity points in the market trend. It is crucial to confirm the signals with other technical analysis tools and maintain proper risk management to maximize results and minimize losses.
Implementing this approach can provide a clearer view of market movements and help make more informed trading decisions.
Prometheus Analytics Hurst ExponentThis indicator uses market data to calculate the Hurst Exponent so traders can have knowledge of the long memory of the asset.
Users can control the lookback length for the H value (Hurst Exponent), lookback length for the SMA (Simple Moving Average) of the Hurst Exponent, to show either, and what to calculate the H value and SMA on.
Hurst Exponent:
The Hurst Exponent is a value between 0 and 1 with 0.5 as a midline.
An H value(Hurst Exponent) above 0.5 indicates a trending market, and a market that should have larger, longer moves.
An H value below 0.5 indicates a mean reverting market, and a market that should have smaller, shorter moves.
An H value of0.5 indicates a random walk. This would mean the price would follow a Brownian Motion model and future prices would be independent from past prices.
Just because the H value is above 0.5 does not indicate that there should be an UP trend, just as a value below 0.5 does not indicate a DOWN trend. It indicates that there should be a trend, up or down.
Scenarios:
An intuitive way to use the Hurst Exponent is as an asset is trending in whatever direction, as the H value crosses below 0.5 it indicates a reversal. It indicates that what was happening before isn’t impacting what is happening now as much.
Steps explained from picture:
Step 1: Strong uptrend is identified with the asset moving up aggressively with H above 0.5.
Step 2: The H value crosses below 0.5 and prices stay elevated.
Step 3: Price reverts back down as the H value stays below 0.5
Just because the H value is above 0.5 doesn’t mean the asset has to be uptrending. In this example we see the asset fall as the H value is above 0.5. Not only that, but every time it crosses below 0.5, the asset takes a breather on the way down
Step 1: As the H value crosses above 0.5, we can expect trends to appear in the asset.
Step 2: After the trend switches to down, we only see a breather and some chop after the H value crosses back below 0.5.
Step 3: Once The H value crosses back over we see the downtrend continue and new lows be made.
Step 4: We see it once again, simply the area of chop is bigger. We don’t see a higher high, breaking the overall downtrend, but once the H value crosses over again the downturn continues and we see a lower low.
It may occur when no strong trend is made in either direction. The H value above 0.5 does indeed sometimes correlate with an uptrend sometimes.
Step 1: After the strong downtrend we see a break below 0.5 with some consolidation.
Step 2: No clear big move on the asset or H value.
Step 3: H value above 0.5 leads to a break of highs and a new uptrend.
Users have the option to decide what to calculate the H value on. Close is the default, or dollar return per bar are the options. Dollar return per bar and offer an H value that may give a better indication of when price moves will be small and sporadic.
Using dollar move per bar.
Step 1: H value cross above 0.5, we see large candles and fast moves.
Step 2: H value crosses below 0.5, the candles immediately following are shorter. The big red candles come right before the cross back above.
Step 3: H value cross back above 0.5, after some chop, large move down.
Similar story
Step 1: H value above 0.5, big trends either direction
Step 2: After the H value crosses below, the moves are short and choppy.
Settings:
Options to show or remove either the H value or it’s SMA.
Options to adjust the period uses, default is (32, 16)
Master Accumulation Weekly Buy SignalsMaster Accumulation Weekly Buy Signals
The Master Accumulation Weekly Buy Signals indicator is designed to help traders identify potential buy opportunities based on the accumulation and distribution of volume, with a primary focus on weekly timeframes. This indicator combines the On Balance Volume (OBV) and the Accumulation/Distribution (AD) indicators to generate buy signals when both metrics show a decline.
Key Features:
Percentage Change Calculation: Calculates the percentage change in OBV and AD over a specified length tailored to weekly timeframes.
Timeframe Adaptability: While optimized for weekly timeframes, the indicator can also adjust to daily and monthly charts.
Volume Validation: Ensures that volume data is available and valid for accurate calculations.
Buy Signals: Generates buy signals when both OBV and AD percentage changes are negative, indicating potential accumulation by informed traders.
Visual Alerts: Plots buy signal triangles below the price bars on the main chart for easy identification.
How It Works:
On Balance Volume (OBV): Tracks the cumulative volume, considering the direction of price changes, and calculates the percentage change over the specified period, primarily for weekly analysis.
Accumulation/Distribution (AD): Measures the flow of volume into or out of a security, considering the relationship between the closing price and the high-low range, and calculates the percentage change over the specified period, primarily for weekly analysis.
Buy Signal Generation: A buy signal is generated when both OBV and AD show a negative percentage change, suggesting a potential buying opportunity.
How to Use:
Apply the indicator to your chart and select the weekly timeframe for optimal performance.
Look for buy signal triangles that appear below the price bars on the main chart.
Use the buy signals as part of your broader trading strategy, confirming them with other technical analysis tools and indicators.
Important Note:
This indicator is a tool to assist in identifying potential buy signals based on volume accumulation patterns. It is primarily designed for weekly timeframes and should not be used as a standalone trading strategy. Always perform comprehensive analysis and consider risk management practices before making any trading decisions.
This description highlights the indicator's primary focus on weekly timeframes while providing comprehensive information about its features and usage.
THIS IS TEST ONLY*******
Rolling Correlation with Bitcoin V1.1 [ADRIDEM]Overview
The Rolling Correlation with Bitcoin script is designed to offer a comprehensive view of the correlation between the selected ticker and Bitcoin. This script helps investors understand the relationship between the performance of the current ticker and Bitcoin over a rolling period, providing insights into their interconnected behavior. Below is a detailed presentation of the script and its unique features.
Unique Features of the New Script
Bitcoin Comparison : Allows users to compare the correlation of the current ticker with Bitcoin, providing an analysis of their relationship.
Customizable Rolling Window : Enables users to set the length for the rolling window, adapting to different market conditions and timeframes. The default value is 252 bars, which approximates one year of trading days, but it can be adjusted as needed.
Smoothing Option : Includes an option to apply a smoothing simple moving average (SMA) to the correlation coefficient, helping to reduce noise and highlight trends. The smoothing length is customizable, with a default value of 4 bars.
Visual Indicators : Plots the smoothed correlation coefficient between the current ticker and Bitcoin, with distinct colors for easy interpretation. Additionally, horizontal lines help identify key levels of correlation.
Dynamic Background Color : Adds dynamic background colors to highlight areas of strong positive and negative correlations, enhancing visual clarity.
Originality and Usefulness
This script uniquely combines the analysis of rolling correlation for a current ticker with Bitcoin, providing a comparative view of their relationship. The inclusion of a customizable rolling window and smoothing option enhances its adaptability and usefulness in various market conditions.
Signal Description
The script includes several features that highlight potential insights into the correlation between the assets:
Rolling Correlation with Bitcoin : Plotted as a red line, this represents the smoothed rolling correlation coefficient between the current ticker and Bitcoin.
Horizontal Lines and Background Color : Lines at -0.5, 0, and 0.5 help to quickly identify regions of strong negative, weak, and strong positive correlations.
These features assist in identifying the strength and direction of the relationship between the current ticker and Bitcoin.
Detailed Description
Input Variables
Length for Rolling Window (`length`) : Defines the range for calculating the rolling correlation coefficient. Default is 252.
Smoothing Length (`smoothing_length`) : The number of periods for the smoothing SMA. Default is 4.
Bitcoin Ticker (`bitcoin_ticker`) : The ticker symbol for Bitcoin. Default is "BINANCE:BTCUSDT".
Functionality
Correlation Calculation : The script calculates the daily returns for both Bitcoin and the current ticker and computes their rolling correlation coefficient.
```pine
bitcoin_close = request.security(bitcoin_ticker, timeframe.period, close)
bitcoin_dailyReturn = ta.change(bitcoin_close) / bitcoin_close
current_dailyReturn = ta.change(close) / close
rolling_correlation = ta.correlation(current_dailyReturn, bitcoin_dailyReturn, length)
```
Smoothing : A simple moving average is applied to the rolling correlation coefficient to smooth the data.
```pine
smoothed_correlation = ta.sma(rolling_correlation, smoothing_length)
```
Plotting : The script plots the smoothed rolling correlation coefficient and includes horizontal lines for key levels.
```pine
plot(smoothed_correlation, title="Rolling Correlation with Bitcoin", color=color.rgb(255, 82, 82, 50), linewidth=2)
h_neg1 = hline(-1, "-1 Line", color=color.gray)
h_neg05 = hline(-0.5, "-0.5 Line", color=color.red)
h0 = hline(0, "Zero Line", color=color.gray)
h_pos05 = hline(0.5, "0.5 Line", color=color.green)
h1 = hline(1, "1 Line", color=color.gray)
fill(h_neg1, h_neg05, color=color.rgb(255, 0, 0, 90), title="Strong Negative Correlation Background")
fill(h_neg05, h0, color=color.rgb(255, 165, 0, 90), title="Weak Negative Correlation Background")
fill(h0, h_pos05, color=color.rgb(255, 255, 0, 90), title="Weak Positive Correlation Background")
fill(h_pos05, h1, color=color.rgb(0, 255, 0, 90), title="Strong Positive Correlation Background")
```
How to Use
Configuring Inputs : Adjust the rolling window length and smoothing length as needed. Ensure the Bitcoin ticker is set to the desired asset for comparison.
Interpreting the Indicator : Use the plotted correlation coefficient and horizontal lines to assess the strength and direction of the relationship between the current ticker and Bitcoin.
Signal Confirmation : Look for periods of strong positive or negative correlation to identify potential co-movements or divergences. The background colors help to highlight these key levels.
This script provides a detailed comparative view of the correlation between the current ticker and Bitcoin, aiding in more informed decision-making by highlighting the strength and direction of their relationship.
Sessions [UkutaLabs]█ OVERVIEW
Sessions is a trading toolkit that displays the different trading sessions on your chart during a trading day. By default, Sessions displays the four standard trading sessions; New York, Tokyo, London, and Sydney.
Each of the four sessions can be toggled, and the Sessions indicator is completely customizable, allowing users to define their own sessions to be generated by the script.
The aim of this script is to improve the trading experience of users by automatically displaying information about each default or custom session to the user.
█ USAGE
This script will automatically detect and label different market sessions. By default, the script will identify the four standard trading sessions, but each of these can be toggled off in the settings.
However, users are not limited to these four trading sessions and have the ability to define their own sessions to be identified by the script. When a session begins, the script will automatically start outlining the market data of that session, including the high and low of the period that is represented by the session.
If the market is within two or more sessions at the same time, then each session will be treated individually and will overlap with each other.
The sessions will be identified as a colored box surrounding the market data of the period that it represents, and a label will be displayed above the box to identify the session that it represents. The label, color and period of each session is completely customizable.
The user can also adjust all sessions at once to account for timezones in the settings.
█ SETTINGS
Session 1
• Session 1: Determines whether or not this session will be drawn by the script.
• A string field to determine the name of the session that will be displayed above the session range.
• Two time fields representing the start and finish of the session.
• A color field to determine the color of the range and label.
Session 2
• Session 2: Determines whether or not this session will be drawn by the script.
• A string field to determine the name of the session that will be displayed above the session range.
• Two time fields representing the start and finish of the session.
• A color field to determine the color of the range and label.
Session 3
• Session 3: Determines whether or not this session will be drawn by the script.
• A string field to determine the name of the session that will be displayed above the session range.
• Two time fields representing the start and finish of the session.
• A color field to determine the color of the range and label.
Session 4
• Session 4: Determines whether or not this session will be drawn by the script.
• A string field to determine the name of the session that will be displayed above the session range.
• Two time fields representing the start and finish of the session.
• A color field to determine the color of the range and label.
Time Zones
• UTC +/-: Determines the offset of each session. Enter - before the number to represent a negative offset.
High Probability OS/OB {DCAquant}DCAquant - High Probability OS/OB
The DCAquant - High Probability OS/OB Pine Script is a sophisticated indicator that provides insights into overbought (OB) and oversold (OS) conditions based on Hull Moving Averages (HMA) and Volume Weighted Moving Averages (VWMA). Here's a detailed breakdown of its functionality:
-------------------------------------------------------------------------------------
THIS INDICATOR IS ONLY WRITTEN FOR BTC, ETH and TOTAL!!!!!!!!!!!!!
-------------------------------------------------------------------------------------
Functionality
The script identifies high-probability OB and OS zones by combining multiple moving averages (MAs).
1. Volume Weighted Moving Average (VWMA)
The VWMA function computes the VWMA over a specified length, incorporating both the price and volume.
2. Hull Moving Average with Volume Weight (HMA-VW)
The hullma_vw function calculates the HMA using the VWMA. This involves:
Computing VWMAs over the full length and half-length.
Using these VWMAs to derive the HMA-VW through a weighted approach.
5. Standard Hull Moving Average (HMA)
The hull function computes the HMA using the standard weighted moving average (WMA).
4. Smoothed HMA-VW
This is an Exponential Moving Average (EMA) of the HMA-VW to smooth out short-term fluctuations.
How this works
First, the distance between the 2 MA's is calculated.
The distance is scored against the average price of the last 100 days.
By getting this score we can calculate extremes
The Extremes are categorized into 4 levels. The transparency of the background color distinguishes these 4 levels.
Only the MOST extremes are plotted ON THE CHART. Within the indicator, all 4 levels are plotted.
Usage
Extreme Buy zone: Consider entering the market when the indicator shows deep negative values (oversold). These are highlighted with a cyan background, with increasing opacity indicating stronger buy signals (Level 4 Zones).
Extreme Sell Zone: Consider exiting the market when the indicator shows high positive values (overbought). These are highlighted with a magenta background, with increasing opacity indicating stronger sell signals (Level 4 Zones).
Disclaimer
This indicator should not be used in isolation. It is recommended to use this as part of a systematic approach, incorporating other tools and analysis methods to confirm signals and make well-informed trading decisions.
Persistent Homology Based Trend Strength OscillatorPersistent Homology Based Trend Strength Oscillator
The Persistent Homology Based Trend Strength Oscillator is a unique and powerful tool designed to measure the persistence of market trends over a specified rolling window. By applying the principles of persistent homology, this indicator provides traders with valuable insights into the strength and stability of uptrends and downtrends, helping to inform better trading decisions.
What Makes This Indicator Original?
This indicator's originality lies in its application of persistent homology , a method from topological data analysis, to financial markets. Persistent homology examines the shape and features of data across multiple scales, identifying patterns that persist as the scale changes. By adapting this concept, the oscillator tracks the persistence of uptrends and downtrends in price data, offering a novel approach to trend analysis.
Concepts Underlying the Calculations:
Persistent Homology: This method identifies features such as clusters, holes, and voids that persist as the scale changes. In the context of this indicator, it tracks the duration and stability of price trends.
Rolling Window Analysis: The oscillator uses a specified window size to calculate the average length of uptrends and downtrends, providing a dynamic view of trend persistence over time.
Threshold-Based Trend Identification: It differentiates between uptrends and downtrends based on specified thresholds for price changes, ensuring precision in trend detection.
How It Works:
The oscillator monitors consecutive changes in closing prices to identify uptrends and downtrends.
An uptrend is detected when the closing price increase exceeds a specified positive threshold.
A downtrend is detected when the closing price decrease exceeds a specified negative threshold.
The lengths of these trends are recorded and averaged over the chosen window size.
The Trend Persistence Index is calculated as the difference between the average uptrend length and the average downtrend length, providing a measure of trend persistence.
How Traders Can Use It:
Identify Trend Strength: The Trend Persistence Index offers a clear measure of the strength and stability of uptrends and downtrends. A higher value indicates stronger and more persistent uptrends, while a lower value suggests stronger and more persistent downtrends.
Spot Trend Reversals: Significant shifts in the Trend Persistence Index can signal potential trend reversals. For instance, a transition from positive to negative values might indicate a shift from an uptrend to a downtrend.
Confirm Trends: Use the Trend Persistence Index alongside other technical indicators to confirm the strength and duration of trends, enhancing the accuracy of your trading signals.
Manage Risk: Understanding trend persistence can help traders manage risk by identifying periods of high trend stability versus periods of potential volatility. This can be crucial for timing entries and exits.
Example Usage:
Default Settings: Start with the default settings to get a feel for the oscillator’s behavior. Observe how the Trend Persistence Index reacts to different market conditions.
Adjust Thresholds: Fine-tune the positive and negative thresholds based on the asset's volatility to improve trend detection accuracy.
Combine with Other Indicators: Use the Persistent Homology Based Trend Strength Oscillator in conjunction with other technical indicators such as moving averages, RSI, or MACD for a comprehensive analysis.
Backtesting: Conduct backtesting to see how the oscillator would have performed in past market conditions, helping you to refine your trading strategy.
Smart Money Analysis with Golden/Death Cross [YourTradingSensei]Description of the script "Smart Money Analysis with Golden/Death Cross":
This TradingView script is designed for market analysis based on the concept of "Smart Money" and includes the detection of Golden Cross and Death Cross signals.
Key features of the script:
Moving Averages (SMA):
Two moving averages are calculated: a short-term (50 periods) and a long-term (200 periods).
The intersections of these moving averages are used to determine Golden Cross and Death Cross signals.
High Volume:
The current trading volume is analyzed.
Periods of high volume are identified when the current volume exceeds the average volume by a specified multiplier.
Support and Resistance Levels:
Key support and resistance levels are determined based on the highest and lowest prices over a specified period.
Buy and Sell Signals:
Buy and sell signals are generated based on moving average crossovers, high volume, and the closing price relative to key levels.
Golden Cross and Death Cross:
A Golden Cross occurs when the short-term moving average crosses above the long-term moving average.
A Death Cross occurs when the short-term moving average crosses below the long-term moving average.
These signals are displayed on the chart with text color changes for better visualization.
Using the script:
The script helps traders visualize key signals and levels, aiding in making informed trading decisions based on the behavior of major market players and technical analysis.
Custom candle lighting(CCL) © 2024 by YourTradingSensei is licensed under CC BY-NC-SA 4.0. To view a copy of this license.
ATH/ATL Tracker [LuxAlgo]The ATH/ATL Tracker effectively displays changes made between new All-Time Highs (ATH)/All-Time Lows (ATL) and their previous respective values, over the entire history of available data.
The indicator shows a histogram of the change between a new ATH/ATL and its respective preceding ATH/ATL. A tooltip showing the price made during a new ATH/ATL alongside its date is included.
🔶 USAGE
By tracking the change between new ATHs/ATLs and older ATHs/ATLs, traders can gain insight into market sentiment, breadth, and rotation.
If many stocks are consistently setting new ATHs and the number of new ATHs is increasing relative to old ATHs, it could indicate broad market participation in a rally. If only a few stocks are reaching new ATHs or the number is declining, it might signal that the market's upward momentum is decreasing.
A significant increase in new ATHs suggests optimism and willingness among investors to buy at higher prices, which could be considered a positive sentiment. On the other hand, a decrease or lack of new ATHs might indicate caution or pessimism.
By observing the sectors where stocks are consistently setting new ATHs, users can identify which sectors are leading the market. Sectors with few or no new ATHs may be losing momentum and could be identified as lagging behind the overall market sentiment.
🔶 DETAILS
The indicator's main display is a histogram-style readout that displays the change in price from older ATH/ATLs to Newer/Current ATH/ATLs. This change is determined by the distance that the current values have overtaken the previous values, resulting in the displayed data.
The largest changes in ATH/ATLs from the ticker's history will appear as the largest bars in the display.
The most recent bars (depending on the selected display setting) will always represent the current ATH or ATL values.
When determining ATH & ATL values, it is important to filter out insignificant highs and lows that may happen constantly when exploring higher and lower prices. To combat this, the indicator looks to a higher timeframe than your chart's timeframe in order to determine these more significant ATHs & ATLs.
For Example: If a user was on a 1-minute chart and 5 highs-new highs occur across 5 adjacent bars, this has the potential to show up as 5 new ATHs. When looking at a higher timeframe, 5 minutes, only the highest of the 5 bars will indicate a new ATH. To assist with this, the indicator will display warnings in the dashboard when a suboptimal timeframe is selected as input.
🔹 Dashboard
The dashboard displays averages from the ATH/ATL data to aid in the anticipation and expectations for new ATH/ATLs.
The average duration is an average of the time between each new ATH/ATL, in this indicator it is calculated in "Days" to provide a more comprehensive understanding.
The average change is the average of all change data displayed in the histogram.
🔶 SETTINGS
Duration: The designated higher timeframe to use for filtering out insignificant ATHs & ATLs.
Order: The display order for the ATH/ATL Bars, Options are to display in chronological (oldest to newest) or reverse chronological order (newest to oldest).
Bar Width: Sets the width for each ATH/ATL bar.
Bar Spacing: Sets the # of empty bars in between each ATH/ATL bar.
Dashboard Settings: Parameters for the dashboard's size and location on the chart.
Chuck Dukas Market Phases of Trends (based on 2 Moving Averages)This script is based on the article “Defining The Bull And The Bear” by Chuck Duckas, published in Stocks & Commodities V. 25:13 (14-22); (S&C Bonus Issue, 2007).
The article “Defining The Bull And The Bear” discusses the concepts of “bullish” and “bearish” in relation to the price behavior of financial instruments. Chuck Dukas explains the importance of analyzing price trends and provides a framework for categorizing price activity into six phases. These phases, including recovery, accumulation, bullish, warning, distribution, and bearish, help to assess the quality of the price structure and guide decision-making in trading. Moving averages are used as tools for determining the context preceding the current price action, and the slope of a moving average is seen as an indicator of trend and price phase analysis.
The six phases of trends
// Definitions of Market Phases
recovery_phase = src > ma050 and src < ma200 and ma050 < ma200 // color: blue
accumulation_phase = src > ma050 and src > ma200 and ma050 < ma200 // color: purple
bullish_phase = src > ma050 and src > ma200 and ma050 > ma200 // color: green
warning_phase = src < ma050 and src > ma200 and ma050 > ma200 // color: yellow
distribution_phase = src < ma050 and src < ma200 and ma050 > ma200 // color: orange
bearish_phase = src < ma050 and src < ma200 and ma050 < ma200 // color red
Recovery Phase : This phase marks the beginning of a new trend after a period of consolidation or downtrend. It is characterized by the gradual increase in prices as the market starts to recover from previous losses.
Accumulation Phase : In this phase, the market continues to build a base as prices stabilize before making a significant move. It is a period of consolidation where buying and selling are balanced.
Bullish Phase : The bullish phase indicates a strong upward trend in prices with higher highs and higher lows. It is a period of optimism and positive sentiment in the market.
Warning Phase : This phase occurs when the bullish trend starts to show signs of weakness or exhaustion. It serves as a cautionary signal to traders and investors that a potential reversal or correction may be imminent.
Distribution Phase : The distribution phase is characterized by the market topping out as selling pressure increases. It is a period where supply exceeds demand, leading to a potential shift in trend direction.
Bearish Phase : The bearish phase signifies a strong downward trend in prices with lower lows and lower highs. It is a period of pessimism and negative sentiment in the market.
These rules of the six phases outline the cyclical nature of market trends and provide traders with a framework for understanding and analyzing price behavior to make informed trading decisions based on the current market phase.
60-period channel
The 60-period channel should be applied differently in each phase of the market cycle.
Recovery Phase : In this phase, the 60-period channel can help identify the beginning of a potential uptrend as price stabilizes or improves. Traders can look for new highs frequently in the 60-period channel to confirm the trend initiation or continuation.
Accumulation Phase : During the accumulation phase, the 60-period channel can highlight that the current price is sufficiently strong to be above recent price and longer-term price. Traders may observe new highs frequently in the 60-period channel as the slope of the 50-period moving average (SMA) trends upwards while the 200-period moving average (SMA) slope is losing its downward slope.
Bullish Phase : In the bullish phase, the 60-period channel showing a series of higher highs is crucial for confirming the uptrend. Additionally, traders should observe an upward-sloping 50-period SMA above an upward-sloping 200-period SMA for further validation of the bullish phase.
Warning Phase : When in the warning phase, the 60-period channel can provide insights into whether the current price is weaker than recent prices. Traders should pay attention to the relationship between the price close, the 50-period SMA, and the 200-period SMA to gauge the strength of the phase.
Distribution Phase : In the distribution phase, traders should look for new lows frequently in the 60-period channel, hinting at a weakening trend. It is crucial to observe that the 50-period SMA is still above the 200-period SMA in this phase.
Bearish Phase : Lastly, in the bearish phase, the 60-period channel reflecting a series of lower lows confirms the downtrend. Traders should also note that the price close is below both the 50-period SMA and the 200-period SMA, with the relationship of the 50-period SMA being less than the 200-period SMA.
By carefully analyzing the 60-period channel in each phase, traders can better understand market trends and make informed decisions regarding their investments.
Advanced Awesome Oscillator [CryptoSea]Advanced AO Analysis Indicator
The Advanced AO Analysis indicator is a sophisticated tool designed to evaluate the Awesome Oscillator (AO) in search of regular and hidden divergences that signal potential price reversals. By tracking the intensity and duration of the AO's movements, this indicator aids traders in pinpointing critical points in price action.
Key Features
Divergence Detection: Identifies both regular and hidden bullish and bearish divergences, providing early signs of potential market reversals.
Customizable Lookback Periods: Allows users to set specific lookback windows to define the strength and relevance of detected divergences.
Adaptive Oscillator Display: Features customizable display options for the AO, enabling users to view data in different modes suited to their analysis needs.
Alert System: Includes configurable alerts to notify users of potential divergence formations, helping traders respond promptly.
How it Works
AO Calculation: Computes the AO as the difference between short-term and long-term moving averages of the midpoints of bars, highlighting momentum shifts.
Pivot Point Analysis: Utilizes advanced algorithms to find low and high pivot points based on the oscillator values, crucial for spotting trend reversals.
Range Validation: Verifies that divergences occur within a predefined range from pivot points, ensuring their validity and strength.
Visualisation: Plots AO values and potential divergences directly on the chart, aiding in quick visual analysis.
Application
Strategic Decision-Making: Assists traders in making informed decisions by providing detailed analysis of AO movements and divergence.
Trend Confirmation: Reinforces trading strategies by confirming potential reversals with pivot point detection and divergence analysis.
Behavioural Insight: Offers insights into market dynamics and sentiment by analyzing the depth and duration of AO cycles above and below zero.
The Advanced AO Analysis indicator equips traders with a powerful analytical tool for studying the Awesome Oscillator in-depth, enhancing their ability to spot and act on divergence-based trading opportunities in the cryptocurrency markets.
Event on charts**Event on Charts Indicator**
This indicator visually marks significant events on your chart. It is highly customizable, allowing you to activate or deactivate different groups of events and choose whether to display the event text directly on the chart or only when hovered over. Each group of events can be configured with distinct settings such as height mode, color, and label style.
### Key Features:
- **Group Activation:** Enable or disable different groups of events based on your analysis needs.
- **Text Display Options:** Choose to display event texts directly on the chart or only on hover.
- **Customizable Appearance:** Adjust the height mode, offset multiplier, bubble color, text color, and label shape for each group.
- **Predefined Events:** Includes predefined events for major crashes, FED rate changes, SPX tops and bottoms, geopolitical conflicts, economic events, disasters, and significant Bitcoin events.
### Groups Included:
1. **Crash Events:** Marks major market crashes.
2. **FED Rate Events:** Indicates changes in the Federal Reserve rates.
3. **SPX Top Events:** Highlights market tops for the S&P 500.
4. **Geopolitical Conflicts:** Marks significant geopolitical events.
5. **Economic Events:** Highlights important economic events such as bankruptcies and crises.
6. **Disaster and Cyber Events:** Indicates major disasters and cyber attacks.
7. **Bitcoin Events:** Marks significant events in the Bitcoin market.
8. **SPX Bottom Events:** Highlights market bottoms for the S&P 500.
### Usage:
This indicator is useful for traders and analysts who want to keep track of historical events that could impact market behavior. By visualizing these events on the chart, you can better understand market reactions and make informed decisions.
MTF Bollinger BandWidth [CryptoSea]The MTF Bollinger BandWidth Indicator is an advanced analytical tool crafted for traders who need to gauge market volatility and trend strength across multiple timeframes. This powerful indicator leverages the Bollinger BandWidth concept to provide a comprehensive view of price movements and volatility changes, making it ideal for those looking to enhance their trading strategies with multi-timeframe analysis.
Key Features
Multi-Timeframe Analysis: Allows users to monitor Bollinger BandWidth across various timeframes, providing a macro and micro perspective on market volatility.
Pivot Point Detection: Identifies crucial high and low pivot points, offering insights into potential support and resistance levels. Pivot points are dynamic and adjust based on the timeframe viewed, reflecting short-term fluctuations or longer-term trends.
Customizable Parameters: Includes options to adjust the length of the moving average, the standard deviation multiplier, and more, enabling traders to tailor the tool to their specific needs.
Dynamic Color Coding: Utilizes color changes to indicate different market conditions, aiding in quick visual assessments.
In the example below, notice how changes in BBW across different timeframes provide early signals for potential volatility increases or decreases.
How it Works
Calculation of BandWidth: Measures the percentage difference between the upper and lower Bollinger Bands, which expands or contracts based on market volatility.
High and Low Pivot Tracking: Automatically calculates and tracks the pivots in BBW values, which are critical for identifying turning points in market behavior. High and low levels will change depending on the timeframe, capturing distinct market behaviors from granular movements to broad trends.
Visual Alerts and Table Display: Highlights significant changes in BBW with visual alerts and provides a detailed table view for comparison across timeframes.
In the example below, BBW identifies a significant contraction followed by an expansion, suggesting a potential breakout.
Application
Strategic Market Entry and Exit: Assists traders in making well-informed decisions about when to enter and exit trades based on volatility cues.
Trend Strength Assessment: Helps in determining the strength of the prevailing market trend through detailed analysis of expansion and contraction periods.
Adaptable to Various Trading Styles: Suitable for day traders, swing traders, and long-term investors due to its customization capabilities and effectiveness across different timeframes.
The MTF Bollinger BandWidth Indicator is a must-have in the arsenal of traders who demand depth, accuracy, and responsiveness in their market analysis tools. Enhance your trading decisions by integrating this sophisticated indicator into your strategy to navigate the complexities of various market conditions effectively.
Mateo's Time of Day Analysis LEThis strategy takes a trade every day at a specified time and then closes it at a specified time.
The purpose of this strategy is to help determine if there are better times to day to buy or sell.
I was originally inspired to write this when a YouTuber stated that SPX had been up during the last 30 minutes of the day over 80% of the time the past year. No matter who says it, test it, and in my opinion, TradingView is one of the easiest placed to do that! Unfortunately, that particular claim did not turn out to be accurate, but this tool remains for those who want to optimize timing their entries and exits at specific times of day.
FiboSequFiboSequ: Fibonacci Sequence Marking
Leonardo Fibonacci was an Italian mathematician who lived in the 12th century. His real name was Leonardo of Pisa, but he is commonly known as "Fibonacci." Fibonacci is famous for introducing the Hindu-Arabic numeral system to the Western world. This system is the basis of the modern decimal number system we use today.
Fibonacci Sequence
The Fibonacci sequence is a series of numbers that frequently appears in mathematics and nature. The first two numbers in the sequence are 0 and 1, and each subsequent number is the sum of the two preceding numbers.
The sequence is as follows:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, ...
Fibonacci Time Zones:
Fibonacci time zones are used to identify potential turning points in the market at specific time intervals. These time zones correspond to the Fibonacci sequence in terms of consecutive days or weeks.
The Fibonacci sequence has a wide range of applications in both mathematics and nature. Leonardo Fibonacci's work has had a significant impact on the development of modern mathematics and numeral systems. In financial markets, the Fibonacci sequence and ratios are frequently used by technical analysts to predict and analyze market movements.
Description:
Overview:
The FiboSequ indicator marks significant days on a price chart based on the Fibonacci sequence. This can help traders identify potential turning points or areas of interest in the market. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, often found in nature and financial markets.
Fibonacci Sequence:
The sequence used in this indicator includes: 1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, and 2584.
These numbers represent the days to be marked on the chart, highlighting possible significant market movements.
How It Works:
User Input:
Users can input the starting date (Year, Month, and Day) from which the Fibonacci sequence will begin to be calculated.
This allows flexibility and customization based on the trader's analysis needs.
Calculation:
The starting date is converted into a timestamp in seconds.
For each bar on the chart, the number of days since the starting date is calculated.
The indicator checks if the current day matches any of the Fibonacci sequence days, the previous day, or the next day.
In this indicator, Fibonacci numbers can be displayed on the chart as plus and minus 2 days. For example, for the 145th day, signals start to appear as 143,144 and 145. This is due to dates that sometimes coincide with weekends and public holidays.
Marking the Chart:
When a match is found, a label is placed above the bar indicating the day number from the Fibonacci sequence.
These labels are colored blue with white text for easy visibility.
Usage:
This indicator can be used on any timeframe and market to help identify potential areas where price might react.
It is especially useful for those who employ Fibonacci analysis in their trading strategy.
Example:
If the starting date is January 1, 2020, the indicator will mark significant Fibonacci days (e.g., 1, 3, 5, 8 days, etc.) on the chart from this date onward.
Community Guidelines Compliance:
This indicator adheres to TradingView's Pine Script community guidelines.
It provides customizable user inputs and does not violate any terms of use.
By using the FiboSequ indicator, traders can enhance their technical analysis by incorporating time-based Fibonacci levels, potentially leading to better market timing and decision-making.
Frequently Asked Questions (FAQ)
Q: What is the FiboSequ indicator?
A: The FiboSequ indicator is a technical analysis tool that marks significant days on a price chart based on the Fibonacci sequence. This indicator helps traders identify potential turning points or areas of interest in the market.
Q: What is the Fibonacci sequence and why is it important?
A: The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones. The first two numbers are 0 and 1. This sequence frequently appears in nature and financial markets and is used in technical analysis to identify important support and resistance levels.
Q: How do the Fibonacci time zones in the indicator work?
A: Fibonacci time zones are used to identify potential market turning points at specific time intervals. The indicator calculates days based on the Fibonacci sequence (e.g., 1, 3, 5, 8 days, etc.) from the starting date and marks them on the chart.
Q: How can users set the starting date?
A: Users can input the starting date by specifying the year, month, and day. This sets the date from which the indicator begins its calculations, providing flexibility for user analysis.
Q: What do the labels in the indicator represent?
A: The labels mark specific days in the Fibonacci sequence. For example, 1st day, 3rd day, 5th day, etc. These labels are displayed in blue with white text for easy visibility.
Q: Which timeframes can I use the FiboSequ indicator on?
A: The FiboSequ indicator can be used on any timeframe. This includes daily, weekly, or monthly charts, as well as shorter timeframes.
Q: Which markets can the FiboSequ indicator be used in?
A: The FiboSequ indicator can be used in various financial markets, including stocks, forex, cryptocurrencies, commodities, and more.
Q: How can I achieve better market timing with the FiboSequ indicator?
A: The FiboSequ indicator helps identify potential market turning points using time-based Fibonacci levels. This can lead to better market timing and more informed trading decisions for traders.
-Please feel free to write your valuable comments and opinions. I attach importance to your valuable opinions so that I can improve myself.
Bull Market Drawdowns V1.0 [ADRIDEM]Bull Market Drawdowns V1.0
Overview
The Bull Market Drawdowns V1.0 script is designed to help visualize and analyze drawdowns during a bull market. This script calculates the highest high price from a specified start date, identifies drawdown periods, and plots the drawdown areas on the chart. It also highlights the maximum drawdowns and marks the start of the bull market, providing a clear visual representation of market performance and potential risk periods.
Unique Features of the New Script
Default Timeframe Configuration: Allows users to set a default timeframe for analysis, providing flexibility in adapting the script to different trading strategies and market conditions.
Customizable Bull Market Start Date: Users can define the start date of the bull market, ensuring the script calculates drawdowns from a specific point in time that aligns with their analysis.
Drawdown Calculation and Visualization: Calculates drawdowns from the highest high since the bull market start date and plots the drawdown areas on the chart with distinct color fills for easy identification.
Maximum Drawdown Tracking and Labeling: Tracks the maximum drawdown for each period and places labels on the chart to indicate significant drawdowns, helping traders identify and assess periods of higher risk.
Bull Market Start Marker: Marks the start of the bull market on the chart with a label, providing a clear reference point for the beginning of the analysis period.
Originality and Usefulness
This script provides a unique and valuable tool by combining drawdown analysis with visual markers and customizable settings. By calculating and plotting drawdowns from a user-defined start date, traders can better understand the performance and risks associated with a bull market. The script’s ability to track and label maximum drawdowns adds further depth to the analysis, making it easier to identify critical periods of market retracement.
Signal Description
The script includes several key visual elements that enhance its usefulness for traders:
Drawdown Area : Plots the upper and lower boundaries of the drawdown area, filling the space between with a semi-transparent color. This helps traders easily identify periods of market retracement.
Maximum Drawdown Labels : Labels are placed on the chart to indicate the maximum drawdown for each period, providing clear markers for significant drawdowns.
Bull Market Start Marker : A label is placed at the start of the bull market, marking the beginning of the analysis period and helping traders contextualize the drawdown data.
These visual elements help quickly assess the extent and impact of drawdowns within a bull market, aiding in risk management and decision-making.
Detailed Description
Input Variables
Default Timeframe (`default_timeframe`) : Defines the timeframe for the analysis. Default is 720 minutes
Bull Market Start Date (`start_date_input`) : The starting date for the bull market analysis. Default is January 1, 2023
Functionality
Highest High Calculation : The script calculates the highest high price on the specified timeframe from the user-defined start date.
```pine
var float highest_high = na
if (time >= start_date)
highest_high := na(highest_high ) ? high : math.max(highest_high , high)
```
Drawdown Calculation : Determines the drawdown starting point and calculates the drawdown percentage from the highest high.
```pine
var float drawdown_start = na
if (time >= start_date)
drawdown_start := na(drawdown_start ) or high >= highest_high ? high : drawdown_start
drawdown = (drawdown_start - low) / drawdown_start * 100
```
Maximum Drawdown Tracking : Tracks the maximum drawdown for each period and places labels above the highest high when a new high is reached.
```pine
var float max_drawdown = na
var int max_drawdown_bar_index = na
if (time >= start_date)
if na(max_drawdown ) or high >= highest_high
if not na(max_drawdown ) and not na(max_drawdown_bar_index) and max_drawdown > 10
label.new(x=max_drawdown_bar_index, y=drawdown_start , text="Max -" + str.tostring(max_drawdown , "#") + "%",
color=color.red, style=label.style_label_down, textcolor=color.white, size=size.normal)
max_drawdown := 0
max_drawdown_bar_index := na
else
if na(max_drawdown ) or drawdown > max_drawdown
max_drawdown := drawdown
max_drawdown_bar_index := bar_index
```
Drawdown Area Plotting : Plots the drawdown area with upper and lower boundaries and fills the area with a semi-transparent color.
```pine
drawdown_area_upper = time >= start_date ? drawdown_start : na
drawdown_area_lower = time >= start_date ? low : na
p1 = plot(drawdown_area_upper, title="Drawdown Area Upper", color=color.rgb(255, 82, 82, 60), linewidth=1)
p2 = plot(drawdown_area_lower, title="Drawdown Area Lower", color=color.rgb(255, 82, 82, 100), linewidth=1)
fill(p1, p2, color=color.new(color.red, 90), title="Drawdown Fill")
```
Current Maximum Drawdown Label : Places a label on the chart to indicate the current maximum drawdown if it exceeds 10%.
```pine
var label current_max_drawdown_label = na
if (not na(max_drawdown) and max_drawdown > 10)
current_max_drawdown_label := label.new(x=bar_index, y=drawdown_start, text="Max -" + str.tostring(max_drawdown, "#") + "%",
color=color.red, style=label.style_label_down, textcolor=color.white, size=size.normal)
if (not na(current_max_drawdown_label))
label.delete(current_max_drawdown_label )
```
Bull Market Start Marker : Places a label at the start of the bull market to mark the beginning of the analysis period.
```pine
var label bull_market_start_label = na
if (time >= start_date and na(bull_market_start_label))
bull_market_start_label := label.new(x=bar_index, y=high, text="Bull Market Start", color=color.blue, style=label.style_label_up, textcolor=color.white, size=size.normal)
```
How to Use
Configuring Inputs : Adjust the default timeframe and start date for the bull market as needed. This allows the script to be tailored to different market conditions and trading strategies.
Interpreting the Indicator : Use the drawdown areas and labels to identify periods of significant market retracement. Pay attention to the maximum drawdown labels to assess the risk during these periods.
Signal Confirmation : Use the bull market start marker to contextualize drawdown data within the overall market trend. The combination of drawdown visualization and maximum drawdown labels helps in making informed trading decisions.
This script provides a detailed view of drawdowns during a bull market, helping traders make more informed decisions by understanding the extent and impact of market retracements. By combining customizable settings with visual markers and drawdown analysis, traders can better align their strategies with the underlying market conditions, thus improving their risk management and decision-making processes.