Mackrani RSI Trend WITH COLORSMACKRANI RSI WITH COLORS
Hull Trend is a hybrid indicator with RSI of HULL Signal. The Hull MA is combined with RSI to see if the Hull MA Buy/Sell Signal is in overbought or oversold condition. Buy Sell Signals are plotted based on settings of OB/OS or RSI .
This indicator is very useful to see if the Trend is in Exhaustion or Beginning of a Trend. Entry and Exit conditions can be more precise based on OB/OS condition of price action. In addition normal RSI trend is plotted with trend color from Hull MA. Best Performance with Heiken Ashi Candle
:- OB/OS Settings provided
:- Hull Buy/Sell Signals plotted
:- Double RSI FAST and DEFAULT signal with crossover
:- Bar Color applied based on Hull RSI Trend
:- Hull Trend + RSI + Price Action
Cari dalam skrip untuk "trend"
Pivot TrendLineThe simplest version of the indicator automatically draws trendLine on your charts, with build-in functions only.
You can change the looking back length settings to get more proper lines you want.
There is also a switch to turn off the historical trendlines.
You can use this to build more advanced indicators or strategies.
Poster Trend AnalysisThis trend analysis indicator is an idea from:
Stocks & Commodities V. 40:03 (8–12): Intraday Patterns Of Price Change by Richard Poster, PhD
We decide an uptrend or downtrend is in play, if there are certain percentage of bars across N bars where the direction is the same. The default settings use what the article says, 66% of adjacent 15 bars must be in the same direction, to be trending. While the article isn't precise about what up or down bars mean, this indicator assumes an up direction if close is greater than the open.
The indicator also allows differing configurations for up and downtrend analysis, though the defaults, as per the article, are the same.
Volatility Percentile🎲 Volatility is an important measure to be included in trading plan and strategy. Strategies have varied outcome based on volatility of the instruments in hand.
For example,
🚩 Trend following strategies work better on low volatility instruments and reversal patterns work better in high volatility instruments. It is also important for us to understand the median volatility of an instrument before applying particular strategy strategy on them.
🚩 Different instrument will have different volatility range. For instance crypto currencies have higher volatility whereas major currency pairs have lower volatility with respect to their price. It is also important for us to understand if the current volatility of the instrument is relatively higher or lower based on the historical values.
This indicator is created to study and understand more about volatility of the instruments.
⬜ Process
▶ Volatility metric used here is ATR as percentage of price. Other things such as bollinger bandwidth etc can also be used with few changes.
▶ We use array based counters to count ATR values in different range. For example, if we are measuring ATR range based on precision 2, we will use array containing 10000 values all initially set to 0 which act as 10000 buckets to hold counters of different range. But, based on the ATR percentage range, they will be incremented. Let's say, if atr percent is 2, then 200th element of the array is increased by 1.
▶ When we do this for every bar, we have array of counters which has the division on how many bars had what range of atr percent.
▶ Using this array, we can calculate how many bars had atr percent more than current value, how many had less than current value, and how many bars in history has same atr percent as current value.
▶ With these information, we can calculate the percentile of atr percentage value. We can also plot a detailed table mentioning what percentile each range map to.
⬜ Settings
▶ ATR Parameters - this include Moving average type and Length for atr calculation.
▶ Rounding type refers to rounding ATR percentage value before we put into certain bucket. For example, if ATR percentage 2.7, round or ceil will make it 3, whereas floor will make it 2 which may fall into different buckets based on the precision selected.
▶ Precision refers to how much detailed the range should be. If precision set to 0, then we get array of 100 to collect the range where each value will represent a range of 1%. Similarly precision of 1 will lead to array of 1000 with each item representing range of 0.1. Default value used is 2 which is also the max precision possible in this script. This means, we use array of 10000 to track the range and percentile of the ATR.
▶ Display Settings - Inverse when applied track percentile with respect to lowest value of ATR instead of high. By default this is set to false. Other two options allow users to enable stats table. When detailed stats are enabled, ATR Percentile as plot is hidden.
▶ Table Settings - Allows users to select set size and coloring options.
▶ Indicator Time Window - Allow users to select particular timeframe instead of all available bars to run the study. By default windows are disabled. Users can chose start and end time individually.
Indicator display components can be described as below:
Currency Strength Meter [HeWhoMustNotBeNamed]⬜ Note: This is not the strength of currency pairs. But, in this script we are trying to derive strength of individual currencies by matching against single base currency.
⬜ Process
This is based on similar concept as that of Magic Numbers for stocks. Idea is simple.
▶ Calculate strength of each currency against USD. Derive the strength for both price movement and volume movement.
▶ Similarly calculate momentum of price and volume change.
▶ If USD is base currency, inverse momentum and strength index for the given symbol.
▶ Once these calculations are done, rank each currencies based on individual score on given things.
▶ Add up all the ranks to derive combined rank
▶ sort the currencies in the ascending order of overall rank.
⬜ USAGE
▶ Identify a base currency. In our case, we have used USD as base currency as it is easy to get pairs of all currencies with USD.
▶ Identify most used combos for all other currencies which are paired with USD. Fx pair can either have USD as base currency or quote currency. It is desirable to use the pair which is most traded. For example, USDJPY is more traded pair than JPYUSD - hence it is advisable to use USDJPY instead of JPYUSD. Similarly AUDUSD is more traded than USDAUD - hence choosing AUDUSD for the purpose of this exercise is better approach. Notice that USDJPY has USD as base currency whereas AUDUSD has USD as quote currency. These calculations are handled internally to derive the right outcome irrespective of position of USD in the pair.
▶ Identify the forex broker which has all the selected forex tickers. All comparison is done against a single broker. Hence, choosing broker which does not wide range of forex pairs will show NAN for many rows.
▶ Once we set these, we get tabular output containing strength and oscillator based trend indexes for both price and volume indicator. Currencies are ordered in descending order of strength. Hence, top of the list can be considered as currency having highest strength and bottom of the table can be considered as currency having lowest strength. Please note that the calculation is valid only for selected timeframe and users can set other parameters such as moving average type, oscillator type, length etc which can alter the outcome.
▶ Use multiple timeframes to find out stronger and weaker currencies. Use directional indicators to understand where they are heading. Combine all these info to come up with currency pair you would like to trade :)
⬜ Settings
▶ Main settings and Currencies
Base Currency : This is set to USD by default as rest of the tickers used are paired with USD. Whatever the base currency is selected, rest of the tickers should follow the same combination.
Timeframe : Timeframe for which rankings need to be calculated.
Currencies : These should be the currency pair which involve base currency defined in the setting on either side.
▶ Display
Table : Allows users to set table location and size of the table. By default this is set to middle center and default size is normal. If user want to use multiple timeframes side by side, they can do so by changing these display settings.
Stat Type : To show either comparative ranking or actual indicator values
Inverse Divergence [HeWhoMustNotBeNamed]Experimental.
In regular scenario divergence calculation follows these procedure
Pivots on price are considered as primary source
They are compared with pivots on oscillators
Trend bias of price is used
This is an experimental version where
Pivots on oscillators are considered as primary source
They are compared with pivots on price
Trend bias of oscillator is used. Using percentrank to define oscillator trend
Caution: Not meant for trading :)
ADX and DI EMA Trend LineADX: The average directional index (ADX) is a technical analysis indicator used by some traders to determine the strength of a trend.
DI: The directional movement index (DMI) is an indicator developed by J. Welles Wilder in 1978 that identifies in which direction the price of an asset is moving. ... Conversely, if -DI is above +DI, then there is more downward pressure on the price. This indicator may help traders assess the trend direction.
EMA: The exponential moving average (EMA) is a technical chart indicator that tracks the price of an investment (like a stock or commodity) over time. The EMA is a type of weighted moving average (WMA) that gives more weighting or importance to recent price data.
UPDATE: This current indicator has been changed from MA and EMA trend lines the 9 and the 50, and also added Inside & Outside bars...You can toggle anything Off or On
The code in this indicator calculates the value of each ADX and DI (+/-) value to give a green color for DI + trend and a red color for DI - trend, and lastly white for no direction...The nice part of this code is the 50 EMA will be your bull or bear transition level. The colors heading to the ema will tell you if we are still bull or bear heading to the EMA.
I also changed the ADX to become the 9 EMA with Yellow showing a ADX positive rate of change, Blue showing a negative rate of change, and white to show that the trend has no direction.
Open settings to adjust how big or small you want the ema lines to be and adjust colors for what works for you. Hopefully you enjoy this update
Multilevel ZigZag SupertrendVery much similar to :
I have slightly changed code to accommodate multiple zigzags. Also removed possibility of external source to keep it simple.
Indicator shows 2 Level zigzag based supertrends. Second zigzag used is multi level zigzag and hence, this acts as higher timeframe filter and can be considered as overall trend bias.
Strategy TemplateTrying to include few basic things which is needed for strategy which can be used as template.
Few important components
Strategy parameters
Few important parameters include - initial_capital, default_qty_type, default_qty_value, commission_type, pyramiding and commission_value. All my strategies will have similar settings with initial captial set to 20000 to 100000. 100% of equity per trade with no pyramiding (set to 1) and minimal commission.
margin_long and margin_short can be used for leveraged trading. But, since we are not using pyramiding, it will make no effect.
Trade Limiting parameters
Two types of limiting is available in the scripts
Limiting trading direction : this is done through method strategy.risk.allow_entry_in and input parameter tradeDirection
Limiting trades to particular time window : This is achieved through adding start time and end time parameters of type input.time and check whether time is within this window
Custom Methods
customized security method to get higher timeframe data
customized moving average method to get moving average of any type
Custom Parameters
Moving average Type option list which I use quite often. Any strategy where there is need to use moving average, I try to scan through different moving average types and lengths to see which one is more appropriate for the given strategy. Hence, keeping this parameter in template to make it readily available when I start with new strategy
waitForCloseBeforeExit - this is used if trailing stop need to activated as soon as price hits the stop or only on close price. This is again something I switch quite often based on strategy. Hence, keeping this as part of the template.
Entry and Exit statements for long and short
These statements from line (57 to 62) can remain as is even with new strategy. Only thing to be set are variables - buyCondition, sellCondition, closeBuyCondition and closeSellCondition
Last but not the least
In pinescript, a long and short position cannot coexist in a strategy at any point of time. Any short positions created will automatically stop long positions and vice versa. Hence, it is important make short and long trades mutually exclusive. In this example, I have used 200 weekly moving average as trend bias. No short positions are taken when price is trading above 200 weekly moving average low/close and no long positions are taken when price is less than 200 weekly moving average high/close. Any rule built on top of this (In this case a simple supertrend rules) ensures that there are no conflicting signals and hence avoids confusing trades on the stratgy.
Price Adjusted ADX Trend IdentifierUsed to identify trend by applying advance decline formula directly to price action. The result is smoothed activity that incorporates trend strength so that minor pullbacks and consolidation that result from large moves do not cloud the overall trend of the chart. Also sideways action will identify the end of a trend sooner by incorporating the shrinking advance decline activity into price action.
The value is less important than the trend identification against the shown imbedded Bollinger band.
The script allows for advance decline length to be adjusted. Set at 2. Longer will be less reactive shorter will be more reactive.
I have not traded this indicator but it may be useful in identifying smoother trends. Possibly using the cross of the ADX line against the Bollinger upper/lower/mid lines.
Enjoy.
ZigZag SupertrendBack to my favourite supertrend. But, this time on the basis of zigzag pivots.
This is similar to forming supertrend based on pivot high lows - but instead of using pivot poitns, we are using zigzag pivots here.
Zigzag is derived using the same method as this script:
But, have removed labels and display options of zigzag. Older lines are also immediately deleted so that it can work well in lower timeframes without any error. Number of zigzaglines to be kept in memory depends on the parameter History
WaitForConfirmation option when selected only considers the confirmed zigzaglines and will ignore present zigzag line which is forming. This is not going to make much difference as the present zigzag line will be always opposite to low or high it formed and hence will not affect the stop loss levels or reversals.
WaitForClose is for supertrend determination. When checked uses close prices. If unchecked uses highs and lows for supertrend direction update.
ATR parameters allow you to set an adjustment below pivot high lows. This is required because support and resistence are often zones rather than single point. Hence, adds bit more wiggle room for trend continuation and delays frequent reversals on pullbacks.
Minervini Trend TemplateMinervini Trend Template
1. Stock price is above MA 150 and 200
2. MA 150 is above MA 200
3. MA 200 is trending at least 1 month(22 days)
4. MA 50 is above both MA 150 and MA 200
5. Current stock price is 25% above 52 weeks low
6. Current Price is within 25% of 52 week high
7. RS Ratings
Multitimeframe Pivot HiLoPivot High/Low for multi timeframes.
Could be great entry filter to include multi time frame pivots in trend trading strategies.
Crypto trend HelperThis is a good tool for chart 2 hours and bellow
the screener script taken from //script taken from with his consent.
long and short determine by my script Trend M version 1
it set up to daily MTF so if it above the mean it green or buy,bellow it it sell
R1 and S1 by percentage from mean set to 7 % or 0.07
the channel is percentage channel set to 7 % up or low
the color of this channel set by
it function to see long trends
you can modify the alts inside the script or in menu\
thanks for Zekis for it help in the screener
TrendRangeIdentifier V3This is non-overlay version of
Since, we plot trend value which keeps incrementing/decrementing upon every step, this also helps us in identifying strength of trend and how long the trend is going on.
Other changes:
Removed display of channels
Coloring candles made optional
Supertrend - Delayed TrailI use supertrend for for trailing stops. One of the problem of trailing stops in long term trend trading is we get stopped too early and then trend continues. To avoid this problem, we can limit or delay our trailing.
In this modified version of supertrend, we can delay trailing by two methods:
Bars : Trail after certain bars. Input DelayBars says after how many bars it should trail.
Steps : Trail after reaching equivalent stop on the other side.
ConsiderWicks option reverse direction upon high reaching trailing Sell stop or low reaching trailing buy stop (instead of close)
ConsiderWicksForDelayByStep does the same thing for calculating if the steps have reached.
Super Trend-adxJust hybrid of Super trend and ADX
above zero=bullish=blue
bellow zero=bearish=red
nice way to see trends
DMI & ADX Trend indicator - colour coded DMI and ADX plotted on an indicator. ADX histogram is colored when above value of 20 and rising when aligned with trend direction as defined by DMI criteria. (Green=Bullish & trending / Red=Bearish & trending)
True Channel TrendSo I make hybrid using Alex Grover and follow the trend line script
I think it more accurate this way to show channels of trends
The length of the curve set to 100 , you can make it smaller if you want to see smaller channels for analysis
here on daily chart you can see how accurate it show the trend reverse from march to bullish trend
follow the trend lineOk this indicator give us the direction of trend
So all you need is to follow the color (red =bearish) ,green=bullish and if the direction going up (bullish) down =bearish
So it make life easy to see if you are in bullish or bearish trends
MA Crossover with Adaptive Trend Strength📘 MA Crossover with Adaptive Trend Strength —
📌 Overview
This TradingView indicator plots two moving averages (Fast & Slow) with user-selected types (T3, EMA, SMA, HMA), visual crossovers, and dynamically calculates an adaptive trend strength score using Z-scores of multiple features. Optional higher timeframe (HTF) confirmation is supported. A color-filled region between the MAs visually indicates momentum direction.
⚙️ Inputs & Controls
📈 Moving Average Settings
Fast MA Length: Length of the fast-moving average (default: 9).
Slow MA Length: Length of the slow-moving average (default: 21).
MA Type: Type of moving average used (T3, EMA, SMA, HMA).
Source: Input data source (default: close).
T3 Volume Factor: Only used when T3 is selected, controls smoothing (range: 0–1).
🎨 Visual Controls
Bullish Fill Color: Fill color when Fast MA is above Slow MA.
Bearish Fill Color: Fill color when Fast MA is below Slow MA.
Show Gradient Fill: Enable or disable the colored area between Fast & Slow MAs.
Trend Label Position: Choose where the trend strength label appears (top or bottom).
Label Update Interval: Number of bars between label updates (reduces clutter).
⏱ Multi-Timeframe Support
Higher Timeframe: Timeframe used for confirmation (default: 60 min).
Use HTF Confirmation: Enables filtering of trend score by higher timeframe trend direction.
📊 Lookback Configuration
Auto Lookback Based on Timeframe: Dynamically adapts scoring lookback period per chart timeframe.
Manual Lookback: Manual fallback lookback length when auto is off.
🧮 MA Calculation Options
T3 MA: Custom T3 function with exponential moving averages and volume factor.
EMA/SMA: Built-in Pine functions (ta.ema, ta.sma).
HMA: Hull Moving Average using WMA calculations.
📉 Trend Strength Calculation
🧠 Z-Score Inputs
Distance between MAs (zDist)
Slope of the Fast MA (zSlope)
Volume (zVol)
ATR (zATR)
📏 Choppiness & Adaptive Weighting
A Choppiness Index (based on ATR & price range) reduces score impact in sideways markets.
Dynamically adjusts Z-score weights:
W1: Distance
W2: Slope
W3: Volume
W4: ATR
🔁 HTF Confirmation
Optionally multiplies the trend score by the direction of the higher timeframe trend to filter noise.
🟩 Plot & Visual Elements
📊 MA Lines
Plots Fast and Slow MA lines in colors based on selected MA type.
🌈 Gradient Fill
Fills the area between Fast and Slow MAs with opacity proportional to their difference.
Colors based on bullish/bearish condition.
🏷️ Trend Strength Label
Updates every n bars (Label Update Interval).
Shows:
Trend Classification: Weak, Moderate, Strong
Numerical Score
Label position (top or bottom) is configurable.
🔔 Crossover Signals
Bullish Crossover ("B"): Fast MA crosses above Slow MA.
Bearish Crossover ("S"): Fast MA crosses below Slow MA.
Labels are plotted at crossover points.
Old labels are removed after a threshold (100) to reduce chart clutter.
📋 Score Summary Table
A table showing:
Max Score within the lookback period
Min Score
HTF Confirmation Status (ON / OFF)
Updates on the same user-defined interval as the trend label.
🚨 Alerts
Condition Description
Bullish MA Cross Fast MA crosses above Slow MA
Bearish MA Cross Fast MA crosses below Slow MA
These are provided via alertcondition() for use in alert creation.
📌 Customization Tips
Turn off the gradient fill for a cleaner chart.
Use HTF confirmation to reduce false positives in ranging markets.
Adjust label update frequency to prevent visual clutter on faster timeframes.
Use T3 MA with volume factor for smoother signals in volatile markets.
Smoothed Heiken Ashi Trend OscillatorThe Smoothed Heiken Ashi Oscillator is a visually clean trend and momentum indicator based on reverse-calculated and optionally smoothed Heiken Ashi data.
It calculates the distance between the actual closing price and a reconstructed smoothed Heiken Ashi value to visualize trend direction and strength. Optional smoothing (SMA, EMA, HMA, VWMA, RMA) helps reduce noise.
Colored histogram bars indicate trend direction (bullish/bearish) and momentum (accelerating/decelerating). An optional info box shows live trend and momentum values.
Ideal for trend confirmation, reversal spotting, and gauging strength in combination with moving averages or price action setups.