RagiBaba's 3:1 Risk-to-Reward Tool with LeverageThis indicator allows you to visualize a 3:1 risk-to-reward ratio for your trades on the chart. It automatically calculates and displays the Stop Loss and Take Profit levels based on your input for:
Entry Price
Trade Amount ($)
Risk Amount ($)
Leverage (x)
You can adjust the following settings:
Trade Direction: Choose between a Long or Short position.
Leverage: Enter the leverage value (e.g., 25x).
Entry Price: Set the price at which you plan to enter the trade.
Risk and Reward: Input the amount of money you're willing to risk and the desired reward (automatically calculated as 3 times your risk).
Label Position: Choose the label position for Entry, Stop, and Target (left, center, or right on the chart).
Each line has a corresponding label showing the price for Entry, Stop Loss, and Take Profit. The labels can be positioned on the left, center, or right side of the chart for better readability.
This tool helps you manage your trades by giving you clear visual cues for your entry, stop loss, and take profit levels with the option to adjust for leverage.
Educational
Trading SessionsTrading Sessions Indicator
Overview
Trading Sessions is a visually displays major trading sessions worldwide. It overlays the trading hours of four major markets - Sydney, Tokyo, London, and New York - on your chart.
Key Features
Simultaneous display of 4 trading sessions
Visual session dividers
Customizable session boxes
Session status display in top-right corner
Session Settings
Configuration Options per Session
Toggle visibility
Timezone configuration
Trading hours setting (Default: 08:00-17:00)
Background color setting (95% transparency)
Default Session Configuration
Sydney Session (Yellow)
Tokyo Session (Red)
London Session (Blue)
New York Session (Lime)
Session Divider Settings
Toggle divider visibility
Divider line position (top/bottom)
Session emoji position (top/bottom)
Customizable emoji per session
Sydney: 🦘
Tokyo: 🗼
London: 🚇
New York: 🗽
Overlay Settings
Force Overlay
When enabled: Forces session backgrounds behind candles
When disabled: Standard overlay display
Box Overlay
When enabled: Displays price range boxes during sessions
Shows session name at box top
Individual color settings per session
Display Features
1. Background Color Distinction
Each session shown in configured color
Visibility adjusted through transparency
2. Session Divider Display
Vertical line (|): Session start/end
Upper line (¯)/lower line (_): During session
Emoji: Session start
3. Status Display
Session status shown in top-right
Active sessions highlighted in corresponding colors
Inactive sessions shown in gray
Limitations
Timezones must conform to IANA Time Zone Database format
Gold Friday Anomaly StrategyThis script implements the " Gold Friday Anomaly Strategy ," a well-known historical trading strategy that leverages the gold market's behavior from Thursday evening to Friday close. It is a backtesting-focused strategy designed to assess the historical performance of this pattern. Traders use this anomaly as it captures a recurring market tendency observed over the years.
What It Does:
Entry Condition: The strategy enters a long position at the beginning of the Friday trading session (Thursday evening close) within the defined backtesting period.
Exit Condition: Friday evening close.
Backtesting Controls: Allows users to set custom backtesting periods to evaluate strategy performance over specific date ranges.
Key Features:
Custom Backtest Periods: Easily configurable inputs to set the start and end date of the backtesting range.
Fixed Slippage and Commission Settings: Ensures realistic simulation of trading conditions.
Process Orders on Close: Backtesting is optimized by processing orders at the bar's close.
Important Notes:
Backtesting Only: This script is intended purely for backtesting purposes. Past performance is not indicative of future results.
Live Trading Recommendations: For live trading, it is highly recommended to use limit orders instead of market orders, especially during evening sessions, as market order slippage can be significant.
Default Settings:
Entry size: 10% of equity per trade.
Slippage: 1 tick.
Commission: 0.05% per trade.
Volatility and Tick Size DataThis indicator, titled "Tick Information & Standard Deviation Table," provides detailed insights into market microstructure, including tick size, point value, and standard deviation values calculated based on the True Range. It helps visualize essential trading parameters that influence transaction costs, risk management, and portfolio performance, including volatility measures that can guide investment strategies.
Why These Data Points Are Important for Portfolio Management
Tick Size and Point Value:
Tick size refers to the smallest possible price movement in a given asset. It defines the granularity of the price changes, affecting how precise the market price can be at any moment. Point value reflects the monetary value of a single price movement (one tick). These two data points are essential for understanding transaction costs and for evaluating how much capital is at risk per price movement. Smaller tick sizes may lead to more efficient pricing in high-frequency trading strategies (Hasbrouck, 2009).
Reference: Hasbrouck, J. (2009). Empirical Market Microstructure. Foundations and Trends® in Finance, 3(4), 169-272.
Standard Deviations and Volatility:
Standard deviation measures the variability or volatility of an asset's price over a set period. This data point is critical for portfolio management, as it helps to quantify risk and predict potential price movements. True Range and its standard deviations provide a more comprehensive measure of market volatility than just price fluctuations, as they include gaps and extreme price changes. Investors use volatility data to assess the potential risk and adjust portfolio allocations accordingly (Ang, 2006).
Reference: Ang, A. (2006). Asset Management: A Systematic Approach to Factor Investing. Oxford University Press.
Risk Management:
The ability to quantify risk through metrics like the 1st, 2nd, and 3rd standard deviations of the true range is essential for implementing risk controls within a portfolio. By incorporating volatility data, portfolio managers can adjust their strategies for different market conditions, potentially reducing exposure to high-risk environments. These volatility measures help in setting stop-loss levels, optimizing position sizes, and managing the portfolio’s overall risk-return profile (Black & Scholes, 1973).
Reference: Black, F., & Scholes, M. (1973). The Pricing of Options and Corporate Liabilities. Journal of Political Economy, 81(3), 637-654.
Portfolio Diversification and Hedging:
Understanding asset volatility and transaction costs is critical when constructing a diversified portfolio. By using the standard deviations from this indicator, investors can better identify assets that may provide diversification benefits, potentially reducing the overall portfolio risk. Moreover, the point values and tick sizes help assess the cost-effectiveness of various assets, enabling portfolio managers to implement more efficient hedging strategies (Markowitz, 1952).
Reference: Markowitz, H. (1952). Portfolio Selection. The Journal of Finance, 7(1), 77-91.
Conclusion
The Tick Information & Standard Deviation Table provides critical market data that informs the risk management, diversification, and pricing strategies used in portfolio management. By incorporating tick size, point value, and volatility metrics, investors can make more informed decisions, better manage risk, and optimize the returns on their portfolios. The data serves as an essential tool for aligning asset selection and portfolio allocations with the investor's risk tolerance and market conditions.
Gap Marker (>5%)This TradingView script identifies and highlights price gaps of more than 5% between consecutive candles. It is a valuable tool for traders to quickly spot significant price movements and take action accordingly.
Features:
Gap-Up Detection: Marks green triangles when a candle’s opening price is more than 5% higher than the previous candle’s closing price.
Gap-Down Detection: Marks red triangles when a candle’s opening price is more than 5% lower than the previous candle’s closing price.
Percentage Display: Shows the percentage change next to the marker for added clarity.
This script is especially useful for identifying potential trading opportunities triggered by substantial market moves.
Dieses TradingView-Skript identifiziert und markiert Kurslücken (Gaps) von mehr als 5 % zwischen aufeinanderfolgenden Kerzen. Es ist ein hilfreiches Tool für Trader, um bedeutende Kursbewegungen sofort zu erkennen und darauf zu reagieren.
Funktionen:
Gap-Up-Erkennung: Markiert grüne Dreiecke, wenn der Eröffnungskurs einer Kerze mehr als 5 % über dem Schlusskurs der vorherigen Kerze liegt.
Gap-Down-Erkennung: Markiert rote Dreiecke, wenn der Eröffnungskurs einer Kerze mehr als 5 % unter dem Schlusskurs der vorherigen Kerze liegt.
Prozentanzeige: Zeigt die prozentuale Veränderung direkt neben der Markierung an.
Das Skript ist besonders nützlich, um potenzielle Handelsmöglichkeiten zu identifizieren, die durch signifikante Marktbewegungen ausgelöst werden.
AlgoMaxx Prev OHLCThe AlgoMaxx Prev OHLC indicator provides a clear visualization of the previous day's Open, High, Low, and Close (OHLC) levels. These levels are crucial for understanding market structure, identifying support and resistance zones, and making informed trading decisions. The indicator is fully customizable and dynamically updates to ensure accuracy and clarity.
Key Features:
Prev. Day High/Low and Open/Close Levels:
Plots previous day's High/Low and Open/Close levels.
Toggle each level (lines and labels) on/off independently.
Customizable Lines and Labels:
Adjust line colors, styles (Solid, Dashed, Dotted), and widths.
Enable or disable labels for each level with customizable label colors.
Dynamic Updates:
Automatically updates levels daily.
Deletes old lines and labels to maintain a clean chart.
Efficient and Intuitive:
Designed to integrate seamlessly into any trading strategy with user-friendly customization options.
Indicator Logic:
Previous Day Levels Calculation:
The indicator uses Pine Script’s request.security function to fetch the previous day’s OHLC data from the daily timeframe ('D').
Dynamic Line and Label Management:
Persistent variables (var) store line and label references.
Old lines and labels are deleted and recreated at the start of each new day, ensuring a clutter-free chart.
Customizable Line Styles and Colors:
A mapping function (f_map_line_style) dynamically assigns line styles based on user input (Solid, Dashed, Dotted).
Separate inputs allow users to define distinct colors and styles for each level.
Independent Toggles:
Separate ON/OFF controls for High/Low and Open/Close lines and labels for maximum flexibility.
Clean Design:
The script ensures all plotted elements are dynamically adjusted to keep the chart clean and focused on actionable data.
How to Use:
Add the indicator to your chart.
Customize levels, colors, and styles via the "Inputs" and "Style" settings.
Analyze the plotted levels to identify key price zones for potential support, resistance, or breakout areas.
[w3ss1] Colored candlesA simple script that colors the candles in a color of choise on specific times of choice.
You can use it if you want to color like Asia session, or if you want to focus on specific times of day.
This keeps the chart clean, it just colors the candles in the choosen timings.
Daily Directional Bias Indicator (S&P 500)This indicator is designed to help you be on the right side of the trade.
Most traders who struggle to know which way price may move are only looking at part of the picture. This Directional Bias Indicator uses both the Accumulation/Distribution Line and VIX for directional confirmation.
The Accumulation/Distribution Line
The Accumulation/Distribution (ACC) line helps us gauge market momentum by showing the cumulative flow of money into or out of an asset. When the ACC line is rising, it suggests that buying pressure is dominating, indicating a bullish market. Conversely, when the ACC line is falling, it suggests that selling pressure is stronger, indicating a bearish market. By comparing the ACC line with the VWAP, traders can see if the price is moving in line with the overall market sentiment. If the ACC line is above the VWAP, it suggests the market is in a bullish phase; if it's below, it indicates a bearish phase.
The VIX
The VIX (Volatility Index) is often referred to as the "fear gauge" of the market. When the VIX is rising, it typically signals increased market fear and higher volatility, which can be a sign of bearish market conditions. Conversely, when the VIX is falling, it suggests lower volatility and a more stable, bullish market. Using the VIX with the VWAP helps us confirm market direction, particularly in relation to the S&P 500.
VWAP
For both the ACC Line and VIX, we use a VWAP line to gauge whether the ACC line or the VIX is above or below the average. When the ACC line is above the VWAP, we view it as a sign that price will go up. However, because the VIX has an inverse relationship, when the VIX falls below the VWAP, we take that as a sign to go long.
How to use
The yellow line represents the ACC Line.
The red line represents the VWAP based on the ACC line.
The triangles at the bottom simply show when the ACC line is above or below the VWAP.
The triangles at the top show whether the VIX is bullish or bearish.
If both triangles (top or bottom) are bullish, this confirms that the price of an asset like the S&P 500 will likely go up. If both triangles are pointing down, it suggests that price will fall.
As always, test for yourself.
Happy trading!
2.5% Risk High Reward Strategy with DebuggingKey Features:
Loosened RSI Conditions: Adjusted to allow trades when RSI is below 50 (long) or above 50 (short).
Buy/Sell Labels: Visual labels added for buy and sell signals.
Stop-Loss (SL) and Take-Profit (TP): Dotted lines displayed for SL and TP levels.
Account Balance: Plots account balance over time for backtesting purposes.
Debugging Visuals: EMA, RSI, and volume threshold plotted to validate entry conditions.
Data extraction to clipboardHow to extract data from indicators/stratagies to clipbaord
///// Educational purpose only /////
This could be useful to store the best parameters for a strategy for instance...
to store and reuse them, to build some code in automatic , to transfer...
using the " log.info() " function ...
Earnings Master (EM) V1.0
Earnings Master (EM)
As an Investor/ Trader, while analysing the tradingview charts, he/she may quickly like to see some of the fundamental data like the financial health of the company which may help to shortlist the list of stocks to pick.
It will be great if he can see the last few quarters or years earnings, to make informed decisions based on detailed financial data.
A person may be interested to see the last few quarters sales data, Profit data, EPS, etc.
Normally he/she has to go to some other fundamental websites to see these data, which will be highly time consuming and a hectic process if he is going through hundreads of charts per day.
Thanks for our new Indicator Earnings Master (EM). This indicator is designed to provide detailed financial insights into a company's performance by displaying key financial metrics such as Profit After Tax (PAT), Operating profit margin (OPM), Earnings Per Share (EPS), Total Revenue etc.
The indicator also calculates and visualizes the percentage changes in these metrics over different quarters, offering a comprehensive view of the company's financial health.
Also it provides sector/Industry details and percentage up from 52-week low and down from 52-week high
Features:
Table Display:
A customisable table that can be viewed in both Dark and light themes
A customisable table that can be positioned in various locations on the chart (e.g., top left, top center, bottom right, etc.).
Color-coded values to indicate positive and negative changes in financial metrics.
Dynamic text size and color for better readability.
Financial Metrics:
PAT (Profit After Tax): Displays the PAT values for the current and previous quarters.
Industry and Sector: Displays the industry and the particular sector of the company
EPS (Earnings Per Share): Displays the EPS values for the current and previous quarters.
Total Revenue: Shows revenue values in crores (Cr) for multiple quarters.
Free Float: Represents the number of freely floating shares.
Quarter-over-Quarter (QoQ) Change: Computes the percentage change in PAT and sales for different quarters.
Sales in Crores: Displays sales values in crores (Cr) and calculates the QoQ changes.
Operating profit margin (OPM): which is a financial ratio that measures how much profit a company makes on sales after paying variable production costs
Inputs
User inputs for table position, Dark mode , and calculation periods for earnings.
- Option to show/hide Borders
Also can customise the indicator to show/hide the following table fields
- Show Sector
- Show Mcap/ Free Float Mcap?
- Show Earnings
- Show 52w High/Low stats
How to Use:
Add the Earnings Master indicator to your TradingView chart.
Customize the table position and color mode as per your preference.
Analyze the displayed financial metrics and percentage changes to gain insights into the company's performance.
Use the color-coded values to quickly identify significant changes and trends in PAT, EPS, revenue, and other key metrics.
Example Output:
In Quarter Ended mode the table will display the following fields
Quarter Ended period values
PAT Quarterly values
PAT YoY in percentage
PAT QoQ in percentage
Quarterly Sales values
Sales YoY in percentage
Sales QoQ in percentage
EPS values
EPS YoY in percentage (Option available to show/hide)
EPS QoQ in percentage (Option available to show/hide)
Price To Earnings (P/E) ratio
Operating profit margin (OPM)
In Year Ended mode the table will display the following fields
Year Ended period values
PAT Quarterly values
PAT YoY in percentage
Yearly Sales values
Sales YoY in percentage
EPS values
Price To Earnings (P/E) ratio
Price To Earnings (P/E) ratio YoY in percentage
Operating profit margin (OPM)
Trading Sessions with Highs and LowsTrading Sessions with Highs and Lows is designed to visually highlight specific trading sessions on the chart, providing traders with key insights into market behavior during these time periods. Here’s a detailed explanation of how the indicator works:
Key Features
1. Session Boxes:
• The indicator plots colored boxes on the chart to represent the price range of defined trading sessions.
• Each box spans the session’s start and end times and encapsulates the high and low prices during that period.
• Two trading sessions are defined by default:
• USA Trading Session: 9:30 AM - 4:00 PM (New York Time).
• UK Trading Session: 8:00 AM - 4:30 PM (London Time).
2. Session Labels:
• The name of the session (e.g., “USA” or “UK”) is displayed above the session box for clear identification.
3. High and Low Markers:
• Markers are added to the chart at the session’s high and low points:
• High Marker: A green label indicating the session high.
• Low Marker: A red label indicating the session low.
4. Dynamic Reset:
• After the session ends, the session high and low values are reset to na to prepare for the next trading day.
5. Customizable Background Colors:
• Each session’s box has a distinct, semi-transparent background color for better visual separation.
How It Works
1. Core Functionality:
• A function, plot_box, takes the session name, start time, end time, and background color as input.
• It calculates whether the current time is within the session.
• During the session:
• It tracks the session’s highest and lowest prices.
• It identifies the bars where the high and low occurred.
• At the session’s end:
• It plots a box on the chart covering the session’s time and price range.
• Labels are created for the session name and its high/low points.
2. Session Timing:
• Timestamps for the USA and UK trading sessions are calculated using the timestamp function with respective time zones.
3. Visual Elements:
• The box.new function draws the session boxes on the chart.
• The label.new function creates session name and high/low labels.
Usage
• Overlay Mode: The indicator is applied directly on the price chart (overlay=true), making it easy to visualize session-specific price behavior.
• Trading Strategy:
• Identify session-specific support and resistance levels.
• Observe price action trends during key trading periods.
• Align trading decisions with session dynamics.
Customization
While the indicator is preset for the USA and UK trading sessions, it can be easily modified:
1. Add/Remove Sessions: Define additional sessions by providing their start and end times.
2. Change Colors: Update the background_color in the plot_box calls to use different colors for sessions.
3. Adjust Time Zones: Replace the current time zones with others relevant to your trading style.
Visualization Example
• USA Session:
• Time: 9:30 AM - 4:00 PM (New York Time).
• Box Color: Semi-transparent orange.
• UK Session:
• Time: 8:00 AM - 4:30 PM (London Time).
• Box Color: Semi-transparent green.
Why Use This Indicator?
1. Market Awareness: Easily spot price behavior during high-liquidity trading periods.
2. Trend Analysis: Analyze how sessions overlap or affect each other.
3. Session Boundaries: Use session high/low levels as dynamic support and resistance zones.
This indicator is an essential tool for intraday and swing traders who want to align their strategies with key market timings.
Simple Decesion Matrix Classification Algorithm [SS]Hello everyone,
It has been a while since I posted an indicator, so thought I would share this project I did for fun.
This indicator is an attempt to develop a pseudo Random Forest classification decision matrix model for Pinescript.
This is not a full, robust Random Forest model by any stretch of the imagination, but it is a good way to showcase how decision matrices can be applied to trading and within Pinescript.
As to not market this as something it is not, I am simply calling it the "Simple Decision Matrix Classification Algorithm". However, I have stolen most of the aspects of this machine learning algo from concepts of Random Forest modelling.
How it works:
With models like Support Vector Machines (SVM), Random Forest (RF) and Gradient Boosted Machine Learning (GBM), which are commonly used in Machine Learning Classification Tasks (MLCTs), this model operates similarity to the basic concepts shared amongst those modelling types. While it is not very similar to SVM, it is very similar to RF and GBM, in that it uses a "voting" system.
What do I mean by voting system?
How most classification MLAs work is by feeding an input dataset to an algorithm. The algorithm sorts this data, categorizes it, then introduces something called a confusion matrix (essentially sorting the data in no apparently order as to prevent over-fitting and introduce "confusion" to the algorithm to ensure that it is not just following a trend).
From there, the data is called upon based on current data inputs (so say we are using RSI and Z-Score, the current RSI and Z-Score is compared against other RSI's and Z-Scores that the model has saved). The model will process this information and each "tree" or "node" will vote. Then a cumulative overall vote is casted.
How does this MLA work?
This model accepts 2 independent variables. In order to keep things simple, this model was kept as a three node model. This means that there are 3 separate votes that go in to get the result. A vote is casted for each of the two independent variables and then a cumulative vote is casted for the overall verdict (the result of the model's prediction).
The model actually displays this system diagrammatically and it will likely be easier to understand if we look at the diagram to ground the example:
In the diagram, at the very top we have the classification variable that we are trying to predict. In this case, we are trying to predict whether there will be a breakout/breakdown outside of the normal ATR range (this is either yes or no question, hence a classification task).
So the question forms the basis of the input. The model will track at which points the ATR range is exceeded to the upside or downside, as well as the other variables that we wish to use to predict these exceedences. The ATR range forms the basis of all the data flowing into the model.
Then, at the second level, you will see we are using Z-Score and RSI to predict these breaks. The circle will change colour according to "feature importance". Feature importance basically just means that the indicator has a strong impact on the outcome. The stronger the importance, the more green it will be, the weaker, the more red it will be.
We can see both RSI and Z-Score are green and thus we can say they are strong options for predicting a breakout/breakdown.
So then we move down to the actual voting mechanisms. You will see the 2 pink boxes. These are the first lines of voting. What is happening here is the model is identifying the instances that are most similar and whether the classification task we have assigned (remember out ATR exceedance classifier) was either true or false based on RSI and Z-Score.
These are our 2 nodes. They both cast an individual vote. You will see in this case, both cast a vote of 1. The options are either 1 or 0. A vote of 1 means "Yes" or "Breakout likely".
However, this is not the only voting the model does. The model does one final vote based on the 2 votes. This is shown in the purple box. We can see the final vote and result at the end with the orange circle. It is 1 which means a range exceedance is anticipated and the most likely outcome.
The Data Table Component
The model has many moving parts. I have tried to represent the pivotal functions diagrammatically, but some other important aspects and background information must be obtained from the companion data table.
If we bring back our diagram from above:
We can see the data table to the left.
The data table contains 2 sections, one for each independent variable. In this case, our independent variables are RSI and Z-Score.
The data table will provide you with specifics about the independent variables, as well as about the model accuracy and outcome.
If we take a look at the first row, it simply indicates which independent variable it is looking at. If we go down to the next row where it reads "Weighted Impact", we can see a corresponding percent. The "weighted impact" is the amount of representation each independent variable has within the voting scheme. So in this case, we can see its pretty equal, 45% and 55%, This tells us that there is a slight higher representation of z-score than RSI but nothing to worry about.
If there was a major over-respresentation of greater than 30 or 40%, then the model would risk being skewed and voting too heavily in favour of 1 variable over the other.
If we move down from there we will see the next row reads "independent accuracy". The voting of each independent variable's accuracy is considered separately. This is one way we can determine feature importance, by seeing how well one feature augments the accuracy. In this case, we can see that RSI has the greatest importance, with an accuracy of around 87% at predicting breakouts. That makes sense as RSI is a momentum based oscillator.
Then if we move down one more, we will see what each independent feature (node) has voted for. In this case, both RSI and Z-Score voted for 1 (Breakout in our case).
You can weigh these in collaboration, but its always important to look at the final verdict of the model, which if we move down, we can see the "Model prediction" which is "Bullish".
If you are using the ATR breakout, the model cannot distinguish between "Bullish" or "Bearish", must that a "Breakout" is likely, either bearish or bullish. However, for the other classification tasks this model can do, the results are either Bullish or Bearish.
Using the Function:
Okay so now that all that technical stuff is out of the way, let's get into using the function. First of all this function innately provides you with 3 possible classification tasks. These include:
1. Predicting Red or Green Candle
2. Predicting Bullish / Bearish ATR
3. Predicting a Breakout from the ATR range
The possible independent variables include:
1. Stochastics,
2. MFI,
3. RSI,
4. Z-Score,
5. EMAs,
6. SMAs,
7. Volume
The model can only accept 2 independent variables, to operate within the computation time limits for pine execution.
Let's quickly go over what the numbers in the diagram mean:
The numbers being pointed at with the yellow arrows represent the cases the model is sorting and voting on. These are the most identical cases and are serving as the voting foundation for the model.
The numbers being pointed at with the pink candle is the voting results.
Extrapolating the functions (For Pine Developers:
So this is more of a feature application, so feel free to customize it to your liking and add additional inputs. But here are some key important considerations if you wish to apply this within your own code:
1. This is a BINARY classification task. The prediction must either be 0 or 1.
2. The function consists of 3 separate functions, the 2 first functions serve to build the confusion matrix and then the final "random_forest" function serves to perform the computations. You will need all 3 functions for implementation.
3. The model can only accept 2 independent variables.
I believe that is the function. Hopefully this wasn't too confusing, it is very statsy, but its a fun function for me! I use Random Forest excessively in R and always like to try to convert R things to Pinescript.
Hope you enjoy!
Safe trades everyone!
Moment-Based Adaptive DetectionMBAD (Moment-Based Adaptive Detection) : a method applicable to a wide range of purposes, like outlier or novelty detection, that requires building a sensible interval/set of thresholds. Unlike other methods that are static and rely on optimizations that inevitably lead to underfitting/overfitting, it dynamically adapts to your data distribution without any optimizations, MLE, or stuff, and provides a set of data-driven adaptive thresholds, based on closed-form solution with O(n) algo complexity.
1.5 years ago, when I was still living in Versailles at my friend's house not knowing what was gonna happen in my life tomorrow, I made a damn right decision not to give up on one idea and to actually R&D it and see what’s up. It allowed me to create this one.
The Method Explained
I’ve been wandering about z-values, why exactly 6 sigmas, why 95%? Who decided that? Why would you supersede your opinion on data? Based on what? Your ego?
Then I consciously noticed a couple of things:
1) In control theory & anomaly detection, the popular threshold is 3 sigmas (yet nobody can firmly say why xD). If your data is Laplace, 3 sigmas is not enough; you’re gonna catch too many values, so it needs a higher sigma.
2) Yet strangely, the normal distribution has kurtosis of 3, and 6 for Laplace.
3) Kurtosis is a standardized moment, a moment scaled by stdev, so it means "X amount of something measured in stdevs."
4) You generate synthetic data, you check on real data (market data in my case, I am a quant after all), and you see on both that:
lower extension = mean - standard deviation * kurtosis ≈ data minimum
upper extension = mean + standard deviation * kurtosis ≈ data maximum
Why not simply use max/min?
- Lower info gain: We're not using all info available in all data points to estimate max/min; we just pick the current higher and lower values. Lol, it’s the same as dropping exponential smoothing with alpha = 0 on stationary data & calling it a day.
You can’t update the estimates of min and max when new data arrives containing info about the matter. All you can do is just extend min and max horizontally, so you're not using new info arriving inside new data.
- Mixing order and non-order statistics is a bad idea; we're losing integrity and coherence. That's why I don't like the Hurst exponent btw (and yes, I came up with better metrics of my own).
- Max & min are not even true order statistics, unlike a percentile (finding which requires sorting, which requires multiple passes over your data). To find min or max, you just need to do one traversal over your data. Then with or without any weighting, 100th percentile will equal max. So unlike a weighted percentile, you can’t do weighted max. Then while you can always check max and min of a geometric shape, now try to calculate the 56th percentile of a pentagram hehe.
TL;DR max & min are rather topological characteristics of data, just as the difference between starting and ending points. Not much to do with statistics.
Now the second part of the ballet is to work with data asymmetry:
1) Skewness is also scaled by stdev -> so it must represent a shift from the data midrange measured in stdevs -> given asymmetric data, we can include this info in our models. Unlike kurtosis, skewness has a sign, so we add it to both thresholds:
lower extension = mean - standard deviation * kurtosis + standard deviation * skewness
upper extension = mean + standard deviation * kurtosis + standard deviation * skewness
2) Now our method will work with skewed data as well, omg, ain’t it cool?
3) Hold up, but what about 5th and 6th moments (hyperskewness & hyperkurtosis)? They should represent something meaningful as well.
4) Perhaps if extensions represent current estimated extremums, what goes beyond? Limits, beyond which we expect data not to be able to pass given the current underlying process generating the data?
When you extend this logic to higher-order moments, i.e., hyperskewness & hyperkurtosis (5th and 6th moments), they measure asymmetry and shape of distribution tails, not its core as previous moments -> makes no sense to mix 4th and 3rd moments (skewness and kurtosis) with 5th & 6th, so we get:
lower limit = mean - standard deviation * hyperkurtosis + standard deviation * hyperskewness
upper limit = mean + standard deviation * hyperkurtosis + standard deviation * hyperskewness
While extensions model your data’s natural extremums based on current info residing in the data without relying on order statistics, limits model your data's maximum possible and minimum possible values based on current info residing in your data. If a new data point trespasses limits, it means that a significant change in the data-generating process has happened, for sure, not probably—a confirmed structural break.
And finally we use time and volume weighting to include order & process intensity information in our model.
I can't stress it enough: despite the popularity of these non-weighted methods applied in mainstream open-access time series modeling, it doesn’t make ANY sense to use non-weighted calculations on time series data . Time = sequence, it matters. If you reverse your time series horizontally, your means, percentiles, whatever, will stay the same. Basically, your calculations will give the same results on different data. When you do it, you disregard the order of data that does have order naturally. Does it make any sense to you? It also concerns regressions applied on time series as well, because even despite the slope being opposite on your reversed data, the centroid (through which your regression line always comes through) will be the same. It also might concern Fourier (yes, you can do weighted Fourier) and even MA and AR models—might, because I ain’t researched it extensively yet.
I still can’t believe it’s nowhere online in open access. No chance I’m the first one who got it. It’s literally in front of everyone’s eyes for centuries—why no one tells about it?
How to use
That’s easy: can be applied to any, even non-stationary and/or heteroscedastic time series to automatically detect novelties, outliers, anomalies, structural breaks, etc. In terms of quant trading, you can try using extensions for mean reversion trades and limits for emergency exits, for example. The market-making application is kinda obvious as well.
The only parameter the model has is length, and it should NOT be optimized but picked consciously based on the process/system you’re applying it to and based on the task. However, this part is not about sharing info & an open-access instrument with the world. This is about using dem instruments to do actual business, and we can’t talk about it.
∞
IU Price Density(Market Noise)This Price density Indicator will help you understand what and how market noise is calculated and treated.
Market noise = when the market is moving up and down without any clear direction
The Price Density Indicator is a technical analysis tool used to measure the concentration or "density" of price movements within a specific range. It helps traders differentiate between noisy, choppy markets and trending ones.
I’ve developed a custom Pine Script indicator, "IU Price Density," designed to help traders distinguish between noisy, indecisive markets and clear trading opportunities. It can be applied across multiple markets.
How this work:
Formula = (Σ (High𝑖 - Low𝑖)) / (Max(High) - Min(Low))
Where,
High𝑖 = the high price at the 𝑖 data point.
Low𝑖 = the low price at the 𝑖 data point.
Max(High) = highest price over the data set.
Max(Low) = Lowest price over the data set.
How to use it :
This indicator ranges from 0 to 10
Green(0-3) = Trending Market
Orange(3-6) = Market is normal
Red(6-10) = Noise market
💡 Key Features:
Dynamic Visuals: The indicator uses color-coded signals—green for trending markets and red for noisy, volatile conditions—making it easy to identify optimal trading periods at a glance.
Background Shading: With background colors highlighting significant market conditions, traders can quickly assess when to engage or avoid certain trades.
Customizable Parameters: The length and smoothing factors allow for flexibility in adapting the indicator to various assets and timeframes.
Whether you're a swing trader or an intraday strategist, this tool provides valuable insights to improve your market analysis. I’m excited to bring this indicator to the community!
Altcoin Season Index - AdamThe "Altcoin Season Index" is a powerful tool for understanding market dynamics between Bitcoin and altcoins. This indicator helps traders identify whether the market is favoring Bitcoin or if it has shifted to favor altcoins. Understanding this can be crucial for making informed decisions about allocating your investments within the crypto market.
Overview of the Altcoin Season Index
The Altcoin Season Index calculates how well the top 10 altcoins are performing compared to Bitcoin over a given period. It helps traders determine if they are currently in an "Altcoin Season" or a "Bitcoin Season." The indicator gives a score from 0 to 100, representing the percentage of altcoins outperforming Bitcoin over a specific time window. When many altcoins are performing better than Bitcoin, it suggests a possible "Altcoin Season," whereas the opposite may indicate a period of Bitcoin dominance.
Key Features:
1. Top 10 Altcoin Performance Comparison: The indicator evaluates the performance of the top 10 altcoins compared to Bitcoin. It provides a clear view of how well altcoins are doing relative to the market leader, Bitcoin.
2. Customizable Performance Period: The period of analysis is adjustable, allowing users to set a specific timeframe, typically in days, to evaluate the relative performance of altcoins versus Bitcoin.
3. Dynamic Replacement of Altcoins: The indicator includes a feature to replace the last coin in the list, ensuring that the data stays relevant as market conditions change. For example, when a new altcoin enters the top 10 in terms of market cap, the indicator can replace an older coin that is falling out of the top ranks.
4. Threshold Indicators: The indicator uses predefined thresholds to determine and visualize whether it is an "Altcoin Season" or a "Bitcoin Season":
- A value above 75 indicates an Altcoin Season, suggesting that altcoins are outperforming Bitcoin.
- A value below 25 suggests Bitcoin dominance, where Bitcoin is outperforming the majority of altcoins.
How the Indicator Works:
1. Performance Calculation: The indicator calculates the percentage change in price for each of the top 10 altcoins and Bitcoin over a given number of days. The comparison is made by looking at how much each asset's price has changed over the specified period.
2. Altcoin Season Calculation: The indicator counts the number of altcoins that have outperformed Bitcoin during the given period. The result is then expressed as a percentage, known as the Altcoin Season Index. If 8 out of 10 altcoins are outperforming Bitcoin, the index will be 80%, signaling a strong altcoin season.
3. Visual Representation: The indicator is visualized on a separate panel within TradingView, showing the Altcoin Season Index over time. Additionally, thresholds are marked on the chart, and background colors are applied to provide visual cues:
- Red Background: When the Altcoin Season Index is above 75, indicating a strong altcoin season.
- Blue Background: When the Altcoin Season Index is below 25, indicating Bitcoin dominance.
Practical Use:
- Identify Market Cycles: Traders can use this indicator to identify when the market is moving into or out of an altcoin season. This can help traders decide whether to rotate capital into altcoins or Bitcoin.
- Investment Strategy Adjustment: During altcoin seasons, altcoins tend to outperform Bitcoin. Traders might allocate more of their portfolio to promising altcoins. Conversely, during Bitcoin-dominant periods, shifting investments towards Bitcoin could provide more stability.
- Support Technical Analysis: This indicator complements other forms of technical analysis by providing macro-level insights about market direction and which asset classes might be favored.
Example Usage:
Imagine that the Altcoin Season Index is currently at 80%. This means that 8 of the top 10 altcoins have performed better than Bitcoin over the selected period. This strong altcoin performance suggests that the market has entered an "Altcoin Season." A trader observing this might consider reallocating funds towards altcoins to capitalize on the positive momentum.
Alternatively, if the index is at 20%, only 2 out of the top 10 altcoins are outperforming Bitcoin, indicating that Bitcoin is currently the stronger player. In this scenario, traders may choose to prioritize Bitcoin or maintain a more conservative portfolio allocation.
Note:
This indicator includes a feature to replace the bottom-ranked altcoin (typically a coin that falls out of the top 10) with a new altcoin when market conditions change. This ensures that the analysis remains relevant by focusing on the top-performing assets by market capitalization.
Conclusion:
The Altcoin Season Index is a helpful tool for understanding broader trends in the cryptocurrency market and making strategic investment decisions. By monitoring which assets are performing better, traders can adapt their strategies and make more informed choices, particularly during shifts in market sentiment.
Please leave your feedback or contributions if there are any inaccuracies in my indicator. Thank you!
Risk Indicator# Risk Indicator
A dynamic risk analysis tool that helps traders identify optimal entry and exit points using a normalized risk scale from 0 to 1. The indicator combines price action, moving averages, and logarithmic scaling to provide clear visual signals for different risk zones.
### Key Features
• Displays risk levels on a scale of 0-1 with intuitive color gradients (blue → cyan → green → yellow → orange → red)
• Shows predicted price levels for different risk values
• Divides the chart into 5 DCA (Dollar Cost Average) zones
• Includes customizable alerts for rapid risk changes and zone transitions
• Automatically adjusts to market conditions using dynamic ATH/ATL calculations
### Customizable Parameters
• SMA Period: Adjust the smoothing period for the baseline moving average
• Power Factor: Fine-tune the sensitivity of risk calculations
• Initial ATL Value: Set the starting point for ATL calculations
• Label Offset: Adjust the position of price level labels
• Visual Options: Toggle price levels and zone labels
• Alert Settings: Customize alert thresholds and enable/disable notifications
### Risk Zones Explained
The indicator divides the chart into five distinct zones:
- 0.0-0.2: DCA 5x (Deep Blue) - Strongest buy zone
- 0.2-0.4: DCA 4x (Cyan) - Strong buy zone
- 0.4-0.6: DCA 3x (Green) - Neutral zone
- 0.6-0.8: DCA 2x (Yellow/Orange) - Take profit zone
- 0.8-1.0: DCA 1x (Red) - Strong take profit / potential sell zone
### Alerts
Built-in alerts for:
• Rapid increases in risk level
• Rapid decreases in risk level
• Entry into buy zones
• Entry into sell zones
### How to Use
1. Add the indicator to your chart
2. Adjust the SMA period and power factor to match your trading timeframe
3. Monitor the risk level and corresponding price predictions
4. Use the DCA zones to guide your position sizing
5. Set up alerts for your preferred risk thresholds
### Tips
- Lower risk values (blue/cyan) suggest potentially good entry points
- Higher risk values (orange/red) suggest taking profits or reducing position size
- Use in conjunction with other technical analysis tools for best results
- Adjust the power factor to fine-tune sensitivity to price movements
### Notes
- Past performance is not indicative of future results
- This indicator is meant to be used as part of a complete trading strategy
- Always manage your risk and position size according to your trading plan
Version 1.0
BTCUSD Momentum After Abnormal DaysThis indicator identifies abnormal days in the Bitcoin market (BTCUSD) based on daily returns exceeding specific thresholds defined by a statistical approach. It is inspired by the findings of Caporale and Plastun (2020), who analyzed the cryptocurrency market's inefficiencies and identified exploitable patterns, particularly around abnormal returns.
Key Concept:
Abnormal Days:
Days where the daily return significantly deviates (positively or negatively) from the historical average.
Positive abnormal days: Returns exceed the mean return plus k times the standard deviation.
Negative abnormal days: Returns fall below the mean return minus k times the standard deviation.
Momentum Effect:
As described in the academic paper, on abnormal days, prices tend to move in the direction of the abnormal return until the end of the trading day, creating momentum effects. This can be leveraged by traders for profit opportunities.
How It Works:
Calculation:
The script calculates the daily return as the percentage difference between the open and close prices. It then derives the mean and standard deviation of returns over a configurable lookback period.
Thresholds:
The script dynamically computes upper and lower thresholds for abnormal days using the mean and standard deviation. Days exceeding these thresholds are flagged as abnormal.
Visualization:
The mean return and thresholds are plotted as dynamic lines.
Abnormal days are visually highlighted with transparent green (positive) or red (negative) backgrounds on the chart.
References:
This indicator is based on the methodology discussed in "Momentum Effects in the Cryptocurrency Market After One-Day Abnormal Returns" by Caporale and Plastun (2020). Their research demonstrates that hourly returns during abnormal days exhibit a strong momentum effect, moving in the same direction as the abnormal return. This behavior contradicts the efficient market hypothesis and suggests profitable trading opportunities.
"Prices tend to move in the direction of abnormal returns till the end of the day, which implies the existence of a momentum effect on that day giving rise to exploitable profit opportunities" (Caporale & Plastun, 2020).
LRSI-TTM Squeeze - AynetThis Pine Script code creates an indicator called LRSI-TTM Squeeze , which combines two key concepts to analyze momentum, squeeze conditions, and price movements in the market:
Laguerre RSI (LaRSI): A modified version of RSI used to identify trend reversals in price movements.
TTM Squeeze: Identifies market compressions (low volatility) and potential breakouts from these squeezes.
Functionality and Workflow of the Code
1. Laguerre RSI (LaRSI)
Purpose:
Provides a smoother and less noisy version of RSI to track price movements.
Calculation:
The script uses a filtering coefficient (alpha) to process price data through four levels (L0, L1, L2, L3).
Movement differences between these levels calculate buying pressure (cu) and selling pressure (cd).
The ratio of these pressures forms the Laguerre RSI:
bash
Kodu kopyala
LaRSI = cu / (cu + cd)
The LaRSI value indicates:
Below 20: Oversold condition (potential buy signal).
Above 80: Overbought condition (potential sell signal).
2. TTM Squeeze
Purpose:
Analyzes the relationship between Bollinger Bands (BB) and Keltner Channels (KC) to determine whether the market is compressed (low volatility) or expanded (high volatility).
Calculation:
Bollinger Bands:
Calculated based on the moving average (SMA) of the price, with an upper and lower band.
Keltner Channels:
Created using the Average True Range (ATR) to calculate an upper and lower band.
Squeeze States:
Squeeze On: BB is within KC.
Squeeze Off: BB is outside KC.
Other States (No Squeeze): Neither of the above applies.
3. Momentum Calculation
Momentum is computed using the linear regression of the difference between the price and its SMA. This helps anticipate the direction and strength of price movements when the squeeze ends.
Visuals on the Chart
Laguerre RSI Line:
An RSI indicator scaled to 0-100 is plotted.
The line's color changes based on its movement:
Green line: RSI is rising.
Red line: RSI is falling.
Key levels:
20 level: Oversold condition (buy signal can be triggered).
80 level: Overbought condition (sell signal can be triggered).
Momentum Histogram:
Displays momentum as histogram bars with colors based on its direction and strength:
Lime (light green): Positive momentum increasing.
Green: Positive momentum decreasing.
Red: Negative momentum decreasing.
Maroon (dark red): Negative momentum increasing.
Squeeze Status Indicator:
A marker is plotted on the zero line to indicate the squeeze state:
Yellow: Squeeze On (compression active).
Blue: Squeeze Off (compression ended, movement expected).
Gray: No Squeeze.
Information Table
A table is displayed in the top-right corner of the chart, showing closing prices for different timeframes (e.g., 1 minute, 5 minutes, 1 hour, etc.). Each timeframe is color-coded.
Alerts
LaRSI Alerts:
Crosses above 20: Exiting oversold condition (buy signal).
Crosses below 80: Exiting overbought condition (sell signal).
Squeeze Alerts:
When the squeeze ends: Indicates a potential price move.
When the squeeze starts: Indicates volatility is decreasing.
Summary
This indicator is a powerful tool for determining market trends, momentum, and squeeze conditions. It helps users identify periods when the market is likely to move or remain stagnant, providing alerts based on these analyses to support trading strategies.
PIVOTBOSS ADR The PivotBoss ADR Method offers a complete approach to analyzing the volatility for a
given market in multiple timeframes by simply using average daily range. The ADR Breakout
helps us identify markets that are extremely compressed and due for significant expansion.
The PivotBoss ADR Targets Indicator is a simple, yet powerful, tool that helps you forecast extremely accurate targets based on the volatility of a given instrument. This indicator self-adjusts to a market's current volatility in order to plot reliable targets in multiple timeframes, including daily, weekly, and monthly targets.
1. Compression/Expansion: The development of trading ranges (Compression) builds the energy that will lead to the next
phase of price discovery (Expansion). ADR helps us quantify when a range is significantly compressed and due for expansion.
2. Volatility: Measures the SPEED of a market in order to forecast future volatility and price behavior. Markets rotate between
LOW and HIGH volatility states. Low ADR readings (<65% ADR) suggest significant compression, implying expansion ahead.
3. The ADR Breakout (Expansion Day): A true breakout from a narrow ADR range includes an Expansion Day, which is a
Trend Day on Day 1, wherein the session’s midpoint exceeds the breakout point and sees a Close beyond the range.
4. The ADR Breakout (Rejection Day): A failed breakout from a narrow ADR range includes a Rejection Day, which may take
the form of a long tail on Day 1, wherein the market attempted range expansion, but failed and closes back within the range.
This signature oftentimes leads to major expansion on the OPPOSITE side of the range.
5. A Variety of Trade Opportunities: Once TRUE expansion occurs from a narrow ADR range, a variety of trade opportunities
present themselves over the course of the next several days, or even weeks. These opportunities include swing trades, day
trades, and even scalps. Understanding when and where to look for these opportunities is key
Crypto Arbitrage Scanner [CryptoSea]Crypto Arbitrage Scanner
The Crypto Arbitrage Scanner is an advanced tool designed to help traders identify arbitrage opportunities across multiple cryptocurrency exchanges. With the ability to compare prices, volumes, and differences in price, this indicator is a must-have for any trader seeking to exploit cross-exchange inefficiencies in real time.
Key Features
Multi-Exchange Price and Volume Comparison: Tracks data from multiple major cryptocurrency exchanges, including BINANCE, COINBASE, KUCOIN, and others, allowing traders to easily compare prices and volume across platforms.
Customizable Difference Metrics: Allows users to toggle between displaying price differences in percentages or absolute dollar values, depending on the preferred metric for arbitrage analysis.
Sorting and Filtering Options: Includes user-defined sorting options to order the data by Price, Volume, or Difference, helping to prioritize potential arbitrage opportunities based on the trader's chosen criteria.
Difference and Volume Thresholds: Users can specify the minimum volume and price difference thresholds, ensuring that only significant arbitrage opportunities are highlighted.
Real-Time Alerts: Built-in alert conditions notify users when arbitrage opportunities exceed their defined price difference thresholds, helping traders respond instantly to market movements.
The Crypto Arb Scanner displays a table of prices, volumes, and price differences across selected exchanges. Each exchange is listed along with the current close price, volume, and the difference in price compared to the average price across all exchanges. Highlighting is used to indicate significant differences that may present arbitrage opportunities.
In the example below, we can see a highlighted opportunity in green showing that the price is below the user inputed thresold.
How it Works
Data Collection: Gathers real-time volume and price data from various exchanges using a streamlined process, allowing for a detailed comparison.
Average Price Calculation: Computes the average price across all valid exchanges to identify where price discrepancies occur, providing a clear picture of arbitrage potential.
Sorting Mechanism: Utilizes custom sorting based on user preferences, making it easy to quickly analyze and identify key opportunities.
Dynamic Highlighting and Alerts: Price differences that exceed user-defined thresholds are highlighted, and alerts can be triggered for these arbitrage opportunities, allowing for a timely response.
Application
Arbitrage Trading: The Crypto Arb Scanner is ideal for traders looking to exploit price differences across exchanges, enabling efficient arbitrage opportunities.
Market Efficiency Analysis: Offers insights into the consistency of prices across exchanges, which can help gauge the efficiency and liquidity of the markets being traded.
Customizable Alerts: Set alerts based on price differences or volume, allowing traders to stay informed about changes without constantly monitoring the markets.
The Crypto Arbitrage Scanner is a powerful addition to any trader's toolkit, offering comprehensive features to detect arbitrage opportunities with confidence. With real-time monitoring, customizable metrics, and a user-friendly interface, this tool allows traders to make informed decisions and capitalize on inefficiencies across exchanges.
RamanVol with Bull Snort Candles and Power Volumes1. Volume Analysis and Conditions:
Pocket Pivot Volume (PPV): A condition where a bar's volume on an up day is greater than the highest down-day volume in the last lookbackPeriod (e.g., 10 days). This indicates strong buying interest and is highlighted with blue bars.
High Down-Bar Volume: Identifies high volume on down days, with the volume greater than the 50-period moving average. This is represented by red bars.
High Up-Bar Volume: Identifies high volume on up days, with the volume greater than the 50-period moving average, represented by green bars.
Low Volume: When the volume is below 20% of the moving average volume (lowVolumeFraction), the bar is colored orange, indicating a "dry" or low volume day.
HVE (Highest Volume Ever): Marks the highest volume ever observed, indicated by a purple label above the bar.
HVQ (Highest Volume in Quarter): Marks the highest volume in the last quarter (63 days), indicated by an orange label (Q).
LVQ (Lowest Volume in Quarter): Marks the lowest volume in the last quarter, indicated by a Q label above the bar.
LVY (Lowest Volume in Year): Marks the lowest volume in the last year, indicated by a Y label.
2. Bull Snort Candles:
A Bull Snort candle is a specific type of candle that meets the following criteria:
Volume is more than 3 times the 50-period volume moving average.
The price closes within the top 35% of the day's range.
The close is higher than the previous bar's close.
When a Bull Snort is detected, the background color of the chart turns purple, and a small dot is plotted below the bar (if enabled).
3. Power Volume:
Power Volume occurs when the volume exceeds a certain threshold (e.g., 500,000) and the price moves at least 5% on that bar.
When these conditions are met, the background of the chart is highlighted with a yellow headlight effect, indicating a significant volume and price movement.
4. Relative Volume (RVol):
Relative Volume compares the current volume to the moving average of volume (50-period), showing how much higher or lower the volume is relative to the average. This is expressed as a percentage (e.g., 200% if today's volume is twice the average volume).
5. Table Display:
The indicator updates a table on the right side of the chart with the following metrics:
RVol: Displays the relative volume as a percentage.
Avg Dollar Volume: Shows the average dollar volume (average volume * average price).
Volume RR (Run Rate): Displays the percentage by which today's volume is higher or lower than the moving average.
Up/Down Volume Ratio: A measure of the ratio of total volume on up days to down days. If this ratio is greater than 1, it's considered bullish.
6. Background Highlights:
Bull Snort Candles: The background turns purple when Bull Snort candles are detected.
Power Volumes: The background turns yellow when Power Volume conditions are met.
Low Volume: Days with very low volume are marked with orange bars.
CREDITS: @finallynitin, Mark Minervini, Gill Morales, Dr Chris, Oliver Kell