Seth_Signal
This script designed to identify up, down, and sideways trends. 200 HMA , 9 EMA , PSAR, and ATR are used to identify the strength of any instrument.
Candle Colors - Simpler approach to follow:
Green color indicates for up side trade signals
Red color indicates for down side trade signals
Yellow color can be interpreted for stop, sideways, and counter trade trade signals
Multiple Trade Setups:
Green Zone - Trading green candles within green zone has better odds of long trades
Red Zone - Trading red candles within red zone has better odds of short trades
200 HMA - Candles above 200 HMA mostly for long trades. Candles below 200 HMA usually for short trades. But the zone also very important to consider
9 EMA - Cross over above 200 HMA in Green zone, look for long trades. Cross over below 200 HMA in red zone, look for short trades
PSAR - This can be used as potential initial warning sign. Also can be used to exit partial or wait for it goes to opposite side for taking trade decisions
Candle Above all - If Green candle and above all the indicators, then very good sign of long side. If red candle and below all indicators, then very good sign of short side.
Multiple Time Frame:
This works very well with any instrument and on any time frame. Always its better to do analysis on multi time frame before entry, exit, and trade execution. Back test it with this setup and also observe it on live market. That will give edge in taking trade decisions. All the best and happy trading.
متوسط المدى الحقيقي
SuperTrend OptimizerHello!
This indicator attempts to optimize Supertrend parameters. To achieve this, 102 parameter combinations are tested concurrently - the top three performers are listed in descending order.
Parameters,
Factor: Changes to this parameter shifts the tested factor range. For instance, increasing the factor measure from 3.00 to 3.01 (+0.01) will remove 3.00 from the tested range - this setting controls the lower threshold of the range. The upper threshold, in all instances, is the lower Factor threshold + 3.3 (i.e. 3.0(lower) - 6.3(upper), 4.0(lower) - 7.3(upper), 2.5(lower) - 5.8(upper))
ATR period: Changes to this parameter shifts the tested ATR period range. For instance, increasing the ATR measure from 10 to 11 (+1) will remove 10 from the tested range - this setting controls the lower threshold of the range. The upper threshold, in all instances, is the lower threshold + 2 (i.e. 10(lower) - 12(upper), 11(lower) - 13(upper), 9(lower), - 11(upper))
The Factor parameter is modifiable to any positive decimal number; the ATR parameter is modifiable to any positive integer. Changing either parameter shifts the tested parameter combination range. Both parameters can be changed in the settings, to which you control the lower threshold of the range. If, for instance, you were to change the Factor measurement from 3.0 to 4.1 (+1.1) the 4.0 Factor measurement, and all Factor measures less than 4.0, will be excluded from the performance test.
Consequently, a Supertrend test will be performed with a Factor of 4.1 and an ATR period of 10 (default). This test repeats at 0.1 Factor intervals and 1.0 ATR intervals.
Therefore, assume you modify the Factor lower threshold to 3.1 and the ATR lower threshold to 10. The indicator will test three Supertrend systems with a Factor of 3.1 and an ATR period of 10.. then 11.. 12, then three systems with a Factor of 3.2 and an ATR period of 10.. then 11.. 12... until (lower Factor threshold + 3.3) and (lower ATR threshold + 2) are tested... which in this example is... a Factor of 6.4 and an ATR period of 12.
The tested Factor range and ATR range are displayed in a bottom right table alongside the top performing parameter combinations.
Of course, you can change the the lower thresholds, which means you can test numerous Supertrend parameter combinations! However, no greater than 102 parameter combinations will be tested simultaneously; the best performing Supertrend parameters are plotted on the chart automatically.
I will be working on this indicator more tomorrow! Let me know if you have questions or anything you would like included!
(I of course added something fun in the script. Be sure to try it with bar replay!)
ATR Trading SetupThis simple script base on function of ATR Trailing Stop (aka SuperTrend) to plot Trading Setup on chart with detail as below:
1. Type of Average True Range (ATR)
+ The function calculate ATR may base on 1 of 3 type of Average: RMA, SMA, EMA
2. Trading Setup
2.1 Long setup
+ SuperTrend is upTrend
+ Entry Long at (or below) last value ATR Trailing Stop of Previous Trend (DownTrend)
+ Stop loss at first value ATR Trailing Stop of now Trend (upTrend)
+ Take profit at first value ATR Trailing Stop of Previous Trend (downTrend)
+ Move stop loss follow ATR Trailing Stop (green dot)
2.1 Short setup
+ SuperTrend is downTrend
+ Entry Short at (or above) last value ATR Trailing Stop of Previous Trend (upTrend)
+ Stop loss at first value ATR Trailing Stop of now Trend (downTrend)
+ Take profit at first value ATR Trailing Stop of Previous Trend (upTrend)
+ Move stop loss follow ATR Trailing Stop (red dot)
4c ATR ThresholdThe 4C ATR Threshold is a simple indicator that paints the chart background red when the ATR goes below the user defined ATR minimum.
Some trading setups have specific criteria that require a minimum ATR on a certain timeframe for the instrument to be playable.
The painting of the chart background based on the ATR value is useful as a quick visual reference.
The minimum ATR value can be adjusted to any specific level for any timeframe.
If the ATR dips below the user defined minimum, the trader can quickly see that the ATR is below the minimum criteria, and should not trade that instrument (based on their personal trade criteria).
If the background is not painted by the indicator, then the ATR is above the user defined minimum.
Parts of this script used the default/stock Tradingview ATR indicator to build from.
Volatility indicator based on ATR Hello,
I'm sharing to you a volatility indicator I've done in the last few weeks based on ATR. There is multiple functionalities on this indicator, the first one is an overlay displaying when an asset is in an "overvolatily zone"
(displayed with red cross) and when we are in an "undervolatily zone" (displayed with green cross). You can change the sensibility of the signals in the parameters if you wish to have more or less greedy signals
(it will only modify the overvolatility signals). By the way those signals are not working for week-ends because volatility works differently on week-ends and it's not a good idea to count week-ends in the calculations, so do not worry if you see no signals on weekends.
Second part of the indicator is something I called "Atr bands" it's an equivalent to the famous Bollinger-Bands but based on ATR. I haven't backtested them yet but they seems really interesting in low ut
(15 mins seems to be the best ut for those) and they seems pretty bad in high ut so they can maybe be useful for low ut scalping.
Last thing, there is a parameter allowing you to display bands on the week-ends so you can easily see where the indicator won't give signals.
I would be really happy if I could have some feedsback if you try the indicator :)
Have a wonderful day
4C ATR w/ Reference LineThe 4C ATR is a simple indicator that plots a horizontal line on the ATR indicator, which can be used as a minimum or maximum reference value.
Some trading setups have specific criteria that require a minimum ATR on a certain timeframe for the instrument to be playable. The horizontal line is useful as a quick visual reference, and can be adjusted to any specific level for any timeframe. If the ATR dips below the horizontal line, the trader can quickly see that the ATR is below the minimum criteria, and should not trade that instrument (based on their personal trade criteria).
This indicator also features a color change of the ATR line based on trend direction. If the ATR is trending up, it is painted blue, and if it starts to trend down, it is painted red. It uses a hidden simple moving average of the ATR, and the slope direction of the moving average paints the ATR line. The moving average length can be adjusted, and is set at a length of 8 for default. The ATR is set at a default value of 14.
Parts of this script used the default/stock Tradingview ATR indicator to build off of.
[BA] ATR Stop LineThis indicator helps you to set your stoploss levels by using ATR. Traders often use atr values in order to calculate their stoploss levels.
This indicator does the calculation for you and draw two tiny lines without messing up the chart so that you can easily see your stoploss levels and get an idea about the volatility and risk amount as well.
One line is below the last candle as a long trade stop loss level and the other one is above the last candle as a short trade stop loss level.
Calculation is simple:
For short trades, 2 times ATR added to last price;
For long trades, 2 times ATR subtracted from last price.
You can change ATR length, ATR multiplier and the line length.
Good luck.
Long Term Heat/Volatility - Accumulation/Distribution v1This is a strategy specifically made for 1D BTC/USD with the aim of capturing cycle tops and bottoms. It's mainly based on two indicators: 21d average of ATR (volatility) and (BTC.price - 180d sma)/BTC.price (heat). The strategy only signals buys or sells after occurrences of high volatility, followed by extremely high or low heat values. It's optimized for utilizing accumulation and distribution at lower and higher prices respectively with respect to last 14 days. 2nd version will include dynamic dollar cost averaging during the accumulation and distribution periods.
Position Size Calc. (Risk Management Tool)Programmed this tool to help prevent overtrading.
Example of application:
Suppose you want to trade ETHUSDT on a 1 minute chart and you are only willing to risk $10 in one single trade. This way, if you get stopped out, then you will only lose $10. Say you are using ATR based stop loss at 2x current ATR to set the initial stop. All these variables are now fixed, so you must make an adjustment to the size of your position.
Quick illustration: Tolerable loss per trade is $10 , the current ATR of ETHUSDT is $4.06, the size of your stop is $8.12 (4.06*2), then your position size should be 1.2 ETH ($10/$8.12).
This script will constantly monitor the current ATR and display the optimal position size on chart. Tolerable loss (aka "Risk amount") is defined by user in settings. Lines showing the size of SL and TPs on chart are optional, it was added to the script to help users draw the long/short position measuring tools built into TradingView.
Other notes: Always consider market liquidity, size of bid-ask spreads, and the possibilities of gap ups/downs. It can never be guaranteed that stop market/limit orders will get filled at desirable prices. Actual stop losses might differ.
Volatility Cloud (SAR)Inspired by the Volatility Index from Wilder
Apply the SAR point to highs, lows ans medians and create a cloud of volatility
Bar By Bar ATR [upslidedown]After seeing strategy after strategy refer to calculating ATR values using a "calculator" (how barbaric!), I thought I'd take a stab at one possible solution to the "problem" as an overlay indicator on the main chart that replaces traditional standard ATR bands. This indicator presents ATR within a channel with a slick trick: invisible hover-able tooltips for you to know the ATR value for your strategy from bar to bar. Just zoom in and hover over the high ATR range and you'll see take profit and stop loss values for whatever strategy you might be running. I defaulted the indicator to a 1:1.5 ATR standard setup because that is good for many strategies but this is as configurable as you'd like to make it. One notable improvement for this indicator over standard ATR bands is that many existing ATR bands only use integers and this one uses a float value, so you can endlessly customize based on whatever strategy you might be running.
Note: Because labels are limited by default, the best way to historically see ATR values is to use TV's replay feature. I did this on purpose to limit resource usage. One could certainly print more labels but I felt it unnecessary to go beyond the default number of labels.
Minimalistic ATRI have a thing for efficiency, as I'm sure many of you do as well. One could say we are minimalist. As such, wasting precious chart space is absolutely unacceptable. Such precious commodity should only be used for things that are pleasing to the eye and mind. This minimalistic ATR filter will give you all the functions a regular ATR provide, without all the clutter of plotting on the chart. Enjoy
The height of cultivation always runs to simplicity.
Anna-LysaEspecially useful when using it for stocks in intraday screening for daytrading.
This gives you quick information about the volatility at the moment when you look at the stock.
The current range of the last candles (adjustable) is calculated so that you can stop based on the Vola.
In addition, the daily volume and daily range are calculated in the table and what is left of the average.
So that you can adjust your ideas for the movement in order to take profit. No matter what the timeframe, you can see how the volume compares to that of the previous few candles and thus anticipate the most likely breakout.
Then the most relevant day trading levels ( Premarkets, Lastday high/lows and some Ma´s ) are shown so that you can get a very fast overview of the stock at the moment.
All levels and labels and colors are adjustable or hidden in the settings.
Chandelier Exit - StrategyI created a strategy version for the Chandelier Exit indicator, originally owned by @everget . With the strategy I prepared, you can try both short-long and stop loss - trailing stop and take profit rates. I have also added a date filter feature so that you can test the strategy in the date range you want.
Orjinali @everget 'e ait olan Chandelier Exit indicator için strateji versiyonu oluşturdum. Hazırladığım strateji ile hem short-long deneyebilir hem de zarar durdur - takip eden stop ve kar al oranları denemeleri yapabilirsiniz. İstediğiniz tarih aralığında strateji testi yapabilmeniz için tarih filtre özelliği de ekledim.
ATR TREXTry to visualize TREX method.
-4 types of candle based on TR :
1. Spinning ( Candle < 0.8*ATR )
2. Standard ( 0.8*ATR < Candle < 1.2*ATR )
3. Long bar ( 1.2*ATR < Candle < 2.5*ATR )
4. Spike ( 2.5*ATR < Candle )
ATR length is different base on FRACTAL timeframes.
you can now find what is type of candle as colored ATR.
-Time frames :
1 Min
5 Min
15 Min
1 Hour
4 Hour
1 Day
1 Week
1 Month
I am working on TREX method and this indicator will change and improve . (V1.0)
Br
Amin
Hourly Bias on BTC in Bullish USA Session “Green Eagle”Name: Hourly Bias on BTC in Bullish USA Session
Category: Hourly Bias
Operating mode: Spot, only long
Trades duration: Intraday, 11 bars
Timeframe: 1H
Suggested usage: When the market is compressed, USA session has a bullish bias.
Entry: enter Long at 15:00 on specific days of the week. There is a volatility filter based on ATR which identifies compression.
Exit: exit at a pre-defined time at 01:00
Usage:
⁃ It can be useful to use alerts or webhooks to automate this strategy.
⁃ This is a core system that can be improved in different ways (e.g. Stop-loss, take-profit, position sizing) or studying more the behaviour in the specific days of the week or short when is red.
Configuration:
- N/A
Backtesting
⁃ Exchange: BINANCE
⁃ Pair: BTCUSDT
⁃ Timeframe: 1H
⁃ Fee 0.075%
⁃ Slippage 2
- Start : 2019-01-06
We decided to release this free BTC strategy.
How you or we can improve? Source code is open so share your ideas!
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:
Nearest Percentile Moving Average BandsWhile coding some filters into another indicator for Long/Short I noticed that ta.nearest.percentile might be the most useful tool in pinescript I've ever encountered.
While percentile_nearest can be used for all kind of things I decided to code moving averages from it and made bands for bottom percentage and top percentage.
The indicator will calculate the top % price of the given bar length.
Example settings:
length: 150
percentile: 99
So when using 99% it will draw a green line when price is moving above the top 1% price of the last 150 candles. It then calculates if the price is below the bottom 1% of the last 150 candles.
Trading use:
Use this indicator to check if the market is leaving normal territory. This signals a breakout move for example the dogecoin pump or the top of the range. I use this indicator to catch bull/bear moves for botting purposes. An other use would be to countertrend trade after the move has ended. With price being in top 1% for a while it is very probable that we see a large correction.
Below example of dogecoin pumps:
Secondary Chart with OverSized CandlesHi everyone, I'm sharing a simple script I made for a friend. He was looking for a way to add another asset to his chart, and monitor relevant movements \ spot eventual correlation, especially when trading Cryptocurrencies.
We couldn't find a similar script already available so here it is - the code is commented and I hope it's clear enough :)
Notes:
- The parameter scale = scale.left keeps the scales separated and therefore the chart is more organized, otherwise the chart would appear flat if the price difference is too big (e.g. BTC vs XRP)
- It is possible to have the script running in a separate panel (instead of overlay) by moving it to a new pane (when added to the chart) or by removing the parameter overlay = true at the beginning of the code.
- In case you wish to add indicators to this sub-chart (e.g. Bollinger Bands, EMA, etc..) you can do that by adding the relevant code and feed it with the variables OPEN \ HIGH \ LOW \ CLOSE as well as using the same method to retrieve new variables from the target asset with the request.security function.
Hope this comes handy.
Val - Protervus
[JL] n Bars Average True RangeI just want to use 1-hour ATR on a 5-min chart, but I don't want to use the security function to get 1-hour ATR.
I don't know if there is a similar script but I decided to change a little from the original ATR source code.
Just change tr function to n_true_range function:
math.max(ta.highest(high,n) - ta.lowest(low,n), math.max(math.abs(ta.highest(high,n) - close ), math.abs(ta.lowest(low,n) - close )))
Here is the comparison image from a 5-min chart with the nATR and a 1-hour chart with the original ATR.
TR High/Low meterInteresting take for a velocity and trend analysis indicator, I call it The TR high/low meter.
First it will find the highest high and lowest low based on X bars back.
Now comes the twist, instead of storing these lowest or highest prices, we store the TR (true range) into the appropriate array (one array for lowest and one array for highest).
Finally, we sum up these two arrays for highest TR's and lowest TR's and subtract each other to get the difference, Hench, see who is stronger.
In the end we plot the difference into the indicator we have here.
The plot is colored with gradient color in which bright color emphasizes the movement is strong and weaker color emphasizes the movement is getting weaker.
Basically this indicator shows us the asset trend direction and strength. Awesome!
==Colors and Bar Colors==
Green: Up Trending
Light Green: Weakening up trend
Red: Down Trending.
Light Red: Weakening Down Trending.
==Notes==
Bar coloring is enabled on this chart!
Supports EMA smoothing (disabled by default)
Like if you like and Enjoy! Follow for more upcoming indicators/strategies: www.tradingview.com
8X Trend ATR SAR Dingue V58X Trend ATR SAR Dingue V5 - This is the updated version for Pine Script 5.
8x indicator into 1 :
2x ATR indicator - 3x Trend indicator - 3x SAR indicator
Trends are helpful to spot reversal and support resistance, especially on bigger time frames.
This indicator gives you a global view of various trends all at once. You can easily turn them On or Off as to not clog the screen.
Each trend is also color-coded to visualize quickly the position of the price compared to it.
You can customize lengths, adjust line sizes, have the start of a new trend marked with a circle, fill in colors.
'Tool tips' explain other settings and if you have any questions, feel free to ask in the comments below.
Thank you for the feedback and check all my ‘Dingue’ indicators.