Custom Hourly Highlight PeriodsThis Pine Script indicator for TradingView allows users to visually highlight up to five distinct periods within a trading day directly on their chart. It's designed to enhance chart analysis by emphasizing specific time frames that may coincide with increased market activity, trading sessions, or personal trading strategies.
Features:
Customizable Highlight Periods: Users can define up to five separate highlight periods, specifying both start and end hours for each. This flexibility supports a wide range of trading strategies and time zones.
Individual Period Activation: Each highlight period can be individually enabled or disabled, allowing users to focus on specific times of interest without cluttering the chart.
Color-Coded Visualization: Each period is highlighted with a different transparent color (blue, red, green, purple, and orange) for clear distinction between different segments of the trading day. Colors are customizable to fit personal preferences or chart themes.
User-Friendly Inputs: Simple input fields make it easy to adjust start/end times and toggle the visibility of each period, requiring no coding experience to customize.
Use Cases:
Identifying Repeating Patterns: Certain regional markets exhibit unique behaviors, with some creating sell pressure in the morning, while others generate buy pressure. This indicator allows for clear visualization of these patterns.
Market Session Highlights: Emphasize the opening and closing hours of major markets (e.g., NYSE, NASDAQ, Forex markets) to identify potential volatility or trading opportunities.
Personal Trading Hours: Mark the time frames when you typically trade or when your trading strategy performs best.
Economic Release Times: Highlight periods when important economic reports are released, which can significantly impact market movement.
Educational
Global Liquidity Index (Candles)The Global Liquidity Index (Candles) provides a comprehensive overview of major central bank balance sheets worldwide, presenting values converted to USD for consistency and comparability, following relevant forex rates. This indicator, based on the code developed by user ingeforberg , incorporates essential US accounts including the Treasury General Account (TGA) and Reverse Repurchase Agreements (RRP), subtracted from the Federal Reserve's balance sheet to offer a nuanced perspective on US liquidity. Users can tailor their analysis by selectively enabling or disabling specific central banks and special accounts according to their preferences. The index exclusively includes central banks abstaining from currency pegging and with reliable data accessible since late 2007, ensuring a robust aggregated liquidity model.
The calculation of the Global Liquidity Index involves subtracting the Treasury General Account (TGA) and Reverse Repurchase Agreements (RRP) from the Federal Reserve System (FED) and adding the balance sheets of major central banks worldwide: the European Central Bank (ECB), the People's Bank of China (PBC), the Bank of Japan (BOJ), the Bank of England (BOE), the Bank of Canada (BOC), the Reserve Bank of Australia (RBA), the Reserve Bank of India (RBI), the Swiss National Bank (SNB), the Central Bank of the Russian Federation (CBR), the Central Bank of Brazil (BCB), the Bank of Korea (BOK), the Reserve Bank of New Zealand (RBNZ), Sweden's Central Bank (Riksbank), and the Central Bank of Malaysia (BNM).
This tool proves invaluable for individuals seeking a consolidated perspective on global liquidity to interpret macroeconomic trends. Analyzing these balance sheets enables users to discern policy trajectories and assess the global economic landscape, providing insights into asset pricing and assisting investors in making well-informed capital allocation decisions. Historically, assets perceived as riskier, such as small caps and cryptocurrencies, have tended to perform favorably during periods of escalating liquidity. Thus, investors may exercise caution regarding additional risk exposure unless a sustained upward trend in global liquidity is evident.
Main differences between the original and updated indicators:
The "Global Liquidity Index (Candles)" script, compared to the original "Global Liquidity Index" script, offers a more detailed and visually rich representation of liquidity data.
"Global Liquidity Index (Candles)" employs candlestick visualization to represent liquidity data. Each candlestick encapsulates open, high, low, and close prices over a given period. This format provides granular insights into liquidity fluctuations, facilitating a more nuanced analysis.
By using candlesticks, the script offers traders detailed information about liquidity dynamics. They can analyze the patterns formed by candlesticks to discern trends, reversals, and market sentiment shifts, aiding in making informed trading decisions.
Moving Average PropertiesThis indicator calculates and visualizes the Relative Smoothness (RS) and Relative Lag (RL) or call it accuracy of a selected moving average (MA) in comparison to the SMA of length 2 (the lowest possible length for a moving average and also the one closest to the price).
Median RS (Relative Smoothness):
Interpretation: The median RS represents the median value of the Relative Smoothness calculated for the selected moving average across a specified look-back period (max bar lookback is set at 3000).
Significance: A more negative (larger) median RS suggests that the chosen moving average has exhibited smoother price behavior compared to a simple moving average over the analyzed period. A less negative value indicates a relatively choppier price movement.
Median RL (Relative Lag):
Interpretation: The median RL represents the median value of the Relative Lag calculated for the selected moving average compared to a simple moving average of length 2.
Significance: A higher median RL indicates that the chosen moving average tends to lag more compared to a simple moving average. Conversely, lower values suggest less lag in the selected moving average.
Ratio of Median RS to Median RL:
Interpretation: This ratio is calculated by dividing the median RS by the median RL.
Significance: Traders might use this ratio to assess the balance between smoothness and lag in the chosen moving average. This a measure of for every % of lag what is the smoothness achieved. This can be used a benchmark to decide what length to choose for a MA to get an equivalent value between two stocks. For example a TESLA stock on a 15 minute time frame with a length of 12 has a value (ratio of RS/RL) of -150 , where as APPLE stock of length 35 on a 15 minute chart also has a value (ratio of RS/RL) of -150.
I imply that a MA of length 12 working on TESLA stock is equivalent to MA of length 35 on a APPLE stock. (THIS IS A EXAMPLE).
My assumption is that finding the right moving average length for a stock isn't a one-size-fits-all situation. It's not just about using a fixed length; it's about adapting to the unique characteristics of each stock. I believe that what works for one stock might not work for another because they have different levels of smoothness or lag in their price movements. So, instead of applying the same length to all stocks, I suggest adjusting the length of the moving average to match the values that we know work best for achieving the desired smoothness or lag or its ratio (RS/RL). This way, we're customizing the indicator for each stock, tailoring it to their individual behaviors rather than sticking to a one-size-fits-all approach.
Users can choose from various types of moving averages (EMA, SMA, WMA, VWMA, HMA) and customize the length of the moving average. RS measures the smoothness of the MA, while RL measures its lag compared to a simple moving average. The script plots the median RS and RL values, the selected MA, and the ratio of median RS to median RL on the price chart. Traders can use this information to assess the performance of different moving averages and potentially inform their trading decisions.
Interest Bricks @shrilssInterest Bricks utilize a unique approach to visualize changes in interest over time. It calculates the difference between the current and previous values of a specified asset's closing price on a daily basis. The resulting value indicates whether there has been an increase, decrease, or no change in interest.
This indicator employs a sine wave plot to represent the trend of interest changes. Positive values of the sine wave indicate increasing interest, while negative values denote decreasing interest. The color of the plot dynamically changes based on the direction of the trend: lime for upward trends and red for downward trends.
Word PuzzleWord Puzzle is a PineScript-based clone of the popular daily puzzle game called "Wordle".
It is not identical, but the general gameplay is the same.
>How It works (The Game)
A secret word (also referred to as the "target word") is randomly selected from a database of 5 Letter words.
The player/user's goal is to guess that word within 6 attempts.
After each guess, the script provides information to the user by color coding the letters of their guess.
Green (Known Letters): These letters are in the exact spot that they occur in the target word.
Yellow (Included Letters): These letters are included in the target word; however, the user does not have them in the correct position.
Gray (Un-used Letters): These letters do not occur anywhere in the target word
>Interface
On each turn the user will input their 5 letter guess into the "Guess #" box and submit it by checking the check-box next to the word.
If the input word is invalid, the script will prompt you. Invalid words are any words not found within the script's valid word list.
After guess 3, hints may be viewed by hovering over the "Need a Hint" box on the display.
If you are unable to guess the word in the given amount of guesses, the 'Game Over' screen will display, and you will be able to view the answer in the same box as the hints.
To start a new game, clear all inputs and insert a different number into the "Puzzle Seed" input, to have the script randomly select a new word.
NOTE: Word selection based on the seed number is deterministic, the same seed number will always have the same puzzle word.
>Additional Information
The script comes equipped with 5 different themes as seen below.
Table size is also selectable.
This indicator makes use of 'tooltips'.
Hover over the boxes on the table for quick reference information or additional information on prompts.
Since the script randomly selects from the ENTIRE valid word list you are bound to come across some obscure words with strange spellings.
Because of this, I have built in a "quick way out".
To end a game without filling out all guesses, submit the answer "Give Up" to skip to the end screen where you can reveal the puzzle's answer.
Afterwards, take a second to look up the definition! Ever heard of a xylyl?!
The code is fully notated. Most of the script involves string management, but there are still some neat tricks in here as well.
Enjoy!
GG - LevelsThe GG Levels indicator is a tool designed for day trading U.S. equity futures. It highlights key levels intraday, overnight, intermediate-swing levels that are relevant for intraday futures trading.
Terminology
RTH (Regular Trading Hours): Represents the New York session from 09:30 to 17:00 EST.
ON Session (Overnight Session): Represents the trading activity from 17:00 to 09:29 EST.
IB (Initial Balance): The first hour of the New York session, from 09:30 to 10:30 EST.
Open: The opening price of the RTH session.
YH (Yesterday's High): The highest price during the RTH session of the previous day.
YL (Yesterday's Low): The lowest price during the RTH session of the previous day.
YC (Yesterday's Close): The daily bar close which for futures gets updated to settlement.
IBH (Initial Balance High): The highest price during the IB session.
IBL (Initial Balance Low): The lowest price during the IB session.
ONH (Overnight High): The highest price during the ON session.
ONL (Overnight Low): The lowest price during the ON session.
VWAP (Volume-Weighted Average Price): The volume-weighted average price that resets each day.
Why is RTH Important?
Tracking the RTH session is important because often times the overnight session can be filled with "lies". It is thought that because the overnight session is lower volume price can be pushed or "manipulated" to extremes that would not happen during higher volume times.
Why is the ON Session Important Then?
Just because the ON session can be thought as a "lie" doesn't mean it is relevant to know. For example, if price is stuck inside the ON range then you can think of the market as rotational or range-bound. If price is above the ON range then it can be thought of as bullish. If price is below the ON range then it can be thought as bearish.
What is IB?
IB or initial balance is the first hour of the New York Session. Typically the market sets the tone for the day in the first hour. This tone is similarly a map like the ON session. If we are above the IBH then it is bullish and likely a trend day to the upside. If we are below the IBL then it is bearish and likely a trend day to the downside. If we are in IB then we want to avoid conducting business in the middle of IBH and IBL to avoid getting chopped up in a range bound market.
These levels are not a holy grail
You should use this indicator as guide or map for context about the instrument you are trading. You need to combine your own technical analysis with this indicator. You want as much context confirming your trade thesis in order to enter a trade. Simply buying or selling because we are above or below a level is not recommended in any circumstance. If it were that easy I would not publish this indicator.
Adjustments
In the indicator settings you can adjust the RTH, ON, and IB session-time settings. All of the times entered must be in EST (Eastern Standard Time). You may want to do this to apply the levels to a foreign market.
Examples
Triple MA HTF strategy - Dynamic SmoothingThe triple MA strategy is a simple but effective method to trade the trend. The advantage of this script over the existing triple MA strategies is that the user can open a lower time frame chart and select higher time frame inputs for different MA types mainting the visibility on the chart. The dynamic smoothing code makes sure the HTF trendlines are not jagged, but a fluid line visiable on the lower time frame chart. The script comes with a MA crossover and crossunder strategy explained below.
Moving Averages (MA) Crossover for Entry:
Long Entry: A long entry signal is triggered when the moving average line 1 crosses above the moving average line 2. This crossover indicates a potential shift in market sentiment towards the upside. However, to validate this signal, the strategy checks if the moving average 3 on a higher time frame (eg. 4 hour) is in an upward trend. This additional filter ensures that the trade aligns with the prevailing trend on a broader time scale, increasing the probability of success.
Short Entry: Conversely, a short entry signal occurs when the moving average line 1 crosses below the moving average line 2. This crossover suggests a possible downturn in market momentum. However, for a short trade to be confirmed, the strategy verifies that the moving average 3 on the higher time frame is in a downward trend. This confirmation ensures that the trade is in harmony with the overarching market direction.
Exit from Long Position: The strategy triggers an exit signal from a long position when the moving average line 1 crosses below the moving average line 2. This crossover indicates a potential reversal in the market trend, prompting the trader to close their long position and take profits or minimize losses.
Exit from Short Position: Similarly, an exit signal from a short position occurs when the moving average line 1 crosses above the moving average line 2. This crossover suggests a potential shift in market sentiment towards the upside, prompting the trader to exit their short position and manage their risk accordingly.
Features of the script
This Triple MA Strategy is basically the HTF Trend Filter displayed 3 times on the chart. For more infomation on how the MA with dynamic smoothing is calculated I recommend reading the following script:
For risk management I included a simple script to opt for % of eauity or # of contracts of in the instrument. For explanation on how the risk management settings work I refer to my ealier published script:
The strategy is a simplified example for setting up an entry and exit logic based on multiple moving avarages. Hence the script is meant for educational purposes only.
Bandwidth Volatility - Silverman Rule of thumb EstimatorOverview
This indicator calculates volatility using the Rule of Thumb bandwidth estimator and incorporating the standard deviations of returns to get historical volatility. There are two options: one for the original rule of thumb bandwidth estimator, and another for the modified rule of thumb estimator. This indicator comes with the bandwidth , which is shown with the color gradient columns, which are colored by a percentile of the bandwidth, and the moving average of the bandwidth, which is the dark shaded area.
The rule of thumb bandwidth estimator is a simple and quick method for estimating the bandwidth parameter in kernel density estimation (KSE) or kernel regression. It provides a rough approximation of the bandwidth without requiring extensive computation resources or fine-tuning. One common rule of thumb estimator is Silverman rule, which is given by
h = 1.06*σ*n^(-1/5)
where
h is the bandwidth
σ is the standard deviation of the data
n is the number of data points
This rule of thumb is based on assuming a Gaussian kernel and aims to strike a balance between over-smoothing and under-smoothing the data. It is simple to implement and usually provides reasonable bandwidth estimates for a wide range of datasets. However , it is important to note that this rule of thumb may not always have optimal results, especially for non-Gaussian or multimodal distributions. In such cases, a modified bandwidth selection, such as cross-validation or even applying a log transformation (if the data is right-skewed), may be preferable.
How it works:
This indicator computes the bandwidth volatility using returns, which are used in the standard deviation calculation. It then estimates the bandwidth based on either the Silverman rule of thumb or a modified version considering the interquartile range. The percentile ranks of the bandwidth estimate are then used to visualize the volatility levels, identify high and low volatility periods, and show them with colors.
Modified Rule of thumb Bandwidth:
The modified rule of thumb bandwidth formula combines elements of standard deviations and interquartile ranges, scaled by a multiplier of 0.9 and inversely with a number of periods. This modification aims to provide a more robust and adaptable bandwidth estimation method, particularly suitable for financial time series data with potentially skewed or heavy-tailed data.
Formula for Modified Rule of Thumb Bandwidth:
h = 0.9 * min(σ, (IQR/1.34))*n^(-1/5)
This modification introduces the use of the IQR divided by 1.34 as an alternative to the standard deviation. It aims to improve the estimation, mainly when the underlying distribution deviates from a perfect Gaussian distribution.
Analysis
Rule of thumb Bandwidth: Provides a broader perspective on volatility trends, smoothing out short-term fluctuations and focusing more on the overall shape of the density function.
Historical Volatility: Offers a more granular view of volatility, capturing day-to-day or intra-period fluctuations in asset prices and returns.
Modelling Requirements
Rule of thumb Bandwidth: Provides a broader perspective on volatility trends, smoothing out short-term fluctuations and focusing more on the overall shape of the density function.
Historical Volatility: Offers a more granular view of volatility, capturing day-to-day or intra-period fluctuations in asset prices and returns.
Pros of Bandwidth as a volatility measure
Robust to Data Distribution: Bandwidth volatility, especially when estimated using robust methods like Silverman's rule of thumb or its modifications, can be less sensitive to outliers and non-normal distributions compared to some other measures of volatility
Flexibility: It can be applied to a wide range of data types and can adapt to different underlying data distributions, making it versatile for various analytical tasks.
How can traders use this indicator?
In finance, volatility is thought to be a mean-reverting process. So when volatility is at an extreme low, it is expected that a volatility expansion happens, which comes with bigger movements in price, and when volatility is at an extreme high, it is expected for volatility to eventually decrease, leading to smaller price moves, and many traders view this as an area to take profit in.
In the context of this indicator, low volatility is thought of as having the green color, which indicates a low percentile value, and also being below the moving average. High volatility is thought of as having the yellow color and possibly being above the moving average, showing that you can eventually expect volatility to decrease.
Asset Price Overlay @shrilssThis indicator allows traders to overlay multiple asset prices onto a single chart for easy comparison. By displaying the closing prices of different assets, users can quickly assess their performance relative to each other.
Key Features:
- Multiple Ticker Display: Users can select up to five different assets to display on the chart simultaneously.
- Customizable Label Positions: The script offers flexibility in choosing where to display the asset labels on the chart.
- Color Customization: Traders can customize the colors of the asset labels to suit their preferences.
Alternative LicensesHello fellow coders.
Sometimes the standard Mozilla Public license is not sufficient for the kind of scripts you want to publish so i have compiled a non-indicator script containing a list of visually appealing, alternative licenses by Creative Commons for everyone to choose and copy depending on your needs.
Please do not hesitate to comment in the public comment section if you have suggestions or queries or if you noticed any mistakes:-)
Alternative Licenses to be used at own discretion. (D.Y.O.R.)
RUBIX_BINARY cannot be held liable for any legal issues related to Creative Commons or the Licenses in this publication.
ICT Hydra MacrosThis indicator allows you to set a colored box at each time frame specified as Macro.
The purpose of this customizable color box is to be able to identify the start and end of the desired time frame, as well as the highest and lowest price during that time frame.
It also allows to place the schedule in numbers inside the box in order to quickly identify the painted time frame.
The indicator has up to 26 customizable boxes both in time frame and color. This allows to have different time frames that each Trader considers convenient for his strategy.
Settings:
General Settings:
Limit Days to Draw: Indicates the number of past days in which boxes will be drawn. Default value is 5 past days.
Timeframe Limit: Indicates the maximum time frame in which the boxes will be displayed. Default value is 5 minutes.
Timezone: Indicates the desired Timezone to calculate the schedules that will be configured later.
Macros Settings:
Show Macros Boxes: Enables or disables all boxes. It is enabled by default.
Display Text: Enables or disables all labels inside the boxes containing the time frame corresponding to the box. It is enabled by default.
Macros Transparency: Indicates the transparency percentage of the selected color for all boxes. By default it contains a value of 80% transparency.
Macro 1-26: Indicates the start time and end time, as well as the color of the individual box. Each Macro can be enabled or disabled individually. Note that the boxes of each Macro will be visible only if the "Show Macros Boxes" property is enabled. By default, there are specified certain Macros or time frames with a duration of 20 minutes, which are Manipulation or Expansion Macros that mentor Hydra has taught us based on the knowledge that ICT has provided for everyone.
The objective of this indicator is to provide a visual tool on the Macros or Time Frames in which the Trader can easily observe the desired schedule and which will automatically adjust according to the time and price on all 4 sides of the box.
Stablecoin Dominance [LuxAlgo]The Stablecoin Dominance tool displays the evolution of the relative supply dominance of major stablecoins such as USDT, USDC, BUSD, DAI, and TUSD.
Users can disable supported stablecoins to only show the supply dominance relative to the ones enabled.
🔶 USAGE
The stablecoin space is subject to constant change due to new arriving stablecoins, regulation, collapse of coins...etc.
Studying the evolution in supply dominance can help see the effect that certain events can have on the stablecoin sphere.
This dominance graph is displayed over the user price chart to easily observe the correlation between stablecoin dominances and market prices. Users can still move the tool to a new pane below if having it on the price chart is not desired.
🔶 DETAILS
Supported stablecoins include:
Tether (USDT)
USD Coin (USDC)
Binance USD (BUSD)
Dai (DAI)
TrueUSD (TUSD)
Supply dominance of a stablecoin is calculated by dividing the total supply of that stablecoin by the total supply of all enabled stablecoins. That is for N stablecoins:
sd(stablecoin A) = supply(stablecoin 1) / [supply(stablecoin 1) + supply(stablecoin 2) + supply(stablecoin 3) + ... + supply(stablecoin N)
🔹 Display
Users can control the fill style of the displayed areas, with "Gradient" enabled by default. Using "Solid" will use a solid color for each area:
This can improve the performance of the script.
Selecting "None" will not display areas.
🔶 SETTINGS
Fill Style: Fill style of the areas between each returned supply dominance. "Gradient" will color the areas using a gradient, while "Solid" will use a solid color.
Stablecoins List: List of stablecoins used for the supply dominance calculation, disabling one stablecoin will exclude it from all calculations.
UNICODE CHEAT SHEETHello fellow coders
This publication is not a indicator or a strategy but rather a quick reference guide for Unicode characters in Pine Code script format. It's purpose is to quickly identify and copy any desired characters to your own scripts.
Hope everyone finds this useful
Liquidation Longs/Shorts [UAlgo]🔶Description:
The "Liquidation Longs/Shorts " indicator is designed to identify potential liquidation levels for long and short positions. It calculates the distance of the selected price source (close, high, low, or open) from two moving averages (MA) and plots the resulting values on the chart. When the price is at an extreme distance from the moving averages, it suggests a potential liquidation point for either long or short positions.
🔶Key Features:
Liquidation Calculations: The indicator calculates the distance of the selected price source from two moving averages: a simple moving average (SMA) and an exponential moving average (EMA) with customizable lengths.
Color Customization: Users can customize the colors of the plotted columns representing the distance from the moving averages for long and short liquidation levels.
Liquidation Circles: The indicator marks potential liquidation levels with small circles on the chart, with customizable colors for long and short liquidations.
Orange Circles -> Identifies Potential Short Liquidations
Aqua Circles -> Identifies Potential Long Liquidations
Example:
Adaptive Source Selection: Traders can select the price source (close, high, low, or open) for liquidation calculations, allowing flexibility based on their trading strategies.
Dynamic Threshold Calculation: The indicator dynamically adjusts the liquidation threshold based on the selected moving average lengths, providing adaptability to changing market conditions.
Disclaimer:
Use with Caution: This indicator is provided for educational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
This indicator serves as a tool to assist traders in identifying potential liquidation levels, but it should be used in conjunction with other technical analysis tools and risk management practices for effective trading decision-making.
Time Based Comparison Tool [TFO]The goal of this indicator is to show how multiple assets are trading relative to their Previous Highs and Lows. Many traders have probably seen charts resembling this that may plot how asset prices are trading as a percent change over time, or something similar.
The key difference with this indicator is that all prices are normalized to reflect how they are trading with respect to the previous range of a user-defined timeframe. Without the normalization process, we would simply be observing some percent change from a given point in time; but this does not provide enough information to describe where price is trading relative to our desired frame of reference.
For example, if the timeframe setting was chosen to be 1 day, the indicator would plot the Previous High (PH) and Previous Low (PL) of the current symbol on the daily timeframe, denoted here by the black lines and labels. Then, the adjusted price of all selected symbols would be shown to visualize how each one is moving with respect its own PH and PL, using the current symbol's PH and PL as reference points.
In the above chart, we can see that CL was trading below its PDL from about 10:00-11:00 am EST, then broke above and retested it at around 11:20 am EST, before trading higher. To verify that this comparison works as intended, we can check to see that CL did in fact retest its PDL at this time before trading higher. Note that we are using the close price for this evaluation.
Since limiting the output to close prices can leave out some vital information, we can change the Plot Type setting from "Close" to "High to Low," which will instead show the range of prices from high to low instead of just the close.
We can expand on this by detecting when PH's and PL's have been raided (traded through), by displaying the text PHR (Previous High Raid) or PLR (Previous Low Raid) next to the symbol's label on the right. In this case below, where we're using the 1 week timeframe, we can observe that NQ1! (purple) traded through the PL level and thus its label (right) is updated to indicate a PLR.
Similarly, YM1! traded through its PH level and was updated to indicate a PHR; and ES1! raided both levels, with its label reflecting just that.
Due to the native limitation of output series in a single pine script, alerts have been consolidated to "Any PHR" or "Any PLR," meaning these alerts would fire if any of the selected symbols raided a PH or PL, respectively. If one wanted to be alerted for just a specific symbol, this could be achieved by deselecting all symbols except that which is desired, then setting an alert and adjusting its title for easier user recognition.
Volume Spike IndicatorHello dear traders,
Today we're discussing an indicator I've coded: the Volume Spike Indicator (VSI).
The indicator isn't a groundbreaking invention and certainly not a novelty. Nevertheless, I haven't seen this version of the indicator on TradingView before, so I'd like to introduce it.
1. The Origin of the Idea:
We're all familiar with volume charts: A volume chart visually represents the trading activity for a specific asset over a certain period, indicating the total number of shares or contracts traded.
We also know that volume spikes can significantly impact the market. A volume spike represents an extreme anomaly, a day, week, or month with an extraordinary amount of trading. However, recognizing these spikes in practice isn't always straightforward. What constitutes high volume? How do we define and identify it? The answers to these questions aren't easy.
It's commonly said that a volume spike could be identified if the volume is 25% more than the average of the two weeks prior, but how do you measure this 25%? It's not always easy to calculate, especially in real-time.
This challenge led me to develop the concept into an indicator.
How Does It Work?
Imagine being able to "feel" the market's energy like a surfer feels the ocean. The VSI does something similar by examining trading volume and comparing it to what has been typical over the past few weeks. Here's a quick look at the magic behind it:
Step 1: Establishing the Baseline: We start by establishing a baseline, i.e., the average trading volume over a given period. Let's use the last 10 days as the default setting. We choose 10 days because, in the traditional stock market, 10 days represent two weeks if you subtract weekends. This gives us a fixed line to compare against.
Step 2: Recognizing Peaks: Next, we look for days when the trading volume significantly exceeds this average. The size of the jump is where you have a say. You can set a threshold, such as 25%, to define what you consider a volume spike.
Step 3: The Calculation: This is where the math comes into play. We calculate the percentage change in today's volume compared to the average volume of the last 10 days. For example, if today's volume is 30% above the average and you've set your threshold at 25%, the VSI will recognize this as a spike.
Step 4: Visual Cue: These spikes are then plotted on a graph, with each spike represented as a bar. The height of the bar indicates the spike's percentage size, so you can see at a glance how significant a spike is.
Step 5: Intuitive Color Coding: For quick analysis, the VSI employs a color-coding system. Exceptionally high peaks, such as those exceeding a 100% increase, are highlighted in blue to emphasize their importance. Other peaks are shown in red, creating a visual hierarchy for quick volume data interpretation.
Why This Matters:
Identifying these spikes can help pinpoint the beginning or end of a trend. The idea is that when trading peaks at a certain level, there might be no more buyers or sellers willing to engage at that price level. Volume peaks, and a reversal is likely imminent. It's a simple yet effective concept. Therefore, it's crucial to use this indicator in the context of the trend, as not every spike carries the same significance.
Customizable:
The beauty of the VSI lies in its flexibility. Trading futures? You might want to adjust the averaging period to 14 days to better suit your market. You have full control over the settings to tailor them to your trading style.
Interpreting the Figures:
A positive percentage indicates a volume spike above the average – the higher the percentage, the more significant the spike.
If the percentage exceeds a certain threshold (which you can set, e.g., 25%), it signals a volume spike, indicating increased market activity that could precede significant price movement.
What makes the VSI genuinely adaptable is your ability to tweak the parameters to suit your needs.
Are you trading in a volatile market? Extend the SMA period to smooth out the noise. Trading in a 24-hour market? Adjust the length of your SMA. Seeking finer details? Shorten it. The VSI is yours to adapt to your trading strategy.
---------------------------------------------------------------------------------------------------------------------
As we wrap up this introduction to the Volume Spike Indicator, I hope you're as excited about its potential as I am. This tool, born out of curiosity and a desire for clarity in the vast ocean of market data, is designed to be your ally in navigating the waves of trading activity.
Remember, the true power of the VSI lies not just in its ability to highlight significant volume spikes, but in its adaptability to your unique trading style and needs. Whether you're charting courses through the tumultuous seas of day trading or navigating the broader currents of long-term investments, the VSI is here to offer insights and guidance.
I encourage you to experiment with it, customize it, and see how it can enhance your trading strategy. And as you do, remember that every tool, no matter how powerful, is just one piece of the puzzle. Combine the VSI with your knowledge, experience, and intuition to make informed and strategic trading decisions.
Thank you for taking the time to explore the Volume Spike Indicator with me.
Best Regards,
Karim Subhieh
UP DOWN Indicator 1Title: UP DOWN Indicator based on ADX Strategy - Accurate Signal Provider with Enhanced Success Potential
Description:
The Martingale ADX Indicator is a groundbreaking tool meticulously crafted to offer traders unparalleled precision in signal generation and risk management. Leveraging the power of the Average Directional Index (ADX), this indicator provides 100% non-repaint signals on the current candle, guiding traders to opportune and prepare for trade entry with remarkable accuracy.
With a focus on empowering traders across various financial markets, including Forex and Binary Options, this ADX Strategy-1 Indicator introduces a unique approach to trading dynamics. By seamlessly integrating the renowned Martingale Step-1 risk management strategy, this indicator not only minimizes losses but also enhances the potential for success, even in volatile market conditions.
Key Features:
Non-Repaint Signals: The Martingale ADX Indicator stands as a testament to reliability, offering 100% non-repaint signals. Traders can trust in the consistency and not removing losing Signals which is very important to trust the previous generated signals also, eliminating uncertainties and facilitating confident decision-making.
ADX-Based Precision: Built upon the robust framework of the Average Directional Index (ADX), this indicator delivers precise signals tailored to prevailing market trends and volatility levels. Whether trading in longer timeframes or engaging in Binary Options, traders can rely on the Martingale Step-1 ADX Indicator for superior insights.
Next Candle Trading: Seamlessly integrated into trading strategies, signals from the Martingale ADX Indicator prompt action on the subsequent candle. This real-time approach ensures traders stay ahead of market movements, seizing opportunities as they emerge. Giving Signals Once Candle ahead makes traders to prepare early and decide whether they want to enter the trade on presented Signal or not as per their own experience too. If the trading candle is loss then the very next candle shall be used for taking Martingale Sep-1 to enhance the Accuracy.
Enhanced Success Potential: With Martingale Step-1 risk management, this ADX Indicator offers more than just signal accuracy – it presents the potential for heightened success rates. Through strategic position sizing and leveraging experience and Price Action insights, traders can elevate overall accuracy to levels ranging from 80% to 90%.
Conclusion:
The UP DOWN Strategy-1 Indicator represents a paradigm shift in trading technology, combining precision signal generation with advanced risk management strategies. Whether you're a seasoned trader or just starting your journey, this indicator empowers you to navigate financial markets with confidence and achieve consistent results.
Experience the difference with the Martingale ADX Indicator – where reliability meets profitability, and success becomes attainable with every trade.
Trade wisely, and may your ventures be marked by prosperity and fulfillment.
Pardon for any descriptive language grammatical error and comment about this indicator and to get my other strategy as well. Happy trading !!
Risk Disclaimer:
Trading in financial markets carries inherent risks and should be approached with caution. It is imperative to exercise sound judgment and trade only with funds that you can afford to lose. We strongly advise against using borrowed funds for trading purposes. First practice on demo for own learning then make decision wisely.
Tops & Bottoms - Day of Week Report█ OVERVIEW
The indicator tracks when the weekly tops and bottoms occur and reports the statistics by the days of the week.
█ CONCEPTS
Not all the days of the week are equal, and the market dynamic can follow through or shift over the trading week. Tops and bottoms are vital when entering a trade, as they will decide if you are catching the train or being straight offside. They are equally crucial when exiting a position, as they will determine if you are closing at the optimal price or seeing your unrealized profits vanish.
This indicator is before all for educational purposes. It aims to make the knowledge available to all traders, facilitate understanding of the various markets, and ultimately get to know your trading pairs by heart (and saving a lot of your time backtesting!).
USDJPY tops and bottoms percentages on any given week.
USDJPY tops and bottoms percentages on up weeks versus down weeks.
█ FEATURES
Custom interval
By default, the indicator uses the weekly interval defined by the symbol (e.g., Monday to Sunday). This option allows you to specify your custom interval.
Weekly interval type filter
Analyze the weekly interval on any weeks, up weeks, or down weeks.
Configurable time range filter
Select the period to report from.
█ NOTES
Trading session
The indicator analyzes the days of the week from the daily chart. The daily trading sessions are defined by the symbol (e.g., 17:00 - 17:00 on EURUSD).
Extended/electronic trading session
The indicator can include the extended hours when activated on the chart, using the 24-hour or 1440-minute timeframe.
█ HOW TO USE
Plot the indicator and navigate on the 1-day or 24-hour timeframe.
Institutions vs. Crypto Whales Spot BuyingBased on analysis from @tedtalksmacro, I have put together a similar tool that helps to visualise whether institutions (Coinbase and Deribit) or native crypto whales (Binance and Bitfinex) are leading the BTC spot buying.
This is plotted as the normalised relative difference (-1 and 1) between the average of Coinbase and Deribit spot price versus Binance and Bitfinex. If positive (i.e. green bar), institutions are trading at a premium; if negative (i.e. red bar), crypto whales are trading at a premium.
For example, if crypto whales are trading at a premium and price is increasing, then they are leading the buying relative to institutions. However, if whales are trading at a premium and price is decreasing, then it is likely institutions are selling off at a more rapid rate relative to the crypto whales buying pressure. This applies to the alternate scenario where institutions are trading at a premium to crypto whales.
In recent times, native crypto whales (largely Binance) drove the push from 40 to 48k, but then also marked the local top with a major sell off at this price. Institutions then took over buying at the most recent lows, driven largely by GBTC outflows slowing down and Blackrock daily inflows exceeding Grayscale outflows for the first time late last week.
Price SextantThe provided Pine Script™ code is for a technical analysis indicator called "Price Sextant." This indicator helps visualize the price position relative to its linear regression and standard deviation levels. Here's a brief description:
Price Sextant Indicator:
Purpose:
The Price Sextant indicator aims to show the current price's deviation from the linear regression line by dividing the price chart into different zones or sextants.
Components:
Linear Regression: The script calculates a linear regression line based on the closing prices over a specified length (default is 50 bars).
Standard Deviation Sections: It then computes standard deviation levels from the linear regression, creating upper and lower sections around the regression line.
Scoring: Each section is assigned a numerical score, and labels with corresponding scores are displayed on the chart.
Arrow and Midline: An arrow is drawn to indicate the current price's position in relation to the regression line and standard deviation bands. It changes color based in what section it is:
orange section shows a ranging price, below orange section -1 arrow turns red and show down trend and if arrow above +1 section it turns green and show strong up trend of price.
A midline is plotted to mark the position of the linear regression line.
Sextant Description:
In navigation, a sextant is an instrument used to measure the angle between two visible objects.
In the context of this indicator, the term "Sextant" is likely used metaphorically to describe the division of the price chart into six sections or zones based on the linear regression and standard deviation bands.
This indicator can help traders identify potential overbought or oversold conditions, as well as assess the strength and direction of the trend.
Please note that the effectiveness of the indicator depends on various factors, and it's advisable to use it in conjunction with other analysis tools for a comprehensive trading strategy.
Bitcoin Price Based On ElectricityThis script Calculates the price of Bitcoin solely on the hashrate and the cost of electricity.
The calculation is quite conservative considering its based on the average cost of electricity globally and we are assuming that everyone is running the latest mining hardware, which is the most efficient and cost effective.
Under both of these assumptions the calculation for bitcoins price is almost identical to the price we are seeing now.
If we change the reward rate to 3.125 (Aprils reward amount) then the price of one bitcoin per cost of work will be around 100k.
I am sure I am missing some important numbers in this calculation, fees, start up costs etc. However, it is very interesting to see that the price of Bitcoin can be calculated almost perfectly based on the hashrate and cost of electricity.
PROOF OF WORK
Candlesticks Patterns [TradingFinder] Pin Bar Hammer Shooting🔵 Introduction
Truly, the title "TradingView" doesn't do justice to this excellent website, and that's why I've written about its crucial aspect. In this indicator, the identification of all candlesticks known as "Pin bars" is explored.
These candlesticks include the following:
- Hammer : A Pin bar formed at the end of a bearish trend, with its body being either bearish or bullish.
- Shooting Star : Formed at the end of a bullish trend, with its body being either bearish or bullish.
- Hanging Man : Formed during an upward trend, characterized by a candle with a lower shadow.
- Inverted Hammer : Formed during a downward trend, characterized by a candle with an upper shadow.
🟣 Important : For ease of use, we refer to these four candlestick patterns as Pin Bars and categorize them into the main friends "Bullish" and "Bearish."
🟣 Important : In all sources, Hanging Man and Inverted Hammer are referred to as "Reversal candles." However, in reality, whenever they appear after breaking a significant area (Break Out), we expect these candles to signal a continuation of the trend and confirmation in the direction of the trend.
🟣 Important : One of the best signs of market manipulation and entry by market giants is the "Ice Berg." So, it provides one of the best trading opportunities.
🔵 Reason for Creation
Many traders, especially volume traders, use Pin bars as confirmation and enter the market after their occurrence. In this indicator, all four patterns are identified and displayed in a colored candle format, using "triangle" and "circle."
When they are evident on the chart, directly or by drawing a horizontal line, they give us good alerts for reversal or continuation areas.
🔵 Information Table
1. Red circle: Pin bars formed in a downtrend.
2. Blue circle: Bullish Pin bars formed in an uptrend.
3. Black triangle: Bearish Pin bar candle in an uptrend.
4. Blue triangle: Bullish Pin bar candle in a downtrend.
🔵 Settings
Trend Detection Period: A special feature that considers smaller or larger fluctuations. If individual price waves need to be considered, use lower numbers; if the overall trend direction is desired, use larger numbers (e.g., 5-7 or higher). This precisely sets the Zigzag or Pivot format, not displayed but considered in the indicator calculation.
Trend Effect : By changing the Trend Effect status to "Off," all Pin bars, whether bullish or bearish, are displayed regardless of the current market trend. If the status remains "On," only Pin bars in the direction of the main market trend are shown.
🟣 Important : Black triangles "Number 3" and blue triangles "Number 4" displayed in the information table section, as explained in the "Information Table" section.
Show Bullish Pin Bar : When set to "Yes," displays bullish Pin bars; when set to "No," does not display them.
Show Bearish Pin Bar : When set to "Yes," allows the display of bearish Pin bars; when set to "No," does not display them.
Bullish Pin Bar Setting : Using the "Ratio Lower Shadow to Body" and "Ratio Lower Shadow to Higher Shadow" settings, you can customize your bullish Pin bar candles. Larger numbers impose stricter conditions for identifying bullish Pin bars.
Bearish Pin Bar Setting : Using the "Ratio Higher Shadow to Body" and "Ratio Higher Shadow to Lower Shadow" settings, you can customize your bearish Pin bar candles. Larger numbers impose stricter conditions for identifying bearish Pin bars.
Show Info Table : Allows the display or non-display of the information table (located at the bottom of the page and on the right side).
🔵 How to Use
At the end of a downtrend, look for "Hammer" candles, easily identified one by one.
To identify the "Shooting Star" candle pattern at the end of an uptrend; expect a price reversal in the downtrend.
For trades in the downward direction, wait for the formation of an "Inverted Hammer" Pin bar.
And finally, in an uptrend, where a "Hanging Man" candle can form.
🔵 Features
For better visualization, triangles and circles are used above the candles, but they can be easily removed. All Pin bars are displayed in color with the following meanings:
- Black-bodied candle: Inverted Hammer
- Turquoise blue candle: Hammer
- Pink candle: Hanging Man
- Red candle: Shooting Star
🟣 Important : The capability to detect the powerful two-candle pattern "Tweezer Top" at the end of an uptrend emerges by forming two "Shooting Star" candles side by side.
Similarly, the two-candle pattern "Tweezer Bottom" is created at the end of a downtrend with the formation of two "Hammer" candles side by side. To identify the "Tweezer" pattern, make sure the settings in the "Trend Effect" section are set to "Off."
🟣 Auxiliary Indicators
During the start of trading sessions such as Asia, London, and New York, where the highest liquidity exists, alongside this indicator, you can use the Trading Sessions indicator.
Sessions
The combination of Order Blocks "-OB" and "+OB" with candles is one of the best trading methods. The indicator that identifies order blocks, along with this indicator, can yield remarkable results in the success of Pin bar candles.
Order Blocks Finder
The trading toolset "TFlab" presents this indicator. To benefit from all indicators, we invite you to visit our page " TFlab Scripts ".
Session Levels Predictor [LuxAlgo]The "Session Levels Predictor" indicator predicts the maximum/minimum levels that will be made within a user-specified session. Hit rate percentages are displayed to measure how often a specific level has been hit.
🔶 USAGE
The indicator can be used to estimate the expected maximum/minimum levels within a specified session, these are directly displayed at the start of a session. This operation can be useful to set take profits/stop losses levels when we expect to exit within a specific session.
Users can display up to 3 upper and lower extremities on their chart (by default only 2 upper and lower extremities are displayed), with their distance from the session opening price being determined by the user-set percentile setting, values closer to 100 will return levels farther away from the session opening price.
Predicting maximum/minimum levels effectively allows obtaining support/resistance levels for the user-defined session, with a breakout probability indicating how easy it can be for the price to reach the estimated levels. These levels can be extended outside the specified session, allowing to test their relevancy as support/resistance levels to prices outside the specified sessions.
🔶 DETAILS
To predict maximum/minimum levels made within a session we keep a record of the distance between a session's maximum/minimum value and the session opening price (opening price when the session starts).
By using the percentile_nearest_rank() on our recorded distances we draw levels from the session opening price. If a level is hit between 2 sessions, this is saved for further calculations.
Lastly, a % hit rate of these levels is shown at the sessions open, indicating the probability that these levels could be hit before the next session.
🔹 array.percentile_nearest_rank()
Returns the value for which the specified percentage of array values (percentile) is less than or equal to it, using the nearest-rank method.
For example, taking the 75th percentile from our recorded distances between the maximum session level and session opening price will return a new distance where 75% of the recorded distances are lower.
The same goes for the green session's open - low levels
🔶 SETTINGS
Session: User-defined session interval, uses the symbol timezone.
Percentile (1, 2, 3): K-th percentile used to estimate session max/min levels, higher values will return more distant levels.
Max Population: Maximum amount of recorded distance data for the calculation of percentiles.
🔹 Style
Extend Middle Line: Toggle to extend the blue Middle Line to the next session - Default disabled