Open Interest Inflows & Outflows [LuxAlgo]The Open Interest Inflows & Outflows indicator focuses on highlighting alterations in the overall count of active contracts associated with a specific financial instrument.
The indicator also includes an oscillator highlighting the price sentiment to use in conjunction with the open interest flow sentiment and also includes a rolling correlation of the open interest flow sentiment with a user-selected source.
🔶 USAGE
Open Interest (OI) indicates the total number of active contracts, encompassing both long and short positions, for a specific financial instrument at any given moment. This key indicator helps traders and analysts assess market activity and sentiment.
An increase in open interest generally indicates new money flowing into the market, suggesting increased activity and the potential for a trending market. Conversely, a decrease in open interest indicates that traders are closing their positions, suggesting less interest in that particular contract.
Open Interest Flow Sentiment assesses the correlation between the initiation of new positions (inflows) and the closure of existing positions (outflows) for a particular instrument. Positive values suggest a prevalence of inflows, while negative values signify a prevalence of outflows.
The magnitude of the deviation from zero reflects the extent of dominance, either in inflows or outflows.
Price Sentiment estimates the relationship between the strength of bulls (buyers) and bears (sellers) on an instrument. Positive values indicate higher bull power and negative values indicate higher bear power.
The correlation feature is a key component of the indicator and helps analyze the relationship between trading volume and Open Interest changes. If volume increases along with rising Open Interest, it supports the validity of the price trend.
A divergence between price movement, volume, and Open Interest may signal potential reversals.
🔶 DETAILS
This indicator, based on Dr. Alexander Elder's acclaimed Elder-Ray concept, aids traders in evaluating the strength of both bulls and bears by delving beneath the surface of the markets. It uncovers data not immediately apparent from a superficial glance at prices. The indicator comprises two components: Bull Power and Bear Power.
Considering that the high price of any candle signifies the maximum power of buyers and the low price represents the maximum power of sellers, Elder employs the 13-period Exponential Moving Average (EMA) to depict the average consensus of price value. Bull Power assesses whether buyers can drive prices above the average consensus of value, while Bear Power assesses whether sellers can push prices below this average.
Here are the formulas for Bull Power and Bear Power:
bull_power = high - ema(close, 13)
bear_power = low - ema(close, 13)
This concept is utilized to calculate Open Interest Flow Sentiment and Price Sentiment. The Open Interest Flow Sentiment estimates the relationship between new positions (inflows) and positions being closed (outflows), providing insights into market dynamics. The Price Sentiment, on the other hand, gauges the correlation between price movements and the Elder-Ray components, aiding traders in identifying potential shifts in market sentiment and momentum.
🔶 SETTINGS
🔹Open Interest Inflows & Outflows
OI Sentiment Correlation: toggles the visibility of Open Interest correlation with a variety of sources.
Money Flow Estimates: toggles the visibility of Money Flow Estimates calculated for the last bar.
🔹Style
OI Flow Sentiment: toggles the visibility of Open Interest Flow Sentiment, along with color customization options.
Price Sentiment: toggles the visibility of Price Sentiment, along with color customization options.
Correlation Colors: color customization option for the Correlation Area.
🔹Others
Smoothing: smoothing length applicable for Open Interest Flow Sentiment and Price Sentiment.
🔶 RELATED SCRIPTS
Open-Interest-Chart
Liquidation-Estimates
Thanks to our community for recommending this script. For more conceptual scripts and related content, we welcome you to explore by visiting >>> LuxAlgo-Scripts .
Statistics
Exceptional MovementThis indicator is a simple tracker for exceptional movement.
It compares the range of the latest candle with the average daily range of the past 20 candles.
The option for the multiplier defines how big the current movement should be to be defined as exceptional movement.
Volatility Adjusted Profit Target
In my 'Volatility Adjusted Profit Target' indicator, I've crafted a dynamic tool for calculating target profit percentages suitable for both long and short trading strategies. It evaluates the highest and lowest prices over the anticipated duration of your trade, establishing a profit target that shifts with market volatility. As volatility increases, the potential for profit follows, with the target percentage rising accordingly; conversely, it declines with decreasing volatility. As a trader, setting an optimal Take Profit level has always been a challenge. This indicator not only helps in determining that level but also dynamically adjusts it throughout the trade's duration, providing a strategic edge in volatile markets.
Within Standard Deviation Bounds ProbabilityThis indicator calculates the probability of the closing price remaining within the upper and lower bounds defined by the mean and standard deviation of historical percent changes. It also plots the probability line and a horizontal line at 68%, which would be the expected probability for a normal distribution. It is designed to be used with my other indicator "Mean and Standard Deviation Lines.
Inputs:
period (Days): This defines the number of bars used to calculate the mean and standard deviation.
Calculations:
Percent change: Calculates the daily percentage change between closing prices.
Mean and standard deviation: Calculates the mean and standard deviation of the percent changes over the specified period.
Bounds: Calculates the upper and lower bounds by adding/subtracting the standard deviation from the mean, multiplied by the closing price.
Crossover tracking: Iterates through bars and counts crosses above and below the bounds.
Probability calculation: Calculates the total crossover probability as a percentage of the period.
Plotting: Plots the probability line and the horizontal line at 68%.
Limitations:
Assumes a normal distribution of price changes, which may not be accurate in real markets.
Overall:
This indicator provides a way to visualize the probability of the price staying within calculated bounds based on historical volatility. However, it's important to be aware of its limitations and interpret the results within the context of your trading strategy and risk management.
Interest Rate IndicatorThis script offers a overview of Year-over-Year (YoY) interest rates for key countries. The interest rate data utilized by default are sourced from TradingView Tickers, but they can be modified to any preferred source via the settings.
The script does not perform any calculations; its primary function is to present a comparative view of interest rates across different countries in a single indicator.
Key features include:
Interest rate data for the USA, European Union, Australia, Canada, Switzerland, Japan, United Kingdom, and New Zealand (Interest Rate Symbols are editable in the settings).
A table displaying country flags, names, and the latest interest rates, providing a clear and immediate comparison.
Country-representative colors for easy identification and visual distinction between different countries' data.
This indicator is designed for traders and analysts looking for a quick and efficient way to monitor and compare the interest rates of major economies directly within TradingView, facilitating better informed financial and investment decisions.
Mean and Standard Deviation Lines Description:
Calculates the mean and standard deviation of close-to-close price differences over a specified period, providing insights into price volatility and potential breakouts.
Manually calculates mean and standard deviation for a deeper understanding of statistical concepts.
Plots the mean line, upper bound (mean + standard deviation), and lower bound (mean - standard deviation) to visualize price behavior relative to these levels.
Highlights bars that cross the upper or lower bounds with green (above) or red (below) triangles for easy identification of potential breakouts or breakdowns.
Customizable period input allows for analysis of short-term or long-term volatility patterns.
Probability Interpretations based on Standard Deviation:
50% probability: mean or expected value
68% probability: Values within 1 standard deviation of the mean (mean ± stdev) represent roughly 68% of the data in a normal distribution. This implies that around 68% of closing prices in the past period fell within this range.
95% probability: Expanding to 2 standard deviations (mean ± 2*stdev) captures approximately 95% of the data. So, in theory, there's a 95% chance that future closing prices will fall within this wider range.
99.7% probability: Going further to 3 standard deviations (mean ± 3*stdev) encompasses nearly 99.7% of the data. However, these extreme values become less likely as you move further away from the mean.
Key Features:
Uses manual calculations for mean and standard deviation, providing a hands-on approach.
Excludes the current bar's close price from calculations for more accurate analysis of past data.
Ensures valid index usage for robust calculation logic.
Employs unbiased standard deviation calculation for better statistical validity.
Offers clear visual representation of mean and volatility bands.
Considerations:
Manual calculations might have a slight performance impact compared to built-in functions.
Not a perfect normal distribution: Financial markets often deviate from a perfect normal distribution. This means probability interpretations based on standard deviation shouldn't be taken as absolute truths.
Non-stationarity: Market conditions and price behavior can change over time, impacting the validity of past data as a future predictor.
Other factors: Many other factors influence price movements beyond just the mean and standard deviation.
Always consider other technical and fundamental factors when making trading decisions.
Potential Use Cases:
Identifying periods of high or low volatility.
Discovering potential breakout or breakdown opportunities.
Comparing volatility across different timeframes.
Complementing other technical indicators for confirmation.
Understanding statistical concepts for financial analysis.
US Yield Curve ComparisonIn finance, the yield curve is a graph which depicts how the yields on debt instruments – such as bonds – vary as a function of their years remaining to maturity. The graph's horizontal or x-axis is a time line of months and years remaining to maturity, with the shortest maturity on the left and progressively longer time periods on the right. The vertical or y-axis depicts the annualized yield to maturity.
To see changes of a definded timeframe, use this indicator to compare the current US yield curve with one in the past.
Monte Carlo Future Moves [ChartPrime]ORIGINS AND HISTORICAL BACKGROUND:
Prior to the the advent of the Monte Carlo method, examining well-understood deterministic problems via simulation generally utilized statistical sampling to gauge uncertainty estimations. The Monte Carlo (MC) approach inverts this paradigm by modeling with probabilistic metaheuristics to address deterministic problems. Addressing Buffon's needle problem, an early form of the Monte Carlo method estimated π (3.14159) by dropping needles on a floor. Later, the modern MC inception primarily began when Stanislaw Ulam was playing solitaire games while experiencing illness and recovery.
Ulam further developed, applied, and ascribed "Monte Carlo" as a classified code name to maintain a level of secrecy for the modern method applications during collaborative investigations on neutron diffusion and collision intricacies with John von Neumann. Despite having relevant data, physicist's conventional deterministic mathematical methods were unable to solve mysterious "neutronion problems". Monte Carlo filled in the gaps necessary to resolve this perplexing neutron problem with innovative statistics, and the resilient MC continues onward to have diverse application in many fields of science. MC also extends into the realm of relevance within finance.
APPLICATION IN FINANCE:
Building on its historical roots, the Monte Carlo method's transition into finance opened new avenues for risk assessment and predictive analysis. In financial markets, characterized by uncertainty and complex variables, this method offers a powerful tool for simulating a wide range of scenarios and assessing probabilities of different outcomes. By employing probabilistic models to predict price movements, the Monte Carlo method helps in creating more resilient and informed trading strategies. This approach is particularly valuable in options pricing, portfolio management, and risk assessment, where understanding the range of potential outcomes is crucial for making sound investment decisions. Our indicator utilizes this methodology, blending traditional financial analysis with advanced statistical techniques.
THE INDICATOR:
The Monte Carlo Future Moves (ChartPrime) indicator is designed to predict future price movements. It simulates various possible price paths, showing the likelihood of different outcomes. We have designed it to be simple to use and understand by displaying lines indicating the most likely bullish and bearish outcomes. The arrows point to these areas making it intuitive to understand. Also included is extreme price levels shown in blue and yellow. This is the most likely extreme range that the price will move to. The outcome distribution is there to show you the range of outcomes along with a visual representation of the possible future outcomes. To make things more user friendly we have also included a representation of this distribution as a background heatmap. The brighter the price level, the more likely the price will end at that level. Finally, we have also included a market bias indication on the side that shows you the general bullish/bearish probabilities.
HOW TO USE:
To use this indicator you want to first assess the market bias. From there you want to target the most likely polar outcome. You can use the range of outcomes to assess your risk and set a stop within a reasonable range of the desired target. By default the indicator projects 10 steps into the future, however this can be easily adjusted in the settings. Generally this indicator excels at mid-term estimations and may yield inconclusive results if the prediction period is too short or too long. You can change the granularity of the outcomes to give you a more or less detailed view of the future. That being said, a lower resolution can make the predictions less useful while a higher resolution can give you a less useful picture. If you decide to use a higher resolution we have included an option to smooth the final result. This is intended to reduce the uncertainty and noise in the predicted outcomes. It is advised to use the minimum level of smoothing possible as a high level of smoothing will greatly reduce the accuracy.
INPUT SECTION:
Derivative Source changes how the indicator sees the price movements. When you set this to Candle it will use the difference between the open and close of each candle. If set to Move, it will use the difference between closing prices. If you are in a market with gaps, you might want to use Candle as this will prevent the indicator from seeing gaps.
Number of Simulations is a crucial setting as it is the core of this indicator. This determines the number of simulations the indicator will use to get its final result. By default it is set to 1000 as we feel like that is around the minimum number of simulations required to get a reasonable output while maintaining stability. In tests the maximum number of simulations we have been able to consistently achieve is 2000.
Lookback is the number of historical candles to account for. A lookback that is too short will not have enough data to accurately assess the likelihood of a price movement, while a period that is too large can make the data less relevant. By default this is set to 1000 as we feel like this is a reasonable tradeoff between volume of data and relevance.
Steps Into Future is the prediction period. By default we have picked a period of 10 steps as this has a good balance between accuracy and usability. The more steps into the future you go, the more uncertain the future outcome will be.
Outcome Granularity controls the precision of the simulated outcomes. By default this is set to 40 as its a good balance between resolution and accuracy.
Outcome Smoothing allows you to smooth the outcome distribution. By default this is set to 0 as it is generally not needed for lower resolutions. Smoothing levels beyond 2 are not recommended as it will negatively impact the output.
Returns Granularity controls the level of definition in the collected price movements. This directly impacts indicator performance and is set to 50 by default because its a good balance between fidelity and usability. When this number is too small, the simulations will be less accurate while numbers too large will negatively impact the probabilities of the movements.
Drift is the trend component in the simulation. This adds the directionality of the simulations by biasing the movements in the current direction of the market. We have included both the standard formula for drift and linear regression. Both methods are well suited for simulating future price movements and have their own advantages. The drift period is set to 100 by default as its a good balance between current and historical directionality. You may want to increase or decrease this number depending on the current market conditions but it is advised to use a period that isn't too small. If your period is too small it can skew the outcomes too much resulting in poor performance. When this is set to 0 it will use the same period as your lookback.
Volatility Adjust , adjusts the simulation to include current volatility. This makes sure that the price movements in the simulation reflects the current market conditions better by making sure that each price move is at least a minimum size.
Returns Style allows you to pick between using percent moves and log returns. We have opted to make percent move the default as it is more intuitive for beginners however both settings yield similar results. Log returns can be less cpu intensive so it might be desirable for longer term predictions.
Precision adjusts the rounding of used when collecting the frequency of price movement sizes. By default this is set to 4 as its is fairly accurate without impacting performance too much. A larger number will make the indicator more precise but at the cost of cpu time. Precision levels that are too small can greatly reduce the accuracy of the simulation and even break the indicator all together.
Update Every Bar allows you to recalculate the prediction every bar and is there for you if you want to strictly use the market bias. It is not recommended to enable this feature but it is there for flexibility.
Side of Chart allows you to pick what side of the price action you want the visuals to be on. When its set to the right everything will be to the right of the starting point and when its set to Left it will position everything to the left of the starting point.
Move Visualization is there to give you an arrow to the most likely bullish and bearish moves. It is meant as a visual aid and visualization tool. The color of these arrows use the same colors as the distribution.
Most Likely Move is a horizontal line that indicates the most likely move. It is positioned in the same location as the Move Visualization.
Standard Deviation is horizontal lines at the extremities of the simulated price action. These represent the most likely range of the future outcomes. You can adjust the multiplier of the standard deviation but by default it is set to 2.
Most Likely Direction is a vertical bar that shows you the sum of the up and down probabilities. It is there to show you the bias of the outcomes and guide you in decision making.
Max Probability Zone is a horizontal line that highlights the location of the highest probability move. You can think of it almost like the POC in a volume distribution but in this case it is the "most likely" single outcome.
Outcome Distribution allows you to toggle the distribution on or off. This is the distribution of all of the simulated outcomes. You can toggle the scale width of the distribution to fit your visual style.
Distribution Text toggles the probability text inside of the distribution bars. When you have a large number for the outcome granularity this text may not be visible and you may want to disable this feature.
Background is a heatmap of the outcome distribution. This allows you to visualize the underlying distribution without the need for the distribution histogram. The brighter the color, the more likely the outcome is for that level. It can be useful for visualizing the range of possible outcomes.
Starting Line is simply a horizontal line indicating the starting point of the simulation. It just the opening price for the starting position.
Extend Lines allows you to extend the lines and background past the prediction period.
CONCLUSION:
With its intuitive visuals and flexible settings, the Monte Carlo Future Moves (ChartPrime) indicator is practice and easy to use. It brings clarity to price movement predictions, helping you to build confidence in your strategies. This indicator not only reflects the evolution of technical analysis but also touches on data-driven insights.
Enjoy
[S] Rolling TrendlineThe Rolling Linear Regression Trendline is a sophisticated technical analysis tool designed to offer traders a dynamic view of market trends over a selectable period. This indicator employs linear regression to calculate and plot a trendline that best fits the closing prices within a specified window, either defined by a number of bars or a set period in days, independent of the chart's timeframe.
Key Features:
Dynamic Window Selection: Users can choose the calculation window based on a fixed number of bars or days, providing flexibility to adapt to different trading strategies and timeframes. For the 'days' option, the indicator calculates the equivalent number of bars based on the chart's timeframe, ensuring relevance across various market conditions and trading sessions.
Linear Regression Analysis: At its core, the indicator uses linear regression to identify the trend direction by calculating the slope and intercept of the trendline. This method offers a statistical approach to trend analysis, highlighting potential uptrends or downtrends based on the positioning and direction of the trendline.
Customizable Period: Traders can input their desired period (N), allowing for tailored analysis. Whether it's short-term movements or longer-term trends, the indicator can adjust to focus on specific time horizons, enhancing its utility across different trading styles and objectives.
Applications:
Trend Identification: By plotting a trendline that mathematically fits the closing prices over the chosen period, traders can quickly identify the prevailing market trend, aiding in bullish or bearish decision-making.
Support and Resistance: The trendline can also serve as a dynamic level of support or resistance, offering potential entry or exit points based on the price's interaction with the trendline.
Strategic Planning: With the ability to adjust the calculation window, traders can align the indicator with their trading strategy, whether focusing on intraday movements or broader swings.
Using this indicator with other parameters can widen you view of the market and help identifying trends
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.
(CF|360) Caruso Financial DashboardThe Caruso Financial 360 Dashboard (CF|360) revolutionizes your TradingView charts by seamlessly integrating comprehensive Fundamental, Statistical, Technical, Performance, and Event information into an intuitively organized dashboard. This empowers users to make informed investment decisions effortlessly, eliminating the need to switch between pages or applications.
The dashboard is strategically divided into five distinct sections, each color-coded for user-friendly navigation. A quick glance at the dark blue "Fundamentals" table reveals two years of quarterly EPS and Sales data, YoY % change, and Surprise %, complete with report dates. Users can explore eight years of annual data and choose between Non-GAAP EPS, Diluted EPS, and Basic EPS for versatile analysis. Opting for Non-GAAP EPS also unveils next quarter estimates. The Fundamentals section further encompasses P/E and P/S data, alongside TTM dividend and dividend yield information.
In the yellow "Extended Fundamentals" section, users gain insights into Gross, EBITDA, and Net margins for easy profitability comparisons within the same industry group. Return on Equity data and Free Cashflow per share provide perspectives on profitability, efficiency, and financial flexibility.
The light blue "Statistics" section furnishes essential statistical measures for a rapid grasp of a company's trading characteristics. Metrics such as Market Cap, Average Volume per day (Shares and $ value), VWAP, Up/Down volume ratio, ATR%, Alpha, Beta, Shares Outstanding & Float, 52-week High/Low, and % distance from the 52-week high are presented. Additionally, market breadth is depicted through Nasdaq and NYSE 52-week high/low data.
The purple "Technical & Performance" section seamlessly integrates both Technical Analysis data and Performance statistics, enabling users to assess the stock's technical context and performance against the market over different periods. Technical indicators, including three customizable moving average types, RSI, ADX, Bollinger Band, Keltner Band, and daily and weekly closing ranges, are featured.
The grey top "Events" section offers a quick overview of the next earnings release date, countdown, and associated color changes as the date approaches. Company name, sector, and industry details are also presented.
To enhance information visibility, record EPS and Sales data are highlighted, emphasizing new records, along with highlights for new 52-week highs and lows.
The CF|360 offers customization options , including three display styles for Desktops, Desktop Slim, and Mobile devices.
Users can also tailor the lengths of technical indicators to suit their preferences. International market enthusiasts will appreciate that the CF|360 provides financial and market data for various regions, including the US, EU, Canada, and beyond.
88 Metrics Included:
Fundamentals Section (Dark Blue Group)
EPS (Adjusted Non-GAAP, Diluted, Basic)
- Quarterly, YoY % Chg, Surprise, Report Date, Next Quarter Estimate (Adjusted EPS only)
- Annual, YoY % Chg
Sales
- Quarterly, YoY % Chg, Surprise, Report Date, Next Quarter Estimate
- Annual, YoY % Chg
P/E ratio
P/S ratio
Dividend TTM
Dividend TTM Yield
Fundamentals Extended (Yellow Group)
Gross Margin
EBITDA Margin
Net Margin
Return on Equity (ROE)
Free Cashflow per Share (FCFPS)
Debt to Equity (Debt)
Effective Interest Rate (Int Rate)
Statistics (Light Blue Group)
Market Cap
Average Daily Volume (Shares)
Average Daily Volume (Dollar Value)
VWAP (Daily)
Average True Range Percent
Shares Outstanding
Shares in Float
Percentage of Share in Float
52-Week High
52-Week Low
% off of 52-Week High
Up / Down Volume Ratio
Beta
Alpha
Nasdaq Net 52-Week High/Lows
Nasdaq 52-Week Highs
Nasdaq 52-Week Lows
NYSE Net 52-Week High/Lows
NYSE 52-Week Highs
NYSE 52-Week Lows
Technical & Performance (Purple Group)
Moving Average Value (3 different averages)
Distance from Moving Average (3 different averages)
Relative Strength Index (RSI)
Average Directional Index (ADX)
Bollinger Band Value (Upper/Lower)
%b
Keltner Band Value (Upper/Lower)
%k
Percentage Changes Since Today’s Open
Daily Closing Range (DCR)
Weekly Closing Range (WCR)
Current Week % Change
1 Month % Change
3 Month % Change
6 Month % Change
1 Year % Change
3 Year % Change
YTD % Change
S&P 500 YTD % Change
Name, Group, & Events (Grey Section)
Company Name
Sector
Industry
Next Earnings Date
Days Until Next Earnings Date
Event Highlights
Record EPS (Quarterly/Annual)
Record Sales (Quarterly/Annual)
52-Week High
52-Week Low
Layout Types
Desktop
Get the full experience with the Desktop view.
Desktop Slim
Save screen real estate with a slim version of the dashboard.
Mobile
Take the most vital metrics with you on your mobile device. For the best experience, view in landscape mode.
Arbitrage Spread v2 : 3 pairs + 3 charts [Arby.Trade]
This indicator allows you to track in real time the change in the spread (the difference in the exchange rate) between two assets for three trading pairs at the same time.
How does the indicator work?
In the indicator settings menu, the user selects two trading pairs, for example BTCUSDT on the Binance exchange and BTCUSDT on the Bybit exchange, after which the script will receive prices from both exchanges and compare them with each other, calculating the percentage deviation between prices (spread). This setting can be made for three trading pairs. Keep in mind that the script can only work with those assets and exchanges that are on board TradingView, and this is quite a lot.
According to the calculated value of spreads, the spread lines for three trading pairs are displayed on the screen. The spread lines move between values above zero and below. When the spread line is below zero, it means that the price of the asset on the first exchange is less than on the second. That is, by buying an asset on the first exchange and selling it on the second one, you can earn money (of course, it is important to take into account the commissions of the exchanges for these transactions). When the spread line is above zero, the opposite is true. When the spread is zero, the prices on both exchanges are the same and there is no arbitrage situation.
Indicator settings.
For a better visual representation of the current spread value, the indicator has the ability to set two threshold spread levels. The first threshold level is the level below which the spread is not interesting to the trader and he will not consider arbitrage deals. The second threshold level is the level of a particularly high spread. When the spread value exceeds the second threshold level, the spread values will be signed above the spread line, and the extreme values for the user-defined period of bars back will be additionally highlighted in a brighter color. Both threshold levels are displayed on the chart and the user can change their values in the indicator settings menu.
The script allows you to leave only one spread line on the chart for one of the three trading pairs, while maintaining the display of indicator tables for three trading pairs. The script also allows you to completely disable the display of unnecessary trading pairs.
If the volatility of the spread lines is too high and the spread lines from different trading pairs overlap each other, use the "Distance between charts" setting and increase its value until the display of all three charts becomes comfortable.
Alerts.
Additionally, you can set the threshold value of the spread, at which the script will send notifications from TradingView. We called it the Spread Signal Threshold. This threshold level has nothing to do with the visual thresholds described above. You can set a signal level exceeding the second visual threshold or make it lower, but it is important to understand that TradingView alerts will only be triggered if the Spread Signal Threshold is exceeded. This threshold level is common to all trading pairs, so notifications will be sent when this spread level is reached for any of the three trading pairs.
To set up alerts, open the "Alerts" tab in the TradingView menu on the right. Click the "Create Alert" button. Then, in the window that opens, select this indicator in the "Condition" line. After that, you can set a name for this alert and complete the notification setup by clicking the "Create" button.
We, the authors of this script, have been engaged in cryptocurrency arbitrage for a long time and, first of all, created it for ourselves and our daily arbitrage trading, but this does not prevent you from using it at your discretion for any types of assets and in any markets.
We have a lighter version of the indicator that allows you to track the spread for only one trading pair. If this indicator seems too heavy for you and your device, you can use a lighter version .
If, on the contrary, the capabilities of your hardware allow, do not forget that you can always add several copies of this indicator to your screen and simultaneously track not 3, but 6-9-12 and so on arbitrage pairs at the same time. ;)
--
Данный индикатор позволяет отслеживать в реальном времени изменение спреда (разницы в курсе) между двумя активами по трем торговым парам.
Как устроен индикатор?
В меню настроек индикатора пользователь выбирает две торговые пары, например BTCUSDT на бирже Binance и BTCUSDT на бирже Bybit, после чего скрипт получит цены с обеих бирж и сравнит их между собой, рассчитав процентное отклонение между ценами (спред). Такую настройку можно произвести для трех торговых пар. Учитывайте, что скрипт может работать только с теми активами и биржами, которые есть на борту TradingView, и это не мало.
По рассчитанному значению спредов на экран выводится линии спредов по трем торговым парам. Линии спредов двигаются между значениями то выше нуля, то ниже. Когда линия спреда ниже нуля это значит что цена на актив на первой бирже меньше, чем на второй. То есть, купив актив на первой бирже и продав его на второй можно заработать (конечно при этом важно учитывать комиссии бирж на совершение данных сделок). Когда линия спреда выше нуля - наоборот. Когда спред равен нулю - цены на обеих биржах одинаковы и арбитражная ситуация отсутствует.
Настройки индикатора.
Для лучшего визуального представления о текущем значении спреда индикатор имеет возможность задать два пороговых уровня спреда. Первый пороговый уровень – это уровень, ниже которого спред не интересен трейдеру и он не будет рассматривать арбитражные сделки. Второй пороговый уровень – это уровень особенно повышенного спреда. Когда значение спреда превышает второй пороговый уровень над линией спреда будут подписаны значения спреда, а экстремальные значения за заданный пользователем период баров назад будут дополнительно выделены более ярким цветом. Оба пороговых уровня отображаются на графике и пользователь может менять их значения в меню настроек индикатора.
Скрипт позволяет оставить на графике только одну линию спреда по одной из трех торговых пар, при этом сохранив отображение индикаторных таблиц по трем торговым парам. Также скрипт позволяет полностью отключить отображение ненужных торговых пар.
Если волатильность линий спреда слишком высока и линии спреда от разных торговых пар накладываются друг на друга воспользуйтесь настройкой «Distance between charts» и увеличивайте ее значение до тех пор пока отображение всех трех графиков не станет комфортным.
Уведомления.
Дополнительно можно настроить пороговое значение спреда, при достижении которого скрипт будет отправлять уведомления от TradingView. Мы назвали это Spread Signal Threshold. Этот пороговый уровень никак не связан с визуальными пороговыми уровнями, описанными выше. Вы можете задать сигнальный уровень превышающий второй визуальный пороговый уровень или сделать его ниже, но важно понимать, что оповещения TradingView будут срабатывать только от превышения именно Spread Signal Threshold. Этот пороговый уровень является общим для всех торговых пар, поэтому уведомления будут приходить при достижении этого уровня спреда по любой из трех торговых пар.
Для настройки оповещений откройте вкладку «Оповещения» в меню TradingView справа. Нажмите кнопку «Создать оповещение». Затем в открывшемся окне в строке «Условие» выберете данный индикатор. После чего вы можете задать название данному оповещению и завершить настройку оповещения, нажав кнопку «Создать».
Мы, авторы данного скрипта, давно занимаемся арбитражем криптовалюты и, в первую очередь, создавали его для себя и своей каждодневной арбитражной торговли, но это не мешает вам использовать его по своему усмотрению для любых видов активов и на любых рынках.
У нас есть более легкая версия индикатора, позволяющая отслеживать спред только по одной торговой паре. Если данный индикатор покажется для вас и вашего устройства слишком тяжелым вы можете воспользоваться более легкой версией .
Если, наоборот, возможности вашего железа позволяют, не забывайте, что вы всегда можете добавить себе на экран несколько копий этого индикатора и отслеживать одновременно не 3, а 6-9-12 и тд арбитражных пар одновременно. ;)
Blockunity Level Presets (BLP)A simple tool for setting performance targets.
Level Presets (BLP) is a simple tool for setting upside and downside levels relative to the current price of any asset. In this way, you can track which price the asset needs to move towards in order to achieve a defined performance.
How to Use
This indicator is very easy to use, you can set up to 5 upward and downward targets in the parameters.
Elements
The main elements of this tool are upward (default green) and downward (default red) levels.
Settings
Several parameters can be defined in the indicator configuration.
In addition to configuring which performance value to set the level at, you can choose not to display it if you don't need it. For example, here we display only two levels:
You can also choose not to display the labels:
Also concerning labels, you can choose not to display them in currency format, but in numerical format only (for example, if you're viewing a non-USD pair, such as ETHBTC):
Finally, you can modify design elements such as colors, level widths and text size:
How it Works
Here's how upside (_u) and downside (_d) levels are calculated:
source = close
level_1_u = source + (source * (level_1 / 100))
level_1_d = math.max(source - (source * (level_1 / 100)), 0)
Arbitrage Spread v1 : 1 pair + 1 chart [Arby.Trade]This indicator allows you to track in real time the change in the spread (the difference in the exchange rate) between two assets.
How does the indicator work?
In the indicator settings menu, the user selects two trading pairs, for example BTCUSDT on the Binance exchange and BTCUSDT on the Bybit exchange, after which the script will receive prices from both exchanges and compare them with each other, calculating the percentage deviation between prices (spread). The script can only work with those assets and exchanges that are on board TradingView.
According to the calculated spread value, the spread line is displayed on the screen. This line moves between values above zero and below. When the spread line is below zero, it means that the price of the asset on the first exchange is less than on the second. That is, by buying an asset on the first exchange and selling it on the second one, you can earn money (of course, it is important to take into account the commissions of the exchanges for these transactions). When the spread line is above zero, the opposite is true. When the spread is zero, the prices on both exchanges are the same and there is no arbitrage situation.
Indicator settings.
For a better visual representation of the current spread value, the indicator has the ability to set two threshold spread levels. The first threshold level is the level below which the spread is not interesting to the trader and he will not consider arbitrage deals. The second threshold level is the level of a particularly high spread. When the spread value exceeds the second threshold level, the spread values will be signed above the spread line, and the extreme values for the user-defined period of bars back will be additionally highlighted in a brighter color. Both threshold levels are displayed on the chart and the user can change their values in the indicator settings menu.
Alerts.
Additionally, you can set the threshold value of the spread, at which the script will send notifications from TradingView. We called it the Spread Signal Threshold. This threshold level has nothing to do with the visual thresholds described above. You can set a signal level exceeding the second visual threshold or make it lower, but it is important to understand that TradingView alerts will only be triggered if the Spread Signal Threshold is exceeded.
To set up alerts, open the "Alerts" tab in the TradingView menu on the right. Click the "Create Alert" button. Then, in the window that opens, select this indicator in the "Condition" line. After that, you can set a name for this alert and complete the notification setup by clicking the "Create" button.
We, the authors of this script, have been engaged in cryptocurrency arbitrage for a long time and, first of all, created it for ourselves and our daily arbitrage trading, but this does not prevent you from using it at your discretion for any types of assets and in any markets.
--
Данный индикатор позволяет отслеживать в реальном времени изменение спреда (разницы в курсе) между двумя активами.
Как устроен индикатор?
В меню настроек индикатора пользователь выбирает две торговые пары, например BTCUSDT на бирже Binance и BTCUSDT на бирже Bybit, после чего скрипт получит цены с обеих бирж и сравнит их между собой, рассчитав процентное отклонение между ценами (спред). Скрипт может работать только с теми активами и биржами, которые есть на борту TradingView, и это не мало.
По рассчитанному значению спреда на экран выводится линия спреда. Данная линия двигается между значениями то выше нуля, то ниже. Когда линия спреда ниже нуля это значит что цена на актив на первой бирже меньше, чем на второй. То есть, купив актив на первой бирже и продав его на второй можно заработать (конечно при этом важно учитывать комиссии бирж на совершение данных сделок). Когда линия спреда выше нуля - наоборот. Когда спред равен нулю - цены на обеих биржах одинаковы и арбитражная ситуация отсутствует.
Настройки индикатора.
Для лучшего визуального представления о текущем значении спреда индикатор имеет возможность задать два пороговых уровня спреда. Первый пороговый уровень – это уровень, ниже которого спред не интересен трейдеру и он не будет рассматривать арбитражные сделки. Второй пороговый уровень – это уровень особенно повышенного спреда. Когда значение спреда превышает второй пороговый уровень над линией спреда будут подписаны значения спреда, а экстремальные значения за заданный пользователем период баров назад будут дополнительно выделены более ярким цветом. Оба пороговых уровня отображаются на графике и пользователь может менять их значения в меню настроек индикатора.
Уведомления.
Дополнительно можно настроить пороговое значение спреда, при достижении которого скрипт будет отправлять уведомления от TradingView. Мы назвали это Spread Signal Threshold. Этот пороговый уровень никак не связан с визуальными пороговыми уровнями, описанными выше. Вы можете задать сигнальный уровень превышающий второй визуальный пороговый уровень или сделать его ниже, но важно понимать, что оповещения TradingView будут срабатывать только от превышения именно Spread Signal Threshold.
Для настройки оповещений откройте вкладку «Оповещения» в меню TradingView справа. Нажмите кнопку «Создать оповещение». Затем в открывшемся окне в строке «Условие» выберете данный индикатор. После чего вы можете задать название данному оповещению и завершить настройку оповещения, нажав кнопку «Создать».
Мы, авторы данного скрипта, давно занимаемся арбитражем криптовалюты и, в первую очередь, создавали его для себя и своей каждодневной арбитражной торговли, но это не мешает вам использовать его по своему усмотрению для любых видов активов и на любых рынках.
Inflation IndicatorThis script provides a great view of Year-over-Year (YoY) inflation rates for key countries.
The inflation data used per default are TradingView Tickers, but you can change them to anything you want from the settings.
There is no calculation in this script, all it does is providing a overview of inflation rates in a single indicator.
Inflation data for the USA, European Union, Australia, Canada, Switzerland, Japan, United Kingdom, and New Zealand (Inflation Symbols editable in the settings)
Customizable static line to indicate a specific threshold value (default: 2.0).
Table displaying country flags, names, and the latest inflation rates.
Country-representative colors for easy identification.
Conditional Volatility PercentileSimple Description: This indicator can basically help you find when a big move might happen ( This indicator can't determine the direction but when a big move could happen. ) Basically, a low-extreme value like 0 means that it only has room for upside, so volatility can only expand from that point on, and the fact that volatility mean reverts supports this.
Conditional Volatility Percentile Indicator
This indicator is a tool designed to view current market volatility relative to historical levels. It uses a statistical approach to assess the percentile rank of the calculated conditional volatility.
The Volatility Calculation
This indicator calculates conditional variance with user-defined parameters, which are Omega, Alpha, Beta, and Sigma, and then takes the square root of the variance to calculate the standard deviation. The script then calculates the percentile rank of the conditional variance over a specified lookback.
What this indicator tells you:
Volatility Assessment: Higher percentile values indicate heightened conditional volatility, suggesting increased market activity or potential stress. Meanwhile, lower percentiles suggest relatively lower conditional volatility.
Extreme Values: Volatility is a mean-reverting process. If the volatility percentile value is at a low value for an extended period of time, you can eventually bet on the volatility percentile value increasing with high confidence.
In financial markets, volatility itself exhibits mean-reverting properties. This means that periods of high volatility are likely to be followed by periods of lower volatility, and vice versa.
1. High Volatility Periods: High volatility levels may be followed by a subsequent decrease in volatility as the market returns to a more typical state.
2. Low Volatility Periods: Periods of low volatility may be followed by an uptick in volatility as the market experiences new information or changes in sentiment.
Self Optimizing PSAR [Starbots]Self Optimizing Parabolic SAR Strategy (non-repainting)
Strategy constantly backtest 169 different combinations of Parabolic SAR indicator for maximum profitability and trades based on the best performing combination at that time.
---------------------------------------------------------------------------------------------------------
# Parabolic SAR (PSAR)
Parabolic SAR is a time and price technical analysis tool created by J. Welles Wilder and it's primarily used to identify points of potential stops and reverses. In fact, the SAR in Parabolic SAR stands for "Stop and Reverse". The indicator's calculations create a parabola which is located below price during a Bullish Trend and above Price during a Bearish Trend.
You can read more about this indicator here:
www.tradingview.com
-----------------------------------------------------------------------------------------------------------
The logic of self - optimizing:
This script is always backtesting 169 different combinations of Parabolic SAR settings in the background and saves the net. profit gained for every single one of them, then strategy selects and use the best performing combination of settings currently available for you to trade.
It's recalculating on every bar close - if one of the parameters starts performing better than others - have a higher net profit gain (it's literally like running 169 backtests with different settings) strategy switches to that parameter and continues trading like that until one of the other indicator parameters starts performing better again and switches to that settings.
We are optimizing our strategy based on 13 different 'Increment' factors of PSAR. We keep the 'Start' factor (default 0.02) and 'Max Value' factor (default 0.2) at default for all of them.
According to creator of this indicator J. Welles Wilder, we usually want to change only 'Increment' factors of PSAR in the calculation and leave the rest at default and that's what we do, we are changing only 'Increment' input.
Inputs : (you don't need to change them at all, it's a good balance for fast and slow detection of trends on PSAR)
Start = 0.02
Max value = 0.2
Increment1 = 0.005, Increment2 = 0.01, Increment3 = 0.015
Increment4 = 0.02, Increment5 = 0.025, Increment6 = 0.03
Increment7 = 0.035, Increment8 = 0.04, Increment9 = 0.045
Increment10 = 0.05, Increment11 = 0.055, Increment12 = 0.06
Increment13 = 0.065
PSAR buy / sell conditions looks like this:
PSAR1 = start 0.02, max value 0.2, increment1 0.005
PSAR2 = start 0.02, max value 0.2, increment2 0.01
PSAR3 = start 0.02, max value 0.2, increment3 0.015
PSAR4 = start 0.02, max value 0.2, increment3 0.02
...
PSAR13 = start 0.02, max value 0.2, increment13 0.065
Backtester in the background works like this:
backtest buying PSAR1 settings with selling PSAR1 settings => save net. profit
backtest buy PSAR1 with sell PSAR2 ;
backtest buy PSAR1 with sell PSAR3 ;
backtest buy PSAR1 with sell PSAR4 ;
..........
backtest buy PSAR1 with sell PSAR13 ;
..........
backtest buy PSAR13 with sell PSAR1 ;
backtest buy PSAR13 with sell PSAR2 ;
......
backtest buy PSAR13 with sell PSAR13 ;
=>
It will backtest 16x16=169 different PSAR settings and save their profits.
Your strategy then trades based on the best performing (highest net.profit) PSAR Setting currently available. It will check the calculations and backtest them on every new bar close - it's like running 169 strategies at time, and manually selecting the best performing one.
________________________________________________________________________
If you wish to use it as INDICATOR - turn on 'Recalculate after every tick' in Properties tab to have this script updating constantly and use it as a normal Indicator tool for manual trading.
Strategy example is backtested on Daily chart of SHIBUSDT Binance
All settings at default. (1000 capital, 100 order size, 0.1% fee, 1 tick slippage)
Settings:
-Start = default Parabolic SAR setting is 0.02
-Max Value = default Parabolic SAR setting is 0.2
--Recommended PSAR Increment settings:
0.02 is default, higher timeframes usually performs good on the faster Increment factors 0.03-0.05+, smaller timeframes on slow Increment factors 0.005-0.02. I recommend you the most common and logical 13 different Increment factors for optimizing in the strategy as default already (from 0.005 to 0.065 - strategy will then optimize and trade based on the most profitable combination).
- Noise-Intensity Filter 🐎0.00-0.20%🐢
This will punish the tiny trades made by certain combinations and give more advantage to big average trades. It's basically like fee calculation, it will deduct 0.xx% fee from every trade when optimizing on their backtests.
You will usually want to have it around 0.05-0.10% like your fees on exchange.
-> 🐎Less than <0.10% allows strategy to be VERY SENSITIVE to market. (a lot of trades - quick buy-sell changes)
-> 🐢More than >0.10% will slow down the strategy, it will be LESS SENSITIVE to market volatility. (less trades - slowly switches the trend direction from buy to sell)
Close Trades on Neutral
After a lot of Trades, Algo starts developing self-intelligence. It can also have a neutral score. (Grey Plots). Sell when the strategy is neutral.
Other settings:
-Take Profit, Multiple Take Profit, Trailing Take Profit, Stop Loss, Trailing Stop Loss with functional alerts.
-Backtesting Range - backtest within your desired time window. Example: 'from 01 / 01 /2020 to 01 / 01 /2023'.
- Strategy is trading on the bar close without repaint. You can trade Long-Sell/Short Sell or Long-Short both directions. Alerts available, insert webhook messages in the inputs.
- Turn on Profit Calendar for better overview of how your strategy performs monthly/annualy
- Notes window : add your custom comments in here or save your webhook message text inside here for later use. I find this helpful to save texts inside.
Recommended TF : 4h, 8h, 1d (Trend Indicators are good at detecting directions of the market, but we can have a lot of noise and false movements on charts, you want to avoid that and ride the long term movements)
This script is fairly simple to use. It's self-optimizing and adjusting to the markets on the go.
TimeSeriesRecurrencePlotLibrary "TimeSeriesRecurrencePlot"
In descriptive statistics and chaos theory, a recurrence plot (RP) is a plot showing, for each moment i i in time, the times at which the state of a dynamical system returns to the previous state at `i`, i.e., when the phase space trajectory visits roughly the same area in the phase space as at time `j`.
```
A recurrence plot (RP) is a graphical representation used in the analysis of time series data and dynamical systems. It visualizes recurring states or events over time by transforming the original time series into a binary matrix, where each element represents whether two consecutive points are above or below a specified threshold. The resulting Recurrence Plot Matrix reveals patterns, structures, and correlations within the data while providing insights into underlying mechanisms of complex systems.
```
~starling7b
___
Reference:
en.wikipedia.org
github.com
github.com
github.com
github.com
juliadynamics.github.io
distance_matrix(series1, series2, max_freq, norm)
Generate distance matrix between two series.
Parameters:
series1 (float) : Source series 1.
series2 (float) : Source series 2.
max_freq (int) : Maximum frequency to inpect or the size of the generated matrix.
norm (string) : Norm of the distance metric, default=`euclidean`, options=`euclidean`, `manhattan`, `max`.
Returns: Matrix with distance values.
method normalize_distance(M)
Normalizes a matrix within its Min-Max range.
Namespace types: matrix
Parameters:
M (matrix) : Source matrix.
Returns: Normalized matrix.
method threshold(M, threshold)
Updates the matrix with the condition `M(i,j) > threshold ? 1 : 0`.
Namespace types: matrix
Parameters:
M (matrix) : Source matrix.
threshold (float)
Returns: Cross matrix.
rolling_window(a, b, sample_size)
An experimental alternative method to plot a recurrence_plot.
Parameters:
a (array) : Array with data.
b (array) : Array with data.
sample_size (int)
Returns: Recurrence_plot matrix.
RPPI Futures & Indices Strategy Tester [SS Premium]Hello everyone,
As promised, here is the strategy companion to the RPPI Futures & Indicies Indicator.
It contains all of the models of the RPPI but the functionality is all about back-testing the strategy. As such, you cannot use this to run probabilities, run autoregression assessments, or do any of the advanced RPPI features, this is solely to allow you to develop and implement a sustainable strategy in your trading using the RPI.
When you launch the indicator, in the settings menu, you will see toggles to customize the strategy you would like to apply:
You can customize your short and long entries and your short and long exits and then review the backtest results of these various combinations.
From there, you can open up tradingview's strategy tester to see the immediate success of the strategy. If you want to test how effective your strategy is further back, you can make use of Tradingview's "Deep Backtesting" option. This allows you to select a start date way in the past, and back-test over numerous months / years, to see if the strategy has been sustainable in the long term.
To read more about the RPPI, you can check out its own page which lists the details of the indicator, how it works and how to use it. As a synopsis, the RPPI is a compendium indicator that contains various models of multiple futures and stocks. This is to attempt to accurately forecast daily, weekly, monthly, 3 month and annual moves on various futures and indices.
This strategy companion will help you hone in on ideal entries and exits and allow you to tailor them to each ticker that you are interested in trading, on whichever timeframe you are interested in trading.
Some important notes when applying the back-testing results:
1. If you are back-testing daily levels, it is recommended to use the 1 to 5-minute chart max.
2. iF you are back-testing weekly levels, it is recommended to use at least 15 to 30 minutes, up to 60 minute candles.
3. Monthly levels, its best to use 1 hour and up.
4. Greater than monthly, its best to use 3 to 4 hours, to daily candles and up.
As always, feel free to leave your questions or suggestions below.
Thank you for reading and, as always, safe trades!
Test - Most correlated assetThis is a simple test to find the most and least correlated assets in a list.
TimeSeriesGrammianAngularFieldLibrary "TimeSeriesGrammianAngularField"
provides Grammian angular field and associated utility functions.
___
Reference:
*Time Series Classification: A review of Algorithms and Implementations*.
www.researchgate.net
method normalize(data, a, b)
Normalize the series to a optional range, usualy within `(-1, 1)` or `(0, 1)`.
Namespace types: array
Parameters:
data (array) : Sample data to normalize.
a (float) : Minimum target range value, `default=-1.0`.
b (float) : Minimum target range value, `default= 1.0`.
Returns: Normalized array within new range.
___
Reference:
*Time Series Classification: A review of Algorithms and Implementations*.
normalize_series(source, length, a, b)
Normalize the series to a optional range, usualy within `(-1, 1)` or `(0, 1)`.\
*Note that this may provide a different result than the array version due to rolling range*.
Parameters:
source (float) : Series to normalize.
length (int) : Number of bars to sample the range.
a (float) : Minimum target range value, `default=-1.0`.
b (float) : Minimum target range value, `default= 1.0`.
Returns: Normalized series within new range.
method polar(data)
Turns a normalized sample array into polar coordinates.
Namespace types: array
Parameters:
data (array) : Sampled data values.
Returns: Converted array into polar coordinates.
polar_series(source)
Turns a normalized series into polar coordinates.
Parameters:
source (float) : Source series.
Returns: Converted series into polar coordinates.
method gasf(data)
Gramian Angular Summation Field *`GASF`*.
Namespace types: array
Parameters:
data (array) : Sampled data values.
Returns: Matrix with *`GASF`* values.
method gasf_id(data)
Trig. identity of Gramian Angular Summation Field *`GASF`*.
Namespace types: array
Parameters:
data (array) : Sampled data values.
Returns: Matrix with *`GASF`* values.
Reference:
*Time Series Classification: A review of Algorithms and Implementations*.
method gadf(data)
Gramian Angular Difference Field *`GADF`*.
Namespace types: array
Parameters:
data (array) : Sampled data values.
Returns: Matrix with *`GADF`* values.
method gadf_id(data)
Trig. identity of Gramian Angular Difference Field *`GADF`*.
Namespace types: array
Parameters:
data (array) : Sampled data values.
Returns: Matrix with *`GADF`* values.
Reference:
*Time Series Classification: A review of Algorithms and Implementations*.
CCOMET_Scanner_LibraryLibrary "CCOMET_Scanner_Library"
- A Trader's Edge (ATE)_Library was created to assist in constructing CCOMET Scanners
Loc_tIDs_Col(_string, _firstLocation)
TickerIDs: You must form this single tickerID input string exactly as described in the scripts info panel (little gray 'i' that
is circled at the end of the settings in the settings/input panel that you can hover your cursor over this 'i' to read the
details of that particular input). IF the string is formed correctly then it will break up this single string parameter into
a total of 40 separate strings which will be all of the tickerIDs that the script is using in your CCOMET Scanner.
Locations: This function is used when there's a desire to print an assets ALERT LABELS. A set Location on the scale is assigned to each asset.
This is created so that if a lot of alerts are triggered, they will stay relatively visible and not overlap each other.
If you set your '_firstLocation' parameter as 1, since there are a max of 40 assets that can be scanned, the 1st asset's location
is assigned the value in the '_firstLocation' parameter, the 2nd asset's location is the (1st asset's location+1)...and so on.
Parameters:
_string (simple string) : (string)
A maximum of 40 Tickers (ALL joined as 1 string for the input parameter) that is formulated EXACTLY as described
within the tooltips of the TickerID inputs in my CCOMET Scanner scripts:
assets = input.text_area(tIDset1, title="TickerID (MUST READ TOOLTIP)", tooltip="Accepts 40 TICKERID's for each
copy of the script on the chart. TEXT FORMATTING RULES FOR TICKERID'S:
(1) To exclude the EXCHANGE NAME in the Labels, de-select the next input option.
(2) MUST have a space (' ') AFTER each TickerID.
(3) Capitalization in the Labels will match cap of these TickerID's.
(4) If your asset has a BaseCurrency & QuoteCurrency (ie. ADAUSDT ) BUT you ONLY want Labels
to show BaseCurrency(ie.'ADA'), include a FORWARD SLASH ('/') between the Base & Quote (ie.'ADA/USDT')", display=display.none)
_firstLocation (simple int) : (simple int)
Optional (starts at 1 if no parameter added).
Location that you want the first asset to print its label if is triggered to do so.
ie. loc2=loc1+1, loc3=loc2+1, etc.
Returns: Returns 40 output variables in the tuple (ie. between the ' ') with the TickerIDs, 40 variables for the locations for alert labels, and 40 Colors for labels/plots
TickeridForLabelsAndSecurity(_ticker, _includeExchange)
This function accepts the TickerID Name as its parameter and produces a single string that will be used in all of your labels.
Parameters:
_ticker (simple string) : (string)
For this parameter, input the varible named '_coin' from your 'f_main()' function for this parameter. It is the raw
Ticker ID name that will be processed.
_includeExchange (simple bool) : (bool)
Optional (if parameter not included in function it defaults to false ).
Used to determine if the Exchange name will be included in all labels/triggers/alerts.
Returns: ( )
Returns 2 output variables:
1st ('_securityTickerid') is to be used in the 'request.security()' function as this string will contain everything
TV needs to pull the correct assets data.
2nd ('lblTicker') is to be used in all of the labels in your CCOMET Scanner as it will only contain what you want your labels
to show as determined by how the tickerID is formulated in the CCOMET Scanner's input.
InvalID_LblSz(_barCnt, _close, _securityTickerid, _invalidArray, _tablePosition, _stackVertical, _lblSzRfrnce)
INVALID TICKERIDs: This is to add a table in the middle right of your chart that prints all the TickerID's that were either not formulated
correctly in the '_source' input or that is not a valid symbol and should be changed.
LABEL SIZES: This function sizes your Alert Trigger Labels according to the amount of Printed Bars the chart has printed within
a set time period, while also keeping in mind the smallest relative reference size you input in the 'lblSzRfrnceInput'
parameter of this function. A HIGHER % of Printed Bars(aka...more trades occurring for that asset on the exchange),
the LARGER the Name Label will print, potentially showing you the better opportunities on the exchange to avoid
exchange manipulation liquidations.
*** SHOULD NOT be used as size of labels that are your asset Name Labels next to each asset's Line Plot...
if your CCOMET Scanner includes these as you want these to be the same size for every asset so the larger ones dont cover the
smaller ones if the plots are all close to each other ***
Parameters:
_barCnt (float) : (float)
Get the 1st variable('barCnt') from the Security function's tuple and input it as this functions 1st input
parameter which will directly affect the size of the 2nd output variable ('alertTrigLabel') that is also outputted by this function.
_close (float) : (float)
Put your 'close' variable named '_close' from the security function here.
_securityTickerid (string) : (string)
Throughout the entire charts updates, if a '_close' value is never registered then the logic counts the asset as INVALID.
This will be the 1st TickerID variable (named _securityTickerid) outputted from the tuple of the TickeridForLabels()
function above this one.
_invalidArray (array) : (array string)
Input the array from the original script that houses all of the invalidArray strings.
_tablePosition (simple string) : (string)
Optional (if parameter not included, it defaults to position.middle_right). Location on the chart you want the table printed.
Possible strings include: position.top_center, position.top_left, position.top_right, position.middle_center,
position.middle_left, position.middle_right, position.bottom_center, position.bottom_left, position.bottom_right.
_stackVertical (simple bool) : (bool)
Optional (if parameter not included, it defaults to true). All of the assets that are counted as INVALID will be
created in a list. If you want this list to be prited as a column then input 'true' here, otherwise they will all be in a row.
_lblSzRfrnce (string) : (string)
Optional (if parameter not included, it defaults to size.small). This will be the size of the variable outputted
by this function named 'assetNameLabel' BUT also affects the size of the output variable 'alertTrigLabel' as it uses this parameter's size
as the smallest size for 'alertTrigLabel' then uses the '_barCnt' parameter to determine the next sizes up depending on the "_barCnt" value.
Returns: ( )
Returns 2 variables:
1st output variable ('AssetNameLabel') is assigned to the size of the 'lblSzRfrnceInput' parameter.
2nd output variable('alertTrigLabel') can be of variying sizes depending on the 'barCnt' parameter...BUT the smallest
size possible for the 2nd output variable ('alertTrigLabel') will be the size set in the 'lblSzRfrnceInput' parameter.
PrintedBarCount(_time, _barCntLength, _barCntPercentMin)
The Printed BarCount Filter looks back a User Defined amount of minutes and calculates the % of bars that have printed
out of the TOTAL amount of bars that COULD HAVE been printed within the same amount of time.
Parameters:
_time (int) : (int)
The time associated with the chart of the particular asset that is being screened at that point.
_barCntLength (int) : (int)
The amount of time (IN MINUTES) that you want the logic to look back at to calculate the % of bars that have actually
printed in the span of time you input into this parameter.
_barCntPercentMin (int) : (int)
The minimum % of Printed Bars of the asset being screened has to be GREATER than the value set in this parameter
for the output variable 'bc_gtg' to be true.
Returns: ( )
Returns 2 outputs:
1st is the % of Printed Bars that have printed within the within the span of time you input in the '_barCntLength' parameter.
2nd is true/false according to if the Printed BarCount % is above the threshold that you input into the '_barCntPercentMin' parameter.
Volume Footprint Voids [BigBeluga]Volume Footprint Voids is a unique tool that uses lower timeframe calculation to plot different styles of single candle POC.
This indicator is very powerful for scalping and finding very precise entry and exits, spotting potential trapped traders, and more.
Unlike many other volume profiles, this aims to plot single candle profiles as well as their own footprints.
🔶 FEATURES
The script includes the following settings:
Windows: Plotting style and calculations
Coloring modes
Display modes
lower-timeframe calculations
🔶 CALCULATION
In the image above we can see how the script calculates each level position that will serve as a calculation process to see how much volume/closes there are within the levels.
In the image above, we can have a more clear example of how we count each candle close.
We use the prior screenshot as an example, after setting each level we will use the lower-timeframe input to measure the amount of closes within the ranges.
Depending on the lot size, the box will be larger or smaller, usually the POC will always have the highest box size.
NOTE: Size is the starting point, always from the low of the candle.
To find more voids, select a closer LTF to the current one you're using.
To find fewer voids, select a timeframe away from your current one.
Due to Pine Script limitations, we are only able to plot a certain amount of footprints, and we can't plot the whole history chart.
POC will be the largest block displayed, indicating the time point of control
Gray areas are closes above the average
Black are Void or imbalance that price will fill in the future, like FVG
The image above shows an incorrect size input that will lead to bad calculations, while on the other side, a correct size input that will lead to a clear vision and better calculation.
🔶 WINDOWS
The "▲▼" Mode will display delta buyers and delta sellers coloring with voids as black.
It also offers a gradient mode for a beautier visualization
The "Total Volume" mode will display the net volume within the lot size (closes within the levels).
This is useful to spot possible highest net volume within the same highest lot size.
The "POC + Gaps" will show both POC and Gaps as the highest block while all the rest will be considered as the smaller block.
This is useful to see where the highest lot were and if there are higher or lower imbalances within the candle
The last option "Gaps" will simply display the gaps as the highest block, while the POC as the lowest block.
This is useful to have a better view of the gaps areas
🔶 EXAMPLE
This is one of the most basic examples of how this script can be used. POC at the bottom creating a strong support area as price holds and creates higher voids gap that price fills while rising.
🔶 SETTINGS
Users have full control over the script, from colors to choosing the lower-timeframe inputs to disabling the lot size.