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.
Wyszukaj w skryptach "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
Volume Cluster Profile [VCP] (Zeiierman)█ Overview
Volume Cluster Profile (Zeiierman) is a volume profile tool that builds cluster-enhanced volume-by-price maps for both the current market window and prior swing segments.
Instead of treating the profile as a raw histogram only, VCP detects the dominant volume peaks (clusters) inside the profile, then uses a Gaussian spread model to “radiate” those peaks into surrounding price bins. This produces a smoother, more context-aware profile that highlights where volume is most meaningfully concentrated, not just where it happened to print.
On top of the live profile, VCP automatically records historical swing profiles between pivots, wraps each segment for clarity, and can project the most recent segment’s High/Low Value extensions (VA/LV) forward to the current bar to keep key structure visible as price evolves.
█ How It Works
⚪ 1) Profile Construction (Volume-by-Price)
VCP builds a volume profile histogram over a chosen window (current lookback, or a swing segment):
Range Scan
The script finds the full min → max price range inside the window.
Bin the Range
That range is divided into a user-defined number of Price Bins (rows). More bins = finer detail, but heavier computation.
Accumulate Volume into Bins
For each bar inside the window, the script takes the bar’s close price, determines which price bin it belongs to, and adds the bar’s volume to that bin.
float step = (maxPrice - minPrice) / binsCount
for i = 0 to barsToUse - 1
int b = f_clamp(int(math.floor((close - minPrice) / step)), 0, binsCount - 1)
volBins += volume
Result: volBins becomes a standard volume-by-price histogram (close-based binning).
⚪ 2) Cluster Detection (Finding Dominant Peaks)
Once the raw histogram is built, VCP identifies cluster centers as the most meaningful volume “hills”:
Local Peak Test
A bin becomes a cluster candidate if its volume is greater than or equal to its immediate neighbors (left/right).
Filter Weak Peaks
Peaks must also be above a basic activity threshold (relative to the average bin volume) to avoid noise.
bool isPeak = v >= left and v >= right
if isPeak and v > avgVol
array.push(clusterIdxs, b)
Keep the Best Peaks Only
If too many peaks exist, the script keeps only the strongest ones, capped by: Max Cluster Centers
Result: clusterIdxs = the set of dominant profile peaks (cluster centers).
⚪ 3) Cluster Enhancement (Gaussian Spread Model)
This is what makes VCP different from a raw profile.
Instead of using volBins directly, the script builds an enhanced profile where each cluster center influences nearby price bins using a Gaussian curve:
Distance from each bin to each cluster center is computed in “bin units”
A Gaussian weight is applied so that bins near the center receive stronger influence, while bins farther away decay smoothly.
Cluster Spread (sigma) controls how wide this influence reaches: low sigma produces tight, sharp clusters, while high sigma results in wider, smoother structure zones.
enhanced += centerV * math.exp(-(dist*dist) / (2.0 * clusterSigma * clusterSigma))
volBinsAI := enhanced / szClFinal
Result: volBinsAI = the cluster-enhanced volume value for each bin.
In practice, VCP turns the profile into a structure map of dominant volume concentrations, rather than a simple “where volume printed” histogram.
⚪ 4) POC from the Enhanced Profile
After enhancement:
The bin with the highest volBinsAI becomes the POC (Point of Control)
POC is plotted at the midpoint price of that bin
if volBinsAI > maxVol
maxVol := volBinsAI , pocBin := b
So the POC reflects the cluster-enhanced profile rather than the raw histogram.
█ How to Use
⚪ Read Cluster Structure (Default = 2 Clusters)
By default, the Volume Cluster Profile (VCP) is configured to detect up to 2 dominant volume clusters within the profile. These clusters represent price zones where the market accepted trading activity, not just where volume printed randomly.
⚪ When TWO Clusters Appear
When VCP detects two distinct clusters, it usually indicates:
Two competing areas of value
Ongoing auction between higher and lower acceptance zones
Treat each cluster as an acceptance zone
Expect slower price action and rotation inside clusters
Expect faster movement in the low-volume space between clusters
Use cluster-to-cluster movement as:
rotation targets
range boundaries
acceptance vs rejection tests
Typical behavior:
Price enters a cluster → stalls, consolidates, rotates
Price rejects at cluster edge → moves toward the opposite cluster
⚪ When ONLY ONE Cluster Appears
If VCP detects only one cluster, or if two clusters visually merge into one:
Volume is no longer split
The market has formed a single dominant value area
Price consensus is strong
Treat the cluster as the primary value anchor
Expect pullbacks and reactions around this zone
Bias becomes directional:
Above the cluster → bullish context
Below the cluster → bearish context
Inside the cluster → balance/chop
This structure often appears during clean trends or stable equilibria.
⚪ VA/LV Extensions
VCP projects two zones from the end of the most recent swing segment:
VA extension = the segment’s highest enhanced-volume bin (dominant zone)
LV extension = the segment’s lowest enhanced-volume bin (thin/weak zone)
A breakout of the VA extension signals acceptance and potential continuation. A retest of the VA or LV extension is used to confirm acceptance or rejection, while rejection from either zone often leads to rotation back toward value.
█ Settings
Cluster Volume Profile
Lookback Bars – how many recent bars build the current profile
Price Bins – profile resolution (more bins = more detail, heavier CPU)
Cluster Spread – Gaussian sigma; higher values widen/smooth cluster influence
Max Cluster Centers – cap on detected peaks used in enhancement
Historical Swing Cluster Volume Profile
Pivot Length – swing sensitivity (larger = fewer, broader segments)
Max Profiles – how many historical segments to retain
Profile Width – thickness of each historical profile
High & Low Value Area
Profile VA/LV – extend the last segment’s top-bin and low-bin zones forward
-----------------
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.
WoAlgo Premium v3.0
WoAlgo Premium v3.0 - Smart Money Analysis
Overview
** WoAlgo Premium v3.0 ** is an advanced technical analysis indicator designed for educational purposes. This tool combines Smart Money Concepts with multi-factor confluence analysis to help traders identify potential market opportunities across multiple timeframes.
The indicator integrates market structure analysis, order flow concepts, and technical momentum indicators into a comprehensive dashboard system. It is designed to assist traders in understanding institutional trading patterns and market dynamics through visual analysis tools.
### What It Does
This indicator provides:
**1. Smart Money Concepts Analysis**
- Market structure identification (Break of Structure and Change of Character patterns)
- Order block detection with volume confirmation
- Fair value gap recognition
- Liquidity zone mapping (equal highs and lows)
- Premium and discount zone calculations
**2. Multi-Factor Confluence Scoring**
The indicator calculates a proprietary confluence score (0-100) based on five key components:
- Price action analysis (30% weight)
- Volume confirmation (20% weight)
- Momentum indicators (25% weight)
- Trend strength measurement (15% weight)
- Money flow analysis (10% weight)
**3. Multi-Timeframe Analysis**
- Scans 5 different timeframes (5M, 15M, 1H, 4H, Daily)
- Calculates alignment percentage across timeframes
- Displays trend and structure status for each period
**4. Visual Dashboard System**
- Comprehensive main dashboard with 13 metrics
- Real-time screener table with 10 data columns
- Multi-timeframe scanner
- Performance tracking panel
### How It Works
**Market Structure Detection**
The indicator identifies key structural changes in price action:
- **BOS (Break of Structure)**: Indicates trend continuation when price breaks previous swing points
- **CHoCH (Change of Character)**: Signals potential trend reversal when market structure shifts
**Order Block Identification**
Order blocks are detected when:
- Significant volume appears at swing points
- Price shows strong directional movement from these levels
- Enhanced detection with extreme volume confirmation (OB++ markers)
**Fair Value Gap Recognition**
Gaps between candles are identified when:
- Price leaves inefficiencies in the market
- Three consecutive candles create a gap pattern
- Gap size exceeds minimum threshold based on ATR
**Confluence Calculation**
The system evaluates multiple technical factors:
1. **Price Position**: Relative to moving averages (EMA 20, 50, 200)
2. **Volume Analysis**: Standard deviation-based volume spikes
3. **Momentum**: RSI, MACD, Stochastic indicators
4. **Trend Strength**: ADX measurements
5. **Money Flow**: MFI indicator readings
Each factor contributes weighted points to create an overall confluence score that helps assess signal strength.
### Signal Types
**Confirmation Signals (▲ / ▼)**
Generated when:
- EMA crossovers occur (20/50 cross)
- Volume confirmation is present
- RSI is in appropriate zone
- Confluence score exceeds 50%
**Strong Signals (▲+ / ▼+)**
Higher-confidence signals requiring:
- Confluence score above 70%
- Extreme volume confirmation
- Alignment with 200 EMA trend
- MACD confirmation
- Bullish or bearish market structure
**Contrarian Signals (⚡)**
Reversal indicators appearing when:
- RSI reaches extreme levels (<30 or >70)
- Stochastic shows oversold/overbought conditions
- Price touches Bollinger Band extremes
- Potential divergence patterns emerge
**Reversal Zones**
Visual boxes highlighting areas where:
- Market structure conflicts with momentum
- High probability of directional change
- Key support/resistance levels interact
**Smart Trail**
Dynamic stop-loss indicator that:
- Adjusts based on ATR (Average True Range)
- Follows trend direction
- Updates automatically as price moves
- Provides risk management reference points
### Dashboard Components
**Main Dashboard (13 Metrics)**
1. **Confluence Score**: Current bull/bear percentage (0-100)
2. **Market Regime**: Trend classification (Strong Up/Down, Range, Squeeze)
3. **Signal Status**: Active buy/sell signal indication
4. **Structure State**: Current market structure (Bullish/Bearish/Neutral)
5. **Trend Strength**: ADX-based measurement
6. **RSI Level**: Momentum indicator with overbought/oversold zones
7. **MACD Direction**: Trend momentum confirmation
8. **Money Flow Index**: Smart money sentiment
9. **Volume Status**: Current volume relative to average
10. **Volatility Rating**: ATR percentage measurement
11. **ATR Value**: Average true range for position sizing
12. **MTF Alignment**: Multi-timeframe agreement percentage
**Screener Table (10 Columns)**
- Current symbol and timeframe
- Real-time price and percentage change
- Quality rating (star system)
- Active signal type
- Smart trail status
- Market structure state
- MACD direction
- Trend strength percentage
- Bollinger Band squeeze detection
**MTF Scanner (5 Timeframes)**
Displays for each timeframe:
- Trend direction indicator
- Market structure classification
- Visual confirmation with color coding
**Performance Metrics**
- Win rate percentage (simplified calculation)
- Total signals generated
- Current confluence score
- MTF alignment status
- Volatility level
### Settings and Customization
**Preset Styles**
Choose from predefined configurations:
- **Conservative**: Fewer, higher-quality signals
- **Moderate**: Balanced approach (recommended)
- **Aggressive**: More frequent signals
- **Scalper**: Short-term focused
- **Swing**: Longer-term oriented
- **Custom**: Full manual control
**Smart Money Concepts Controls**
- Toggle each feature independently
- Adjust swing length (3-50 periods)
- Enable/disable internal structure
- Control order block display
- Manage breaker block visibility
- Show/hide fair value gaps
- Display liquidity zones
- Premium/discount zone visualization
**Signal Configuration**
- Enable/disable confirmation signals
- Toggle strong signal markers
- Control contrarian signal display
- Show/hide reversal zones
- Smart trail activation
- Sensitivity adjustment (5-50)
**Visual Customization**
- Moving average display options
- MA period adjustments (Fast: 20, Slow: 50, Trend: 200)
- Support/resistance line toggle
- Dynamic S/R lookback period
- Candle coloring based on trend
- Color scheme customization
- Dashboard size options (Small/Normal/Large)
- Position placement (4 corners)
### How to Use
**Step 1: Initial Setup**
1. Add indicator to chart
2. Select appropriate preset or use Custom
3. Adjust timeframe to match trading style
4. Configure dashboard visibility preferences
**Step 2: Analysis Workflow**
1. Check MTF Scanner for timeframe alignment
2. Review Main Dashboard confluence score
3. Observe Market Regime classification
4. Identify active signals on chart
5. Confirm with Smart Money Concepts (order blocks, FVG, structure)
**Step 3: Trade Consideration**
Strong signals (▲+ / ▼+) require:
- Confluence score >70%
- MTF alignment >60%
- Confirmation from multiple dashboard metrics
- Support from Smart Money Concepts
- Appropriate volume levels
**Step 4: Risk Management**
- Use Smart Trail as dynamic stop-loss reference
- Consider ATR for position sizing
- Monitor volatility rating
- Respect support/resistance levels
- Combine with personal risk parameters
### Best Practices
**For Scalping (1M-5M timeframes)**
- Use Scalper preset
- Reduce swing length to 5-7
- Focus on strong signals only
- Monitor MTF alignment closely
- Quick entries near order blocks
**For Intraday Trading (15M-1H timeframes)**
- Use Moderate preset (recommended)
- Default swing length (10)
- Combine confirmation and strong signals
- Check MTF scanner before entry
- Use fair value gaps for entries
**For Swing Trading (4H-D timeframes)**
- Use Swing preset
- Increase swing length to 15-20
- Focus on strong signals
- Require high MTF alignment
- Patient approach with major structure levels
### Technical Specifications
**Indicators Used**
- Exponential Moving Averages (20, 50, 200)
- Hull Moving Average
- Relative Strength Index (14)
- MACD (12, 26, 9)
- Money Flow Index (14)
- Stochastic Oscillator (14, 3)
- ADX / DMI (14)
- Bollinger Bands (20, 2)
- ATR (14)
- Volume Analysis (SMA 20 with standard deviation)
**Calculation Methods**
- Swing detection using pivot high/low functions
- Volume confirmation via statistical analysis
- Multi-factor scoring with weighted components
- Dynamic support/resistance using highest/lowest functions
- Real-time MTF data via security() function
### Limitations and Considerations
**Important Notes**
1. This indicator is designed for educational and analytical purposes only
2. Historical performance does not guarantee future results
3. Signals should be confirmed with additional analysis
4. Market conditions vary and affect indicator performance
5. Not all signals will be profitable
6. Risk management is essential for all trading
**Known Limitations**
- Confluence scoring is algorithmic and not predictive
- MTF analysis requires sufficient historical data
- Effectiveness varies across different market conditions
- Sideways markets may produce conflicting signals
- High volatility can affect signal reliability
- Backtesting results shown are simplified calculations
**Not Suitable For**
- Automated trading without human oversight
- Sole basis for trading decisions
- Guaranteed profit expectations
- Inexperienced traders without proper education
- Trading without risk management plans
### Market Applicability
**Effective On**
- Trending markets (any direction)
- Clear structure formation periods
- Liquid instruments with consistent volume
- Multiple asset classes (forex, stocks, crypto, commodities)
- Various timeframes with appropriate settings
**Less Effective During**
- Extended ranging/choppy conditions
- Extremely low volume periods
- Major news events causing gaps
- Early market open with high spread
- Illiquid instruments with erratic price action
### Risk Disclaimer
**⚠️ IMPORTANT NOTICE**
This indicator is provided for **educational and informational purposes only**. It does not constitute financial advice, investment recommendations, or trading signals.
**Key Risk Factors:**
- Trading financial instruments involves substantial risk of loss
- Past performance does not indicate future results
- No indicator can predict market movements with certainty
- Users should conduct independent research and analysis
- Professional financial advice should be sought when appropriate
- Risk management and position sizing are critical to successful trading
- Users are solely responsible for their trading decisions
**Responsible Usage:**
- Combine with comprehensive market analysis
- Use appropriate stop-loss orders
- Never risk more than you can afford to lose
- Maintain realistic expectations
- Continue education on technical analysis principles
- Test thoroughly on demo accounts before live trading
- Understand all indicator features before using
### Educational Resources
**Understanding Smart Money Concepts**
Smart Money Concepts analyze how institutional traders and large market participants operate. Key principles include:
- Institutional order flow patterns
- Market structure changes
- Liquidity manipulation
- Supply and demand imbalances
- Order block formations
**Multi-Timeframe Analysis Theory**
Analyzing multiple timeframes helps:
- Identify overall market direction
- Improve entry timing
- Confirm trend strength
- Recognize consolidation periods
- Reduce conflicting signals
**Confluence Trading Approach**
Using multiple confirming factors:
- Increases signal reliability
- Reduces false signals
- Provides conviction for trades
- Helps with position sizing
- Improves risk-reward ratios
### Version History
**v3.0 (Current)**
- Multi-factor confluence scoring system
- Complete Smart Money Concepts implementation
- Real-time multi-timeframe analysis
- Four professional dashboard panels
- Enhanced order block detection
- Breaker block identification
- Premium/discount zone calculations
- Smart trail stop-loss system
- Customizable preset configurations
- Performance tracking metrics
**Development Philosophy**
This indicator was developed with focus on:
- Educational value for traders
- Transparent methodology
- Comprehensive feature set
- User-friendly interface
- Flexible customization options
### Technical Support
**For Questions About:**
- Indicator functionality
- Parameter optimization
- Signal interpretation
- Dashboard metrics
- Best practice recommendations
Please use TradingView's comment section below. The developer monitors comments and provides assistance to users learning to use the indicator effectively.
### Acknowledgments
This indicator implements concepts from:
- Smart Money Concepts trading methodology
- Multi-timeframe analysis techniques
- Technical indicator theory
- Market structure analysis principles
- Institutional order flow concepts
All implementations are original code and calculations based on established technical analysis principles.
---
## ADDITIONAL INFORMATION SECTION
**Category**: Indicators
**Type**: Market Structure / Multi-Timeframe Analysis
**Complexity**: Intermediate to Advanced
**Open Source**: Code visible for transparency and education
**Pine Script Version**: v6
**Chart Overlay**: Yes
**Maximum Objects**: 500 boxes, 500 lines, 500 labels
AlphaStrike: Zen ModeDescription:
1. The Philosophy: Reducing Cognitive Load Modern charts are often cluttered with dozens of noisy lines (Bollinger Bands, Moving Averages, Oscillators) that lead to "Analysis Paralysis." This script is designed with a "Zen" philosophy: P rocess the complexity in the background, but display only the decision.
This is not a simple indicator overlay. It is a Risk-Based Trading Engine that runs multiple validation checks (Momentum, Volatility, and Price Action) simultaneously but hides the underlying calculations to keep the chart clean. It focuses the trader's attention on the two things that matter most: Trend Direction and Position Sizing.
2. The "Invisible" Technical Engine The script operates on a Dual-State Logic system that adapts to market conditions. It uses standard indicators as filters, not just visuals.
A. Trend State (The Backbone) The script calculates a volatility-adjusted Trend Baseline (SuperTrend).
Green State: The market is in a markup phase. The script looks for continuation.
Red State: The market is in a markdown phase. The script looks for defense.
B. The "Confluence" Reversal Logic Instead of cluttering the screen with Bollinger Bands and RSI windows, the script performs these checks internally:
Condition 1 (Volatility): Is price extending beyond the 2.0 Standard Deviation (Bollinger Lower/Upper)?
Condition 2 (Momentum): Is RSI overextended (<35 or >65)?
Condition 3 (Price Action): Is there a specific Pin Bar candle pattern (Long wick rejection)?
Result: Only when all three conditions align does the script print a "Reversal Circle." This filters out weak signals that usually occur in strong trends.
3. The Risk Management Calculator (Key Feature) Most traders fail not because of bad entries, but because of inconsistent sizing. This script features a built-in Dynamic Position Sizing Dashboard located in the bottom right.
Adaptive Stop Loss:
In a Trend: The Stop Loss is automatically set to the Trend Line (SuperTrend).
In a Reversal: The script internally scans for the nearest Swing Low/High (using hidden Pivot calculations) and sets the Stop Loss there.
Position Sizing Math: The dashboard reads your Account Size and Risk % inputs. It instantly calculates the "Max Size" (contract/share amount) allowed for the current trade.
Formula: Position Size = (Account Value * Risk %) / Distance to Stop.
Benefit: This ensures you risk the exact same dollar amount on every trade, whether the stop loss is 1% away or 10% away.
4. How to Read the Signals
Triangles (Breakouts): These represent a shift in the dominant trend direction.
Green Triangle: Bullish Trend Start.
Red Triangle: Bearish Trend Start.
Circles (Mean Reversion): These are high-probability counter-trend plays.
Blue Circle: Buy Reversal (Oversold + Pinbar + Bollinger Support).
Orange Circle: Sell Reversal (Overbought + Pinbar + Bollinger Resistance).
5. Settings
Trend Settings: Adjust the ATR Period and Factor to change the sensitivity of the trend line.
Reversal Settings: Tweak the RSI and Bollinger thresholds to filter out more/less signals.
Risk Management: Input your total Account Size and desired Risk Per Trade (e.g., 1%) to calibrate the Dashboard.
Disclaimer This tool provides algorithmic analysis and risk calculations. It does not guarantee profits or provide financial advice. Always verify position sizes before executing.
TREND FLOW CANDLES - [EntryLab]Trend Flow Candles was created for the community to clearly visualize the flow of trend on any token. It provides a simple, clean, and visually pleasing way to identify overall trend bias at a glance. Using proprietary algorithmic logic developed specifically to assist traders, the candles dynamically reflect trend strength and direction to help with higher-timeframe confluence.
This indicator has been back-tested with strong accuracy and is designed to be easy to use, quick to set up, and practical in real trading conditions. Trend Flow Candles works best as a directional bias tool, helping traders stay aligned with the dominant trend while making clearer, more confident decisions. It is a powerful addition to any indicator arsenal when you need reliable trend context without clutter.
Regards,
ENTRYLAB
Dip Buy/Sell Signals (Vix Fix + MA Deviation + TRMAD) [DotGain]Dip Buy/Sell Signals (Vix Fix + MA Deviation + TRMAD)
This indicator combines three proven market stress and mean-reversion components to identify potential buy and sell opportunities during extended market conditions.
────────────────────
📌 Included Components
1️⃣ Volatility-Based Stress Filter (Vix Fix)
Detects short-term market panic using relative price movement.
Signals are generated only during periods of elevated volatility or market stress.
2️⃣ Moving Average Deviation (MA Deviation)
Identifies overbought and oversold conditions based on the percentage deviation from a selected moving average.
Supported MA types:
• EMA
• SMA
• RMA
• VWMA
• WMA
• TEMA
3️⃣ TRMAD (True Range Mean Absolute Deviation)
Measures the distance of price from its mean relative to current volatility.
Useful for filtering extreme price moves and reducing false signals.
────────────────────
📈 Trading Signals
Buy Signal:
• Elevated market volatility
• Price significantly below the moving average
• TRMAD below the defined threshold
Sell Signal:
• Elevated market volatility
• Price significantly above the moving average
• TRMAD above the defined threshold
Signals are visualized directly on the chart:
• Buy: green label below the candle
• Sell: red label above the candle
────────────────────
⚙️ Settings & Customization
All components are fully adjustable:
• Lookback periods
• Moving average types and lengths
• Volatility and threshold levels
This makes the indicator suitable for:
• Intraday trading
• Swing trading
• Crypto, Forex, indices, and equities
────────────────────
Disclaimer
This "Dip Buy/Sell Signals (Vix Fix + MA Deviation + TRMAD)" (DipSig) indicator is provided for informational and educational purposes only. It does not, and should not be construed as, financial, investment, or trading advice.
The signals generated by this tool (both "Buy" and "Sell") are the result of a specific set of algorithmic conditions. They are not a direct recommendation to buy or sell any asset. All trading and investing in financial markets involves substantial risk of loss. You can lose all of your invested capital.
Past performance is not indicative of future results. The signals generated may produce false or losing trades. The creator (© DotGain) assumes no liability for any financial losses or damages you may incur as a result of using this indicator.
You are solely responsible for your own trading and investment decisions. Always conduct your own research (DYOR) and consider your personal risk tolerance before making any trades.
4 Bar Sequential Counter (9 to 13) [DotGain]4-Bar Sequential Counter (Seq4)
This indicator identifies potential trend exhaustion phases using a strict sequential count
based on the relationship between the current closing price and the closing price four bars earlier.
How it works
• A bullish sequence is counted as long as the current close remains below the close from 4 bars ago.
• A bearish sequence is counted as long as the current close remains above the close from 4 bars ago.
• The count resets immediately if the respective condition is no longer met.
• The sequence counts up to a maximum of 13 , after which it resets and a new sequence may begin.
Visualization
• Only counts from 9 to 13 are displayed on the chart.
• Bullish sequences are plotted below price bars.
• Bearish sequences are plotted above price bars.
• The minimalist design keeps the chart clean and focused on potentially relevant exhaustion zones.
Interpretation
• A count of 9 may indicate an early sign of market overextension.
• A count of 13 represents a more advanced sequence and a higher probability
of consolidation or corrective price action.
• This indicator is not a standalone trading system and should be used in combination
with trend analysis, volume, and support/resistance levels.
Alerts
• Bullish sequence at 9
• Bullish sequence at 13
• Bearish sequence at 9
• Bearish sequence at 13
Disclaimer
This "4-Bar Sequential Counter (9–13)" (Seq4) indicator is provided for informational and educational purposes only. It does not, and should not be construed as, financial, investment, or trading advice.
This indicator is an independent implementation of a sequential counting method and is not affiliated with, or endorsed by any trademarked trading concepts or methodologies.
The signals generated by this tool (Green and Red) are the result of a specific set of algorithmic conditions. They are not a direct recommendation to buy or sell any asset.
All trading and investing in financial markets involves a substantial risk of loss. You can lose all of your invested capital.
Past performance does not guarantee future results.
This indicator highlights sequential price exhaustion patterns and may generate false, lagging, or incomplete signals. Markets can remain unpredictable longer than you can remain solvent.
The creator DotGain assumes no liability for any financial losses or damages you may incur, directly or indirectly, as a result of using this indicator or the information it provides.
You are solely responsible for your own trading and investment decisions. Always conduct your own research (DYOR), validate signals with other methods, and consider your personal risk tolerance before entering any trade.






















