Crypto Trend IndicatorThe Crypto Trend Indicator is a trend-following indicator specifically designed to identify bullish and bearish trends in the price of Bitcoin, and other cryptocurrencies. This indicator doesn't provide explicit instructions on when to buy or sell, but rather offers an understanding of whether the trend is bullish or bearish. It's important to note that this indicator is only useful for trend trading.
The band is a visual representation of the 30-day and 60-day Exponential Moving Average (EMA). When the 30-day EMA is above the 60-day EMA, the trend is bullish and the band is green. When the 30-day EMA is below the 60-day EMA, the trend is bearish and the band is red. When the 30-day EMA starts to converge with the 60-day EMA, the trend is neutral and the band is grey.
The line is a visual representation of the 20-week Simple Moving Average (SMA) in the daily timeframe. "Bull" and "Bear" signals are generated when the 20-day EMA is either above or below the 20-week SMA, in conjunction with a bullish or bearish trend. When the band is green and the 20-day EMA is above the 20-week SMA, a “Bull” signal emerges. When the band is red and the 20-day EMA is below the 20-week SMA, a “Bear” signal emerges. The 20-week SMA can potentially also function as a leading indicator, as substantial price deviations from the SMA typically indicate an overextended market.
While this indicator has traditionally identified bullish and bearish trends in various cryptocurrency assets, past performance does not guarantee future results. Therefore, it is advisable to supplement this indicator with other technical tools. For instance, range-bound indicators can greatly improve the decision-making process when planning for entries and exits points.
Cerca negli script per "bear"
[blackcat] L3 Aroon ZoneLevel 3
Background
The Aroon indicator developed by Tushar Chanand indicates whether there is a trend price or is located in a trading area.
Function
Classical Aroon can also show the beginning of a new trend, its strength and expectation of changes from trade areas to trends. However, it produces too much noise when is bull or bear during sideways. In this improved version, I use bars without "blur cross" to classify bull, bear and sideways, which could look better to know the status of current market.
Since Chinese uses red for bull, green for bear, while others use green for bull and red for bear, i try to avoid to use red or green, which may be confusing. I use my style of color for bull and bear:
Yellow --> Bull
Fuchsia --> Bear
Gray --> Sideways
Remarks
Feedbacks are appreciated.
ahpuhelperLibrary "ahpuhelper"
Helper Library for Auto Harmonic Patterns UltimateX. It is not meaningful for others. This is supposed to be private library. But, publishing it to make sure that I don't delete accidentally. Some functions may be useful for coders.
insert_open_trades_table_column(showOpenTrades, table_id, column, colors, values, intStatus, harmonicTrailingStartState, lblSizeOpenTrades)
add data to open trades table column
Parameters:
showOpenTrades : flag to show open trades table
table_id : Table Id
column : refers to pattern data
colors : backgroud and text color array
values : cell values
intStatus : status as integer
harmonicTrailingStartState : trailing Start state as per configs
lblSizeOpenTrades : text size
Returns: nextColumn
populate_closed_stats(ClosedStatsPosition, bullishCounts, bearishCounts, bullishRetouchCounts, bearishRetouchCounts, bullishSizeMatrix, bearishSizeMatrix, bullishRR, bearishRR, allPatternLabels, flags, rowMain, rowHeaders)
populate closed stats for harmonic patterns
Parameters:
ClosedStatsPosition : Table position for closed stats
bullishCounts : Matrix containing bullish trade stats
bearishCounts : Matrix containing bearish trade stats
bullishRetouchCounts : Matrix containing bullish trade stats for those which retouched entry
bearishRetouchCounts : Matrix containing bearish trade stats for those which retouched entry
bullishSizeMatrix : Matrix containing data about size of bullish patterns
bearishSizeMatrix : Matrix containing data about size of bearish patterns
bullishRR : Matrix containing Risk Reward data of bullish patterns
bearishRR : Matrix containing Risk Reward data of bearish patterns
allPatternLabels : array containing pattern labels
flags : display flags
rowMain : Pattern header data
rowHeaders : header grouping data
Returns: void
get_rr_details(patternTradeDetails, harmonicTrailingStartState, disableTrail, breakEvenTrail)
calculate and return risk reward based on targets and stops
Parameters:
patternTradeDetails : array containing stop, entry and targets
harmonicTrailingStartState : trailing point
disableTrail : If set, ignores trailing point
breakEvenTrail : If set, trailing does not go beyond breakeven.
Returns: nextColumn
Options Scalping by harsh gbychi this is my script.
Bank Nifty Live OI Change Chart can give very useful clues for intraday support and resistance levels for Bank Nifty. If there is more addition in Open Interest at 12200 Calls, that would mean most market players are comfortable writing call options at this level because they believe it to be a strong resistance. That would be bearish indication for BankNifty.
Similarly is there is highest writing in 12000 Puts that would indicate strong intraday support at that level.
Third Scenario: There is good amount of Open Interest increase in 12000 PE and 12200 CE –> this means we should expect a range bound session for the day, as both bears and bulls are comfortable holding the 12200 and 12000 levels respectively.
Following factors could improve reliability of BankNifty OI Change analysis:
1) Put Call Ratio: Higher PCR means bullishness. If there is more writing at 12000PE and PCR is high and increasing during the day that would add to bullish scenario
If the PCR is declining for the day and more writing happening at 12200CE then this adds to bearishness.
2) Close to expiry: The closer to expiry we are, the more reliable the ‘Open Interest’ analysis. Early in the series, the OI analysis is less reliable.
3) More Players: As the number of players increase, the OI analysis become more reliable.
4) Bid-ask Spread: The lower the bid-ask spread the more reliable the OI analysis.
5) Technical Indicators: The best trades are found by combining OI analysis with other technical indicators. MACD, RSI, Channel lines and EW count give best results with Open Interest Analysis.
Rollover LTEThis indicator shows where price needs to be and when in order to cause the 20-sma and 50-sma moving averages to change directions. A change in direction requires the slope of a moving average to change from negative to positive or from positive to negative. When a moving average changes direction, it can be said that it has “rolled over” or “rolled up,” with the latter only applying if slope went from negative to positive.
Theory:
In order to solve for the price of the current bar that will cause the moving average to roll up, the slope from the previous bar’s average to the current bar’s average must be set equal to zero which is to say that the averages must be the same.
For the 20-sma, the equation simply stated in words is as follows:
Current MA as a function of current price and previous 19 values = previous MA which is fixed based on previous 20 values
The denominators which are both 20 cancel and the previous 19 values cancel. What’s left is current price on the left side and the value from 20 bars ago on the right.
Current price = value from 20 bars ago
and since the equation was set up for solving for the price of the current bar that will cause the MA to roll over
Rollover price = value from 20 bars ago
This makes plotting rollover price, both current and forecasted, fairly simple, as it’s merely the closing price plotted with an offset to the right the same distance as the moving average length.
Application:
The 20-sma and 50-sma rollover prices are plotted because they are considered to be the two most important moving averages for rollover analysis. Moving average lengths can be modified in the indicator settings. The 20-sma and 20-sma rollover price are both plotted in white and the 50-sma and 50-sma rollover price are both plotted in blue. There are two rollover prices because the 20-sma rollover price is the price that will cause the 20-sma to roll over and the 50-sma rollover price is the price that will cause the 50-sma to roll over. The one that's vertically furthest away from the current price is the one that will cause both to rollover, as should become clearer upon reading the explanation below.
The distance between the current price and the 20-sma rollover price is referred to as the “rollover strength” of the price relative to the 20-sma. A large disparity between the current price and the rollover price suggests bearishness (negative rollover strength) if the rollover price is overhead because price would need to travel all that distance in order to cause the moving average to roll up. If the rollover price and price are converging, as is often the case, a change in moving average and price direction becomes more plausible. The rollover strengths of the 20-sma and 50-sma are added together to calculate the Rollover Strength and if a negative number is the result then the background color of the plot cloud turns red. If the result is positive, it turns green. Rollover Strength is plotted below price as a separate indicator in this publication for reference only and it's not part of this indicator. It does not look much different from momentum indicators. The code is below if anybody wants to try to use it. The important thing is that the distances between the rollover prices and the price action are kept in mind as having shrinking, growing, or neutral bearish and bullish effects on current and forecasted price direction. Trades should not be entered based on cloud colorization changes alone.
If you are about to crash into a wall of the 20-sma rollover price, as is indicated on the chart by the green arrow, you might consider going long so long as the rollover strength, both current and forecasted, of the 50-sma isn’t questionably bearish. This is subject to analysis and interpretation. There was a 20-sma rollover wall as indicated with yellow arrow, but the bearish rollover strength of the 50-sma was growing and forecasted to remain strong for a while at that time so a long entry would have not been suggested by both rollover prices. If you are about to crash into both the 20-sma and 50-sma rollover prices at the same time (not shown on this chart), that’s a good time to place a trade in anticipation of both slopes changing direction. You may, in the case of this chart, see that a 20-sma rollover wall precedes a 50-sma rollover convergence with price and anticipate a cascade which turned out to be the case with this recent NQ rally.
Price exiting the cloud entirely to either the upside or downside has strong implications. When exiting to the downside, the 20-sma and 50-sma have both rolled over and price is below both of them. The same is true for upside exits. Re-entering the cloud after a rally may indicate a reversal is near, especially if the forecasted rollover prices, particularly the 50-sma, agree.
This indicator should be used in conjunction with other technical analysis tools.
Additional Notes:
The original version of this script which will not be published was much heavier, cluttered, and is not as useful. This is the light version, hence the “LTE” suffix.
LTE stands for “long-term evolution” in telecommunications, not “light.”
Bar colorization (red, yellow, and green bars) was added using the MACD Hybrid BSH script which is another script I’ve published.
If you’re not sure what a bar is, it’s the same thing as a candle or a data point on a line chart. Every vertical line showing price action on the chart above is a bar and it is a bar chart.
sma = simple moving average
Rollover Strength Script:
// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © Skipper86
//@version=5
indicator(title="Rollover Strength", shorttitle="Rollover Strength", overlay=false)
source = input.source(close)
length1 = input.int(20, "Length 1", minval=1)
length2 = input.int(50, "Length 2", minval=1)
RolloverPrice1 = source
RolloverPrice2 = source
RolloverStrength1 = source-RolloverPrice1
RolloverStrength2 = source-RolloverPrice2
RolloverStrength = RolloverStrength1 + RolloverStrength2
Color1 = color.rgb(155, 155, 155, 0)
Color2 = color.rgb(0, 0, 200, 0)
Color3 = color.rgb(0, 200, 0, 0)
plot(RolloverStrength, title="Rollover Strength", color=Color3)
hline(0, "Middle Band", color=Color1)
//End of Rollover Strength Script
Oxy CandlestickOxymoronic (oxy) candlesticks often appear at significant levels in a chart and can indicate increased probabilities of directional moves.
Typically, green candles are hollow and red candles are filled. An oxymoronic candle is colored bullishly but filled bearishly (solid green) or vice versa (hollow red).
Oxy flags occur when:
1) Price gaps up and closes lower than the open but above the last close. A solid green (or black) candle is bearish.
2) Price gaps down and closes higher than the open but below the last close. A hollow red candle is bullish.
An oxy candle indicates one of three things:
1) Price is going up (bullish oxy)
2) Price is going down (bearish oxy)
3) Price will return to this level (either)
#1 and #2 are the default meaning. If those don't play out then look for #3.
As is the case with most indicators, it is best not to use this indicator in isolation, but to combine it with other forms of analysis to increase your probabilities and to identify significant levels.
EMA Options Clouds With SignalsEMA Clouds for Options!
This indicator can help you confidently open and close options positions. Note that you should set stop a little below midline EMA . Risk reward for good signals is fairly consistent in profit. Most of the simulations I ran got between 1:2 and 1:4 profits. The losers usually can be avoided by making sure you are not in a choppy trading channel. Wait for EMAs to start separating and don't blindly follow every buy/sell.
3 wave EMA + Clouds:
Defaults:
EMA 8/32/64
Signals (off by default - turn on in settings):
Buy Call/Sell Call (open/exit call positions)
Buy Put/Sell Put (open/exit put positions)
Enter signals bullish:
Close over Middle EMA AND Short EMA > Middle EMA > Long EMA
Exit signals bullish:
Close under Middle EMA OR trend turns bearish (Short EMA < Middle EMA < Long EMA )
Enter signals bearish:
Close under Middle EMA AND Short EMA < Middle EMA < Long EMA
Exit signals bearish:
Close over Middle EMA OR Short EMA > Middle EMA > Long EMA
Cloud Colors (Default)
Green: Bullish
Red: Bearish
White: Chop/Transition
EMA Confirmations & RejectionsWant to know how the bulls and bears are doing? Use this to see the attempts made for making big moves and their outcomes to feel more confident in your entry or exit and know when the tides are turning. Do not read a single arrow or cross on the chart and think it means one thing. Take in the big picture and detect patterns and frequency of good or bad signals to determine the likelihood of the future being bullish or bearish. For example, more green arrows than orange arrows in a consolidation period would suggest a break to the upside is more likely.
There are 4 different signals this indicator can print:
1. A green arrow indicates a move of strength to the upside has begun. Could be a bull trap or the start of a long lasting bullish move.
2. An orange arrow indicates a move of strength to the downside has begun. Could be a bear trap or the start of a long lasting bearish move.
3. A blue cross is printed above if the break was to the upside, or below if it was to the downside. Indicates a failed attempt to change the trend and bullish price action is more likely in the next few candles.
4. A red cross is printed above if the break was to the upside, or below if it was to the downside. Indicates a failed attempt to change the trend and bearish price action is more likely in the next few candles.
The location of the cross is more important than the colour. Above means pressure downwards, and below means pressure upwards.
Pro Tip: Green arrows below 50 on the RSI are more meaningful than when above. This also works for orange arrows when above 50.
coates moving averages (cma)This indicator uses three moving averages:
2 period low simple ma
2 period high simple ma
9 period least squares ma
The trend is determined by the angle of the moving averages, current close relative the the 9 least squares ma (lsm) and the current close relative to the prior two periods high and low.
When there are consecutive closes inside the prior two candles high and low then a range is signaled:
In ranges the buy zone is between the lowest low and the lowest close of the current range. The sell zone is between the highest high and the highest close. The zones are adjusted as long as the new close is within the prior two candles range:
When price closes above the 2 high ma and the 9 lsm then a bull trend is signaled if all moving averages are angled upward (as seen at #4 in the chart above and #1 the chart below ). If the 9 lsm and / or the 2 low ma continue to angle downward, following a close above the 2 high ma and 9 lsm, then a prolonged range or reversal is expected (#2 in the chart below):
During a bull trend the buy zone is between the 2 low ma and the 9 lsm. The profit target is the 2 high ma:
During dip buying opportunities price should resist closing below the 9 lsm. If there is one close below the 9 lsm then it is a canary in the coalmine that tells us to proceed with caution. This will often signal a range, based on the conditions outlined above. To avoid a prolonged range, or reversal, price needs to immediately react in the direction of the prevailing trend:
If the moving averages are angled down and the most recent close is below the 2 low ma and 9 lsm then trend is fully bearish:
During a bear trend the short zone is between the 2 high ma and 9 lsm. The profit target is the 2 low ma:
When the 2 high ma angles down and the 2 low ma angles up while price closes inside both mas then it indicates a cma squeeze:
Volatility is expected in the direction of the breakout following the squeeze. In this situation traps / shakeouts are common. If there is a wick outside the cma, with a close inside, then it indicates a trap / shakeout. If there is a close outside the 2 high / low ma then it signals a breakout.
A trend is considered balanced when the 9 lsm is roughly equidistant from the 2 low and 2 high mas. If the 9 lsm crosses the 2 high or 2 low ma then it signals exhaustion / imbalance.
For a stop loss I use the prior three periods low, for bull trends, and the prior three periods high for bear trends. I would expect other reliable stops, such as the parabolic sar or bill williams fractal, to be effective as well. The default moving averages should be very effective on all timeframes and assets classes, however this indicator was developed for bitcoin with a focus on higher timeframes such as the 4h, daily and weekly.
As with any other technical indicator there will be bad signals. Proceed with caution and never risk more than you are willing to lose.
VPA ANALYSIS VPA Analysis provide the indications for various conditions as per the Volume Spread Analysis concept. The various legends are provided below
LEGEND DETAILS
UT1 - Upthrust Bar: This will be widespread Bar on high Volume closing on the low. This normally happens after an up move. Here the smart money move the price to the High and then quickly brings to the Low trapping many retail trader who rushed into in order not to miss the bullish move. This is a bearish Signal
UT2 -Upthrust Bar Confirmation: A widespread Down Bar following a Upthrust Bar. This confirms the weakness of the Upthrust Bar. Expect the stock to move down
Confirms . This is a Bearish Signal
PUT - Pseudo Upthrust: An Upthrust Bar in bar action but the volume remains average. This still indicates weakness. Indicate Possible Bearishness
PUC -Pseudo Upthrust Confirmation: widespread Bar after a pseudo–Upthrust Bar confirms the weakness of the Pseudo Upthrust Bar
Confirms Bearishness
BC - Buying Climax: A very wide Spread bar on ultra-High Volume closing at the top. Such a Bar indicates the climatic move in an uptrend. This Bar traps many retailers as the uptrend ends and reverses quickly. Confirms Bearishness
TC - Trend Change: This Indicates a possible Trend Change in an uptrend. Indicates Weakness
SEC- Sell Condition: This bar indicates confluence of some bearish signals. Possible end of Uptrend and start of Downtrend soon. Bearish Signal
UT - Upthrust Condition: When multiple bearish signals occur, the legend is printed in two lines. The Legend “UT” indicates that an upthrust condition is present. Bearish Signal
ND - No demand in uptrend: This bar indicates that there is no demand. In an uptrend this indicates weakness. Bearish Signal
ND - No Demand: This bar indicates that there is no demand. This can occur in any part of the Trend. In all place other than in an uptrend this just indicates just weakness
ED - Effort to Move Down: Widespread Bar closing down on High volume or above average volume . The smart money is pushing the prices down. Bearish Signal
EDF - Effort to Move Down Failed: Widespread / above average spread Bar closing up on High volume or above average volume appearing after ‘Effort to move down” bar.
This indicates that the Effort to move the pries down has failed. Bullish signal
SV - Stopping Volume: A high volume medium to widespread Bar closing in the upper middle part in a down trend indicates that smart money is buying. This is an indication that the down trend is likely to end soon. Indicates strength
ST1 - Strength Returning 1: Strength seen returning after a down trend. High volume adds to strength. Indicates Strength
ST2 - Strength Returning 2: Strength seen returning after a down trend. High volume adds to strength.
BYC - Buy Condition: This bar indicates confluence of some bullish signals Possible end of downtrend and start of uptrend soon. Indicates Strength
EU - Effort to Move Up: Widespread Bar closing up on High volume or above average volume . The smart money is pushing the prices up. Bullish Signal
EUF - Effort to Move Up Failed: Widespread / above average spread Bar closing down on High volume or above average volume appearing after ‘Effort to move up” bar.
This indicates that the Effort to move the pries up has failed. Bearish Signal
LVT- Low Volume Test: A low volume bar dipping into previous supply area and closing in the upper part of the Bar. A successful test is a positive sign. Indicates Strength
ST(after a LVT ) - Strength after Successful Low Volume Test: An up Bar closing near High after a Test confirms strength. Bullish Signal
RUT - Reverse Upthrust Bar: This will be a widespread Bar on high Volume closing on the high is a Down Trend. Here the buyers have become active and move the prices from the low to High. The down Move is likely to end and up trend likely to start soon. indicates Strength
NS - No supply Bar: This bar indicates that there is no supply. This is a sign of strength especially in a down trend. Indicates strength
ST - Strength Returns: When multiple bullish signals occur, the legend is printed in two lines. The Legend “ST” indicates that an condition of strength other than the condition mentioned in the second line is present. Bullish Signals
BAR COLORS
Green- Bullish / Strength
Red - Bearish / weakness
Blue / White - Sentiment Changing from bullish to Bearish and Vice Versa
Combo VIX and DXYHello traders
It's been a while :)
I wanted to share a cool script that you can use for any asset class.
The script isn't really special - though what it displays is super helpful
Volatility Index $VIX
(Source: Wikipedia)
VIX is the ticker symbol and the popular name for the Chicago Board Options Exchange's CBOE Volatility Index, a popular measure of the stock market's expectation of volatility based on S&P 500 index options.
It is calculated and disseminated on a real-time basis by the CBOE, and is often referred to as the fear index or fear gauge.
I consider that a $VIX above 30% is a very bearish signal.
Above 30% translating investors selling in masse their assets. #blood #on #the #street
Dollar Index $DXY
(Source: Wikipedia)
The U.S. Dollar Index (USDX, DXY, DX, or, informally, the "Dixie") is an index (or measure) of the value of the United States dollar relative to a basket of foreign currencies, often referred to as a basket of U.S. trade partners' currencies.
The Index goes up when the U.S. dollar gains "strength" (value) when compared to other currencies.
The index is designed, maintained, and published by ICE (Intercontinental Exchange, Inc.), with the name "U.S. Dollar Index" a registered trademark.
It is a weighted geometric mean of the dollar's value relative to following select currencies:
Euro (EUR), 57.6% weight
Japanese yen (JPY) 13.6% weight
Pound sterling (GBP), 11.9% weight
Canadian dollar (CAD), 9.1% weight
Swedish krona (SEK), 4.2% weight
Swiss franc (CHF) 3.6% weight
In "bear markets", the $DXY usually goes up.
People are selling their hard assets to get some $USD in return - pumping the $DXY higher
Corollary
I'm not sure which one happens first between a bearish $DXY or bearish $DXY... though both are usually correlated
If:
- $VIX goes above 30%, usually $DXY increases and assets versus the good old' $USD drop
- $VIX goes below 30%, usually $DXY decreases and assets versus the good old' $USD increases
This is a nice lever effect between both the $VIX, $DXY and the assets versus the $USD
That's being said, I don't only use those 2 information to enter in a trade.
It gives me though a strong confirmation whenever I'm long or short
Imagine I get a LONG signal but the combo $VIX + $DXY is bearish... this tells me to be cautious and to:
- enter at a pullback
- protect my position quickly at breakeven
- take my profit quick
For a mega bull market (some called it hyperinflation), you want your fiat to drop in value for the counter-asset to increase in value.
And before you ask.... yes I look at what $DXY is doing before taking a trade on $BTCUSD :)
In other words, $DXY going down is quite bullish for Bitcoin.
Settings and Alerts
The settings by default are the ones I use for my trading.
The background colors will be colored whenever the COMBO is bullish (green) or bearish (red)
Alerts are enabled using the brand new alert function published last week by @TradingView
That's it for today, I hope you'll like it :)
PS: In this chart above, I'm using the Supertrend indicator from @KivancOzbilgic
Dave
[blackcat] L1 Composite RSI Trend OscillatorLevel: 1
Background
The Relative Strength Index (RSI) is a technical indicator for analyzing financial markets. It is intended to represent the current and historical strength or weakness of a trading pair or a market based on the closing prices of a last trading period.
Function
L1 Composite RSI Trend Oscillator utilizes candles to indicate trend. E.g. yellow candles for bull and fuchsia candles for bear. NOTE: it is inverted to RSI from bull bear perspective. Colorful RSI with yellow indicating bull and fuchsia indicating bear.
Key Signal
lwr1 --> trend oscillator fast line (lwr1 >= lwr2 for bear)
lwr2 --> trend oscillator slow line (lwr1 < lwr2 for bull)
botzone --> bottom zone indicates oversold with green
topzone --> top zone indicates overbought with red
longentry --> long entry signal
shortentry --> short entry signal
Pros and Cons
Pros:
1. combines both the benefit of RSI response and trend oscillator candles
2. divergence can be observed easily
Cons:
1. It may satruate for extreme conditions of long and short.
2. Not accurate for long and short entries and need filtering out noise and fake signal.
Remarks
NA
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Average Sentiment OscillatorDescription of this indicator from its author:
Average Sentiment Oscillator
Momentum oscillator of averaged bull/bear percentages.
We suggest using it as a relatively accurate way to gauge the sentiment of a given period of candles, as a trend filter or for entry/exit signals.
It’s a combination of two algorithms, both essentially the same but applied in a different way. The first one analyzes the bullish/bearishness of each bar using OHLC prices then averages all percentages in the period group of bars (eg. 10) to give the final % value. The second one treats the period group of bars as one bar and then determines the sentiment percentage with the OHLC points of the group. The first one is noisy but more accurate in respect to intra-bar sentiment, whereas the second gives a smoother result and adds more weight to the range of price movement. They can be used separately as Mode 1 and Mode 2 in the indicator settings, or combined as Mode 0.
Original indicator idea from Benjamin Joshua Nash, converted from MT4 version
Usage:
The blue line is Bulls %, red line is Bears %. As they are both percentages of 100, they mirror each other. The higher line is the dominating sentiment. The lines crossing the 50% centreline mark the shift of power between bulls and bears, and this often provides a good entry or exit signal, i.e. if the blue line closes above 50% on the last bar, Buy or exit Sell, if the red line closes above 50% on the last bar, Sell or exit Buy. These entries are better when average volume is high.
It's also possible to see the relative strength of the swings/trend, i.e. a blue peak is higher than the preceding red one. A clear divergence can be seen in the picture as the second bullish peak registers as a lower strength on the oscillator but moved higher on the price chart. By setting up levels at the 70% and 30% mark the oscillator can also be used for trading overbought/oversold levels similar to a Stochastic or RSI. As is the rule with most indicators, a smaller period gives more leading signals and a larger period gives less false signals.
Absolute Strength MTF IndicatorIntroduction
The non-signal version of the absolute strength indicator from fxcodebase.com requested by ernie76 . This indicator originally from mt4 aim to estimate the bullish/bearish force of the market by using various methods.
The Indicator
Two lines are plotted, a bull line (blue) representing the bullish/buying force and a bear one (red) representing the bearish/selling force, when the bull line is greater than the bear line the market is considered to be strongly bullish, else strongly bearish.
The indicator use various method, Rsi, stochastic, adx. The Rsi method is the one by default.
The stochastic method is less reactive but smoother
The Adx method is way different, while the other two methods make the bull and bear lines somewhat uncorrelated, the adx method focus more on the overall market strength than individual buyer/seller strength.
The smoothing method use 3 different filters, SMA, EMA and LSMA, LSMA is more reactive than the two previous one while EMA is just more computer efficient.
It is possible to use price data of different time frames for the calculation of the indicator.
Stochastic method with 4 hour price close as source.
Conclusion
A classic indicator who can be derived into a lot of ways using a more adaptive architecture or recursion. Hope you find it a use :)
A big thanks to ernie76 for the request and the support/testing of the indicator
Feel free to pm me for any request.
[BoTo] ATH/2 OverlayThan this indicator is useful?
Can help you to understand this indicator who main in the market now. Bulls or bears.
How it works
All-Time-High ('ATH') - the highest point in price that a cryptocurrency has been in history.
Step 1: The 'ATH' line is drawn
Step 2: 'ATH/2' line is drawn.
Step 3: If the price became more than 'ATH' it means the market bulls have taken, and the price it will be more probable to increase. And vice versa. If the price became less than 'ATH/2' it means that the market was taken by bears, and the price it will be more probable to fall.
Step 4: If it is the bull market, then the green background is drawn. And vice versa. If it is the bear market, then the red background is drawn. If the market has changed, then the background will be gray color. Only one candle.
How to use it
It is possible to use any timeframes, and any symbol.
It is possible to use chart type only the japanese candles, the line or bars. Don't use Kagi, Renko or Haiken Ashi!
The background can be not shown. You can make 1 or 2 lines. If you have chosen only 1 line, then in the bull market you will see only 'ATH/2' line. And vice versa. In the bear market you will see only the 'ATH' line.
You need just to turn on this indicator once to understand what to wait in this market, big falling or big rockets for. And to switch off it that he didn't prevent to analyze.
It is the good help for long-term investments (the position can be longer than 1 year)
For an example
'Ethereum'
'Ripple'
We tried for you. We want to receive your like for good work.
Ichimoku Kinko Hyo: Basic StrategyIchimoku Kinko Hyo: Basic Strategy
Entry/Exit orders are placed when three basic signals are triggered.
Ichimoku Signals:
1) Tenkan-Sen/Kijun-Sen Cross
Bullish: Tenkan-Sen is above the Kijun-Sen.
Bearish: Tenkan-Sen is below the Kijun-Sen.
2) Chikou-Span Cross
Bullish: Chikou-Span is above the close of 26 bars ago.
Bearish: Chikou-Span is below the close of 26 bars ago.
3) Price versus Kumo Cloud
Bullish: Close is above the Kumo Cloud.
Bearish: Close is below the Kumo Cloud.
Notes:
1) Long-only or short-only direction is feasible by checkbox. Stop and reverse strategy is taken by default.
2) Built-in Ichimoku indicator is strictly wrong because of counting one extra bar for all Ichimoku components.
Including the current bar like moving average is correct way in Japan. This problem is fixed in my script.
MestreDoFOMO MACD VisualMasterDoFOMO MACD Visual
Description
MasterDoFOMO MACD Visual is a custom indicator that combines a unique approach to MACD with stochastic logic and simulated Renko-based direction signals. It is designed to help traders identify entry and exit opportunities based on market momentum and trend changes, with a clear and intuitive visualization.
How It Works
Stylized MACD with Stochastic: The indicator calculates the MACD using EMAs (exponential moving averages) normalized by stochastic logic. This is done by subtracting the lowest price (lowest low) from a defined period and dividing by the range between the highest and lowest price (highest high - lowest low). The result is a MACD that is more sensitive to market conditions, magnified by a factor of 10 for better visualization.
Signal Line: An EMA of the MACD is plotted as a signal line, allowing you to identify crossovers that indicate potential trend reversals or continuations.
Histogram: The difference between the MACD and the signal line is displayed as a histogram, with distinct colors (fuchsia for positive, purple for negative) to make momentum easier to read.
Simulated Renko Direction: Uses ATR (Average True Range) to calculate the size of Renko "bricks", generating signals of change in direction (bullish or bearish). These signals are displayed as arrows on the chart, helping to identify trend reversals.
Purpose
The indicator combines the sensitivity of the Stochastic MACD with the robustness of Renko signals to provide a versatile tool. It is ideal for traders looking to capture momentum-based market movements (using the MACD and histogram) while confirming trend changes with Renko signals. This combination reduces false signals and improves accuracy in volatile markets.
Settings
Stochastic Period (45): Sets the period for calculating the Stochastic range (highest high - lowest low).
Fast EMA Period (12): Period of the fast EMA used in the MACD.
Slow EMA Period (26): Period of the slow EMA used in the MACD.
Signal Line Period (9): Period of the EMA of the signal line.
Overbought/Oversold Levels (1.0/-1.0): Thresholds for identifying extreme conditions in the MACD.
ATR Period (14): Period for calculating the Renko brick size.
ATR Multiplier (1.0): Adjusts the Renko brick size.
Show Histogram: Enables/disables the histogram.
Show Renko Markers: Enables/disables the Renko direction arrows.
How to Use
MACD Crossovers: A MACD crossover above the signal line indicates potential bullishness, while below suggests bearishness.
Histogram: Fuchsia bars indicate bullish momentum; purple bars indicate bearish momentum.
Renko Arrows: Green arrows (upward triangle) signal a change to an uptrend; red arrows (downward triangle) signal a downtrend.
Overbought/Oversold Levels: Use the levels to identify potential reversals when the MACD reaches extreme values.
Notes
The chart should be set up with this indicator in isolation for better clarity.
Adjust the periods and ATR multiplier according to the asset and timeframe used.
Use the built-in alerts ("Renko Up Signal" and "Renko Down Signal") to set up notifications of direction changes.
This indicator is ideal for day traders and swing traders who want a visually clear and functional tool for trading based on momentum and trends.
Full Day Midpoint Line with Dynamic StdDev Bands (ETH & RTH)A Pine Script indicator designed to plot a midpoint line based on the high and low prices of a user-defined trading session (typically Extended Trading Hours, ETH) and to add dynamic standard deviation (StdDev) bands around this midpoint.
Session Midpoint Line:
The midpoint is calculated as the average of the session's highest high and lowest low during the defined ETH period (e.g., 4:00 AM to 8:00 PM).
This line represents a central tendency or "fair value" for the session, similar to a pivot point or volume-weighted average price (VWAP) anchor.
Interpretation:
Prices above the midpoint suggest bullish sentiment, while prices below indicate bearish sentiment.
The midpoint can act as a dynamic support/resistance level, where price may revert to or react at this level during the session.
Dynamic StdDev Bands:
The bands are calculated by adding/subtracting a multiple of the standard deviation of the midpoint values (tracked in an array) from the midpoint.
The standard deviation is dynamically computed based on the historical midpoint values within the session, making the bands adaptive to volatility.
Interpretation:
The upper and lower bands represent potential overbought (upper) and oversold (lower) zones.
Prices approaching or crossing the bands may indicate stretched conditions, potentially signaling reversals or breakouts.
Trend Identification:
Use the midpoint as a reference for the session’s trend. Persistent price action above the midpoint suggests bullishness, while below indicates bearishness.
Combine with other indicators (e.g., moving averages, RSI) to confirm trend direction.
Support/Resistance Trading:
Treat the midpoint as a dynamic pivot point. Price rejections or consolidations near the midpoint can be entry points for mean-reversion trades.
The StdDev bands can act as secondary support/resistance levels. For example, price reaching the upper band may signal a potential short entry if accompanied by reversal signals.
Breakout/Breakdown Strategies:
A strong move beyond the upper or lower band may indicate a breakout (bullish above upper, bearish below lower). Confirm with volume or momentum indicators to avoid false breakouts.
The dynamic nature of the bands makes them useful for identifying significant price extensions.
Volatility Assessment:
Wider bands indicate higher volatility, suggesting larger price swings and potentially riskier trades.
Narrow bands suggest consolidation, which may precede a breakout. Traders can prepare for volatility expansions in such scenarios.
The "Full Day Midpoint Line with Dynamic StdDev Bands" is a versatile and visually intuitive indicator well-suited for day traders focusing on session-specific price action. Its dynamic midpoint and volatility-adjusted bands provide valuable insights into support, resistance, and potential reversals or breakouts.
Enhanced BTC Order Block IndicatorThe script you provided is an "Enhanced BTC Order Block Indicator" written in Pine Script v5 for TradingView. It is designed to identify and visually mark Order Blocks (OBs) on a Bitcoin (BTC) price chart, specifically tailored for a high-frequency scalping strategy on the 5-minute (M5) timeframe. Order Blocks are key price zones where institutional traders are likely to have placed significant buy or sell orders, making them high-probability areas for reversals or continuations. The script incorporates customizable filters, visual indicators, and alert functionality to assist traders in executing the strategy outlined earlier.
Key Features and Functionality
Purpose:
The indicator detects bullish Order Blocks (buy zones) and bearish Order Blocks (sell zones) based on a predefined percentage price movement (default 0.5–1%) and volume confirmation.
It marks these zones on the chart with colored boxes and provides alerts when an OB is detected.
User-Configurable Inputs:
Price Move Range: minMovePercent (default 0.5%) and maxMovePercent (default 1.0%) define the acceptable price movement range for identifying OBs.
Volume Threshold: volumeThreshold (default 1.5x average volume) ensures OB detection is backed by significant trading activity.
Lookback Period: lookback (default 10 candles) determines how many previous candles are analyzed to find the last candle before a strong move.
Wick/Body Option: useWick (default false) allows users to choose whether the OB zone is based on the candle’s wick or body.
Colors: bullishOBColor (default green) and bearishOBColor (default red) set the visual appearance of OB boxes.
Box Extension: boxExtension (default 100 bars) controls how far the OB box extends to the right on the chart.
RSI Filter: useRSI (default true) enables an RSI filter, with rsiLength (default 14), rsiBullishThreshold (default 50), and rsiBearishThreshold (default 50) for trend confirmation.
M15 Support/Resistance: useSR (default true) and srLookback (default 20) integrate M15 timeframe swing highs and lows for additional OB validation.
Core Logic:
Bullish OB Detection: Identifies a strong upward move (0.5–1%) with volume above the threshold. It then looks back to the last bearish candle before the move to define the OB zone. RSI > 50 and proximity to M15 support/resistance (optional) enhance confirmation.
Bearish OB Detection: Identifies a strong downward move (0.5–1%) with volume confirmation, tracing back to the last bullish candle. RSI < 50 and M15 resistance proximity (optional) add validation.
The OB zone is drawn as a rectangle from the high to low of the identified candle, extended rightward.
Visual Output:
Boxes: Uses box.new to draw OB zones, with left set to the previous bar (bar_index ), right extended by boxExtension, top and bottom defined by the OB’s high and low prices. Each box includes a text label ("Bullish OB" or "Bearish OB") and is semi-transparent.
Colors distinguish between bullish (green) and bearish (red) OBs.
Alerts:
Global alertcondition definitions trigger notifications for "Bullish OB Detected" and "Bearish OB Detected" when the respective conditions are met, displaying the current close price in the message.
Helper Functions:
f_priceChangePercent: Calculates the percentage price change between open and close prices.
isNearSR: Checks if the price is within 0.2% of M15 swing highs or lows for support/resistance confluence.
How It Works
The script runs on each candle, evaluating the current price action against the user-defined criteria.
When a bullish or bearish move is detected (meeting the percentage, volume, RSI, and S/R conditions), it identifies the preceding candle to define the OB zone.
The OB is then visualized on the chart, and an alert is triggered if configured in TradingView.
Use Case
This indicator is tailored for your BTC scalping strategy, where trades last 1–15 minutes targeting 0.3–0.5% gains. It helps traders spot institutional order zones on the M5 chart, confirmed by secondary M1 analysis, and integrates with your use of EMAs, RSI, and volume. The customizable settings allow adaptation to varying market conditions or personal preferences.
Limitations
The M15 S/R detection is simplified (using swing highs/lows), which may not always align perfectly with manual support/resistance levels.
Alerts depend on TradingView’s alert system and require manual setup.
Performance may vary with high volatility or low-volume periods, necessitating parameter adjustments.
Multi-Timeframe Continuity Custom Candle ConfirmationMulti-Timeframe Continuity Custom Candle Confirmation
Overview
The Timeframe Continuity Indicator is a versatile tool designed to help traders identify alignment between their current chart’s candlestick direction and higher timeframes of their choice. By coloring bars on the current chart (e.g., 1-minute) based on the directional alignment with selected higher timeframes (e.g., 10-minute, daily), this indicator provides a visual cue for confirming trends across multiple timeframes—a concept known as Timeframe Continuity. This approach is particularly useful for day traders, swing traders, and scalpers looking to ensure their trades align with broader market trends, reducing the risk of trading against the prevailing momentum.
Originality and Usefulness
This indicator is an original creation, built from scratch to address a common challenge in trading: ensuring that price action on a lower timeframe aligns with the trend on higher timeframes. Unlike many trend-following indicators that rely on moving averages, oscillators, or other lagging metrics, this script directly compares the bullish or bearish direction of candlesticks across timeframes. It introduces the following unique features:
Customizable Timeframes: Users can select from a range of higher timeframes (5m, 10m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1M) to check for alignment, making it adaptable to various trading styles.
Neutral Candle Handling: The script accounts for neutral candles (where close == open) on the current timeframe by allowing them to inherit the direction of the higher timeframe, ensuring continuity in trend visualization.
Table: A table displays the direction of each selected timeframe and the current timeframe, helping identify direction in the event you don't want to color bars.
Toggles for Flexibility: Options to disable bar coloring and the debug table allow users to customize the indicator’s visual output for cleaner charts or focused analysis.
This indicator is not a mashup of existing scripts but a purpose-built tool to visualize timeframe alignment directly through candlestick direction, offering traders a straightforward way to confirm trend consistency.
What It Does
The Timeframe Continuity Indicator colors bars on your chart when the direction of the current timeframe’s candlestick (bullish, bearish, or neutral) aligns with the direction of the selected higher timeframes:
Lime: The current bar (e.g., 1m) is bullish or neutral, and all selected higher timeframes (e.g., 10m) are bullish.
Pink: The current bar is bearish or neutral, and all selected higher timeframes are bearish.
Default Color: If the directions don’t align (e.g., 1m bar is bearish but 10m is bullish), the bar remains the default chart color.
The indicator also includes a debug table (toggleable) that shows the direction of each selected timeframe and the current timeframe, helping traders diagnose alignment issues.
How It Works
The script uses the following methodology:
1. Direction Calculation: For each timeframe (current and selected higher timeframes), the script determines the candlestick’s direction:
Bullish (1): close > open / Bearish (-1): close < open / Neutral (0): close == open
Higher timeframe directions are fetched using Pine Script’s request.security function, ensuring accurate data retrieval.
2. Alignment Check: The script checks if all selected higher timeframes are uniformly bullish (full_bullish) or bearish (full_bearish).
o A higher timeframe must have a clear direction (bullish or bearish) to trigger coloring. If any selected timeframe is neutral, alignment fails, and no coloring occurs.
3. Coloring Logic: The current bar is colored only if its direction aligns with the higher timeframes:
Lime if the higher timeframes are bullish and the current bar is bullish or neutral.
Maroon if the higher timeframes are bearish and the current bar is bearish or neutral.
If the current bar’s direction opposes the higher timeframe (e.g., 1m bearish, 10m bullish), the bar remains uncolored.
Users can disable bar coloring entirely via the settings, leaving bars in their default chart color.
4. Direction Table:
A table in the top-right corner (toggleable) displays the direction of each selected timeframe and the current timeframe, using color-coded labels (green for bullish, red for bearish, gray for neutral).
This feature helps traders understand why a bar is or isn’t colored, making the indicator accessible to users unfamiliar with Pine Script.
How to Use
1. Add the Indicator: Add the "Timeframe Continuity Indicator" to your chart in TradingView (e.g., a 1m chart of SPY).
2. Configure Settings:
Timeframe Selection: Check the boxes for the higher timeframes you want to compare against (default: 10m). Options include 5m, 10m, 15m, 30m, 1h, 2h, 4h, 1D, 1W, and 1M. Select multiple timeframes if you want to ensure alignment across all of them (e.g., 10m and 1d).
Enable Bar Coloring: Default: true (bars are colored lime or maroon when aligned). Set to false to disable coloring and keep the default chart colors.
Show Table: Default: true (table is displayed in the top-right corner). Set to false to hide the table for a cleaner chart.
3. Interpret the Output:
Colored Bars: Lime bars indicate the current bar (e.g., 1m) is bullish or neutral, and all selected higher timeframes are bullish. Maroon bars indicate the current bar is bearish or neutral, and all selected higher timeframes are bearish. Uncolored bars (default chart color) indicate a mismatch (e.g., 1m bar is bearish while 10m is bullish) or no coloring if disabled.
Direction Table: Check the table to see the direction of each selected timeframe and the current timeframe.
4. Example Use Case:
On a 1m chart of SPY, select the 10m timeframe.
If the 10m timeframe is bearish, 1m bars that are bearish or neutral will color maroon, confirming you’re trading with the higher timeframe’s trend.
If a 1m bar is bullish while the 10m is bearish, it remains uncolored, signaling a potential misalignment to avoid trading.
Underlying Concepts
The indicator is based on the concept of Timeframe Continuity, a strategy used by traders to ensure that price action on a lower timeframe aligns with the trend on higher timeframes. This reduces the risk of entering trades against the broader market direction. The script directly compares candlestick directions (bullish, bearish, or neutral) rather than relying on lagging indicators like moving averages or RSI, providing a real-time, price-action-based confirmation of trend alignment. The handling of neutral candles ensures that minor indecision on the lower timeframe doesn’t interrupt the visualization of the higher timeframe’s trend.
Why This Indicator?
Simplicity: Directly compares candlestick directions, avoiding complex calculations or lagging indicators.
Flexibility: Customizable timeframes and toggles cater to various trading strategies.
Transparency: The debug table makes the indicator’s logic accessible to all users, not just those who can read Pine Script.
Practicality: Helps traders confirm trend alignment, a key factor in successful trading across timeframes.
Market Sentiment Index US Top 40 [Pt]▮Overview
Market Sentiment Index US Top 40 [Pt} shows how the largest US stocks behave together. You pick one simple measure—High Low breakouts, Above Below moving average, or RSI overbought/oversold—and see how many of your chosen top 10/20/30/40 NYSE or NASDAQ names are bullish, neutral, or bearish.
This tool gives you a quick view of broad-market strength or weakness so you can time trades, confirm trends, and spot hidden shifts in market sentiment.
▮Key Features
► Three Simple Modes
High Low Index: counts stocks making new highs or lows over your lookback period
Above Below MA: flags stocks trading above or below their moving average
RSI Sentiment: marks overbought or oversold stocks and plots a small histogram
► Universe Selection
Top 10, 20, 30, or 40 symbols from NYSE or NASDAQ
Option to weight by market cap or treat all symbols equally
► Timeframe Choice
Use your chart’s timeframe or any intraday, daily, weekly, or monthly resolution
► Histogram Smoothing
Two optional moving averages on the sentiment bars
Markers show when the faster average crosses above or below the slower one
► Ticker Table
Optional on-chart table showing each ticker’s state in color
Grid or single-row layout with adjustable text size and color settings
▮Inputs
► Mode and Lookback
Pick High Low, Above Below MA, or RSI Sentiment
Set lookback length (for example 10 bars)
If using Above Below MA, choose the moving average type (EMA, SMA, etc.)
► Universe Setup
Market: NYSE or NASDAQ
Number of symbols: 10, 20, 30, or 40
Weights: on or off
Timeframe: blank to match chart or pick any other
► Moving Averages on Histogram
Enable fast and slow averages
Set their lengths and types
Choose colors for averages and markers
► Table Options
Show or hide the symbol table
Select text size: tiny, small, or normal
Choose layout: grid or one-row
Pick colors for bullish, neutral, and bearish cells
Show or hide exchange prefixes
▮How to Read It
► Sentiment Bars
Green means bullish
Red means bearish
Near zero means neutral
► Zero Line
Separates bullish from bearish readings
► High Low Line (High Low mode only)
Smooth ratio of highs versus lows over your lookback
► MA Crosses
Fast MA above slow MA hints rising breadth
Fast MA below slow MA hints falling breadth
► Ticker Table
Each cell colored green, gray, or red for bull, neutral, or bear
▮Use Cases
► Confirm Market Trends
Early warning when price makes highs but breadth is weak
Catch rallies when breadth turns strong while price is flat
► Spot Sector Rotation
Switch between NYSE and NASDAQ to see which group leads
Watch tech versus industrial breadth to track money flow
► Filter Trade Signals
Enter longs only when breadth is bullish
Consider shorts when breadth turns negative
► Combine with Other Indicators
Use RSI Sentiment with trend tools to spot overextended moves
Add volume indicators in High Low mode for breakout confirmation
► Timeframe Analysis
Daily for big-picture bias
Intraday (15-min) for precise entries and exits
Directional Movement Index (DMI) + AlertsThis is a Study with associated visual indicators and Bullish/Bearish Alerts for Directional Movement (DMI). It consists of an Average Directional Index (ADX), Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI).
Published by J. Welles Wilder in 1978 for use with currencies and commodities which are typically more volatile than stocks and have stronger trends.
Development Notes
---------------------------
This indicator, and most of the descriptions below, were derived largely from the TradingView reference manual. Feedback and suggestions for improvement are more than welcome, as well are recommended Input settings and best practices for use.
tradingview.com/chart/?solution=43000502250
Strategy Description
---------------------------
ADX defines whether or not there is a trend present; +DI and -DI compliment the ADX by taking direction into account. An ADX above 25 indicates a strong trend, and a Bullish alert is subsequently triggered when +DI is above -DI and a Bearish alert when -DI is above +DI.
Note that the Bullish or Bearish crossover alert will only trigger if ADX is simultaneously above 25 during the crossover event. If ADX later rises to 25 and +DI is still greater than -DI, or -DI greater than +DI, then a delayed alert will not trigger by design.
Basic Use
---------------------------
Acceptable DMI values are up to the trader's interpretation and may change depending on the financial instrument being examined. Recommend not changing any default values without being first familiar with their purpose and impact on the indicator at large.
Confidence in price action and trend is higher when two or more indicators are in agreement -- therefore we recommend not using this indicator by itself to determine entry or exit trade opportunities.
Recommend also choosing 'Once Per Bar Close' when creating alerts.
Inputs
---------------------------
ADX Smoothing - the time period to be used in calculating the ADX which has a smoothing component (14 is the Default).
DI Length - the time period to be used in calculating the DI (14 is the Default).
Key Level - any trade with the ADX above the key level is a strong indicator that it is trending (23 to 25 is the suggested setting).
Sensitivity - an incremental variable to test whether the past n candles are in the same bullish or bearish state before triggering a delayed crossover alert (3 is the Default). Filter out some noise and reduces active alerts.
Show ADX Option - two visual styles are provided for user preference, a visible ADX line or a background overlay (green or red when ADX is above the key level, for bullish or bearish, and gray when below).
Color Candles - an option to transpose the bullish and bearish crossovers to the main candle bars. Can be turned off in the Style Tab by deselecting 'Bar Colors'. Dark blue is bullish, dark purple is bearish, and the black inner color is neutral. Note that the outer red and green border will still be distinguished by whether each individual candle is bearish or bullish during the specified timeframe.
Indicator Visuals
---------------------------
Bullish or Bearish plot based on DMI strategy (ADX and +/-DI values).
Visual cues are intended to improve analysis and decrease interpretation time during trading, as well as to aid in understanding the purpose of this study and how its inclusion can benefit a comprehensive trading strategy.
Trend Strength
---------------------------
To analyze trend strength, the focus should be on the ADX line and not the +DI or -DI lines. An ADX reading above 25 indicates a strong trend, while a reading below 20 indicates a weak or non-existent trend. A reading between those two values would be considered indeterminable. Though what is truly a strong trend or a weak trend depends on the financial instrument being examined; historical analysis can assist in determining appropriate values.
Bullish DI Cross
---------------------------
1. ADX must be over 25 (strong trend) (value is determined by the trader)
2. +DI cross above -DI
3. Set Stop Loss at the current day's low (any +DI cross-backs below -DI should be ignored)
4. Set trailing stop if ADX strengthens (i.e., signal rises)
Bearish DI Cross
---------------------------
1. ADX must be over 25 (strong trend) (value is determined by the trader)
2. -DI cross above +DI
3. Set Stop Loss at the current day's high (any -DI cross-backs below +DI should be ignored)
4. Set trailing stop if ADX strengthens (i.e., signal rises)
Disclaimer
---------------------------
This post and the script are not intended to provide any financial advice. Trade at your own risk.
No known repainting.
Version 1.1
-------------------------
- Added multi-timeframe resolution using PineCoders secure security function to eliminate repainting.
- Cleaned up option for selecting ADX view; and added a colored line as a choice, based on same bullish, bearish, or neutral colors as the background.
- Added exit crossover indicator to aid in an overall strategy development. This ability pairs better with my CHOP Zone Entry Strategy which relies on DMI Exits. Note that exit conditions don't employ the sensitivity variable. Green labels are for Bullish exits and red are for Bearish.
-- Exit condition is triggered if in an active Bullish or Bearish position and ADX drops below 25, Or if either the -DI crosses above +DI (for previously Bullish) or +DI crosses above -DI (for previously Bearish).
- Added reverse position determination. Triggers when a Bullish entry occurs on the same candle as a Bearish exit, or vice versa. Green labels are for Bullish reverses and red are for Bearish.
- Added selectable option to choose visible labels -- Bearish, Bullish, Both, Exits, Reverses, or All.
-- Note that a reverse label will only show if the opposing entry and exit labels are set to show, otherwise the reverse will revert to the appropriate entry or exit on the chart.
- Added alerts to account for new conditions.
-- Note that alerts for crossovers, exits, and reverses will only be triggered if the associated labels are selected to be shown (i.e., what you choose to see on the chart is what you will be alerted to).
Version 1.2
-------------------------
- Changed exit condition to be decided on by whether ADX is below 25 and on a +/-DI crossover. Versus being either or. The previous version had too many false triggers. This variety can now show multiple Bullish or Bearish alerts before an Exit condition too. I'm tempted to simply make this condition based on ADX, and not DI … thoughts? See lines 138 and 139.
- Updated the Background view to have deeper shades of colors dependent upon the ADX trend strength.
- Added an Oscillator view for the ADX and momentum computations to color the histogram by trend. DI lines are hidden.
-- If ADX is Bullish, then the oscillator is colored light green in an uptrend and dark green in a downtrend; if Bearish, then its light red in an uptrend and dark redin a downtrend; if adx is below key level, then it is light gray in a downtrend and dark grey in the uptrend.
- Added option to Hide ADX in case only the Directional lines are desired. This could be useful if you would like to have the ADX oscillator in one panel and +/-DI crossovers in another.
- Added a Columnar view for the ADX. DI lines are hidden. This view is really simple and compact, with the trend strength still easily understood. Colors are the same as for the oscillator -- the deeper the shade of green or red, then the higher the ADX trend strength level.
- Added a Trend Strength label.
ADX Trend Strength Trade (Y/N) Setup Types
0 to 10 = Barely Breathing N N/A
10 to 20 = Weak Trend Y Range/Pre-Breakout
20 to 30 = Potentially Starting to Trend Y Early Stage Trend
30 to 50 = Strong Trend Y Ride the Wave
50 to 75 = Very Strong Trend N Exhaustion
75 to 100 = Extremely Strong Trend N N/A
Version 1.3
-------------------------
Updated to Pine Script v5 to resolve errors from the deprecated v4 version.
This is a reissue of a previously published script that was hidden due to a v4 compatibility issue.
'https://www.tradingview.com/script/9OoEHrv5-Directional-Movement-Index-DMI-Alerts/'
C&B Auto MK5C&B Auto MK5.2ema BullBear
Overview
The C&B Auto MK5.2ema BullBear is a versatile Pine Script indicator designed to help traders identify bullish and bearish market conditions across various timeframes. It combines Exponential Moving Averages (EMAs), Relative Strength Index (RSI), Average True Range (ATR), and customizable time filters to generate actionable signals. The indicator overlays on the price chart, displaying EMAs, a dynamic cloud, scaled RSI levels, bull/bear signals, and market condition labels, making it suitable for swing trading, day trading, or scalping in trending or volatile markets.
What It Does
This indicator generates bull and bear signals based on the interaction of two EMAs, filtered by RSI thresholds, ATR-based volatility, a 50/200 EMA trend filter, and user-defined time windows. It adapts to market volatility by adjusting EMA lengths and RSI thresholds. A dynamic cloud highlights trend direction or neutral zones, with candlestick coloring in neutral conditions. Market condition labels (current and historical) provide real-time trend and volatility context, displayed above the chart.
How It Works
The indicator uses the following components:
EMAs: Two EMAs (short and long) are calculated on a user-selected timeframe (1, 5, 15, 30, or 60 minutes). Their crossover or crossunder triggers potential bull/bear signals. EMA lengths adjust based on volatility (e.g., 10/20 for volatile markets, 5/10 for non-volatile).
Dynamic Cloud: The area between the EMAs forms a cloud, colored green for bullish trends, red for bearish trends, or a user-defined color (default yellow) for neutral zones (when EMAs are close, determined by an ATR-based threshold). Users can widen the cloud for visibility.
RSI Filter: RSI is scaled to price levels and plotted on the chart (optional). Signals are filtered to ensure RSI is within volatility-adjusted bull/bear thresholds and not in overbought/oversold zones.
ATR Volatility Filter: An optional filter ensures signals occur during sufficient volatility (ATR(14) > SMA(ATR, 20)).
50/200 EMA Trend Filter: An optional filter restricts bull signals to bullish trends (50 EMA > 200 EMA) and bear signals to bearish trends (50 EMA < 200 EMA).
Time Filter: Signals are restricted to a user-defined UTC time window (default 9:00–15:00), aligning with active trading sessions.
Market Condition Labels: Labels above the chart display the current trend (Bullish, Bearish, Neutral) and optionally volatility (e.g., “Bullish Volatile”). Up to two historical labels persist for a user-defined number of bars (default 5) to show recent trend changes.
Visual Aids: Bull signals appear as green triangles/labels below the bar, bear signals as red triangles/labels above. Candlesticks in neutral zones are colored (default yellow).
The indicator ensures compatibility with standard chart types (e.g., candlestick or bar charts) to produce realistic signals, avoiding non-standard types like Heikin Ashi or Renko.
How to Use It
Add to Chart: Apply the indicator to a candlestick or bar chart on TradingView.
Configure Settings:
Timeframe: Choose a timeframe (1, 5, 15, 30, or 60 minutes) to match your trading style.
Filters:
Enable/disable the ATR volatility filter to focus on high-volatility periods.
Enable/disable the 50/200 EMA trend filter to align signals with the broader trend.
Enable the time filter and set custom UTC hours/minutes (default 9:00–15:00).
Cloud Settings: Adjust the cloud width, neutral zone threshold, color, and transparency.
EMA Colors: Use default trend-based colors or set custom colors for short/long EMAs.
RSI Display: Toggle the scaled RSI and its thresholds, with customizable colors.
Signal Settings: Toggle bull/bear labels and set signal colors.
Market Condition Labels: Toggle current/historical labels, include/exclude volatility, and adjust decay period.
Interpret Signals:
Bull Signal: A green triangle or “Bull” label below the bar indicates potential bullish momentum (EMA crossover, RSI above bull threshold, within time window, passing filters).
Bear Signal: A red triangle or “Bear” label above the bar indicates potential bearish momentum (EMA crossunder, RSI below bear threshold, within time window, passing filters).
Neutral Zone: Yellow candlesticks and cloud (if enabled) suggest a lack of clear trend; consider range-bound strategies or avoid trading.
Market Condition Labels: Check labels above the chart for real-time trend (Bullish, Bearish, Neutral) and volatility status to confirm market context.
Monitor Context: Use the cloud, RSI, and labels to assess trend strength and volatility before acting on signals.
Unique Features
Volatility-Adaptive EMAs: Automatically adjusts EMA lengths based on ATR to suit volatile or non-volatile markets, reducing manual configuration.
Neutral Zone Detection: Uses an ATR-based threshold to identify low-trend periods, helping traders avoid choppy markets.
Scaled RSI Visualization: Plots RSI and thresholds directly on the price chart, simplifying momentum analysis relative to price.
Flexible Time Filtering: Supports precise UTC-based trading windows, ideal for day traders targeting specific sessions.
Historical Market Labels: Displays recent trend changes (up to two) with a decay period, providing context for market shifts.
50/200 EMA Trend Filter: Aligns signals with the broader market trend, enhancing signal reliability.
Notes
Use on standard candlestick or bar charts to ensure accurate signals.
Test the indicator on a demo account to optimize settings for your market and timeframe.
Combine with other analysis (e.g., support/resistance, volume) for better decision-making.
The indicator is not a standalone system; use it as part of a broader trading strategy.
Limitations
Signals may lag in fast-moving markets due to EMA-based calculations.
Neutral zone detection may vary in extremely volatile or illiquid markets.
Time filters are UTC-based; ensure your platform’s timezone settings align.
This indicator is designed for traders seeking a customizable, trend-following tool that adapts to volatility and provides clear visual cues with robust filtering for bullish and bearish market conditions.