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.
在腳本中搜尋"trend"
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:
CEDCR - momentum and trend analysisDESCRIPTION
CEDCR is a momentum and trend analysis script, visualized by a pair of lines (Top and Bottom) that signal strength and direction of upcoming moves. The lines tend to converge and diverge around a midpoint line of 0.31-0.33 (the midpoint line is slightly different depending on the asset class). When the lines are converging it signals trend reversal and when they are diverging it indicates strength.
SCRIPT MECHANICS
CEDCR lines are calculated using a combination of Moving Averages, RSI and OnBalanceVolume.
KEY LEVEL
Midpoint Level : 0.31-0.33, most asset classes have the lines converging and diverging around the midpoint line.
HOW TO USE
- Lines converging: Upcoming reversal of current trend.
- Lines diverging: Strengthening of current trend.
- Bottom(purple) line crossing over Top(green) line is bearish .
- Top (green) line crossing over Bottom(purple) is bullish .
SIGNALS
The signals are just an additional helpful visual aid.
Buy signal is the green band when divergence between Top and Bottom > 0.05 on Top line crosses over Bottom line.
Sell signal is the red band when divergence between Top and Bottom has weakened below 0.5.
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 :)
The Updated Trending Band IndicatorThis indicator shows the trend of the market. The middle line is the 200-day moving average because it shows the long term trend of the market. However, since the market does give fake signals of going up and down through the 200-day moving average, I had to put a band on it to push through the fake signals. The first band around the middle line is 1 standard deviation of historical volatility which gives an area of cushion to prevent fake signals. The goal is if the stock is above the first top band, then the stock is in an uptrend. If the stock is below the first bottom band, then the stock is in a downtrend. If it is the middle of the first bands, then the stock is known to be rangebound.
The top most and bottom most yellow lines are 4 standard deviations of historical volatility which give an idea of where the floor and ceiling are. This helps investors and traders identify good buy and sell zones using the yellow lines to see overbought and oversold sides.
This is a great indicator for people who need help following the trend of a stock, etf , etc.
This indicator is different from the other ones I have posted because the underlying algorithm has been improved and updated by multiplying the expected move by 90%.
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.
Breakout Candles V2Enhanced Breakout Candles indicator. On top of existing Breakout Candles, this also identifies stop and target distance based on trend.
cardi - trend followingTrading strategy tries to get involved in trends at the beginning in the low time frame. Instead of staying flat, the statistical components in the algorithm help strategy to stay in the trend as long as it predicts that buyers or sellers will continue to profit.
Backtest is calculated by using 10% of equity and 0.075% market fee is defined as default. Commission may differ depending on the preferred exchange to trade.
PM us to obtain access.
Stock Algorithm Trend AnalysisThis algorithm is meant to be used on stocks but also works well with cryptocurrencies, forex pairs and indexes. This software helps traders take advantage of momentum trading and by riding trends. It works best when playing the underlying symbol in a bullish sense when the algorithm says "likely to rise" and in a bearish sense when the algorithm says "likely to fall".
Send me a private message on TradingView to gain access.
Jedi Knight 15 minute chart XBTUSD Trend Following ScriptThis script is meant mainly for use on BitMex's XBTUSD instrument, on the 15 minute chart, and provides buy and sell signals for use in the event the user would like to automate it. Read below for more information on how it might be used:
The underlying logic in this script reads specific indicator conditions to identify when a change in medium term trend direction is taking place. This script is great at ignoring the short-term choppy conditions that BTC /USD often goes through, which can cause other indicators to give conflicting signals and flip-flop often.
The BTC /USD market is one that trends often, and because this script is specifically meant to identify medium term trends, it is meant for use specifically on BitMex's XBTUSD instrument. It is built with a Stop-Loss input included to minimize any losses, and currently works most profitably with a 3% Stop-Loss set.
It can be used in all conditions on the BitMex XBTUSD market.
Send a private message to request access.
Jedi Knight 15 minute chart XBTUSD Trend Following ScriptThis script is meant mainly for use on BitMex's XBTUSD instrument, on the 15 minute chart, and provides buy and sell signals for use in the event the user would like to automate it. Read below for more information on how it might be used:
The underlying logic in this script reads specific indicator conditions to identify when a change in medium term trend direction is taking place. This script is great at ignoring the short-term choppy conditions that BTC /USD often goes through, which can cause other indicators to give conflicting signals and flip-flop often.
The BTC /USD market is one that trends often, and because this script is specifically meant to identify medium term trends, it is meant for use specifically on BitMex's XBTUSD instrument. It is built with a Stop-Loss input included to minimize any losses, and currently works most profitably with a 3% Stop-Loss set.
It can be used in all conditions on the BitMex XBTUSD market.
Send a private message to request access.
Super Trend-adxJust hybrid of Super trend and ADX
above zero=bullish=blue
bellow zero=bearish=red
nice way to see trends
NKP Trend Trader V1NKP Trend Trader is an indicator. It will plot buy / sell signal in live market based on custom calculated information about entry points at close of the candle. Buy/ Sell signal is the best entry point but you can enter at the next candle.
we can see the Trend line and signals like Buy/Sell - 5 min candle (Intraday trading)
we can see the trend line formed with two colors(Red or Green). If the Trend line color change from red to green then buy signal will generate with green color label with "Buy" text once see the buy signal then go for long in the next candle open.
If the Trend line color change from green to red then sell signal will generate with red color label with "Sell" text once see the sell signal then go for short in the next candle open.
How does it work?
buy - Take the buy order in the next candle open after Buy signal and book profit when signal change to sell( trend line color changes from green to red)
sell - Take the sell order in the next candle open after Sell signal and book profit when signal change to buy( trend line color changes from red to green)
What are the signals?
Yes it will generate the buy/sell signals in the live market
these signal will plot Green color label with "Buy"/Red color label with "Sell" based on signal.
Can we set the Alert on this?
Yes, we can set the alert based on the signals
Two custom alerts - NKP Buy , NKP Sell
IMPORTANT: this script does not generate exit signals and those should be find using money management rules or else. Perfectly catches long runs in trends at all underlings (stocks, indexes ) at 5 min time frame. Lower/High period gives more incorrect signals and shorter runs on below 5 min period , higher period gives you late entry and less. Of course it gives false signals from time to time but fortunately it makes a correction very fast.
Try it! Good luck and good trading!
"Use the link below to obtain access to this indicator" or "PM us to obtain access."