Polynomial Regression Bands + Channel [DW]This is an experimental study designed to calculate polynomial regression for any order polynomial that TV is able to support.
This study aims to educate users on polynomial curve fitting, and the derivation process of Least Squares Moving Averages (LSMAs).
I also designed this study with the intent of showcasing some of the capabilities and potential applications of TV's fantastic new array functions.
Polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modeled as a polynomial of nth degree (order).
For clarification, linear regression can also be described as a first order polynomial regression. The process of deriving linear, quadratic, cubic, and higher order polynomial relationships is all the same.
In addition, although deriving a polynomial regression equation results in a nonlinear output, the process of solving for polynomials by least squares is actually a special case of multiple linear regression.
So, just like in multiple linear regression, polynomial regression can be solved in essentially the same way through a system of linear equations.
In this study, you are first given the option to smooth the input data using the 2 pole Super Smoother Filter from John Ehlers.
I chose this specific filter because I find it provides superior smoothing with low lag and fairly clean cutoff. You can, of course, implement your own filter functions to see how they compare if you feel like experimenting.
Filtering noise prior to regression calculation can be useful for providing a more stable estimation since least squares regression can be rather sensitive to noise.
This is especially true on lower sampling lengths and higher degree polynomials since the regression output becomes more "overfit" to the sample data.
Next, data arrays are populated for the x-axis and y-axis values. These are the main datasets utilized in the rest of the calculations.
To keep the calculations more numerically stable for higher periods and orders, the x array is filled with integers 1 through the sampling period rather than using current bar numbers.
This process can be thought of as shifting the origin of the x-axis as new data emerges.
This keeps the axis values significantly lower than the 10k+ bar values, thus maintaining more numerical stability at higher orders and sample lengths.
The data arrays are then used to create a pseudo 2D matrix of x power sums, and a vector of x power*y sums.
These matrices are a representation the system of equations that need to be solved in order to find the regression coefficients.
Below, you'll see some examples of the pattern of equations used to solve for our coefficients represented in augmented matrix form.
For example, the augmented matrix for the system equations required to solve a second order (quadratic) polynomial regression by least squares is formed like this:
(∑x^0 ∑x^1 ∑x^2 | ∑(x^0)y)
(∑x^1 ∑x^2 ∑x^3 | ∑(x^1)y)
(∑x^2 ∑x^3 ∑x^4 | ∑(x^2)y)
The augmented matrix for the third order (cubic) system is formed like this:
(∑x^0 ∑x^1 ∑x^2 ∑x^3 | ∑(x^0)y)
(∑x^1 ∑x^2 ∑x^3 ∑x^4 | ∑(x^1)y)
(∑x^2 ∑x^3 ∑x^4 ∑x^5 | ∑(x^2)y)
(∑x^3 ∑x^4 ∑x^5 ∑x^6 | ∑(x^3)y)
This pattern continues for any n ordered polynomial regression, in which the coefficient matrix is a n + 1 wide square matrix with the last term being ∑x^2n, and the last term of the result vector being ∑(x^n)y.
Thanks to this pattern, it's rather convenient to solve the for our regression coefficients of any nth degree polynomial by a number of different methods.
In this script, I utilize a process known as LU Decomposition to solve for the regression coefficients.
Lower-upper (LU) Decomposition is a neat form of matrix manipulation that expresses a 2D matrix as the product of lower and upper triangular matrices.
This decomposition method is incredibly handy for solving systems of equations, calculating determinants, and inverting matrices.
For a linear system Ax=b, where A is our coefficient matrix, x is our vector of unknowns, and b is our vector of results, LU Decomposition turns our system into LUx=b.
We can then factor this into two separate matrix equations and solve the system using these two simple steps:
1. Solve Ly=b for y, where y is a new vector of unknowns that satisfies the equation, using forward substitution.
2. Solve Ux=y for x using backward substitution. This gives us the values of our original unknowns - in this case, the coefficients for our regression equation.
After solving for the regression coefficients, the values are then plugged into our regression equation:
Y = a0 + a1*x + a1*x^2 + ... + an*x^n, where a() is the ()th coefficient in ascending order and n is the polynomial degree.
From here, an array of curve values for the period based on the current equation is populated, and standard deviation is added to and subtracted from the equation to calculate the channel high and low levels.
The calculated curve values can also be shifted to the left or right using the "Regression Offset" input
Changing the offset parameter will move the curve left for negative values, and right for positive values.
This offset parameter shifts the curve points within our window while using the same equation, allowing you to use offset datapoints on the regression curve to calculate the LSMA and bands.
The curve and channel's appearance is optionally approximated using Pine's v4 line tools to draw segments.
Since there is a limitation on how many lines can be displayed per script, each curve consists of 10 segments with lengths determined by a user defined step size. In total, there are 30 lines displayed at once when active.
By default, the step size is 10, meaning each segment is 10 bars long. This is because the default sampling period is 100, so this step size will show the approximate curve for the entire period.
When adjusting your sampling period, be sure to adjust your step size accordingly when curve drawing is active if you want to see the full approximate curve for the period.
Note that when you have a larger step size, you will see more seemingly "sharp" turning points on the polynomial curve, especially on higher degree polynomials.
The polynomial functions that are calculated are continuous and differentiable across all points. The perceived sharpness is simply due to our limitation on available lines to draw them.
The approximate channel drawings also come equipped with style inputs, so you can control the type, color, and width of the regression, channel high, and channel low curves.
I also included an input to determine if the curves are updated continuously, or only upon the closing of a bar for reduced runtime demands. More about why this is important in the notes below.
For additional reference, I also included the option to display the current regression equation.
This allows you to easily track the polynomial function you're using, and to confirm that the polynomial is properly supported within Pine.
There are some cases that aren't supported properly due to Pine's limitations. More about this in the notes on the bottom.
In addition, I included a line of text beneath the equation to indicate how many bars left or right the calculated curve data is currently shifted.
The display label comes equipped with style editing inputs, so you can control the size, background color, and text color of the equation display.
The Polynomial LSMA, high band, and low band in this script are generated by tracking the current endpoints of the regression, channel high, and channel low curves respectively.
The output of these bands is similar in nature to Bollinger Bands, but with an obviously different derivation process.
By displaying the LSMA and bands in tandem with the polynomial channel, it's easy to visualize how LSMAs are derived, and how the process that goes into them is drastically different from a typical moving average.
The main difference between LSMA and other MAs is that LSMA is showing the value of the regression curve on the current bar, which is the result of a modelled relationship between x and the expected value of y.
With other MA / filter types, they are typically just averaging or frequency filtering the samples. This is an important distinction in interpretation. However, both can be applied similarly when trading.
An important distinction with the LSMA in this script is that since we can model higher degree polynomial relationships, the LSMA here is not limited to only linear as it is in TV's built in LSMA.
Bar colors are also included in this script. The color scheme is based on disparity between source and the LSMA.
This script is a great study for educating yourself on the process that goes into polynomial regression, as well as one of the many processes computers utilize to solve systems of equations.
Also, the Polynomial LSMA and bands are great components to try implementing into your own analysis setup.
I hope you all enjoy it!
--------------------------------------------------------
NOTES:
- Even though the algorithm used in this script can be implemented to find any order polynomial relationship, TV has a limit on the significant figures for its floating point outputs.
This means that as you increase your sampling period and / or polynomial order, some higher order coefficients will be output as 0 due to floating point round-off.
There is currently no viable workaround for this issue since there isn't a way to calculate more significant figures than the limit.
However, in my humble opinion, fitting a polynomial higher than cubic to most time series data is "overkill" due to bias-variance tradeoff.
Although, this tradeoff is also dependent on the sampling period. Keep that in mind. A good rule of thumb is to aim for a nice "middle ground" between bias and variance.
If TV ever chooses to expand its significant figure limits, then it will be possible to accurately calculate even higher order polynomials and periods if you feel the desire to do so.
To test if your polynomial is properly supported within Pine's constraints, check the equation label.
If you see a coefficient value of 0 in front of any of the x values, reduce your period and / or polynomial order.
- Although this algorithm has less computational complexity than most other linear system solving methods, this script itself can still be rather demanding on runtime resources - especially when drawing the curves.
In the event you find your current configuration is throwing back an error saying that the calculation takes too long, there are a few things you can try:
-> Refresh your chart or hide and unhide the indicator.
The runtime environment on TV is very dynamic and the allocation of available memory varies with collective server usage.
By refreshing, you can often get it to process since you're basically just waiting for your allotment to increase. This method works well in a lot of cases.
-> Change the curve update frequency to "Close Only".
If you've tried refreshing multiple times and still have the error, your configuration may simply be too demanding of resources.
v4 drawing objects, most notably lines, can be highly taxing on the servers. That's why Pine has a limit on how many can be displayed in the first place.
By limiting the curve updates to only bar closes, this will significantly reduce the runtime needs of the lines since they will only be calculated once per bar.
Note that doing this will only limit the visual output of the curve segments. It has no impact on regression calculation, equation display, or LSMA and band displays.
-> Uncheck the display boxes for the drawing objects.
If you still have troubles after trying the above options, then simply stop displaying the curve - unless it's important to you.
As I mentioned, v4 drawing objects can be rather resource intensive. So a simple fix that often works when other things fail is to just stop them from being displayed.
-> Reduce sampling period, polynomial order, or curve drawing step size.
If you're having runtime errors and don't want to sacrifice the curve drawings, then you'll need to reduce the calculation complexity.
If you're using a large sampling period, or high order polynomial, the operational complexity becomes significantly higher than lower periods and orders.
When you have larger step sizes, more historical referencing is used for x-axis locations, which does have an impact as well.
By reducing these parameters, the runtime issue will often be solved.
Another important detail to note with this is that you may have configurations that work just fine in real time, but struggle to load properly in replay mode.
This is because the replay framework also requires its own allotment of runtime, so that must be taken into consideration as well.
- Please note that the line and label objects are reprinted as new data emerges. That's simply the nature of drawing objects vs standard plots.
I do not recommend or endorse basing your trading decisions based on the drawn curve. That component is merely to serve as a visual reference of the current polynomial relationship.
No repainting occurs with the Polynomial LSMA and bands though. Once the bar is closed, that bar's calculated values are set.
So when using the LSMA and bands for trading purposes, you can rest easy knowing that history won't change on you when you come back to view them.
- For those who intend on utilizing or modifying the functions and calculations in this script for their own scripts, I included debug dialogues in the script for all of the arrays to make the process easier.
To use the debugs, see the "Debugs" section at the bottom. All dialogues are commented out by default.
The debugs are displayed using label objects. By default, I have them all located to the right of current price.
If you wish to display multiple debugs at once, it will be up to you to decide on display locations at your leisure.
When using the debugs, I recommend commenting out the other drawing objects (or even all plots) in the script to prevent runtime issues and overlapping displays.
Recherche dans les scripts pour "algo"
NNFX Baseline ToolNNFX All-in-One Baseline display / test tool.
This is usefull (hopefully) for the NNFX way of trading only. It's not intended to be used as a standalone tool.
Basically, this script displays and tests many types of Moving Averages as baselines.
It displays baseline signals, based on the NNFX ATR-related rule for baseline entries.
It can be used as a backtest tool, or plugged into the whole nnfx algo.
If signal display option is enabled, signals are displayed on chart : green for long, red for short, orange for crossovers beyond the ATR channel :
Many baselines available : SMA , EMA , WMA , VWMA , ALMA , AMA, SMMA , DEMA , FRAMA , HULL, KAMA , KIJUN, JURIK, LAGUERRE, MCGINLEY , TMA1, TMA2, VIDYA , MODULAR FILTER, VAMA , ZLEMA , T3, LSMA, etc.
Additional options :
- multiplying the ATR channel (and subsequent rule) by a factor (default = 1)
- plot the ATR channel (def = yes)
- fill it (def = yes)
- display signals (def = yes)
- option for add color to the baseline, for long/short territory (2 different options : baseline is colored, background is colored)
- darkmode / lightmode color option. (def = dark)
We also display panels, with general information and some test results. Tests are done within the test period.
I tried to test all the different MAs included in the script but some bugs might still be present, so use it at ur own risk.
If you'd like a new MA option added, please let me know in comments.
I included a "bad" signal detection, it can help for tweaking the settings. Signals are defined as "bad" when they are immediately followed by another signal.
When there is 2 or more bad signals next to another, you spotted a chopiness zone (a chopiness zone is defined as a zone where BL get eaten alive).
Example :
to do :
- plug it with the c1/c2 backtest tool (it's the whole point)
- add alerts,
- add more ma types
- stop to use the operator, it's not convenient at all
- add wr% calculation as a standalone feature (with TP / SL)
- add a way to measure chopiness in the test (dont know how yet)
- detect & display chopiness zones
I asked other users when I used their ideas (for some particular types of MAs). They all agreed.
Best strategy for TradingView (fake)Hello everyone! I want to show you this strategy so you don't fall for the tricks of scammers. On TradingView, you can write an algorithm (probably more than one) that will show any profit you want: from 1% to 100,000% in one year (maybe more)! This can be done, for example, using the built-in linebreak () function and several conditions for opening long and short.
I am sure that sometimes scammers show up on TradingView showing their incredible strategies. Will a smart person sell a profitable quick strategy? When a lot of people start using the quick strategy, it stops working. Therefore, no smart person would sell you a quick strategy. It is acceptable to sell slow strategies: several transactions per month - this does not greatly affect the market.
So, don't fall for the tricks of scammers, write quick strategies yourself.
About this strategy, I can say that the linebreak () function does not work correctly in it. Accordingly, the lines are not drawn correctly on the chart. They are drawn in such a way as to show the maximum profit. I watched this algorithm on a 1m timeframe - no lines are drawn in real time. This is a fake!
Line breakI decided to help TradingView programmers and wrote code that converts a standard candles / bars to a line break chart. The built-in linebreak() and security() functions for constructing a Linear Break chart are bad, the chart is not built correctly, and does not correspond to the Line Breakout chart built into TradingView. I’m talking about simulating the Linear Break lines using the plotcandle() annotation, because these are the same candles without shadows. When you try to use the market simulator, when the gaps are turned on in the security() function, nothing is added to the chart, and when turned off, a completely different line break chart is drawn. Do not try to write strategies based on the built-in linebreak() function! The developers write in the manual: "Please note that you cannot plot Line Break boxes from Pine script exactly as they look. You can only get a series of numbers similar to OHLC values for Line Break charts and use them in your algorithms." However, it is possible to build a “Linear Breakthrough” chart exactly like the “Linear Breakthrough" chart built into TradingView. Personally, I had enough Pine Script functionality.
For a complete understanding of how such a graph is built, you can refer to Steve Nison's book “BEYOND JAPANESE CANDLES” and see the instructions for creating a “Three-Line Breakthrough” chart (the number of lines for a breakthrough is three):
Rule 1: if today's price is above the base price (closing the first candle), draw a white line from the base price to the new maximum price (before closing).
or Rule 2: if today's price is below the base price, draw a black line from the base price to the new low of prices (before closing).
Rule 3: if today's price is no different from the base, do not draw any line.
Rule 4: if today's price rises above the maximum of the first line, shift to the column to the right and draw a new white line from the previous maximum to the new maximum of prices.
Rule 5: if the price is below the low of the first line, move one column to the right and draw a new black line down from the previous low to the new low of prices.
Rule 6: if the price is kept in the range of the first line, nothing is applied to the chart.
Rule 7: if the market reaches a new maximum, surpassing the maximum of previous lines, move to the column to the right and draw a new white line up to a new maximum.
Rule 8: if today's price is below the low of previous lines (i.e. there is a new low), move to the right column and draw a new black line down to a new low.
Rule 9: if the price is in the range of the first two lines, nothing is applied to the chart.
Rule 10: if there is a series of three white lines, a new white line is drawn when a new maximum is reached (even if it is only one tick higher than the old one). Under the same conditions, for drawing a black reversal line, the price should fall below the minimum of the series of the last three white lines. Such a black line is called a black reversal line. It runs from the base of the highest white line to a new low of price.
Rule 11: if there is a series of three black lines, a new black line is drawn when a new minimum is reached. Under the same conditions, for drawing a white line, called a white reversal line, the price must exceed the maximum of the previous three black lines. This line is drawn from the top of the lowest black line to a new high of the price.
So, the script was not small, but the idea is extremely simple: if you need to break n lines to build a line, then among these n lines (or less, if this is the beginning of the chart), the maximum or minimum of closures and openings will be searched. If the current candles closed above or below these highs or lows, then a new line is added to the chart on the current candles (trend or breakout). According to my observations, this script draws a chart that is completely identical to the Line Breakout chart built into TradingView, but of course with gaps, as there is time in the candles / bar chart. I stuffed all the logic into a wrapper in the form of the get_linebreak() function, which returns a tuple of OHLC values. And these series with the help of the plotcandle() annotation can be converted to the "Linear Breakthrough" chart. I also want to note that with a large number of candles on the chart, outrages about the buffer size uncertainty are heard from the TradingView black box. Because of this, in the annotation study() set the value to the max_bars_back parameter.
In general, use it (for example, to write strategies)!
REVEREVE is abbreviation from Range Extension Volume Expansion. This indicator shows these against a background of momentum. The histogram and columns for the range and volume rises ara calculated with the same algorithm as I use in the Volume Range Events indicator, which I published before. Because this algorithm uses the same special function to assess 'normal' levels for volume and range and uses the same calculation for depicting the rises on a scale of zero through 100, it becomes possible to compare volume and range rises in the same chart panel and come to meaningful conclusions. Different from VolumeRangeEvents is that I don't attempt to show direction of the bars and columns by actually pointing up or down. However I did color the bars for range events according to direction if Close jumps more than 20 percent of ATR up or down either blue or red. If the wider range leads to nothing, i.e. a smaller jump than 20 percent, the color is black. You can teak this in the inputs. The volume colums ar colored according to two criteria, resulting in four colors (orange, blue, maroon, green). The first criterium is whether the expansion is climactic (orange, blue) or moderate (maroon, green). I assume that climactic (i.e. more than twice as much) volume marks the beginning or end of a trend. The second criterium looks at the range event that goes together with the volume event. If lots of volume lead to little change in range (blue, green), I assume that this volume originates from institutional traders who are accumulating or distributing. If wild price jumps occur with comparatively little volume (orange, maroon, or even no volume event) I assume that opportunistic are active, some times attributing to more volume.
For the background I use the same colors calculated with the same algorithm as in the Hull Agreement Indicator, which I published before. This way I try to predict trend changes by observation of REVE.
T3 ICL MACD STRATEGY
Backtested manually and received approx 60% winrate. Tradingview strategy tester is skewed because this program does not specify when to sell at profit target or at a stop loss.
Uses 1 min for entry and a longer time frame for confirmation (5,10,15, etc..) (Not sure what the yellow arrows are in the picture but they can be ignored)
Ideal Long Entry - The algo uses T3 moving average (T3) and the Ichimoku Conversion Line (ICL) to determine when to enter a long or short position. In this case we are going to showcase what causes the algo to alert long. It first checks to see if the the ICL is greater than T3. Once that condition is met T3 must be green in order to enter long and finally the last closing price has to be greater than the ICL. You can use the MACD to further verify a long trend as well!
Ideal Short Entry - The algo uses T3 moving average (T3) and the Ichimoku Conversion Line (ICL) to determine when to enter a long or short position. In this case we are going to showcase what causes the algo to alert short. It first checks to see if the the ICL is less than T3. Once that condition is met T3 must be red in order to enter short and finally the last closing price has to be less than the ICL. You can use the MACD to further verify a long trend as well!
[PX] Moon PhaseHello guys,
while scrolling through the public library, I was surprised that there was no Open-Source version of the Moon Phase indicator. All moon phase indicators in the public library were either protected or not exactly what I was looking for. There is a built-in "Moon Phase" indicator, but even for this one, we can't access its source code.
Therefore, I started searching for an algorithm that I could implement into PineScript.
So here we go, an Open-Source Moon Phase indicator. It comes with the option to color the background based on the recent moon. Compared to the built-in indicator, the moon is slightly shifted, because it is centered on the candle and not plotted between two candles like the built-in indicator is doing it.
Feel free to use the indicator for your analysis or build on top of it in an open-source fashion.
Happy trading,
paaax :)
Reference: This indicator is a converted and simplified version of the original javascript algorithm, which can be found here .
SMU Quantum Thermo BallsThis script is the enhanced version of Market Thermometer with one difference. This one has Quantum Thermo balls shooting out of the thermometer tube when overheated. Quantum psychology, Quantum observation, call it what you like
My scripts are designed to beat ALGO, so the behavior of indicators is not like traditional indicators. Don't try to overthink it and compare it to other established functions.
If you knew ALGo as much as I do, then you would also ditch old indicators and design your own weird scripts to match the ALGO's personality. Oh yes, each AlGo for each stock has its own programming personality. Most my scripts are tuned to beat SPX ALGO meniac
Enjoy and think outside the box, the only way to beat the ALGO
BERLIN Renegade - Baseline & RangeThis is the baseline and range candles part of a larger algorithm called the "BERLIN Renegade". It is based on the NNFX way of trading, with some modifications.
The baseline is used for price crossover signals, and consists of the LSMA. When price is below the baseline, the background turns red, and when it is above the baseline, the background turns green.
It also includes a modified version of the Range Identifier by LazyBear. This version calculates the same, but draws differently. It remove the baseline signal color if the Range Identifier signals there is a possible trading range forming.
The main way of identifying ranges is using the BERLIN Range Index. A panel version of this indicator is included in another part of the algorithm, but the bar color version is included here, to make the ranges even more visible and easier to avoid.
Low Frequency Fourier TransformThis Study uses the Real Discrete Fourier Transform algorithm to generate 3 sinusoids possibly indicative of future price.
I got information about this RDFT algorithm from "The Scientist and Engineer's Guide to Digital Signal Processing" By Steven W. Smith, Ph.D.
It has not been tested thoroughly yet, but it seems that that the RDFT isn't suited for predicting prices as the Frequency Domain Representation shows that the signal is similar to white noise, showing no significant peaks, indicative of very low periodicity of price movements.
Correlation MATRIX (Flexible version)Hey folks
A quick unrelated but interesting foreword
Hope you're all good and well and tanned
Me? I'm preparing the opening of my website where we're going to offer the Algorithm Builder Single Trend, Multiple Trends, Multi-Timeframe and plenty of others across many platforms (TradingView, FXCM, MT4, PRT). While others are at the beach and tanning (Yes I'm jealous, so what !?!), we're working our a** off to deliver an amazing looking website and great indicators and strategies for you guys.
Today I worked in including the Trade Manager Pro version and the Risk/Reward Pro version into all our Algorithm Builders. Here's a teaser
We're going to have a few indicators/strategies packages and subscriptions will open very soon.
The website should open in a few weeks and we still have loads to do ... (#no #summer #holidays #for #dave)
I see every message asking me to allow access to my Algorithm Builders but with the website opening shortly, it will be better for me to manage the trials from there - otherwise, it's duplicated and I can't follow all those requests
As you can probably all understand, it becomes very challenging to publish once a day with all that workload so I'll probably slow down (just a bit) and maybe posting once every 2/3 days until the website will be over (please forgive me for failing you). But once it will open, the daily publishing will resume again :) (here's when you're supposed to be clapping guys....)
While I'm so honored by all the likes, private messages and comments encouraging me, you have to realize that a script always takes me about 2/3 hours of work (with research, coding, debugging) but I'm doing it because I like it. Only pushing the brake a bit because of other constraints
INDICATOR OF THE DAY
I made a more flexible version of my Correlation Matrix .
You can now select the symbols you want and the matrix will update automatically !!! Let me repeat it once more because this is very cool... You can now select the symbols you want and the matrix will update automatically :)
Actually, I have nothing more to say about it... that's all :) Ah yes, I added a condition to detect negative correlation and they're being flagged with a black dot
Definition : Negative correlation or inverse correlation is a relationship between two variables whereby they move in opposite directions.
A negative correlation is a key concept in portfolio construction, as it enables the creation of diversified portfolios that can better withstand portfolio volatility and smooth out returns.
Correlation between two variables can vary widely over time. Stocks and bonds generally have a negative correlation, but in the decade to 2018, their correlation has ranged from -0.8 to 0.2. (Source : www.investopedia.com
See you maybe tomorrow or in a few days for another script/idea.
Be sure to hit the thumbs up to cheer me up as your likes will be the only sunlight I'll get for the next weeks.... because working on building a great offer for you guys.
Dave
____________________________________________________________
- I'm an officially approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
SMA/pivot/Bollinger/MACD/RSI en pantalla gráficoMulti-indicador con los indicadores que empleo más pero sin añadir ventanas abajo.
Contiene:
Cruce de 3 medias móviles
La idea es no tenerlas en pantalla, pero están dibujadas también. Yo las dejo ocultas salvo que las quiera mirar para algo.
Lo que presento en pantalla es la media lenta con verde si el cruce de las 3 marca alcista, amarillo si no está claro y rojo si marca bajista.
Pivot
Normalmente los tengo ocultos pero los muestro cuando me interesa. Están todos aunque aparezcan 2 seguidos.
Bandas de Bollinger
No dibujo la línea central porque empleo la media como tal.
Parabollic SAR
Lo empleo para dibujar las ondas de Elliott como postula Matías Menéndez Larre en el capítulo 11 de su libro "Las ondas de Elliott". Así que, aunque se puede mostrar, lo mantengo oculto y lo que muestro es dónde cambia (SAR cambio).
MACD
No está dibujado porque necesitaría sacarlo del gráfico.
Marco en la parte superior cuándo la señal sobrepasa al MACD hacia arriba o hacia abajo con un flecha indicando el sentido de esta señal.
RSI
Similar al MACD pero en la parte inferior.
Probablemente, programe otro indicador para visualizar en una ventanita MACD, RSI y volumen todo junto. El volumen en la principal hay veces que no te permite ver bien alguna sombra y los otros 2 te quitan mucho espacio para graficar si los tienes permanentemente en 2 ventanas separadas.
DFT - Dominant Cycle Period 8-50 bars - John EhlerThis is the translation of discret cosine tranform (DCT) usage by John Ehler for finding dominant cycle period (DC).
The price is first filtered to remove aliasing noise(bellow 8 bars) and trend informations(above 50 bars), then the power is computed.
The trick here is to use a normalisation against the maximum power in order to get a good frequency resolution.
Current limitation in tradingview does not allow to display all of the periods, still the DC period is plot after beeing computed based on the center of gravity algo.
The DC period can be used to tune all of the indicators based on the cycles of the markets. For instance one can use this (DC period)/2 as an input for RSI.
Hope you find this of some interrest.
[naoligo] Simple ADXI'm publishing this indicator just for study purposes, because the result is exactly the same as DMI without the smoothing factor. It is exactly the same as ADX Wilder from MT5.
I was looking for the algorithm all over and it was a pain to find the right formula, meaning: one that would match with the built-in ones. After several study and comparison, I still didn't find the algorithm that match with the MT5's built-in simple ADX ...
Enjoy!
Patrones de entrada/salida V.1.0 -BETA-Este algoritmo intenta identificar patrones o fractales dentro de los movimientos de precios para dar señales de compra o venta de activos.
Zero Lag MACD Enhanced - Version 1.1ENHANCED ZERO LAG MACD
Version 1.1
Based on ZeroLag EMA - see Technical Analysis of Stocks and Commodities, April 2000
Original version by user Glaz. Thanks !
Ideas and code from @yassotreyo version.
Tweaked by Albert Callisto (AC)
New features:
Added original signal line formula
Added optional EMA on MACD
Added filling between the MACD and signal line
I looked at other versions of the zero lag and noticed that the histogram was slightly different. After looking at other zero lags on TV, I noticed that the algorithm implementation of Glanz generated a modified signal line. I decided to add the old version to be compliant with the original algorithm that you will find in other platforms like MT4, FXCM, etc.
So now you can choose if you want the original algorithm or Glanz version. It's up to you then to choose which one you prefer. I also added an extra EMA applied on the MACD. This is used in a system I am currently studying and can be of some interest to filter out false signals.
Acc/Dist. Cloud with Fractal Deviation Bands by @XeL_ArjonaACCUMULATION / DISTRIBUTION CLOUD with MORPHIC DEVIATION BANDS
Ver. 2.0.beta.23:08:2015
by Ricardo M. Arjona @XeL_Arjona
DISCLAIMER
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
Pine Script code MOD's and adaptations by @XeL_Arjona with special mention in regard of:
Buy (Bull) and Sell (Bear) "Power Balance Algorithm by Vadim Gimelfarb published at Stocks & Commodities V. 21:10 (68-72).
Custom Weighting Coefficient for Exponential Moving Average (nEMA) adaptation work by @XeL_Arjona with contribution help from @RicardoSantos at TradingView @pinescript chat room.
Morphic Numbers (PHI & Plastic) Pine Script adaptation from it's algebraic generation formulas by @XeL_Arjona
Fractal Deviation Bands idea by @XeL_Arjona
CHANGE LOG:
ACCUMULATION / DISTRIBUTION CLOUD: I decided to change it's name from the Buy to Sell Pressure. The code is essentially the same as older versions and they are the center core (VORTEX?) of all derived New stuff which are:
MORPHIC NUMBERS: The "Golden Ratio" expressed by the result of the constant "PHI" and the newer and same in characteristics "Plastic Number" expressed as "PN". For more information about this regard take a look at: HERE!
CUSTOM(K) EXPONENTIAL MOVING AVERAGE: Some code has cleaned from last version to include as custom function the nEMA , which use an additional input (K) to customise the way the "exponentially" is weighted from the custom array. For the purpose of this indicator, I implement a volatility algorithm using the Average True Range of last 9 periods multiplied by the morphic number used in the fractal study. (Golden Ratio as default) The result is very similar in response to classic EMA but tend to accelerate or decelerate much more responsive with wider bars presented in trending average.
FRACTAL DEVIATION BANDS: The main idea is based on the so useful Standard Deviation process to create Bands in favor of a multiplier (As John Bollinger used in it's own bands) from a custom array, in which for this case is the "Volume Pressure Moving Average" as the main Vortex for the "Fractallitly", so then apply as many "Child bands" using the older one as the new calculation array using the same morphic constant as multiplier (Like Fibonacci but with other approach rather than %ratios). Results are AWSOME! Market tend to accelerate or decelerate their Trend in favor of a Fractal approach. This bands try to catch them, so please experiment and feedback me your own observations.
EXTERNAL TICKER FOR VOLUME DATA: I Added a way to input volume data for this kind of study from external tickers. This is just a quicky-hack given that currently TradingView is not adding Volume to their Indexes so; maybe this is temporary by now. It seems that this part of the code is conflicting with intraday timeframes, so You are advised.
This CODE is versioned as BETA FOR TESTING PROPOSES. By now TradingView Admins are changing lot's of things internally, so maybe this could conflict with correct rendering of this study with special tickers or timeframes. I will try to code by itself just the core parts of this study in order to use them at discretion in other areas. ALL NEW IDEAS OR MODIFICATIONS to these indicator(s) are Welcome in favor to deploy a better and more accurate readings. I will be very glad to be notified at Twitter or TradingView accounts at: @XeL_Arjona
Shannon Entropy (Quant Lab)🟦 Shannon Entropy = The level of "order" or "chaos" in the market.
This indicator gives you the answer to the question:
"Is the market currently orderly and understandable, or is it random and chaotic?"
No other classical indicator can accurately show this.
The value of Entropy is between 0 and 1:
⸻
🟩 1) Entropy = 0.0 – 0.3 → Structured, orderly, readable market
During these periods, the price:
• A trend forms • Ranges work clearly • Patterns (head & shoulders, flag, triangle) form smoothly • Systems like Z-score, VWAP, EMA work very cleanly • Data for modeling (algorithmic strategies, ML) is high quality
Think of this region as follows:
The market "works according to rules," it's easy to trade.
⸻
🟧 2) Entropy = 0.3 – 0.7 → Normal behavior region
In this region:
• Neither too orderly nor too chaotic
• Most systems operate at an average rate • We can say the market is healthy
It is tradable; however, the conditions are not perfect.
⸻
🟥 3) Entropy = 0.7 – 1.0 → Chaos / Noise / Manipulation region
This is the MOST DANGEROUS REGION OF THE MARKET.
What happens?
• Prices jump randomly left and right. • Wicks increase excessively. • Fake breakouts multiply. • The win rate of strategies decreases. • Trend-following systems constantly generate "false signals." • Even mean-reversion systems are caught off guard. • ML models learn junk data during these periods. • Generally, news, liquidation cascades, and manipulation periods increase entropy.
This period perfectly illustrates:
"There is no logic in this market right now — it's moving randomly."
Therefore, it's a period where you need to be very careful:
Reduce position size. • Trade less. • Avoid unnecessary risks. • Tighten stop losses. • Don't use leverage.
This is your risk alert panel.
⸻
🔥 The real superpower Entropy gives you: Trend selection and system selection
Entropy → Determines which strategy you will use.
✔ Low Entropy → Trend following or mean-reversion that works like a toy
✔ High Entropy → Even opening a trade is risky
✔ Normal Entropy → Most strategies work
Building a strategy without this information is unprofessional.
⸻
🧠 Critical summary (you can even copy and paste it as a description in TradingView):
Low entropy → market is structured, patterns & trends are reliable
High entropy → market is chaotic, noisy, unpredictable; avoid aggressive trading
Entropy tells you if your strategy has a high chance or low chance of working
⸻
🟦 Signals Entropy gives in practice:
🔹 Entropy is falling →
The market is stabilizing → A major trend or strong move is approaching.
🔹 Entropy is rising →
The market is becoming chaotic → Sudden spike, a period of trading in prayer mode, extra risk.
🔹 Low Entropy + VR > 1 + High ER → FULL TREND MARKET
A true “trend paradise” period.
🔹 Low Entropy + VR < 1 + High FDI → RANGE MARKET
A paradise of mean reversion.
🔹 High Entropy + High VoV → DANGEROUS PERIOD
Big explosions, news, and liquidations happen here.
⸻
⭐ IN SHORT:
Entropy = an indicator of how randomly the market behaves.
• 0–0.3 → regular, good, reliable market
• 0.3–0.7 → normal market
• 0.7–1.0 → chaotic, dangerous market
It tells you at a glance whether you should trade during this period or not.
Mutanabby_AI | ONEUSDT_MR1
ONEUSDT Mean-Reversion Strategy | 74.68% Win Rate | 417% Net Profit
This is a long-only mean-reversion strategy designed specifically for ONEUSDT on the 1-hour timeframe. The core logic identifies oversold conditions following sharp declines and enters positions when selling pressure exhausts, capturing the subsequent recovery bounce.
Backtested Period: June 2019 – December 2025 (~6 years)
Performance Summary
| Metric | Value |
|--------|-------|
| Net Profit | +417.68% |
| Win Rate | 74.68% |
| Profit Factor | 4.019 |
| Total Trades | 237 |
| Sharpe Ratio | 0.364 |
| Sortino Ratio | 1.917 |
| Max Drawdown | 51.08% |
| Avg Win | +3.14% |
| Avg Loss | -2.30% |
| Buy & Hold Return | -80.44% |
Strategy Logic :
Entry Conditions (Long Only):
The strategy seeks confluence of three conditions that identify exhausted selling:
1. Prior Move Filter:*The price change from 5 bars ago to 3 bars ago must be ≥ -7% (ensures we're not entering during freefall)
2. Current Move Filter: The price change over the last 2 bars must be ≤ 0% (confirms momentum is stalling or reversing)
3. Three-Bar Decline: The price change from 5 bars ago to 3 bars ago must be ≤ -5% (confirms a significant recent drop occurred)
When all three conditions align, the strategy identifies a potential reversal point where sellers are exhausted.
Exit Conditions:
- Primary Exit: Close above the previous bar's high while the open of the previous bar is at or below the close from 9 bars ago (profit-taking on strength)
- Trailing Stop: 11x ATR trailing stop that locks in profits as price rises
Risk Management
- Position Sizing:Fixed position based on account equity divided by entry price
- Trailing Stop:11× ATR (14-period) provides wide enough room for crypto volatility while protecting gains
- Pyramiding:Up to 4 orders allowed (can scale into winning positions)
- **Commission:** 0.1% per trade (realistic exchange fees included)
Important Disclaimers
⚠️ This is NOT financial advice.
- Past performance does not guarantee future results
- Backtest results may contain look-ahead bias or curve-fitting
- Real trading involves slippage, liquidity issues, and execution delays
- This strategy is optimized for ONEUSDT specifically — results may differ on other pairs
- Always test before risking real capital
Recommended Usage
- Timeframe:*1H (as designed)
- Pair: ONEUSDT (Binance)
- Account Size: Ensure sufficient capital to survive max drawdown
Source Code
Feedback Welcome
I'm sharing this strategy freely for educational purposes. Please:
- Drop a comment with your backtesting results any you analysis
- Share any modifications that improve performance
- Let me know if you spot any issues in the logic
Happy trading
As a quant trader, do you think this strategy will survive in live trading?
Yes or No? And why?
I want to hear from you guys
Elliott Wave Full Fractal System v2.0Elliott Wave Full Fractal System v2.0 – Q.C. FINAL (Guaranteed R/R)
Elliott Wave Full Fractal System is a multi-timeframe wave engine that automatically labels Elliott impulses and ABC corrections, then builds a rule-based, ATR-driven risk/reward framework around the “W3–W4–W5” leg.
“Guaranteed R/R” here means every order is placed with a predefined stop-loss and take-profit that respect a minimum Reward:Risk ratio – it does not mean guaranteed profits.
Core Idea
This strategy turns a full fractal Elliott Wave labelling engine into a systematic trading model.
It scans fractal pivots on three wave degrees (Primary, Intermediate, Minor) to detect 5-wave impulses and ABC corrections.
A separate “Trading Degree” pivot stream, filtered by a 200-EMA trend filter and ATR-based dynamic pivots, is then used to find W4 pullback entries with a minimum, user-defined Reward:Risk ratio.
Default Properties & Risk Assumptions
The backtest uses realistic but conservative defaults:
// Default properties used for backtesting
strategy(
"Elliott Wave Full Fractal System - Q.C. FINAL (Guaranteed R/R)",
overlay = true,
initial_capital = 10000, // realistic account size
default_qty_type = strategy.percent_of_equity,
default_qty_value = 1, // 1% risk per trade
commission_type = strategy.commission.cash_per_contract,
commission_value = 0.005, // example stock commission
slippage = 0 // see notes below
)
Account size: 10,000 (can be changed to match your own account).
Position sizing: 1% of equity per trade to keep risk per idea sustainable and aligned with TradingView’s recommendations.
Commission: 0.005 cash per contract/share as a realistic example for stock trading.
Slippage: set to 0 in code for clarity of “pure logic” backtesting. Real-life trading will experience slippage, so users should adjust this according to their market and broker.
Always re-run the backtest after changing any of these values, and avoid using high risk fractions (5–10%+) as that is rarely sustainable.
1. Full Fractal Wave Engine
The script builds and maintains four pivot streams using ATR-adaptive fractals:
Primary Degree (Macro Trend):
Captures the large swings that define the major trend. Labels ①–⑤ and ⒶⒷⒸ using blue “Circle” labels and thicker lines.
Intermediate Degree (Trading Degree):
Captures the medium swings (swing-trading horizon). Uses teal labels ( (1)…(5), (A)(B)(C) ).
Minor Degree (Micro Structure):
Tracks short-term swings inside the larger waves. Uses red roman numerals (i…v, a b c).
ABC Corrections (Optional):
When enabled, the engine tries to detect standard A–B–C corrective structures that follow a completed 5-wave impulse and plots them with dashed lines.
Each degree uses a dynamic pivot lookback that expands when ATR is above its EMA, so the system naturally requires “stronger” pivots in volatile environments and reacts faster in quiet conditions.
2. Theory Rules & Strict Mode
Normal Mode: More permissive detection. Designed to show more wave structures for educational / exploratory use.
Strict Mode: Enforces key Elliott constraints:
Wave 3 not shorter than waves 1 and 5.
No invalid W4 overlap with W1 (for standard impulses).
ABC Logic: After a confirmed bullish impulse, the script expects a down-up-down corrective pattern (A,B,C). After a bearish impulse, it looks for up-down-up.
3. Trend Filter & Pivots
EMA Trend Filter: A configurable EMA (default 200) is used as a non-wave trend filter.
Price above EMA → Only long setups are considered.
Price below EMA → Only short setups are considered.
ATR-Adaptive Pivots: The pivot engine scales its left/right bars based on current ATR vs ATR EMA, making waves and trading pivots more robust in volatile regimes.
4. Dynamic Risk Management (Guaranteed R/R Engine)
The trading engine is designed around risk, not just pattern recognition:
ATR-Based Stop:
Stop-loss is placed at:
Entry ± ATR × Multiplier (user-configurable, default 2.0).
This anchors risk to current volatility.
Minimum Reward:Risk Ratio:
For each setup, the script:
Computes the distance from entry to stop (risk).
Projects a take-profit target at risk × min_rr_ratio away from entry.
Only accepts the setup if risk is positive and the required R:R ratio is achievable.
Result: Every order is created with both TP and SL at a predefined distance, so each trade starts with a known, minimum Reward:Risk profile by design.
“Guaranteed R/R” refers exclusively to this order placement logic (TP/SL geometry), not to win-rate or profitability.
5. Trading Logic – W3–W4–W5 Pattern
The Trading pivot stream (separate from visual wave degrees) looks for a simple but powerful pattern:
Bullish structure:
Sequence of pivots forms a higher-high / higher-low pattern.
Price is above the EMA trend filter.
A strong “W3” leg is confirmed with structure rules (optionally stricter in Strict mode).
Entry (Long – W4 Pullback):
The “height” of W3 is measured.
Entry is placed at a configurable Fibonacci pullback (default 50%) inside that leg.
ATR-based stop is placed below entry.
Take-profit is projected to satisfy min Reward:Risk.
Bearish structure:
Mirrored logic (lower highs/lows, price below EMA, W3 down, W4 retrace up, W5 continuation down).
Once a valid setup is found, the script draws a colored box around the entry zone and a label describing the type of signal (“LONG SETUP” or “SHORT SETUP”) with the suggested limit price.
6. Orders & Execution
Entry Orders: The strategy uses limit orders at the computed W4 level (“Sniper Long” or “Sniper Short”).
Exits: A single strategy.exit() is attached to each entry with:
Take-profit at the projected minimum R:R target.
Stop-loss at ATR-based level.
One Trade at a Time: New setups are only used when there is no open position (strategy.opentrades == 0) to keep the logic clear and risk contained.
7. Visual Guide on the Chart
Wave Labels:
Primary: ①,②,③,④,⑤, ⒶⒷⒸ
Intermediate: (1)…(5), (A)(B)(C)
Minor: i…v, a b c
Trend EMA: Single blue EMA showing the dominant trend.
Setup Boxes:
Green transparent box → long entry zone.
Red transparent box → short entry zone.
Labels: “LONG SETUP / SHORT SETUP” labels mark the proposed limit entry with price.
8. How to Use This Strategy
Attach the strategy to your chart
Choose your market (stocks, indices, FX, crypto, futures, etc.) and timeframe (for example 1h, 4h, or Daily). Then add the strategy to the chart from your Scripts list.
Start with the default settings
Leave all inputs on their defaults first. This lets you see the “intended” behaviour and the exact properties used for the published backtest (account size, 1% risk, commission, etc.).
Study the wave map
Zoom in and out and look at the three wave degrees:
Blue circles → Primary degree (big picture trend).
Teal (1)…(5) → Intermediate degree (swing structure).
Red i…v → Minor degree (micro waves).
Use this to understand how the engine is interpreting the Elliott structure on your symbol.
Watch for valid setups
Look for the coloured boxes and labels:
Green box + “LONG SETUP” label → potential W4 pullback long in an uptrend.
Red box + “SHORT SETUP” label → potential W4 pullback short in a downtrend.
Only trades in the direction of the EMA trend filter are allowed by the strategy.
Check the Reward:Risk of each idea
For each setup, inspect:
Limit entry price.
ATR-based stop level.
Projected take-profit level.
Make sure the minimum Reward:Risk ratio matches your own rules before you consider trading it.
Backtest and evaluate
Open the Strategy Tester:
Verify you have a decent sample size (ideally 100+ trades).
Check drawdowns, average trade, win-rate and R:R distribution.
Change markets and timeframes to see where the logic behaves best.
Adapt to your own risk profile
If you plan to use it live:
Set Initial Capital to your real account size.
Adjust default_qty_value to a risk level you are comfortable with (often 0.5–2% per trade).
Set commission and slippage to realistic broker values.
Re-run the backtest after every major change.
Use as a framework, not a signal machine
Treat this as a structured Elliott/R:R framework:
Filter signals by higher-timeframe trend, major S/R, volume, or fundamentals.
Optionally hide some wave degrees or ABC labels if you want a cleaner chart.
Combine the system’s structure with your own trade management and discretion.
Best Practices & Limitations
This is an approximate Elliott Wave engine based on fractal pivots. It does not replace a full discretionary Elliott analysis.
All wave counts are algorithmic and can differ from a manual analyst’s interpretation.
Like any backtest, results depend heavily on:
Symbol and timeframe.
Sample size (more trades are better).
Realistic commission/slippage settings.
The 0-slippage default is chosen only to show the “raw logic”. In real markets, slippage can significantly impact performance.
No strategy wins all the time. Losing streaks and drawdowns will still occur even with a strict R:R framework.
Disclaimer
This script is for educational and research purposes only and does not constitute financial advice or a recommendation to buy or sell any security. Past performance, whether real or simulated, is not indicative of future results. Always test on multiple symbols/timeframes, use conservative risk, and consult your financial advisor before trading live capital.
Multi-Distribution Volume Profile (Zeiierman)█ Overview
Multi-Distribution Volume Profile (Zeiierman) is a flexible, structure-first volume profile tool that lets you reshape how volume is distributed across price, from classic uniform profiles to advanced statistical curves like Gaussian, Lognormal, Student-t, and more.
Instead of forcing every market into a single "one-size-fits-all" profile, this tool lets you model how volume is likely concentrated inside each bar (body vs wicks, midpoint, tails, center bias, right-skew, heavy tails, etc.) and then stacks that behavior across a whole lookback window to build a rich, multi-distribution map of traded activity.
On top of that, it overlays a dynamic Center Band (value area) and a fade/gradient model that can color each price row by volume, hits, recency, volatility, reversals, or even liquidity voids, turning a plain profile into a multi-dimensional context map.
Highlights
Choose from multiple Profile Build Modes , including uniform, body-only, wick-only, midpoint/close/open, center-weighted, and a suite of probability-style distributions (Gaussian, Lognormal, Weibull, Student-t, etc.)
Flexible anchor layout: draw the profile on Right/Left (horizontal) or Bottom/Top (vertical) to fit any chart layout
Value Area / Center Band computed from volume quantiles around the POC.
Gradient-based Fade Metrics: volume, price hits, freshness (time decay), volatility impact, dwell time, reversal density, compression, and liquidity voids
Separate bullish vs bearish volume at each price row for directional structure insights
█ How It Works
⚪ Profile Construction
The script scans a user-defined Bars Included window and finds the full high–low span of that zone. It then divides this range into a user-controlled number of Price Levels (rows).
For each historical bar within the window:
It measures the candle’s price range, body, and wicks.
It assigns volume to rows according to the selected Profile Build Mode, for example:
* Range Uniform – volume spread evenly across the full high–low range.
* Range Body Only / Range Wick Only – concentrate volume inside the body or wicks only.
* Midpoint / Close / Open Only – allocate volume entirely into one price row (pinpoint modeling).
HL2 / Body Center Weighted – center weights around the middle of the range/body.
Recent-Weighted Volume – amplify newer bars using exponential time decay.
Volume Squared (Hard) – aggressively boost bars with large volume.
Up Bars Only / Down Bars Only – filter volume to only bullish or bearish bars.
For more advanced shapes, the script uses continuous distributions across the bar’s span:
Linear, Triangular, Exponential to High
Cosine Centered, PERT
Gaussian, Lognormal, Cauchy, Laplace
Pareto, Weibull, Logistic, Gumbel
Gamma, Beta, Chi-Square, Student-t, F-Shape
Each distribution produces a weight for each row within the bar’s range, normalized so the total volume remains consistent, but the shape of where that volume lands changes.
⚪ POC & Center Band (Value Area)
Once all rows are accumulated:
The row with the highest total volume becomes the Point of Control (POC)
The script computes cumulative volume and finds the band that wraps a user-defined Center of Profile % (e.g., 68%) around the center of distribution.
This range is displayed as a central band, often treated like a value area where price has spent the most “effort” trading.
⚪ Gradient Fade Engine
Each row also gets a fade metric, chosen in Fade Metric:
Volume – opacity based on relative volume.
Price Hits – how frequently that row was touched.
Blended (Vol+Hits) – average of volume & hits.
Freshness – emphasizes recent activity, controlled by Decay.
Volatility Impact – rows that saw larger ranges contribute more.
Dwell Time – where price “camped” the longest.
Reversal Density – where direction changes cluster.
Compression – tight-range compression zones.
Liquidity Void – inverse of volume (thin liquidity zones).
When Apply Gradient is enabled, the row’s bullish/bearish colors are tinted from faint to strong based on this chosen metric, effectively turning the profile into a heatmap of your chosen structural property.
█ How to Use
⚪ Explore Different Distribution Assumptions
Switch between multiple Profile Build Modes to see how your assumptions about intrabar volume affect structure:
Use Range Uniform for classical profile reading.
Deploy Gaussian, Logistic, or Cosine shapes to emphasize central clustering.
Try Pareto, Lognormal, or F-Shape to focus on tail / extremal activity.
Use Recent-Weighted Volume to prioritize the most recent structural behavior.
This is especially useful for traders who want to test how different modeling assumptions change perceived value areas and levels of interest.
⚪ Identify Value, Acceptance & Rejection Zones
Use the POC and Center of Profile (%) band to distinguish:
High-acceptance zones – wide central band, thick rows, strong gradient → fair value areas
Rejection zones & tails – thin extremes, low dwell time, high volatility or reversal density
These regions can be used as:
Targets and origin zones for mean reversion
Context for breakout validation (leaving value)
Bias reference for intraday rotations or swing rotations
⚪ Read Directional Structure Within the Profile
Because each row is split into bullish vs bearish contributions, you can visually read:
Where buyers dominated a price region (large bullish slice)
Where sellers absorbed or defended (large bearish slice)
Combining this with Fade Metrics like Reversal Density, Dwell Time, or Freshness turns the profile into a structural order-flow map, without needing raw tick-by-tick volume data.
⚪ Use Fade Metrics for Contextual Heatmaps
Each Fade Metric can be used for a different analytical lens:
Volume / Blended – emphasize where volume and activity are concentrated.
Freshness – highlight the most recently active zones that still matter.
Volatility Impact & Compression – spot areas of explosive moves vs coiled ranges.
Reversal Density – locate micro turning points and battle zones.
Liquidity Void – visually pop out thin regions that may act as speedways or magnets.
█ Settings
Profile Build Mode – Selects how each bar’s volume is distributed across its price range (uniform, body/wick, midpoint/close/open, center-weighted, or statistical distribution families).
Bars Included – Number of bars used to build the profile from the current bar backward.
Price Levels – Vertical resolution of the profile: more levels = smoother but heavier.
Anchor Side – Where the profile is drawn on the chart: Right, Left, Bottom, or Top.
Offset (bars) – Horizontal offset from the last bar to the profile when using Right/Left modes.
Apply Gradient – Toggles the fade/heatmap coloring based on the selected metric.
Fade Metric – Chooses the property driving row opacity (Volume, Hits, Freshness, Volatility Impact, Dwell Time, Reversal Density, Compression, Liquidity Void).
Decay – Time-decay factor for Freshness (values close to 1 keep older activity relevant for longer).
Profile Thickness – Relative thickness of the profile along the time axis, as a % of the lookback window.
Center of Profile (%) – Volume percentage used to define the central band (value area) around the POC.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
IDLP – Intraday Daily Levels Pro [FXSMARTLAB]🔥 IDLP – Intraday Daily Levels Pro
IDLP – Intraday Daily Levels Pro is a precision toolkit for intraday traders who rely on objective daily structure instead of repainting indicators and noisy signals.
Every level plotted by IDLP is derived from one simple rule:
Today’s trading decisions must be based on completed market data only.
That means:
✅ No use of the current day’s unfinished data for levels
✅ No lookahead
✅ No hidden repaint behavior
IDLP reconstructs the previous trading day from the intraday chart and then projects that structure forward onto the current session, giving you a stable, institutional-style intraday map.
🧱 1. Previous Daily Levels (Core Structure)
IDLP extracts and displays the full previous daily structure, which you can toggle on/off individually via the inputs:
Previous Daily High (PDH)
Previous Daily Low (PDL)
Previous Daily Open
Previous Daily Close,
Previous Daily Mid (50% of the range)
Previous Daily Q1 (25% of the range)
Previous Daily Q3 (75% of the range)
All of these come from the day that just closed and are then locked for the entire current session.
What these levels tell you:
PDH / PDL – true extremes of yesterday’s price action (liquidity zones, breakout/reversal points).
Previous Daily Open / Close – how the market positioned itself between session start and end
Mid (50%) – equilibrium level of the previous day’s auction.
Q1 / Q3 (25% / 75%) internal structure of the previous day’s range, dividing it into four equal zones and helping you see if price is trading in the lower, middle, or upper quarter of yesterday’s range.
All these levels are non-repaint: once the day is completed, they are fixed and never change when you scroll, replay, or backtest.
🎯 2. Previous Day Pivot System (P, S1, S2, R1, R2)
IDLP includes a classic floor-trader pivot grid, but critically:
It is calculated only from the previous day’s high, low, and close.
So for the current session, the following are fixed:
Pivot P – central reference level of the previous day.
Support 1 (S1) and Support 2 (S2)
Resistance 1 (R1) and Resistance 2 (R2)
These levels are widely used by institutional desks and algos to structure:
mean-reversion plays, breakout zones, intraday targets, and risk placement.
Everything in this section is non-repaint because it only uses the previous day’s fully closed OHLC.
📏 3. 1-Day ADR Bands Around Previous Daily Open
Instead of a multi-day ADR, IDLP uses a pure 1-Day ADR logic:
ADR = Range of the previous day
ADR = PDH − PDL
From that, IDLP builds two clean bands centered around the previous daily Open:
ADR Upper Band = Previous Day Open + (ADR × Multiplier)
ADR Lower Band = Previous Day Open − (ADR × Multiplier)
The multiplier is user-controlled in the inputs:
ADR Multiplier (default: 0.8)
This lets you choose how “tight” or “wide” you want the ADR envelope to be around the previous day’s open.
Typical use cases:
Identify realistic intraday extension targets, Spot exhaustion moves beyond ADR bands, Frame reversals after reaching volatility extremes, Align trades with or against volatility expansion
Again, since ADR is calculated only from the completed previous day, these bands are totally non-repaint during the current session.
🔒 4. True Non-Repaint Architecture
The internal logic of IDLP is built to guarantee non-repaint behavior:
It reconstructs each day using time("D") and tracks:
dayOpen, dayHigh, dayLow, dayClose for the current day
prevDayOpen, prevDayHigh, prevDayLow, prevDayClose for the previous day
At the moment a new day starts:
The “current day” gets “frozen” into prevDay*
These prevDay* values then drive: Previous Daily Levels, Pivots, ADR.
During the current day:
All these “previous day” values stay fixed, no matter what happens.
They do not move in real time, they do not shift in replay.
This means:
What you see in the past is exactly what you would have seen live.
No fake backtests.
No illusion of perfection from repainting behavior.
🎯 5. Designed For Intraday Traders
IDLP – Intraday Daily Levels Pro is made for:
- Day traders and scalpers
- Index and FX traders
- Prop firm challenge trading
- Traders using ICT/SMC-style levels, liquidity, and range logic
- Anyone who wants a clean, institutional-style daily framework without noise
You get:
Previous Day OHLC
Mid / Q1 / Q3 of the previous range
Previous-Day Pivots (P, S1, S2, R1, R2)
1-Day ADR Bands around Previous Day Open
All calculated only from closed data, updated once per day, and then locked.
gelizon ema pack (9 EMA, 21 EMA, 55 EMA, 200 SMA)This indicator plots a set of commonly used moving averages designed for trend identification, momentum confirmation, and multi-timeframe alignment. It includes three exponential moving averages (9, 21, 55) and one long-term simple moving average (200). These moving averages help traders quickly assess short-term momentum, medium-term trend structure, and overall market direction.
Included Moving Averages:
9 EMA – Fast momentum guide; useful for scalping and intraday trend continuation.
21 EMA – Medium-speed EMA that helps identify short-term trend structure.
55 EMA – Smoother trend line offering a broader view of momentum flow.
200 SMA – Widely used long-term trend benchmark for overall market bias.
Features:
Toggle each moving average on or off
Customize colors for all MAs
Clean overlay design for easy chart interpretation
This indicator is ideal for day traders, swing traders, and algorithmic setups that rely on moving-average alignment or crossover behavior to confirm trend direction and identify high-probability entries.






















