Trading Day Holidays: 8am reminder of early closing day ahead-Designed for Index Futures(ES,NQ,YM). 8am Visual reminder on the morning of a holiday trading day that trading will cease at 1pm (NY time).
-This is updated and stripped down version of @Daveatt's 2020 script: 'BEST USA Bank Holidays Helper'.
-Simply marks 'HOLIDAY' on the holiday trading days, at 8am NY time on that day. Past 'HOLIDAY' labels will delete when new ones print.
-Should be 9 of these 'half-day' days throughout the year (not including Xmas period)
~I plan to update this each year
Forecasting
Drawdown and Drawback || Ranging Hey!
So this indicator tries to spot ranges;
Above the zero line is the data from green candles and below the zero line is the data from the red candles;
When the white area is > than the black area, it indicates that the DrawBack is higher than the DrawDown;
This might work counterintuitively for some people because, for a bullish candle, this means it has to go down for the indicator to recognize it as “good”/ see it as a DrawBack value;
The same is true for a bearish candle, the price has to move up after for it to be seen as a DrawBack value;
There are a few input values:
Length_: This is how many bars a candle gets for the price to move in, the default is 8 bars, so after a bar is formed, from the following 8 bars the DrawBack/DrawDown is saved;
EMA_Length: This is the EMA length, you can change the EMA length and also the MA variant, so you have full flexibility about what might work best for you;
RB_Size: This is how many points a Real Body of a candle has to have before it gets registered within the indicator, what I found it, is that if you put this too low your data gets ruined by candles that have 1-5 points if you use it on a low TimeFrame, but if you want to use it on higher timeframes you maybe have to make the default a bit higher.
Everything is plotted with an Offset of 1, I like it this way so you get a realistic view of the market as you will -most likely- place trades on the next candle either way not on the current candle. But that is just my opinion.
I also added 2 yellow Hlines for visual purposes to see if they were within a certain boundary, see if these add anything for yourself, because they can also make it look a bit messy;
If you have any questions about the code or the indicator itself, feel free to ask them!
I hope it helps at least one person ;)
Quantitative Price Forecasting - The Quant ScienceThis script is a quantitative price forecasting indicator that forecasts price changes for a given asset.
The model aims to forecast future prices by analyzing past data within a selected time period. Mathematical probability is used to calculate whether starting from time X can lead to reaching prices Y1 and Y2. In this context, X represents the current selected time period, Y1 represents the selected percentage decrease, and Y2 represents the selected percentage increase. The probabilities are estimated using the simple average.
The simple average is displayed on the chart, showing in red the periods where the price is below the average and in green the periods where the price is above the average.
This powerful tool not only provides forecasts of future prices but also calculates the distribution of variations around the average. It then takes this information and creates an estimate of the average price variation around the simple average.
Using a mean-reverting logic, buying and selling opportunities are highlighted.
We recommend turning off the display of bars on your chart for a better experience when using this indicator.
Unlock the full potential of your trading strategy with our powerful indicator. By analyzing past price data, it provides accurate forecasts and calculates the probability of reaching specific price targets. Its mean-reverting logic highlights buying and selling opportunities, while the simple moving average displayed on the chart shows periods where the price is above or below the average. Additionally, it estimates the average variation of price around the simple average, giving you valuable insights into price movements. Don't miss out on this valuable tool that can take your trading to the next level
Dynamic Reactor [CHE]This simple Pine script is an implementation of the Dynamic Reactor indicator. The indicator is designed to dynamically adjust to market conditions and identify trend reversals.
The indicator takes one input parameter: the length of the Dynamic Reactor. The script calculates the high, low, and midpoint values of the Dynamic Reactor using a simple moving average (SMA) function. The plot colors are determined by the current price in relation to the high and low values. If the price is above the high value, the plot is colored green. If the price is below the low value, the plot is colored red. Otherwise, the plot is colored gray. The area between the high and low values is filled with a transparent color to help visualize the range of the indicator.
Price Legs & Fib Projections: Fibonacci Confluence-Plots price legs based on two user input lookback numbers. Smaller number for small legs, larger number for large legs.
-Plots Fib projections of these price legs, above and below; User can input four independent fib levels or standard deviation levels
## User Inputs ##
~Show visible chart only; Show price leg labels (time and price); show small legs (fibs and/or boxes); show large legs (fibs and/or boxes)
~Input 4 Fibonacci levels or measured move levels. Toggle each level on/off
~toggle on/off Fib levels ABOVE or fib levels BELOW
~extend Fib levels 'X' bars to the right, or toggle on/off 'Full Extend' to the right
## Tips & Notes ##
-use 'Full Extend' together with 'visible chart only' if searching for multiple confluence of Fib levels.
-can quickly get very cluttered, but the aim in writing this was to try to find area of confluence at a glance amongst a mess of levels, then hide the indicator and study/note that area.
-if lines don't print toward the left hand side of the chart you've likely reached the max line limit set by Tradingview.
-Fib level input of 1.0 represents zero % extension above the high or below the low of the leg; 2.0 represents 100% extension.
1hr S&P: Visible chart only; large legs only; 50%, 100%, 150%, 200% Fib extensions; Above only; lines extended fully to the right:
Usage notes; 15m S&P: Small & Large price legs; partial extend; all fib levels above/below:
ICT MacrosThis script allows traders to visualize the range of time when a macro (an automated series of instructions/trades from large fund traders, executed by an algorithm) will likely occur in the market. It does this by drawing vertical lines and labels on the chart at these specific times:
(Macro Open) - 9:50 AM EST
(Macro Close) - 10:10 AM EST
(Macro Open) - 10:50 AM EST
(Macro Close) - 11:10 AM EST
(Macro Open) - 1:10 PM EST
(Macro Close) - 1:40 PM EST
(Macro Open) - 3:15 PM EST
(Macro Close) - 3:45 PM EST
The theory behind the use of these macros - is that the market will either seek buy side or sell side liquidity, or seek to rebalance price at a point of interest in between the open and close of the macro. Traders who follow this theory can use that information to anticipate how price might behave.
When a macro occurs, the script draws a vertical line on the chart using a dotted line style with a user-defined color. Additionally, a label is placed above the line to indicate whether it is a Macro Open or Macro Close event.
To preserve space, the labels are abbreviated on chart - "Macro Open" (M.O.) and "Macro Close" (M.C.) for both the morning and afternoon trading sessions. The labels may be turned on/off by the user.
The script also includes alerts that can notify traders when a macro occurs. These alerts can be set to go off once per bar close, and the alert message indicates the specific macro type and time.
This script is entirely open-source, meaning that traders can read the code and modify it as needed. Credit to the foundation of this script goes to TradingView user @rickyzcarroll for his open source Strat Assistant Hour Flip script. Important changes include the specific time changes and alert function.
Recession Warning Traffic LightThis is an indicator that uses 6 different metrics to determine the combined probability of a recession and compares the high probability warning periods against actual historical periods of recession.
GREEN tells us that the referenced recession indicators are not exhibiting any warning. Observe the long stretches of “all-green” in between recessionary periods in the chart above.
RED will show a full-on warning level for that particular recession indicator, signaling that monitoring of this sector is clearly showing a problem – which has in the past, reliably exhibited itself as a forewarning of recessions.
Adding green and red together can help determine a combined probability of recession.
IMPORTANT: Your chart should be on 1d and set to SPX , DJI ,or NDQ indices
Precious metals: This indicator calculates the relative prices of Gold & rhodium. Gold is a flight-to-quality asset. Rhodium is the rarest of precious industrial metals and prices spike when the economy is heating up. In front of a recession, the upper relative movement of rhodium precedes gold.
Stock markets: This indicator compares closing prices to growth rate curves of the SPX. This indication is the noisiest but tells us very well when the recession has ended. Stock market indices, which respond to “smart money” moving out of markets when the other indicators begin to warn of recession, or when markets become overheated and rise to historically unsustainable levels.
Yield curve: This indicator compares the 3m & 10y treasuries and detects yield curve inversions. Interest rates are controlled by the Federal Reserve and by the purchasers in the Federal Treasury auction markets, which together create the treasury yield curve. This inversion is the most reliable recession indicator. These happen during a flight to quality.
Federal Reserve: This indicator measures GDP and detects contraction which is technically a recession. This is usually one of the last indicators to enter a Warning state, and it could be 6 months delayed simply confirming what may have already been projected.
Money Supply. This indicator measures the M2 money supply, which typically grows about 1% per calendar quarter. When this shrinks, it's tapping the brakes on the economy. This can also lead to yield curve inversion. This is also a measure of inflation and its effects on the aggregate money supply (liquid capital) available for short-term economic activity, or which can be directed into the purchase of long-term, less liquid assets.
Leading Economic factors: There is a whole basket of leading economic indicators that, as collections, reflect overall growth or contraction of economic activity. These indicators include measures of level and growth in productivity, employment, housing, consumer confidence, industrial purchasing confidence, and much more. These indicators may or may not be detached from the broader economy, and often provide up to 6 months of foresight. For more information please visit www.conference-board.org
Actual Recession: Central Bank indicators are published by the Federal Reserve and reflect their own analysis of national and regional economic health, as well as their calculations of the likelihood of a recession. The Federal Reserve has a recession ticker which is used to plot periods of actual recessions on this indicator for comparison.
Spoofing Detector with VPOC [CHE]"We're keeping an eye on the market makers, zooming in for a closer look."
Spoofing and Volume Point of Control (VPOC) are terms used in the context of market manipulation and market analysis in financial markets.
A spoofing detector is a tool developed to detect the spoofing of orders. Spoofing refers to a practice where a market participant places large orders to deceive other market participants and influence the price of a stock. These large orders, however, are not executed but cancelled shortly after, creating a false demand for a specific stock and influencing the price. A spoofing detector can use algorithms to detect and report these practices to maintain the integrity of the market.
The Volume Point of Control (VPOC) is a concept in technical analysis aimed at identifying the key price level at which a stock was bought and sold. VPOC is calculated by analyzing the volume data of a stock and determining the price level at which the largest volume was traded for a specific period. This price level can serve as an indicator of the current market trend and market interest in a specific stock.
There is a substantive connection between a spoofing detector and VPOC because both tools can be used to gain a better understanding of the stock markets and detect potential forms of market manipulation. For example, VPOC can be used as an indicator of potential market manipulation when an abnormal distribution of trading volume is observed at a specific price level. A spoofing detector can then be used to detect and report these activities.
Pine Script Indicator Analysis:
This is a Pine Script code for a spoofing detector and volume point of control (VPOC) indicator. The purpose of the indicator is to detect and highlight potential spoofing activities in the market, as well as to plot the volume point of control on the chart.
Inputs:
Median Lookback: This input defines the length of the median calculation, with a default value of 25.
Range To Edges Threshold: This input sets a threshold value for the range to edges calculation, with a default value of 200.
Multiplier 1: This input sets a multiplier value to be used in the average true range calculation, with a default value of 0.8.
Multipler 2: This input sets a multiplier value to be used in the average true range calculation, with a default value of 2.0.
Multipler 3: This input sets a multiplier value to be used in the average true range calculation, with a default value of 3.0.
Variables:
y, x, ds, os: These are arrays and a variable used for the first part of the spoofing detection process.
y1, x1, ds1, os1: These are arrays and a variable used for the second part of the spoofing detection process.
y2, x2, ds2, os2: These are arrays and a variable used for the third part of the spoofing detection process.
Calculation:
The code starts by defining some variables, such as the bar index (n), the close price (src), and the average true range (atr) with different multipliers.
Next, the median of the close price is calculated over the lookback period specified by the "Median Lookback" input.
Then, the difference between the current median and the previous median is calculated, and the value is compared with the average true range with different multipliers to determine the state of the market (up, down, or unchanged).
The code then checks if the state has changed from the previous bar, and if so, the code performs a spoofing detection calculation.
The spoofing detection calculation involves determining the range between the first and last bar in the median calculation, and dividing it by the sum of the absolute differences calculated earlier. If the result is below the "Range To Edges Threshold" input, the code plots a line and a label on the chart indicating a potential spoofing activity.
The process is repeated for each of the three parts of the spoofing detection process.
VPOC:
The VPOC code is used to calculate the Volume Point of Control (VPOC) on a chart. The VPOC is the price level with the highest volume over a specified lookback period. The script contains several functions and inputs that allow the user to customize the calculation.
Inputs:
i_source: This input allows the user to specify the source for the VPOC price calculation. The options are the close price of the bar.
i_vpocThreshold: This input allows the user to set the threshold percentage for the VPOC highlight.
Functions:
timeStep_translate(): This function returns a string representing the time step of the lower time frame based on the current time frame of the chart.
ltfStats(): This function returns an array of the source and volume of the lower time frame.
ltfSrc, ltfVolume: This line requests the lower time frame data using the request.security_lower_tf function, with the lower time frame step calculated by the timeStep_translate() function.
maxVolume and indexOfMaxVolume: These variables store the maximum volume value and its corresponding index in the ltfVolume array.
maxVol: This variable stores the source value corresponding to the maximum volume.
vpocThresholdMet: This variable is a boolean that is true when the volume at the maximum volume price level is greater than or equal to the threshold percentage of the total volume.
vpocColor: This variable stores the color for the VPOC plot.
vh: This variable stores the highest volume in the lookback period.
plotshape(): This function plots the VPOC on the chart. The shape will be plotted only if the volume is greater than the specified threshold percentage of the highest volume in the lookback period. The shape will be labeled with the text "VC".
Overall, this script calculates the VPOC for a chart by aggregating volume data from a lower time frame and plotting a shape at the price level with the highest volume. The user can specify the source for the VPOC calculation and the threshold percentage for the VPOC highlight.
Important: VPOC shows everything in real time as a leading indicator, the triple spoofing detector is trailing
Best regards
Chervolino
Expected Move Plotter [CHE]Expected Move Plotter
"There is magic in everything new."
Introduction:
This script is an indicator for financial trading that plots the expected movement of a security based on the average range over the last five periods. The script is written in Pine Script, a high-level programming language used for creating technical indicators, strategies, and other trading tools for the TradingView platform.
Inputs:
Percentage of Open and Close: This input specifies the percentage of the open and close price to use for the expected movement.
Time Periods: The script takes the different time periods into account and translates them to either 60 seconds, 240 seconds, 1 day, 3 days, 7 days, 1 month, 3 months or 12 months.
Calculation:
The script uses the "Open" and "High"/"Low" values of the last 5 periods to calculate the average range and plots the expected movement above and below the current open price. The plot is either green or red depending on whether the expected move is above or below the current close.
Code Breakdown:
The script starts by defining three integer constants: MS_IN_MIN, MS_IN_HOUR, and MS_IN_DAY, which represent the number of milliseconds in a minute, hour, and day, respectively.
The function timeStep_translate() returns a string that represents the timeframe for a chart based on the current timeframe. The function first converts the chart's timeframe to milliseconds and then uses a switch statement to determine the string value to be returned based on the number of milliseconds in the timeframe.
The script then retrieves the data for the open, high, and low values for the last five periods. The high and low values are used to calculate the average range, which is then used to plot the expected movement above and below the current open price.
Conclusion:
This script provides traders with a visual representation of the expected movement of a security based on the average range over the last five periods. It takes different time periods into account and provides a clear indication of whether the expected move is above or below the current close. The script is easy to use and provides a useful tool for traders looking to make informed trading decisions.
Best regards Chervolino
TOMMAR#TOMMAR #MultiMovingAverages #MMAR
Dear fellow traders, this is Tommy, and today I'd like to introduce you to the Multi-Moving Averages Ribbon (MMAR) indicator, which I believe to be one of the best MMAR indicators available on TradingView. Moving Averages is a popular technical analysis tool used to smooth out price data by creating an average of past price data points over a specified time period. They can be used to identify trends and provide a clearer view of price action, as well as generate buy and sell signals by observing crossovers between different moving average lines.
In the MMAR indicator, we have incorporated 12 different types of Moving Averages, including Simple Moving Averages (SMA), Exponential Moving Averages (EMA), Weighted Moving Averages (WMA), Hull Moving Averages (HMA), and Smoothed Moving Averages (SMMA), among others. This allows traders to choose the optimal type for their preferred trading commodities.
One common technique in technical analysis is using multiple Moving Averages with varying lengths, which provides a more comprehensive view of price action. By analyzing multiple Moving Averages with different timeframes, traders can better understand both short- and long-term trends and make more informed trading decisions. Some of the well-known combinations of multiple moving averages used by traders are (5, 9, 14, 21, 45), (6, 11, 16, 22, 51), [8, 13, 21, 55), (50, 100, 200), and (60, 120, 240).
Another way to gauge the strength of the market trend is to look for the arrangement of the Moving Averages. If they are in a sequential order, with the shortest on top and the longest on the bottom, it is most likely a bullish trend. On the other hand, if they are arranged in reverse order, with the shortest on the bottom and the longest on top, it is most likely a bearish trend. The 'Trend Light' in the indicator settings will automatically signal when the Moving Averages are in either an orderly or reverse arrangement.
Lastly, I have added a useful feature to the indicator: the 'MA Projection'. This feature projects and forecasts the Moving Averages in the future, allowing traders to easily identify confluence zones in future candlesticks. Please note that the projection levels may change in the case of extreme price action that significantly affects the Moving Averages.
This is free so any Tradingview users can use this indicator. Just search TOMMAR in the indicator section located on top of the chart.
#TOMMAR #MultiMovingAverages #MMAR
안녕하세요 트레이더 여러분, 토미입니다. 오늘 여러분들에게 소개드릴 지표는 다양한 길이의 이동평균선 조합을 사용할 수 있는 MMAR (Multiple Moving Averages Ribbon)입니다. 아마 제가 만든 MMAR 지표가 트레이딩뷰에서 가장 쓸만할 겁니다. 이동평균선, 줄여서 이평선은 말 그대로 특정 기간 범위 내의 주가들을 평균한 값들로 이루어진 선입니다. 제가 이평선 관련된 강의 자료는 예전에 올려드린 바 있으니 더 자세한 내용이 궁금하신 분들은 아래 링크/이미지 클릭하시길 바랍니다.
본 지표는 Simple Moving Averages (SMA), Exponential Moving Averages (EMA), Weighted Moving Averages (WMA), Hull Moving Averages (HMA), 그리고 Smoothed Moving Averages (SMMA) 등을 포함해 총 12개 종류의 이평선 지표를 사용할 수 있습니다. 또한 각 이평선의 길이들도 하나하나 일일이 설정하실 수 있습니다. 예를 들어 요즘에 자주 보이는 이평선들의 조합이 , , , , 그리고 등등이 존재하는데 여러분의 취향에 맞게 설정하여 사용하시면 됩니다.
몇 가지 주요 기능에 대해서 설명 드리겠습니다. 설정에서 ‘Trend Light’를 키면 이평선들의 정배열 혹은 역배열 여부를 쉽게 볼 수 있습니다. 이평선이 정배열일때는 맨 아래의 이평선에 초록불이, 역배열일때는 맨 위의 이평선에 빨간불이 켜지며 둘 다 아닐 땐 아무 불도 켜지지 않습니다. 또한 ‘MA Projection’을 키면 이평선들의 미래 예측 값들을 확장해줍니다. 당연히 가격 변동이 갑자기 크게 나오면 이평선 예측 확장 레벨들이 확 바뀌겠죠.
지표창에 TOMMAR 검색하시거나 아래 즐겨찾기 인디케이터에 넣기 클릭하시면 누구나 사용하실 수 있습니다~ 여러분의 구독, 좋아요, 댓글은 저에게 큰 힘이 됩니다.
RISK MANAGEMENTHi dear Traders,
Here I would present you my 'Risk Management' tool which is based on your buy orders, trading fees and your desired benefit.
Easily, fulfill the price and volume of each entries. Add to this, you can prepare the info about your next proposed entries, just let them not check at first and by meeting the prices then active the check-box beside it.
Two line will be presented on your candle-plot, one of the indicate the place that without any lose/win you can exit and also the desired exit position by considering user defined benefit.
Use it for free but please do not forget to boost the script.
Best regards and happy trading.
Shakib
Position Sizing Tool [Skiploss]The position sizing tool is an indicator to help calculate in trading, such as loss and gain, lots size, and risk-reward ratio.
When you open the indicator, you must select the entry, take profit, and stop-loss points.
Be careful;
The take profit point must be more than the entry point in the long position. On the other hand, it will be a short position.
The stop loss point must be less than the entry point in the long position. On the other hand, it will be a short position.
For contract size, you can find details on MetaTrader, Ctrader, or your broker.
DANIEL AGA INDICATOR BBThis is a custom trading indicator that combines several popular technical indicators such as EMA (exponential moving average), CCI (commodity channel index), RSI (relative strength index), MFI (money flow index), High-Low Bars, and ATR (average true range). This indicator can be used to identify buying and selling opportunities in the digital currency market. The code presented is an implementation of this indicator in the PineScript programming language, used on trading platforms. Users can customize the indicator by entering different values for different parameters (such as the EMA period, CCI, RSI, MFI thresholds, etc.). The indicator will display buy or sell signals through rectangle labels and can be set to generate alerts if trading opportunities are detected.
Fibonacci RetracementThis script calculates the low and high of the past 14 candles and uses those values as the start and end points for the retracement. The script then plots lines at the key Fibonacci retracement levels (23.6%, 38.2%, 50%, 61.8%, and 76.4%) for reference. Traders can use these levels as potential areas of support or resistance, and watch for price action at these levels to help determine the direction of the market.
Machine Learning: Lorentzian Classification█ OVERVIEW
A Lorentzian Distance Classifier (LDC) is a Machine Learning classification algorithm capable of categorizing historical data from a multi-dimensional feature space. This indicator demonstrates how Lorentzian Classification can also be used to predict the direction of future price movements when used as the distance metric for a novel implementation of an Approximate Nearest Neighbors (ANN) algorithm.
█ BACKGROUND
In physics, Lorentzian space is perhaps best known for its role in describing the curvature of space-time in Einstein's theory of General Relativity (2). Interestingly, however, this abstract concept from theoretical physics also has tangible real-world applications in trading.
Recently, it was hypothesized that Lorentzian space was also well-suited for analyzing time-series data (4), (5). This hypothesis has been supported by several empirical studies that demonstrate that Lorentzian distance is more robust to outliers and noise than the more commonly used Euclidean distance (1), (3), (6). Furthermore, Lorentzian distance was also shown to outperform dozens of other highly regarded distance metrics, including Manhattan distance, Bhattacharyya similarity, and Cosine similarity (1), (3). Outside of Dynamic Time Warping based approaches, which are unfortunately too computationally intensive for PineScript at this time, the Lorentzian Distance metric consistently scores the highest mean accuracy over a wide variety of time series data sets (1).
Euclidean distance is commonly used as the default distance metric for NN-based search algorithms, but it may not always be the best choice when dealing with financial market data. This is because financial market data can be significantly impacted by proximity to major world events such as FOMC Meetings and Black Swan events. This event-based distortion of market data can be framed as similar to the gravitational warping caused by a massive object on the space-time continuum. For financial markets, the analogous continuum that experiences warping can be referred to as "price-time".
Below is a side-by-side comparison of how neighborhoods of similar historical points appear in three-dimensional Euclidean Space and Lorentzian Space:
This figure demonstrates how Lorentzian space can better accommodate the warping of price-time since the Lorentzian distance function compresses the Euclidean neighborhood in such a way that the new neighborhood distribution in Lorentzian space tends to cluster around each of the major feature axes in addition to the origin itself. This means that, even though some nearest neighbors will be the same regardless of the distance metric used, Lorentzian space will also allow for the consideration of historical points that would otherwise never be considered with a Euclidean distance metric.
Intuitively, the advantage inherent in the Lorentzian distance metric makes sense. For example, it is logical that the price action that occurs in the hours after Chairman Powell finishes delivering a speech would resemble at least some of the previous times when he finished delivering a speech. This may be true regardless of other factors, such as whether or not the market was overbought or oversold at the time or if the macro conditions were more bullish or bearish overall. These historical reference points are extremely valuable for predictive models, yet the Euclidean distance metric would miss these neighbors entirely, often in favor of irrelevant data points from the day before the event. By using Lorentzian distance as a metric, the ML model is instead able to consider the warping of price-time caused by the event and, ultimately, transcend the temporal bias imposed on it by the time series.
For more information on the implementation details of the Approximate Nearest Neighbors (ANN) algorithm used in this indicator, please refer to the detailed comments in the source code.
█ HOW TO USE
Below is an explanatory breakdown of the different parts of this indicator as it appears in the interface:
Below is an explanation of the different settings for this indicator:
General Settings:
Source - This has a default value of "hlc3" and is used to control the input data source.
Neighbors Count - This has a default value of 8, a minimum value of 1, a maximum value of 100, and a step of 1. It is used to control the number of neighbors to consider.
Max Bars Back - This has a default value of 2000.
Feature Count - This has a default value of 5, a minimum value of 2, and a maximum value of 5. It controls the number of features to use for ML predictions.
Color Compression - This has a default value of 1, a minimum value of 1, and a maximum value of 10. It is used to control the compression factor for adjusting the intensity of the color scale.
Show Exits - This has a default value of false. It controls whether to show the exit threshold on the chart.
Use Dynamic Exits - This has a default value of false. It is used to control whether to attempt to let profits ride by dynamically adjusting the exit threshold based on kernel regression.
Feature Engineering Settings:
Note: The Feature Engineering section is for fine-tuning the features used for ML predictions. The default values are optimized for the 4H to 12H timeframes for most charts, but they should also work reasonably well for other timeframes. By default, the model can support features that accept two parameters (Parameter A and Parameter B, respectively). Even though there are only 4 features provided by default, the same feature with different settings counts as two separate features. If the feature only accepts one parameter, then the second parameter will default to EMA-based smoothing with a default value of 1. These features represent the most effective combination I have encountered in my testing, but additional features may be added as additional options in the future.
Feature 1 - This has a default value of "RSI" and options are: "RSI", "WT", "CCI", "ADX".
Feature 2 - This has a default value of "WT" and options are: "RSI", "WT", "CCI", "ADX".
Feature 3 - This has a default value of "CCI" and options are: "RSI", "WT", "CCI", "ADX".
Feature 4 - This has a default value of "ADX" and options are: "RSI", "WT", "CCI", "ADX".
Feature 5 - This has a default value of "RSI" and options are: "RSI", "WT", "CCI", "ADX".
Filters Settings:
Use Volatility Filter - This has a default value of true. It is used to control whether to use the volatility filter.
Use Regime Filter - This has a default value of true. It is used to control whether to use the trend detection filter.
Use ADX Filter - This has a default value of false. It is used to control whether to use the ADX filter.
Regime Threshold - This has a default value of -0.1, a minimum value of -10, a maximum value of 10, and a step of 0.1. It is used to control the Regime Detection filter for detecting Trending/Ranging markets.
ADX Threshold - This has a default value of 20, a minimum value of 0, a maximum value of 100, and a step of 1. It is used to control the threshold for detecting Trending/Ranging markets.
Kernel Regression Settings:
Trade with Kernel - This has a default value of true. It is used to control whether to trade with the kernel.
Show Kernel Estimate - This has a default value of true. It is used to control whether to show the kernel estimate.
Lookback Window - This has a default value of 8 and a minimum value of 3. It is used to control the number of bars used for the estimation. Recommended range: 3-50
Relative Weighting - This has a default value of 8 and a step size of 0.25. It is used to control the relative weighting of time frames. Recommended range: 0.25-25
Start Regression at Bar - This has a default value of 25. It is used to control the bar index on which to start regression. Recommended range: 0-25
Display Settings:
Show Bar Colors - This has a default value of true. It is used to control whether to show the bar colors.
Show Bar Prediction Values - This has a default value of true. It controls whether to show the ML model's evaluation of each bar as an integer.
Use ATR Offset - This has a default value of false. It controls whether to use the ATR offset instead of the bar prediction offset.
Bar Prediction Offset - This has a default value of 0 and a minimum value of 0. It is used to control the offset of the bar predictions as a percentage from the bar high or close.
Backtesting Settings:
Show Backtest Results - This has a default value of true. It is used to control whether to display the win rate of the given configuration.
█ WORKS CITED
(1) R. Giusti and G. E. A. P. A. Batista, "An Empirical Comparison of Dissimilarity Measures for Time Series Classification," 2013 Brazilian Conference on Intelligent Systems, Oct. 2013, DOI: 10.1109/bracis.2013.22.
(2) Y. Kerimbekov, H. Ş. Bilge, and H. H. Uğurlu, "The use of Lorentzian distance metric in classification problems," Pattern Recognition Letters, vol. 84, 170–176, Dec. 2016, DOI: 10.1016/j.patrec.2016.09.006.
(3) A. Bagnall, A. Bostrom, J. Large, and J. Lines, "The Great Time Series Classification Bake Off: An Experimental Evaluation of Recently Proposed Algorithms." ResearchGate, Feb. 04, 2016.
(4) H. Ş. Bilge, Yerzhan Kerimbekov, and Hasan Hüseyin Uğurlu, "A new classification method by using Lorentzian distance metric," ResearchGate, Sep. 02, 2015.
(5) Y. Kerimbekov and H. Şakir Bilge, "Lorentzian Distance Classifier for Multiple Features," Proceedings of the 6th International Conference on Pattern Recognition Applications and Methods, 2017, DOI: 10.5220/0006197004930501.
(6) V. Surya Prasath et al., "Effects of Distance Measure Choice on KNN Classifier Performance - A Review." .
█ ACKNOWLEDGEMENTS
@veryfid - For many invaluable insights, discussions, and advice that helped to shape this project.
@capissimo - For open sourcing his interesting ideas regarding various KNN implementations in PineScript, several of which helped inspire my original undertaking of this project.
@RikkiTavi - For many invaluable physics-related conversations and for his helping me develop a mechanism for visualizing various distance algorithms in 3D using JavaScript
@jlaurel - For invaluable literature recommendations that helped me to understand the underlying subject matter of this project.
@annutara - For help in beta-testing this indicator and for sharing many helpful ideas and insights early on in its development.
@jasontaylor7 - For helping to beta-test this indicator and for many helpful conversations that helped to shape my backtesting workflow
@meddymarkusvanhala - For helping to beta-test this indicator
@dlbnext - For incredibly detailed backtesting testing of this indicator and for sharing numerous ideas on how the user experience could be improved.
Color Agreement Aggregate (CAA)This indicator helps finding patterns within market structure in a highly intuitive manner.
It does this by painting a picture instead of presenting numerical values.
It greatly reduces noise in trend/structure analysis.
----- HOW TO USE IT -----
1) Zoom out of chart to get a clearer picture of overall color patterns.
2) Consider areas of intense reds and greens as areas of interest.
3) There is always a pattern of intense reds followed by intense greens. Consider this pattern as the start of a new cycle.
4) Key spikes and dips are shown when all 3 bands are matching of intense colors.
5) Turn on Precision in the Style tab to get more information on decisive spikes in price (See "Precision" below).
Reach (top band):
This is the fast and more volatile movement of the market. It shows the direction in which the recent price action is reaching towards.
Energy (middle band):
This is the medium speed of market movement. It shows the energy of the Reach and how influential it is to market change.
Frequent and intense change of color in this band can be a precursor of change within the Basis.
Basis (bottom band):
This is the slower, broader movement of the market. It is the basis on which the Reach and Energy sit on.
Intense colors in this band show major changes in price levels and market structure.
Precision:
Precision shows the weaker levels of colors. It does this by making bars in a band half its size.
For example, if there is a light green bar that is half, it means that the current bar is on the weaker level of the light green level.
Precision helps in identifying where there are influential moves in price action. Note, there will never be a half-sized bar in the highest and lowest levels.
This is because these levels are the limits and don't have a weaker half.
See notes in chart for more information. Note, you can turn off the labels in the Style tab.
----- HOW THIS INDICATOR IS ORIGINAL; WHAT IT DOES AND HOW IT DOES IT -----
This indicator has an original, unique ability to paint the overall market structure in a highly intuitive manner. It "paints" an image instead of showing numbers.
It does this by color-coding different levels of varying speeds of market movement. It then presents these levels as simple bars.
Finally, it stacks them all and creates an overall image of clear breaks and/or repeats within market structure.
This greatly reduces noise in pattern finding, finding breaks in market structure, and in confirming repeated patterns.
----- VERSION -----
The only significant information from this indicator are the colors themselves and the patterns, agreement, and aggregate of the colors.
This indicator does not provide any numerical information of the underlying, mathematical calculations.
The levels for the Reach are made by the KPAM; for the Energy, the CCI; and for the Basis, the RSI.
However, this indicator is not a variant, replacement, or presentation of the KPAM, CCI, or the RSI in any way, shape, or form -- this indicator does not present itself as such.
The 3 indicators are only useful to this indicator in as much as they are what the colors are derived from -- nothing more.
They are needed in order to obtain, visualize, and create the overall aggregate and agreement of colors.
Thus, the KPAM, CCI, and RSI cannot be adjust nor are they plotted. They are not, in any way, a focus of this indicator.
Wavechart v2 ##Wave Chart v2##
For analyzing Neo-wave theory
Plot the market's highs and lows in real-time order.
Then connect the highs and lows
with a diagonal line. Next, the last plot of one day (or bar) is connected with a straight line to the
first plot of the next day (or bar).
DR/IDR Case Study [TFO]This indicator was made to backtest the DR / IDR concept (Defining Range / Implied Defining Range). There is only one built in DR session, but it can be changed to fit whatever session you like. Just make sure that the beginning time of the Session parameter matches the end time of the Defining Range parameter.
I'm not trying to validate or invalidate the claims of the DR concept, as the sample size of the success rate from this indicator is likely significantly smaller than that of the backtests where the initial success rates were derived. I'm simply sharing this indicator to encourage others to do their own due diligence by collecting their own data before implementing new concepts in their trading. Likewise I'm also making this open source for those who wish to do different kinds of backtesting and extract more value from this concept - for example, what percentage of the time does the session actually close further from the DR after initially closing through the range? Data like this could be good to track for those looking to make a trading model out of the DR concept.
Please note that all times are set to the "America/New_York" time zone by default. Besides the fact that the input times will use New York local time, this also means that they automatically adjust for Daylight Savings (this only impacts areas that do not observe Daylight Savings).
DR/IDR Candles [LuxAlgo]This indicator displays defining ranges (DR) and implied defining ranges (IDR) constructed from two user set sessions (RDR/ODR) as graphical candles on the chart. The script introduces additional graphical elements to the original DR/IDR concept and as such can be thought as a graphical method in addition to a technical indicator.
Additionally, this script can display various Fibonacci retracements from the constructed DR/IDR if enabled within the settings.
Settings
Regular Session: Enable/disable regular session's DR/IDR alongside setting the session time. By default, 09:30 - 10:30 am.
Overnight Session: Enable/disable overnight session's DR/IDR alongside setting the session time. By default, 03:00 - 04:00 am.
UTC Offset: UTC offset for the time zone, by default -5 (EST)
Retracements
Reverse: Inverts source range upper/lower value for constructing the retracements.
From: Source range used to construct the retracements, by default DR is used.
By default, the 0.5 retracement (average line) is displayed.
Usage
The used sessions are highlighted by a gray background. DRs are highlighted by dashed lines while IDRs are highlighted by solid ones. The maximum/minimum price between each user set session is highlighted by solid wicks.
The color of the DRs/IDRs/wicks are determined by the price position relative to the DR; if price is above the DR maximum, then a blue color is used. If price is below, then an orange color is used, and if price is within the DR range, then a gray color is used.
Additionally, the area of the DR range is used to highlight the number of time price is located within the DR, with a longer background highlighting a higher number of occurrences. This can help highlight if the DR levels were potentially useful as support/resistance.
When price is outside the IDR range, the area between the price and IDR is highlighted, in blue if price is above the IDR, and orange if it is under.
The original author of the DR/IDR concept describes 3 rules using the price position relative to the DR/IDR levels:
1.) If price on the 5-minute timeframe closes above the DR high after 10:30 AM or 04:00 AM then the DR low will likely be the low of the trading session.
2.) If price on the 5-minute timeframe closes below the DR low after 10:30 AM or 04:00 AM then the DR high will likely be the high of the trading session.
3.) If price closes above the IDR high after 10:30 AM or 04:00 AM it is an early indication that the low of the DR will be the low of the day and vice versa.
We can see that the above rules are cases of conditional probabilities.
There is no significant data supporting or regarding any statistical probability of the above rules to be true, which are more than uncertain given the stochastic nature of prices. The lack of precision of these rules is also a concern (time zone dependance, applicable markets, etc...).
Credits
Credits to trader TheMas7er who originally created the DR/IDR concept in November of 2022. This script was derived from his proposed session times & rules for trading.
RSI Pull-BackA pull-back occurs whenever the price or the value of an indicator breaks a line and comes back to test it before continuing in the prevailing trend.
The RSI has oversold and overbought levels such as 20 and 80 and whenever the market breaks them returns to normality, we can await a pull-back to them before the reversal continues.
This indicator shows the following signals:
* A bullish signal is generated whenever the RSI surpasses the chosen oversold level then directly shapes a pull-back to it without breaking it again.
* A bearish signal is generated whenever the RSI breaks the chosen overbought level then directly shapes a pull-back to it without surpassing it again.
Emibap's Uniswap V3 HEX/USDC 3% Liquidity PoolThis script will display a histogram of the Uniswap V3 HEX / USDC 3% liquidity pool.
Similar to what you can see in the liquidity section of the Uniswap pool page but conveniently rendered alongside your chart.
It's meant to be used on any HEX / USDC chart only.
One of the main motivations for using this in your HEX / USDC chart is to get an idea of the current sentiment: If most of the volume is below the price it might be an indication of an upcoming move up, for instance.
I'll try to update the liquidity regularly; if possible several times a day.
Using the 4h, daily, or weekly time frames is highly recommended.
The options are straightforward:
Histogram bars color. Default is blue
Histogram background color. Default is black at 20% opacity
Upper price limit of the diagram: Visible upper bound price limit for the histogram, based on the current price. I.E: 200%: If the price is 1, the histogram will show 3 as the upper bound
Lower price limit of the diagram. Visible lower bound price limit for the histogram, based on the current price. I.E: 99%: If the price is 1, the histogram will show 0. 01 as the upper bound
Width of the widest bar: Width (in bars) for the widest bar of the histogram. The more the higher resolution you'll get
Nick_OS RangesUNDERSTANDING THE SCRIPT:
TIMEFRAME RESOLUTION:
* You have the option to choose Daily , Weekly , or Monthly
LOOKBACK WINDOW:
* This number represents how far back you want the data to pull from
- Example: "250" would represent the past 250 Days, Weeks, or Months depending on what is selected in the Timeframe Resolution
RANGE 1 nth (Gray lines):
* This number represents the range of the nth biggest day, week, or month in the Lookback Window
- Example: "30" would represent the range of the 30th biggest day in the past 250 days. (If the Lookback Window is "250")
RANGE 2 nth (Blue lines):
* This number represents the range of the nth biggest day, week, or month in the Lookback Window
- Example: "10" would represent the range of the 10th biggest day in the past 250 days. (If the Lookback Window is "250")
RANGE 3 nth (Pink lines):
* This number represents the range of the nth biggest day, week, or month in the Lookback Window
- Example: "3" would represent the range of the 3rd biggest day in the past 250 days. (If the Lookback Window is "250")
YELLOW LINES:
* The yellow lines are the average percentage move of the inputted number in the Lookback Window
SUGGESTED INPUTS:
FOR DAILY:
Lookback Window: 250
Range 1 nth: 30
Range 2 nth: 10
Range 3 nth: 3
FOR WEEKLY:
Lookback Window: 50
Range 1 nth: 10
Range 2 nth: 5
Range 3 nth: 2
FOR MONTHLY:
Lookback Window: 12
Range 1 nth: 3
Range 2 nth: 2
Range 3 nth: 1
TIMEFRAMES TO USE (If You Have TradingView Premium):
Daily: 5 minute timeframe and higher (15 minute timeframe and higher for Futures)
Weekly: 15 minute timeframe and higher
Monthly: Daily timeframe and higher (Monthly still has issues)
TIMEFRAMES TO USE (If You DO NOT Have TradingView Premium):
Daily: 15 minute timeframe and higher
Weekly: 30 minute timeframe and higher
Monthly: Daily timeframe and higher (Monthly still has issues)
IMPORTANT RELATED NOTE:
If you decide to use a higher Lookback Window, the ranges might be off and the timeframes listed above might not apply
ISSUES THAT MIGHT BE RESOLVED IN THE FUTURE
1. If it is a shortened week (No Monday or Friday), then the Weekly Ranges will show the same ranges as last week
2. Monthly ranges will change based on any timeframe used
Average Range @coldbrewroshTaking the average daily range from low to high or high to low isn't the "best" way to get an idea of how much to set targets. So, I made this indicator to make the system better.
This indicator calculates the daily range from Open to High on Bullish Days & Open to Low on Bearish Days .
Nobody can catch the absolute low of the day on bullish days and get out at the high but one can enter at a reasonable price around the open ( 17:00 EST ) .
To complement the Average Range, another table shows the movement in the opposite direction.
For Instance: On Bullish Days how much it moved from Open to Low so that we have an idea of where to put the stop loss and vice versa. The time ranges calculated are the last 5 days, last 1 month, last 3 months & last 1 year.
Note #1: Even though the date range is predefined, it has a different meaning. For Instance: date range of last 5 days means "calculation of the range of last 5 bullish daily candles & not last 5 days" .
Note #2: Exclusive to Forex at the time of posting this.