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.
Statistics
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.
Drawdown % (with SMA)This script, titled "Drawdown % (with SMA)" and designed for Pine Script version 5
offers a sophisticated tool for traders to monitor drawdown percentages, a crucial metric in assessing investment risks. The script calculates the drawdown as the percentage decrease from the all-time high value of the selected financial instrument.
Portfolio Management [TrendX_]Portfolio Management is a powerful tool that helps you create and manage your own portfolio of stocks, based on your risk and return preferences.
*** Note: You should select the appropriate index for each stock as the benchmark to compare your portfolio’s performance.
*** Note: You should apply the indicator to the same chart as the benchmark, so that it can capture the historical trends of all the 10 stocks in your portfolio.
USAGE
Analyze your portfolio’s return factor, which shows the compound annual growth rate (CAGR) of each stock and the portfolio as a whole, as well as the weight of each stock in the portfolio.
The Weighting approach contains 2 options, Equal and Growth-based method:
Customize your portfolio by selecting up to 10 stocks from a wide range of markets and sectors:
Compare your portfolio’s performance with a benchmark of your choice, which is the S&P500 by default setting.
Evaluate your portfolio’s risk factor, which includes the capital asset pricing model (CAPM), the portfolio beta, and the Sharpe ratio of both the portfolio and the benchmark:
- CAPM is a model that calculates the expected return of the portfolio based on its risk and the risk-free rate of return.
- Portfolio beta is a measure of how sensitive the portfolio is to the movements of the benchmark. A beta of 1 means the portfolio moves in sync with the benchmark, a beta of less than 1 means the portfolio is less volatile than the benchmark, and a beta of more than 1 means the portfolio is more volatile than the benchmark.
- Sharpe ratio measures how much excess return the portfolio generates per unit of risk. It is calculated by subtracting the risk-free rate of return from the portfolio’s return, and dividing by the portfolio’s standard deviation. A higher Sharpe ratio means the portfolio has a better risk-adjusted return. A Sharpe ratio of more than 1 is considered good, a Sharpe ratio of more than 2 is considered very good, and a Sharpe ratio of more than 3 is considered excellent .
Adjust your portfolio’s rebalancing strategy, which determines when and how to change the weight of each stock in the portfolio to optimize your return and risk objectives. The tool also suggests a default hedging-stock asset, which is the US dollar interpreted through the dollar index (DXY):
- The dollar index is a measure of the value of the US dollar relative to a basket of other major currencies. It is often used as a proxy for the global economic sentiment and the demand for safe-haven assets. A rising dollar index means the US dollar is strengthening, which may indicate a bearish outlook for the stock market. A falling dollar index means the US dollar is weakening, which may indicate a bullish outlook for the stock market.
- The rebalancing strategy suggest increasing the weight of the hedging-stock asset when the dollar index is under positive supertrend condition, and decreasing the weight of the hedging-stock asset when the dollar index is in the downward supertrend. This way, you can hedge against the adverse effects of the stock market fluctuations on your portfolio, simply you can just cash out at the suggested hedging weight.
CONCLUSION
Investors can gain a deeper insight into their portfolio’s performance, risk, and potential, and make informed decisions to achieve their financial goals with confidence and ease.
DISCLAIMER
The results achieved in the past are not all reliable sources of what will happen in the future. There are many factors and uncertainties that can affect the outcome of any endeavor, and no one can guarantee or predict with certainty what will occur.
Therefore, you should always exercise caution and judgment when making decisions based on past performance.
Qullamaggie ADR and Volatility and Price Change IndicatorElevate your trading strategy with Qullamaggie ADR, a dynamic indicator inspired by the Kristjan Qullamaggie trading approach. Gain a deeper understanding of market dynamics, daily price movements, and potential turning points.
Key Features:
Qullamaggie ADR: Assess market volatility through the QullaADR, offering customizable time intervals (5, 10, 15, 20 days) to adapt to various trading styles.
Today's Change: Monitor price changes relative to the low of the current trading day, providing valuable intraday insights.
PrevDay price differentials from the previous day's low, aiding in the identification of potential trend reversals.
Track the percentage change from the opening price, offering a snapshot of intraday market sentiment.
Percent from 10-day SMA: Visualize the percentage difference between the closing price and a 10-day Simple Moving Average (SMA), a key trend-following indicator.
Usage:
Utilize QullaADR to set realistic profit targets and stop-loss levels based on current market conditions.
Identify potential trend shifts by observing changes from the previous day's low with Today's QullaChange.
Incorporate QullaPercent from 10-day SMA for trend confirmation and well-informed trading decisions.
Strategy Inspiration:
QullaADR draws inspiration from the Kristjan Qullamaggie trading strategy, aiming to complement your trading toolkit and enhance decision-making.
Disclaimer:
Trading involves risk, and past performance is not indicative of future results. Use this indicator as a supplementary tool within a comprehensive trading strategy.
Version: 1.0
Ichimoku Strategy - Easiest Backtest [A.R.]▓ INTRODUCTION
This indicator allows a new "sandbox" approach to the Ichimoku system allowing to combine several entry, confirmation and exit conditions, to add basic risk management, to be able to backtest the performance of the strategy using a table directly on chart, and automate entry and exit signals using alerts.
▓ DEFINITION
The Ichimoku strategy is a trading system based on technical analysis, using a set of graphical indicators to evaluate the trend, strength and support/resistance levels of a financial asset. It integrates components such as the conversion line (Tenkan), the baseline (Kijun), the cloud delimited by the Senkou Span A and the Senkou Span B (SSA - SSB - Kumo) and the lagging span (Chikou) to provide different trading signals.
▓ ADDED VALUE
Several indicators and strategies concerning Ichimoku are already available on Tradingview, we are publishing this indicator to make this strategy even more accessible, what makes it original:
▪️ Unique Settings Windows, easy-to-read. The settings categories are clearly separated. Some parameters are aligned to avoid having an endless list of parameters to modify. This makes the settings window easy to understand and pleasant to use.
▪️ Sandbox type settings, you can choose 1 or 2 Entry conditions, choose to add 1 Confirmation, choose to add between 1 and 3 Exit Conditions. Dozens of possible configurations.
▪️ Possibility of adding basic Risk Management (TP/SL)
▪️ Backtest table directly on chart that allow to get quickly the results (script execution <1 sec) which makes it practical, allowing dozens of different configurations to be tested in a short period of time
▪️ Monitoring historical and current trades on chart thanks to Boxes and Labels
▓ HOW TO USE
You can try the indicator with default settings but you can also modify backtesting settings and trade Entry conditions, Entry Confirmation, and Exit conditions, also you can decide to add a Stop Loss and/or a Take Profit. Then you can find the stats of the backtesting in a table directly in the top right corner of the chart. Finally you can automate the strategy using Alert conditions. You can find all the settings below:
Initial backtesting settings:
🔹Set up Side: Choose Long|Short, Long or Short
🔹Set up Investment: Choose an amount in $, it simulates the equity / funds on the trading account.
🔹Set up Position Size: Choose an amount in $, it simulates the amount of the position size of each trade. If you want to simulate leverage trading, you can put a Position Size superior to Investment. For exemple Investment = 10000 and Position Size = 20000 simulates a x2 leverage.
🔹Set up your Fee rate %: Each trade entry and trade exit, a % of position size will be deducted from the PnL stats. For example if you choose 0.04% with 10000 Position Size, 4$ will be deducted each trade entry and each trade exit = 8$ fees each trade.
🔹Set up the Start and End date: It allows to backtest the strategy over a period of time, for Example from 01-01-2021 to 01-12-2022. By default the end date is year 2050, the backtest will start to take into account data from Start Date to the current time.
Backtest the main Ichimoku sub-strategies choosing entry conditions:
🔸Cloud Breakouts trading: Choose this Entry condition to start a trade when Price crosses the Cloud Upside (Long) or Downside (Short)
🔸Tenkan x Kijun cross trading: Choose this Entry condition to start a trade when Tenkan (Red line) crosses Kijun (Blue line) Upside (Long) or Downside (Short)
* There is no repaint, a signal is validated after the condition is confirmed at the end of the previous candle. If a signal appears on the chart, it won't ever disappear.
Entry Confirmations:
✔️ Chikou Above or Below price: if you check this setting, Long entry signals will be confirmed only when the Chikou (White Line) is Above the current price and Short entry signals will be confirmed only when the Chikou (White Line) is below the current price. In the Ichimoku system the Chikou is often used to confirm all types of signals.
Exit Conditions:
❌ Cloud Reintegrations: When a trade is open (Long or Short), if the price goes back into the cloud the trade is closed
❌ Reverse Cloud Breakouts: When a Long trade is open, if the price breaks out of the cloud from below the trade is closed. When a Short trade is open, if the price breaks out of the cloud from above the trade is closed.
❌ Reverse Tenkan-Kijun Cross: When a Long trade is open, if the Tenkan crosses Downside the Kijun the trade is closed. When a Short trade is open, if the Tenkan crosses Upside the Kijun the trade is closed.
Basic Risk Management:
⛔️ SL: Choose to set up a Stop Loss
✅ 1 single TP: Choose to set up a Take Profit
Signals:
🔔 Entry/Exit Alerts available: 4 types of alert conditions are available ENTRY LONG, ENTRY SHORT, EXIT LONG, EXIT SHORT. The entry conditions trigger at the beginning of the candle, choose alert frequence = once per bar.
👉 Tips: Easier to find profitable configurations in High Timeframe above H4.
▓ BACKTESTING SYSTEM
The Backtesting system integrated into the script tracks each trade. It allows you to test the strategy over a fixed period between a start date and an end date. It also allows to quickly and directly display on the chart the most important data to determine if a configuration is profitable such as the % PnL, the Max Drawdown, the amount of fees, the risk-reward ratio. It has been designed to be easy and quick to use even for a beginner.
═════════════════════════════════════════════════════════════════════════
The information published here on TradingView is not prohibited, doesn't constitute investment advice, and isn't created solely for qualified investors.
Important to note: The source code of this indicator is not accessible because it benefits from the code of our backtesting system present in other non-public indicators that we protect. Our indicators with the same backtesting system are published in separate publications because putting them together in a single script would considerably slow down the execution of the script.
Sessions [TradingFinder] New York, London, Tokyo & Sydney ForexTiming is one of the influential factors in a trader's position. This indicator categorizes transactions into three sessions (Asia, Europe, and America). Five significant trading cities (New York, London, Frankfurt, Tokyo, and Sydney) are selectable.
I recommend using the tool on a 5-minute time frame, but it is usable on all time frames.
Settings:
• Trading sessions: Display or hide each trading session as needed.
• Color: Change the color of each box.
• Session time intervals: The default is based on the main working hours for each time interval and can be adjusted.
• Information table: Delete or display additional information table.
Information Table:
• Trading sessions
• Opening and closing times of each trading session
How to Use:
Initiating trading sessions involves entering with increased liquidity, and the market usually experiences significant movements. Many trading strategies are based on "time" and "session openings." This tool empowers traders to focus intensely on each time interval.
These trading sessions are crucial for all Forex, stock, and index traders:
The total price ceiling and floor in the Asia session (Tokyo and Sydney) are crucial for traders in the European session.
The European session starts with Frankfurt, and an hour later, London begins, collectively forming the European session.
The dashboard provides additional information, displaying hours based on UTC.
Customization options are considered in all sections so that everyone can apply their own settings.
Important: Default times are the most accurate for each region, and in most indicators, this time is not correctly selected. Therefore, the level of influence and time intervals are specified at the beginning of each session. If you are using another indicator, match its default time to the announced time and share the results with me in the comments.
Kendall's Tau Correlation Regimes [NariCapitalTrading]The "Kendall's Tau Correlation Regimes" indicator is designed to analyze price data and determine market regimes based on Kendall's Tau correlation coefficient. It provides insight into the strength and direction of the correlation between two data series: close price and a selected moving average.
User Inputs:
Period: Defines the lookback period for calculating Kendall's Tau correlation. It can be adjusted using the input slider, with a minimum value of 1.
Threshold: Sets the threshold for identifying bullish and bearish market regimes. The user can adjust this value within the range of 0.1 to 1.0 with step increments of 0.1.
MA Type: Allows users to select the type of moving average to be used in the correlation calculation. Options include Simple Moving Average (SMA), Exponential Moving Average (EMA), and Hull Moving Average (HMA).
Kendall's Tau Correlation Calculation:
Calculates Kendall's Tau correlation coefficient between the closing price and the selected moving average.
Kendall's Tau measures the strength and direction of the ordinal association between two data series. It assesses whether the data pairs are in the same order or not.
The calculation involves counting concordant and discordant pairs of data points and then computing the coefficient.
Market Regime Identification:
Based on the threshold defined by the user, the indicator identifies two market regimes: bullish and bearish.
A regime is considered bullish when the Kendall's Tau correlation coefficient is greater than the threshold.
A regime is considered bearish when the Kendall's Tau correlation coefficient is less than the negative of the threshold.
Plotting:
The indicator plots the calculated Kendall's Tau correlation coefficient as a blue line on a separate indicator pane.
It also highlights bullish regimes with a green background and bearish regimes with a red background.
Conclusion:
The "Kendall's Tau Correlation Regimes" indicator provides traders with a visual aid for assessing market regimes based on the strength of correlation between price and a selected moving average.
Disclaimer: This indicator is for educational and informational purposes only.