Trend System Oscillator Averages RatingThis is a trend system made with multiple oscillator averages designed especially for trending markets such as stocks or crypto.
It can be used with any timeframe.
Its made of multiple moving oscillators such as
RSI
Stochastic
ADX
CCI
AO
MACD
MOM
STOCH RSI
WPR
BP
UO
Avg of all oscillators
It has also a rating, making an avg from all of the oscillators , going from -100 (all ma's are telling to go short ) to 100 ( all ma are telling to go long).
If you have any questions let me know !
In den Scripts nach "adx" suchen
Zigzag Trend/Divergence DetectorPullbacks are always hardest part of the trade and when it happen, we struggle to make decision on whether to continue the trade and wait for recovery or cut losses. Similarly, when an instrument is trending well, it is often difficult decision to make if we want to take some profit off the table. This indicator is aimed to make these decisions easier by providing a combined opinion of sentiment based on trend and possible divergence.
⬜ Process
▶ Use any indicator to find trend bias. Here we are using simple supertrend
▶ Use any oscillator. I have added few inbuilt oscillators as option. Default used is RSI.
▶ Find divergence by using zigzag to detect pivot high/low of price and observing indicator movement difference between subsequent pivots in the same direction.
▶ Combine divregence type, divergence bias and trend bias to derive overall sentiment.
Complete details of all the possible combinations are present here along with table legend
⬜Chart Legend
C - Continuation
D - Divergence
H - Hidden Divergence
I - Indeterminate
⬜ Settings
▶ Zigzag parameters : These let you chose zigzag properties. If you check "Use confirmed pivots", then unconfirmed pivot will be ignored in the table and in the chart
▶ Oscillator parameters : Lets you select different oscillators and settings. Available oscillators involve
CCI - Commodity Channel Index
CMO - Chande Momentum Oscillator
COG - Center Of Gravity
DMI - Directional Movement Index (Only ADX is used here)
MACD - Moving average convergence divergence (Can chose either histogram or MACD line)
MFI - Money Flow Index
MOM - Momentum oscillator
ROC - Rate Of Change
RSI - Relative Strength Index
TSI - Total Strength Index
WPR - William Percent R
BB - Bollinger Percent B
KC - Keltner Channel Percent K
DC - Donchian Channel Percent D
ADC - Adoptive Donchian Channel Percent D ( Adoptive-Donchian-Channel )
▶ Trend bias : Supertrend is used for trend bias. Coloring option color candles in the direction of supertrend. More option for trend bias can be added in future.
▶ Stats : Enables you to display history in tabular format.
Overview of settings present here:
⬜ Notes
Trend detection is done only with respect to previous pivot in the same direction. Hence, if chart has too many zigzags in short period, try increasing the zigzag length or chart timeframe. Similarly, if there is a steep trend, use lower timeframe charts to dig further.
Oscillators does not always make pivots at same bar as price. Due to this some the divergence calculation may not be correct. Hence visual inspection is always recommended.
⬜ Possible future enhancements
More options for trend bias
Enhance divergence calculation. Possible options include using oscillator based zigzag as primary or using close prices based zigzag instead of high/low.
Multi level zigzag option - Can be messy to include more than one zigzag. Option can be added to chose either Level1 or Level2 zigzags.
Alerts - Alerts can only be added for confirmed pivots - otherwise it will generate too many unwanted alerts. Will think about it :)
If I get time, I will try to make a video.
DMI - VisualBasically, when the background is:
White = no defined direction
Light blue = up.
Dark blue = well defined up
Light red = down
Dark red = well defined down
Blue/red centered circle = change of direction
Red circle on top = possible short entry
Blue circle at the bottom = possible long entry
//Português
Basicamente, quando o fundo é:
Branco = sem direção definida
Azul claro = alta
Azul escuro = alta bem definida
Vermelho claro = baixa
Vermelho escuro = baixa bem definida
Círculo azul/vermelho centrado = mudança da direção
Círculo vermelho no topo = possível entrada de short
Círculo azul na parte inferior = possível entrada de long
DMI + HMA - No Risk ManagementDMI (Directional Movement Index) and HMA (Hull Moving Average)
The DMI and HMA make a great combination, The DMI will gauge the market direction, while the HMA will add confirmation to the trend strength.
What is the DMI?
The DMI is an indicator that was developed by J. Welles Wilder in 1978. The Indicator was designed to identify in which direction the price is moving. This is done by comparing previous highs and lows and drawing 2 lines.
1. A Positive movement line
2. A Negative movement line
A third line can be added, which would be known as the ADX line or Average Directional Index. This can also be used to gauge the strength in which direction the market is moving.
When the Positive movement line (DI+) is above the Negative movement line (DI-) there is more upward pressure. Ofcourse visa versa, when the DI- is above the DI+ that would indicate more downwards pressure.
Want to know more about HMA? Check out one of our other published scripts
What is this strategy doing?
We are first waiting for the DMI to cross in our favoured direction, after that, we wait for the HMA to signal the entry. Without both conditions being true, no trade will be made.
Long Entries
1. DI+ crosses above DI-
2. HMA line 1 is above HMA line 2
Short Entries
1. DI- Crosses above DI+
2. HMA line 1 is below HMA lilne 2
Its as simple as that.
Conclusion
While this strategy does have its downsides, that can be reduced by adding some risk manegment into the script. In general the trade profitability is above average, And the max drawdown is at a minimum.
The settings have been optimised to suite BTCUSDT PERP markets. Though with small adjustments it can be used on many assets!
Trend Momentum with Buyers / Sellers PowerHi there!
With this indicator, you can hunt big trends before they start.
This indicator is combined with RSI and Momentum indicators
It can show you the power of trend and which side it wants to go
It can help you to open a position at the first point of a new trend or at the safe and proven point of the trend, also it can help you to close your position before the trend change its direction (it's not recommended to use it to close your positon, but sometimes it can help you to find the ending point of big pumps)
Rules:
* Baseline is ZERO ( 0 ) line
* When gray line crossover red line, it shows us a powerful uptrend
* When the gray line crossunder the red line it shows us a powerful upward trend
Signals:
* Only use Buy signals(Long) when they are above or crossing-up baseline
* Only use Sell signals(Short) when they are under or crossing-down baseline
* If they both (red and gray lines) are too high and they suddenly starting to come back to baseline, it shows we have a range trend, the trend is weak or a reversal trend is coming!!
!! WARNING: DO NOT USE THIS INDICATOR ALONE !!
Suggestions :
-Use 1H, 4H, daily, or Weekly timeframes
-Use ADX and DI or three WMA's
-Use divergence
-You can use it for scalping but you need to change the inputs (not recommended)
If you have any idea about making new indicators(what information do you want from the chart?), comment please, then I can research and make it for all of us! =)
Vortex HeikinThis indicator use macd crossover plus vortex and heikin candle to find the best spot entry.
There a lot to improve if you want, it's only a starting point.
You can change Vortex indicator with ADX indicator to find a better spot, but there could be more false entry.
Natural Directional Index [CC]The Natural Directional Index was created by Jim Sloman and this is another indicator that I'm publishing from the collection of Ocean indicators. I want to make sure his legacy is covered by as many eyes as possible. This is his version of the directional index indicator but he uses his weighting method to use the square root of time and you can see that the signals are very smooth. Big thanks of course to @altcoinz and @tmac87 for helping me get the full source code and files for all of his work. This indicator captures the current trend and I have used my strong buy and sell signals to let you know the strength of the current trend. Darker colors are for strong signals and lighter colors are for normal ones. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish!
MTF Technical Ratings [Anan]█ OVERVIEW
This indicator is a modified version of "Technical Ratings" v5.0 available in the public library to provide a quick overview of Technical Ratings in 6 optional timeframes.
█ FEATURES
- Multi-timeframe Table.
- Display Technical Ratings for "MAs" with a percentage.
- Display Technical Ratings for "Oscillators" with a percentage.
- Display Technical Ratings for "All" with a percentage.
- Full control of displaying any row(MAs / Oscillators / All) or any column(Multi-timeframe)
- Full control of Table position and size.
- Full control of displaying any row or column.
ORIGINAL DESCRIPTION ABOUT TECHNICAL RATING v1.0
█ OVERVIEW
This indicator calculates TradingView's well-known "Strong Buy", "Buy", "Neutral", "Sell" or "Strong Sell" states using the aggregate biases of 26 different technical indicators.
█ CALCULATIONS
The indicator calculates the aggregate value of two groups of indicators: moving averages and oscillators.
The "MAs" group is comprised of 15 different components:
• Six Simple Moving Averages of periods 10, 20, 30, 50, 100 and 200
• Six Exponential Moving Averages of the same periods
• A Hull Moving Average of period 9
• A Volume-weighed Moving Average of period 20
• Ichimoku
The "Oscillators" group includes 11 components:
• RSI
• Stochastic
• CCI
• ADX
• Awesome Oscillator
• Momentum
• MACD
• Stochastic RSI
• Wiliams %R
• Bull Bear Power
• Ultimate Oscillator
The state of each group's components is evaluated to a +1/0/-1 value corresponding to its bull/neutral/bear bias. The resulting value for each of the two groups are then averaged to produce the overall value for the indicator, which oscillates between +1 and -1. The complete conditions used in the calculations are documented in the Help Center.
VIX Fix Double PleasureFULL README: github.com/samgozman/vix-fix-double-pleasure
The idea of an oscillator is quite simple. It is based on the popular VIX Fix oscillator, the purpose of which is to find local bottoms within the scope of trend movement. But in addition to the classic VIX fix, I built an oscillator opposite to it, which serves as a potential signal of the end of local growth.
Components
VIX Fix classic (red lines)
VIX Fix reversed (green lines)
Buy/sell signals (colored dots)
Parameters
VIXFix_length - defval: 22. Classic length for VIX fix
VIXFix_arraySize - defval: 22. The number of periods among which to look for lows and highs. If there are too many signals, reduce this value.
plotMarks - defval: true. Plot high/low marks
How it is calculated
VIX fix classic: (highest(close, VIXFix_length) - low) / highest(close, VIXFix_length) * -100
VIX fix reversed: (lowest(close, VIXFix_length) - high) / lowest(close, VIXFix_length) * -100
Signals
🟢 Buy signal if current "VIX fix classic" or "VIX Fix reversed" value is lowest from the last VIXFix_arraySize periods.
🔴 Sell signal if current "VIX fix classic" or "VIX Fix reversed" value is highest from the last VIXFix_arraySize periods.
General recommendations
I advise you not to use this oscillator for a short positions. Long only . It is recommended to set a long position by pyramiding.
Relative Volume & RSI PopThis is a basic idea/script designed to take a breakout trade by taking advantage of volume spikes when price/strength is extended (either long or short).
The script only utilises two indicators, the Relative Volume (RV) and the Relative Strength Index (RSI). The script allows the user to select a RSI value between 69 up to 100 for a long trade and between 35 down to 0 for short trade and then pair this with RV from 0 - 10. The period for both the RSI and RV can also be amended by the user but I found in most cases there was no benefit gained by changing away from normal "14" period lookback. The script typically only has small draw downs as the script is designed to exit the trade when the RSI returns back to "normalised" level, therefore the trades are generally quite short. The exit condition for a long trade is when RSI crosses back below 69 (which is why you cannot enter a long below this value) and for a short the, trade will close when RSI crosses back above 35 (which is why you cannot enter a short above this value). These exit values are locked.
By allowing RSI value to go all the way up to "100" on the long side and "0" on the short side this in effect is a way of eliminating the script from taking either longs or shorts if lets say you wanted to back test the script for long only spikes or short only spike. E.G. By setting RSI upper value to "75" the RV to "1" and RSI lower value to "0" then no short trades will not be taken in your back test as the RSI never really gets down to zero.
I put this together with meme stocks in mind and back tested it on day charts for AMC and then a few trending style stocks too. It typically worked best as long only and with RSI settings between 71 - 75 and RV at 1 or 1.5. I also found it had okay results on some lower 1hr timeframe futures markets and weekly time frames too (albeit trades were few and far between on weekly timeframe).
The beauty of such a basic script you could easily set up a trading view screener to look for these opportunities everyday and perhaps even add in an ADX filter on the screener to see if the trend is increasing. Then use this script to run a back test on the stocks that you've selected from the screener.
Technical Analysis Consulting Table (TACT)Inspired by Tradingview's own "Technical Analysis Summary", I present to you a table with analogous logic.
You can track any ticker you want, no matter your chart. You can even have multiple tables to track multiple tickers. By default it tracks the Total Crypto Cap.
You can change the resolution you want to track. By default it is the same as the chart.
You can position the table to whichever corner of the chart you want. By default it draws in the bottom right corner.
Background colors and text size can be adjusted.
Indicators Used:
Oscillators
RSI(14)
STOCH(14, 3, 3)
CCI(20)
ADX(14)
AO
Momentum(10)
MACD(12, 26)
STOCH RSI(3, 3, 14, 14)
%R(14)
Bull Bear Power
UO(7,14,28)
Moving Averages
EMA(5)
SMA(5)
EMA(10)
SMA(10)
EMA(20)
SMA(20)
EMA(30)
SMA(30)
EMA(50)
SMA(50)
EMA(100)
SMA(100)
EMA(200)
SMA(200)
Ichimoku Cloud(9, 26, 52, 26)
VMWA(20)
HMA(9)
Pivots
Traditional
Fibonacci
Camarilla
Woodie
WARNING: I have observed up to a couple of seconds of signal jitter/delay, so use it with caution in very small resolutions (1s to 1m).
I hope you enjoy this and good luck with your trading. Suggestions and feedback are most welcome.
Technical Ratings on Multi-frames / Assets█ OVERVIEW
This indicator is a modified version of TECHNICAL RATING v1.0 available in the public library to provide a quick overview of consolidated technical ratings performed on 12 assets in 3 timeframes.The purpose of the indicator is to provide a quick overview of the current status of the custom 12 (24) assets and to help focus on the appropriate asset.
█ MODIFICATIONS
- Markers, visualizations and alerts have been deleted
- Due to the limitation on maximum number of security (40), the results of 12 assets evaluated in 3 different time frames can be shown at the same time.
- An additional 12 assets can be configured in the settings so that you do not have to choose each ticker one by one to facilitate a quick change, but can switch between the 12 -12 assets with a single click on "Second sets?".
- The position, colors and parameters of the table can be widely customized in the settings.
- The 12 assets can be arranged in rows 3, 4, 6 and 12 with Table Rows options, which can also be used to create a simple mobile view.
- The default gradient color setting has been changed to red/yellow/green traffic lights
ORIGINAL DESCRIPTION ABOUT TECHNICAL RATING v1.0
█ OVERVIEW
This indicator calculates TradingView's well-known "Strong Buy", "Buy", "Neutral", "Sell" or "Strong Sell" states using the aggregate biases of 26 different technical indicators.
█ WARNING
This version is similar, but not identical, to our recently published "Technical Ratings" built-in, which reproduces our "Technicals" ratings displayed as a gauge in the right panel of charts, or in the "Rating" indicator available in the TradingView Screener. This is a fork and refactoring of the code base used in the "Technical Ratings" built-in. Its calculations will not always match those of the built-in, but it provides options not available in the built-in. Up to you to decide which one you prefer to use.
█ FEATURES
Differences with the built-in version
• The built-in version produces values matching the states displayed in the "Technicals" ratings gauge; this one does not always.
• A strategy version is also available as a built-in; this script is an indicator—not a strategy.
• This indicator will show a slightly different vertical scale, as it does not use a fixed scale like the built-in.
• This version allows control over repainting of the signal when you do not use a higher timeframe. Higher timeframe (HTF) information from this version does not repaint.
• You can adjust the weight of the Oscillators and MAs components of the rating here.
• You can configure markers on signal breaches of configurable levels, or on advances declines of the signal.
The indicator's settings allow you to:
• Choose the timeframe you want calculations to be made on.
• When not using a HTF, you can select a repainting or non-repainting signal.
• When using both MAs and Oscillators groups to calculate the rating, you can vary the weight of each group in the calculation. The default is 50/50.
Because the MAs group uses longer periods for some of its components, its value is not as jumpy as the Oscillators value.
Increasing the weight of the MAs group will thus have a calming effect on the signal.
• Alerts can be created on the indicator using the conditions configured to control the display of markers.
Display
The calculated rating is displayed as columns, but you can change the style in the inputs. The color of the signal can be one of three colors: bull, bear, or neutral. You can choose from a few presets, or check one and edit its color. The color is determined from the rating's value. Between 0.1 and -0.1 it is in the neutral color. Above/below 0.1/-0.1 it will appear in the bull/bear color. The intensity of the bull/bear color is determined by cumulative advances/declines in the rating. It is capped to 5, so there are five intensities for each of the bull/bear colors.
The "Strong Buy", "Buy", "Neutral", "Sell" or "Strong Sell" state of the last calculated value is displayed to the right of the last bar for each of the three groups: All, MAs and Oscillators. The first value always reflects your selection in the "Rating uses" field and is the one used to display the signal. A "Strong Buy" or "Strong Sell" state appears when the signal is above/below the 0.5/-0.5 level. A "Buy" or "Sell" state appears when the signal is above/below the 0.1/-0.1 level. The "Neutral" state appears when the signal is between 0.1 and -0.1 inclusively.
Five levels are always displayed: 0.5 and 0.1 in the bull color, zero in the neutral color, and -0.1 and - 0.5 in the bull color.
█ CALCULATIONS
The indicator calculates the aggregate value of two groups of indicators: moving averages and oscillators.
The "MAs" group is comprised of 15 different components:
• Six Simple Moving Averages of periods 10, 20, 30, 50, 100 and 200
• Six Exponential Moving Averages of the same periods
• A Hull Moving Average of period 9
• A Volume-weighed Moving Average of period 20
• Ichimoku
The "Oscillators" group includes 11 components:
• RSI
• Stochastic
• CCI
• ADX
• Awesome Oscillator
• Momentum
• MACD
• Stochastic RSI
• Wiliams %R
• Bull Bear Power
• Ultimate Oscillator
Indicator PanelHello All,
This script shows Indicator panel in a Table. Table.new() is a new feature and released today! Thanks a lot to Pine Team to add this new great feature! This new feature is a game changer!
The script shows indicator values for each symbol and changes background color of each cell by using current and last values of the indicators for each symbol. if current value is greater than last value then backgroung color is green, if lower than last value then red, if they are equals then gray.
You can choose the indicators to display. Number of columns in the table is dynamic and is changed by number of the indicators.
You can choose 5 different Symbols, 6 Indicators and 2 Simple or Exponential Moving averages, you can set type of moving averages and the lengths. You can also set the lengths for each Indicators.
Indicators:
- RSI
- MACD ( MACD and Signal and Histogram )
- DMI ( +DI and -DI + and ADX )
- CCI
- MFI
- Momentum
- MA with Length 50 (length can be set)
- MA with Length 200 (length can be set)
In this example RSI, MACD and MA 200 were chosen, you can see how table size changes dynamically:
Enjoy!
Technical Ratings█ OVERVIEW
This indicator calculates TradingView's well-known "Strong Buy", "Buy", "Neutral", "Sell" or "Strong Sell" states using the aggregate biases of 26 different technical indicators.
█ FEATURES
Differences with the built-in version
• You can adjust the weight of the Oscillators and MAs components of the rating here.
• The built-in version produces values matching the states displayed in the "Technicals" ratings gauge; this one does not always, where weighting is used.
• A strategy version is also available as a built-in; this script is an indicator—not a strategy.
• This indicator will show a slightly different vertical scale, as it does not use a fixed scale like the built-in.
• This version allows control over repainting of the signal when you do not use a higher timeframe. Higher timeframe (HTF) information from this version does not repaint.
• You can configure markers on signal breaches of configurable levels, or on advances declines of the signal.
The indicator's settings allow you to:
• Choose the timeframe you want calculations to be made on.
• When not using a HTF, you can select a repainting or non-repainting signal.
• When using both MAs and Oscillators groups to calculate the rating, you can vary the weight of each group in the calculation. The default is 50/50.
Because the MAs group uses longer periods for some of its components, its value is not as jumpy as the Oscillators value.
Increasing the weight of the MAs group will thus have a calming effect on the signal.
• Alerts can be created on the indicator using the conditions configured to control the display of markers.
Display
The calculated rating is displayed as columns, but you can change the style in the inputs. The color of the signal can be one of three colors: bull, bear, or neutral. You can choose from a few presets, or check one and edit its color. The color is determined from the rating's value. Between 0.1 and -0.1 it is in the neutral color. Above/below 0.1/-0.1 it will appear in the bull/bear color. The intensity of the bull/bear color is determined by cumulative advances/declines in the rating. It is capped to 5, so there are five intensities for each of the bull/bear colors.
The "Strong Buy", "Buy", "Neutral", "Sell" or "Strong Sell" state of the last calculated value is displayed to the right of the last bar for each of the three groups: All, MAs and Oscillators. The first value always reflects your selection in the "Rating uses" field and is the one used to display the signal. A "Strong Buy" or "Strong Sell" state appears when the signal is above/below the 0.5/-0.5 level. A "Buy" or "Sell" state appears when the signal is above/below the 0.1/-0.1 level. The "Neutral" state appears when the signal is between 0.1 and -0.1 inclusively.
Five levels are always displayed: 0.5 and 0.1 in the bull color, zero in the neutral color, and -0.1 and - 0.5 in the bull color.
The levels that can be used to determine the breaches displaying long/short markers will only be visible when their respective long/short markers are turned on in the "Direction" input. The levels appear as a bright dotted line in bull/bear colors. You can control both levels separately through the "Longs Level" and "Shorts Level" inputs.
If you specify a higher timeframe that is not greater than the chart's timeframe, an error message will appear and the indicator's background will turn red, as it doesn't make sense to use a lower timeframe than the chart's.
Markers
Markers are small triangles that appear at the bottom and top of the indicator's pane. The marker settings define the conditions that will trigger an alert when you configure an alert on the indicator. You can:
• Choose if you want long, short or both long and short markers.
• Determine the signal level and/or the number of cumulative advances/declines in the signal which must be reached for either a long or short marker to appear.
Reminder: the number of advances/declines is also what controls the brightness of the plotted signal.
• Decide if you want to restrict markers to ones that alternate between longs and shorts, if you are displaying both directions.
This helps to minimize the number of markers, e.g., only the first long marker will be displayed, and then no more long markers will appear until a short comes in, then a long, etc.
Alerts
When you create an alert from this indicator, that alert will trigger whenever your marker conditions are confirmed. Before creating your alert, configure the makers so they reflect the conditions you want your alert to trigger on.
The script uses the alert() function, which entails that you select the "Any alert() function call" condition from the "Create Alert" dialog box when creating alerts on the script. The alert messages can be configured in the inputs. You can safely disregard the warning popup that appears when you create alerts from this script. Alerts will not repaint. Markers will appear, and thus alerts will trigger, at the opening of the bar following the confirmation of the marker condition. Markers will never disappear from the bar once they appear.
Repainting
This indicator uses a two-pronged approach to control repainting. The repainting of the displayed signal is controlled through the "Repainting" field in the script's inputs. This only applies when you have "Same as chart" selected in the "Timeframe" field, as higher timeframe data never repaints. Regardless of that setting, markers and thus alerts never repaint.
When using the chart's timeframe, choosing a non-repainting signal makes the signal one bar late, so that it only displays a value once the bar it was calculated has elapsed. When using a higher timeframe, new values are only displayed once the higher timeframe completes.
Because the markers never repaint, their logic adapts to the repainting setting used for the signal. When the signal repaints, markers will only appear at the close of a realtime bar. When the signal does not repaint (or if you use a higher timeframe), alerts will appear at the beginning of the realtime bar, since they are calculated on values that already do not repaint.
█ CALCULATIONS
The indicator calculates the aggregate value of two groups of indicators: moving averages and oscillators.
The "MAs" group is comprised of 15 different components:
• Six Simple Moving Averages of periods 10, 20, 30, 50, 100 and 200
• Six Exponential Moving Averages of the same periods
• A Hull Moving Average of period 9
• A Volume-weighed Moving Average of period 20
• Ichimoku
The "Oscillators" group includes 11 components:
• RSI
• Stochastic
• CCI
• ADX
• Awesome Oscillator
• Momentum
• MACD
• Stochastic RSI
• Wiliams %R
• Bull Bear Power
• Ultimate Oscillator
The state of each group's components is evaluated to a +1/0/-1 value corresponding to its bull/neutral/bear bias. The resulting value for each of the two groups are then averaged to produce the overall value for the indicator, which oscillates between +1 and -1. The complete conditions used in the calculations are documented in the Help Center .
█ NOTES
Accuracy
When comparing values to the other versions of the Rating, make sure you are comparing similar timeframes, as the "Technicals" gauge in the chart's right pane, for example, uses a 1D timeframe by default.
For coders
We use a handy characteristic of array.avg() which, contrary to avg() , does not return na when one of the averaged values is na . It will average only the array elements which are not na . This is useful in the context where the functions used to calculate the bull/neutral/bear bias for each component used in the rating include special checks to return na whenever the dataset does not yet contain enough data to provide reliable values. This way, components gradually kick in the calculations as the script calculates on more and more historical data.
We also use the new `group` and `tooltip` parameters to input() , as well as dynamic color generation of different transparencies from the bull/bear/neutral colors selected by the user.
Our script was written using the PineCoders Coding Conventions for Pine .
The description was formatted using the techniques explained in the How We Write and Format Script Descriptions PineCoders publication.
Bits and pieces were lifted from the PineCoders' MTF Selection Framework .
Look first. Then leap.
Simple way to BEAT the market [STRATEGY]This script has been created to demonstrate the effectiveness of using market regime filters in your trading strategy, and how they can improve your returns and lower your drawdowns
This strategy adds a simple filter (A historical volatility percentile filter, an implementation of which can be found on my trading profile) to a traditional buy and hold strategy of the index SPY.
Note, There are other filters that could also be added including a long-term moving average/percentile rank filter/ADX filter etc, to improve the returns further.
The filter closes our long position during periods of volatility that exceed the 95th percentile (or in the top 5% of volatile days) and buys back when the volatility is below 95% rank of the past 100 days
Have included the backtest results since 1993 which is 28 years of data at the time of writing. Comparison of traditional buy and hold with this modified strategy can be found below:
Traditional buy and hold:
Return per year: 7.95 % (ex Dividends)
Total return: 851.1 %
Max drawdown: 50.79 %
'Modified' buy and hold (this script):
Return per year: 9.92 % (ex Dividends)
Total return: 1412.2 %
Max drawdown: 31.57 %
Feel free to use some of the market filters in my trading profile to improve and refine your strategies further, or make a copy and play around with the code yourself. This is just a simple example for demo purposes.
Strategy - DMI Indicator with DPO Indicator as a GuardThe Directional Movement Index Indicator is one of my favorite indicators in tradingview's built-in library. It is free to use for all
For more information on what the DMI is, please visit: www.tradingview.com
The only problem I've come across with the DMI is that when it hits a 'trade range zone' it triggers false new trends (this is the case with almost every indicator I've ever tested).
This script modifies the DMI by removing the need for the ADX logic. It only focuses on the +DI and the -DI.
In order to remove the 'noise' generated during a trade range zone I have added another powerful indicator called the Detrended Price Oscillator.
The DPO is also a 'built-in' indicator on tradingview. www.tradingview.com
The DPO is used in conjunction with the DMI to stop trade ranges from wrecking your profits.
This strategy logic simply checks for the DMI indicator to cross itself. If the +DI crosses over the -DI this is a bullish cross and visa versa, if the -DI crosses over the +DI then it could mean bearish sentiment is building.
But then strategy logic uses the DPO to check if the DPO is above 0 or below 0 value
If the +DI crosses over the -DI and the DPO is above 0 value, then it's a Long entry point.
However, if the +DI crosses over the -DI and the DPO is below 0 value, then the Long signal is void.
And visa versa, if the -DI crosses over the +DI and the DPO is below 0 value, then it's a Short entry point (unless the DPO is greater than 0)
With this DPO 'guard' in place, it helps us keep the total trades executed to a minimum.
This is vital to push through trade ranges that can wreck your profit potential.
I wish I could create a better plotting mechanism for this indicator so you can better see the visuals. But combining the DMI to scale with the DPO is not possible.
The best solution is to simply add another DMI indicator to your chart so you can compare the DMI to this script that is dominated by the DPO (yellow line).
Enjoy! Likes are much appreciated!
FUERSTUses Normalized Price Oscillator and Stochastics and combines them as an ADX weighted measure.
During low trend intensity Stochastics gets higher weighted than Price Oscillator, and vice-versa in times of high trend-intensity.
Stoch DMIStochastics applied to adjusted ADX to represent the trend direction. DM based sub-indicators added to hint the momentum and changes in the ADX.
DMI with Oversold/Overbought markingModification of original DMI indicator, simply marking background in case of finding Overbought or Oversold levels - this happens when ADX is above both DI+ and DI- values.
Grid ToolThe core idea of this grid tool is that you have to concentrate less on the trade entries (this happens automatically time-independent but price-dependant) but rather on the validity of the macro trend. Exiting a trend when it is no longer valid is more important than entering a trade. But as long as the trend is valid, the trader participates exponentially in the overall trend.
It is advisable to start with a basic position and then "set up" the grid on this in a ratio of 1/10.
A major advantage of grid trading is that the average entry price in a trend moves further and further away from the current market price while the position continues to grow.
A small timeframe should be used so that the distance between the trades corresponds as closely as possible to the selected grid gap and since TV backtests are carried out with closed bars.
Before starting a grid, pre-analysis the market to make sure it is trending. Select the grid gap and grid position size that you are comfortable with. Monitor the trend and from time to time take some profit :).
PS: The ADX filter looks interesting.
Trend Indicators CollectionAnalyses MACD crosses with Ichimoku cloud direction and state
General idea:
- MACD crosses usually point to a change in trend direction and Kumo state and direction often act as a confirmation as well as a trend strength indicator. Using this, the script points out where there were was or can be a point where the trend change may have the strength to carry on.
Buy warnings:
- This warning will be triggered in two ways, both of them only if MACD is above EMA and the current close price is over Kumo:
- Senku span A crosses over Senku B (Kumo turns positive) when MACD is already positive
- MACD turns positive when Kumo is already positive
Sell warnings
- Triggered in two ways:
- Kumo turns negative when the current close price is bellow EMA
- The inverse of the above, the current close price falls bellow EMA when the Kumo is already negative
Trend Indicators Collection (TIC) contains:
- MACD, EMA, ADX, Mass index, Ichimoku Cloud, and Pivot points
- Best suited for monthly charts with 30m bars
Trend Trader Buy/Sell SignalsTrend Trader
The code is open source, what it uses to print signals is MACD cross and ADX. Bar colors change in relation to where price is according to the 50 day MA. The MA ribbon is used for visualizing trend and using it for dynamic support/resistance. The ribbon is comprised of the 50 day and 100 day MAs.
Main reason to publish this script is because some like to jumble up scripts together slap some moving averages on it to "follow trend" and then label it an algorithm, market it and sell it to people online. No single system will work 100% of the time, do you due diligence in anything you are interested in buying. Plenty of free scripts in the TV library that can do you justice when trading.