All Time LowThis script is to remind you of how much you would lose if the price went down to the all time low.
This will make you think twice about your purchases!
Stoploss
[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.
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.
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.
SignalsThis script allows you to calculate position size, and future profit, loses.
- You can add 3 target values and 1 stop loss
- Optionally you can display table, position it as you like, and see risk ratio
Plans:
- add profit loss to the labels
Kzx PT mod v1.0 by RX-RAYKzx Position tracker mod v1.0 by RX-RAY
Original script by K-zax
The modification was made for the USDRUB ticker (the number of digits in the values of price, interest, lot volume and profit loss for other tickers may affect the positioning of the inscription, but it is fully operative and it may be used with other tickers )
Typical label view:
74.30 - ENTRY PRICE
+/-0.16% - % of price chang ( range +/-9.99)
20 - position value (range 0-99)
(S) - position type (L) - long (S) - short
+/-0017 - actual profit/loss in cash (range +/- 9999)
(All range value for correct label position,
but script mod can be used out off range)
List of additions and changes:
1. Added display of position value, short / long position type and profit / loss value (including broker commission).
2. Positive interest change now corresponds to profit, negative change in interest to loss in accordance with the type of position ( short/long )
3. The position of the inscription and the digits of the values are fixed and now insignificantly depends on the change in the time interval and the change in the scale of the graph and the change in data values and their signs.
4. Added changing the color of the inscription in the situation positive price change, but profit < commission fee. (critical gain).
Trailing Stop AlertsThis script is designed as an ATR-based trailing stop tool to assist in managing open positions.
Once you're involved in a profitable trade, if you add this script to your chart you'll be prompted to select a bar to begin trailing from.
You can then adjust the candle lookback distance for swing high/lows (7 by default), the ATR multiplier (1.0 by default), and the direction to trail (Long/Short).
You can also adjust the ATR period in the settings menu if you want to (14 period by default).
Once the script is added to your chart, it will begin drawing your trailing stop and you can then set up alerts.
Alert Options:
Any alert() function call : Will trigger an alert for both conditions (trailing stop updated, trailing stop hit)
Alert Conditions : Trailing Stop Update will trigger whenever the stop is updated, Trailing Stop Hit will trigger whenever the stop is hit.
Note: the alerts will only fire once per bar close and the trailing stop will not update on realtime bars.
Trailing StopMost of the trailing stops on TradingView are made of using the lowest lows and the highest highs. Not many are based around what I called the volatile trailing stop.
This is where the trailing stop will move around according to a set percentage difference from the previous closing value. This allows you to say "If the current bar moves x percent, then stop". The script I've made here is a simple version of that with a few options for smoothing and setting the percent change.
Disclaimer: This is not financial advice, please do your own research before making any decisions.
Gain/StopLoss Percentage LinesGain/StopLoss Percentage Lines is a quick way to enter your Entry Price in to a stock and track the percentage of gain or loss at the 5% and 10% markers.
Click on the gear settings icon and type in your entry price. The percentage is defaulted to 5%. You can change this to a different percentage at this screen. Note that whatever number you enter will be doubled for the upper and lower lines. For instance, if you want to set your first red line stop loss and green gain line at 2.5%, your two other upper and lower green and red lines will be at 5%.
However, this will not change the text on the tab marker.
To change the tab text, go in to the Pine Editor and change the green text that says "5% Gain" and "5% Loss" to your new percentages.
vol_signalNote: This description is copied from the script comments. Please refer to the comments and release notes for updated information, as I am unable to edit and update this description.
----------
USAGE
This script gives signals based on a volatility forecast, e.g. for a stop
loss. It is a simplified version of my other script "trend_vol_forecast", which incorporates a trend following system and measures performance. The "X" labels indicate when the price touches (exceeds) a forecast. The signal occurs when price crosses "fcst_up" or "fcst_down".
There are only three parameters:
- volatility window: this is the number of periods (bars) used in the
historical volatility calculation. smaller number = reacts more
quickly to changes, but is a "noisier" signal.
- forecast periods: the number of periods for projecting a volatility
forecast. for example, "21" on a daily chart means the plots will
show the forecast from 21 days ago.
- forecast stdev: the number of standard deviations in the forecast.
for example, "2" means that price is expected to remain within
the forecast plot ~95% of the time. A higher number produces a
wider forecast.
The output table shows:
- realized vol: the volatility over the previous N periods, where N =
"volatility window".
- forecast vol: the realized volatility from N periods ago, where N =
"forecast periods"
- up/down fcst (level): the price level of the forecast for the next
N bars, where N = "forecast periods".
- up/down fcst (%): the difference between the current and forecast
price, expressed as a whole number percentage.
The plots show:
- blue/red plot: the upper/lower forecast from "forecast periods" ago.
- blue/red line: the upper/lower forecast for the next
"forecast periods".
- red/blue labels: an "X" where the price touched the forecast from
"forecast periods" ago.
+ NOTE: pinescript only draws a limited number of labels.
They will not appear very far into the past.
trend_vol_stopThe description below is copied from the script's comments. Because TradingView does not allow me to edit this description, please refer to the script's comments section, as well as the release notes, for the most up-to-date information.
----------
Usage:
The inputs define the trend and the volatility stop.
Trend:
The trend is defined by a moving average crossover. When the short
(or fast) moving average is above the long (slow) moving average, the
trend is up. Otherwise, the trend is down. The inputs are:
long: the number of periods in the long/slow moving average.
short: the number of periods in the short/fast moving average.
The slow moving average is shown in various colors (see explanation
below. The fast moving average is a faint blue.
Volatility stop:
The volatility stop has two modes, percentage and rank. The percentage
stop is given in terms of annualized volatility. The rank stop is given
in terms of percentile.
stop_pct and stop_rank are initialized with "-1". You need to set one of
these to the values you want after adding the indicator to your chart.
This is the only setting that requires your input.
mode: choose "rank" for a rank stop, "percentage" for a percentage stop.
vol_window: the number of periods in the historical volatility
calculation. e.g. "30" means the volatility will be a weighted
average of the previous 30 periods. applies to both types of stop.
stop_pct: the volatility limit, annualized. for example, "50" means
that the trend will not be followed when historical volatility rises
above 50%.
stop_rank: the trend will not be followed when the volatility is in the
N-th percentile. for example, "75" means the trend will not be
followed when the current historical volatility is greater than 75%
of previous volatilities.
rank_window: the number of periods in the rank percentile calculation.
for example, if rank_window is "252" and "stop_rank" is "80", the
trend will not be followed when current historical volatility is
greater than 80% of the previous 252 historical volatilities.
Outputs:
The outputs include moving averages, to visually identify the trend,
a volatility table, and a performance table.
Moving averages:
The slow moving average is colored green in an uptrend, red in a
downtrend, and black when the volatility stop is in place.
Volatility table:
The volatility table gives the current historical volatility, annualized
and expressed as a whole number percentage. E.g. "65" means the
instrument's one standard deviation annual move is 65% of its price.
The current rank is expressed, also as a whole number percentage. E.g.
"15" means the current volatility is greater than 15% of previous
volatilities. For convenience, the volatilities corresponding to the
0, 25, 50, 75, and 100th percentiles are also shown.
Performance table:
The performance table shows the current strategy's performance versus
buy-and-hold. If the trend is up, the instrument's return for that
period is added to the strategy's return, because the strategy is long.
If the trend is down, the negative return is added, because the strategy
is short. If the volatility stop is in (the slow moving average is
black), that period's return is excluded from the strategy returns.
Every period's return is added to the buy-and-hold returns.
The table shows the average return, the standard deviation of returns,
and the sharpe ratio (average return / standard deviation of returns).
All figures are expressed as per-period, whole number percentages.
For exmaple, "0.1" in the mean column on a daily chart means a
0.1% daily return.
The number of periods (samples) for each strategy is also shown.
trend_vol_forecastNote: The following description is copied from the script's comments. Since TradingView does not allow me to edit this description, please refer to the comments and release notes for the most up-to-date information.
-----------
USAGE
This script compares trend trading with a volatility stop to "buy and hold".
Trades are taken with the trend, except when price exceeds a volatility
forecast. The trend is defined by a moving average crossover. The forecast
is based on projecting future volatility from historical volatility.
The trend is defined by two parameters:
- long: the length of a long ("slow") moving average.
- short: the length of a short ("fast") moving average.
The trend is up when the short moving average is above the long. Otherwise
it is down.
The volatility stop is defined by three parameters:
- volatility window: determines the number of periods in the historical
volatility calculation. More periods means a slower (smoother)
estimate of historical volatility.
- stop forecast periods: the number of periods in the volatility
forecast. For example, "7" on a daily chart means that the volatility
will be forecasted with a one week lag.
- stop forecast stdev: the number of standard deviations in the stop
forecast. For example, "2" means two standard deviations.
EXAMPLE
The default parameters are:
- long: 50
- short: 20
- volatility window: 30
- stop forecast periods: 7
- stop forecast standard deviations: 1
The trend will be up when the 20 period moving average is above the 50
period moving average. On each bar, the historical volatility will be
calculated from the previous 30 bars. If the historical volatility is 0.65
(65%), then a forecast will be drawn as a fuchsia line, subtracting
0.65 * sqrt(7 / 365) from the closing price. If price at any point falls
below the forecast, the volatility stop is in place, and the trend is
negated.
OUTPUTS
Plots:
- The trend is shown by painting the slow moving average green (up), red
(down), or black (none; volatility stop).
- The fast moving average is shown in faint blue
- The previous volatility forecasts are shown in faint fuchsia
- The current volatility forecast is shown as a fuchsia line, projecting
into the future as far as it is valid.
Tables:
- The current historical volatility is given in the top right corner, as a
whole number percentage.
- The performance table shows the mean, standard deviation, and sharpe
ratio of the volatility stop trend strategy, as well as buy and hold.
If the trend is up, each period's return is added to the sample (the
strategy is long). If the trend is down, the inverse of each period's
return is added to the sample (the strategy is short). If there is no
trend (the volatility stop is active), the period's return is excluded
from the sample. Every period is added to the buy-and-hold strategy's
sample. The total number of periods in each sample is also shown.
money managementthis indicator has been designed to make your calculations easier and faster.
you can use this indicator to set tp and sl prices based on your entry price, balance,risk and leverage.
it has been designed only for cryptocurrency market and it is not recommended to use it in other markets!
1- enter your balance in the setting of the indicator.
2- enter risk percentage of your balance.
3- enter your sl percentage.
4- enter your tp percentage.
5- set your leverage if you are trading in futures market.
6- and at last set your entry price.
your position size both in spot market and futures market and the exact price of tp and sl , will be shown top right of the screen.
caution: before using this indicator in real market, please make sure that you understand this indicator's behavior and test it.
--------------------------------------------------------------------
این اندیکاتور برای تسریع محاسبات مدیریت سرمایه و سهولت رعایت آن طراحی شده است.
شما میتوانید با وارد کردن پارامترهاقیمت ورودی، سرمایه کل، ریسک و اهرم، قیمت حد سود و ضرر خود را محاسبه کنید.
همچنین اندازه حجم معاملات شما توسط این اندیکاتور محاسبه خواهد شد.
این اندیکاتور برای بازار کریپتوکارنسی طراحی شده است و استفاده از آن در سایر بازارها پیشنهاد نمیشود.
از بخش تنظیمات اندیکاتورمراحل زیر را انجام دهید:
1- میزان سرمایه خود را در قسمت بالانس وارد کنید
2- میزان ریسک سرمایه در هر معامله را مشخص کنید (به درصد)
3- میزان حد ضرر خود را مشخص کنید (به درصد)
4- میزان حد سود خود را مشخص کنید (به درصد)
5- عدد اهرم خود را وارد کنید
6- قیمت ورود به معامله را وارد کنید
توجه: قبل از استفاده این اندیکاتور در بازار لایو لطفا آن را تست کنید و از کارکرد صحیح آن با مدیریت سرمایه خود اطمینان حاصل فرمایید.
ATR Stop Loss FinderThis Indicator uses Average True Range (ATR) to determine a safe place to put stop losses to avoid being stop hunted or stopped out of a trade due to a tight stop loss. Default multiplier setting is 1.5. For a more conservative stop loss use 2 and for a tighter stop loss use 1. ATR and stop loss prices are displayed in table at bottom of screen. Use high(red) for shorts and low(teal) for longs.
Relative VolumeVolume can be a very useful tool if used correctly. Relative volume is designed to filter out the noise and highlight anomalies assisting traders in tracking institutional movements. This tool can be used to identify stop loss hunters and organized dumps. It uses a variety of moving averages to hide usual activity and features an LSMA line to show trend. Trend columns are shown to highlight activity and can be seen at bottom of the volume columns, this is done using ZLSMA and LSMA.
The above chart shows an example of 2 indicators being used on the 15 min chart. The bottom indicator is set to the 1 min chart. Traders can see a large dump on the 1 min chart as institutions wipe out any tight stop losses. Next they buy back in scooping up all those long positions.
This is an example layout using a split screen setup and multiple timeframes ranging from 1 min to 30 mins. This gives a clear indication of trends and make it easy to pickup on institutional behaviour. Tip: Double clicking indicator background will maximize RVOL to the split screen window.
YesillimThe "Yesillim" indicator is a trend follower and trailing stop indicator that reacts quickly and aims to enter early in an uptrend and exit early from a downtrend. Since moving averages are used, it can be used in daytrade and scalping in daily or lower periods. The crossover and crossdown intersections of the price and the indicator line may be meaningful, but it is actually a color changing indicator and color changes should be interpreted. The bullish market gains strength when the color turns green, and the bearish market when it turns red. When prices get too far from the indicator, they are approaching again, in this case, it may be support will work like resistance according to the current trend. Like any indicator, it is possible to produce false signals in the horizontal market, so it should not be used alone, the oscillator and volume should support the current trend. In strong trend changes, angle changes in the indicator can also be interpreted manually. In this case, sharp angled turns indicate a sharp trend change. Technically customized weighted moving average weights are specially weighted with golden ratio coefficients, smoothed with a lower period for noise removal with the same principle and added bias. I wish it to be used in profitable transactions.
Turkish (Türkçe): Yeşillim indikatörü bir trend izleme ve hareketli iz süren indikatördür. Son barları agresif olarak ağırlıklandırdığı için var olan bir yükseliş trendine erken sokup, düşüş trendinden erken çıkarması olasıdır. İndikatör yorumlanırken fiyat ve indikatör kesişimleri anlamlı olsada (yükseliş düşüş trendlerinde destek-direnç görevi görebilecektir) ancak asıl amaç renk değişimi yorumlanmalıdır, yeşil yükseliş trendinin, kırmızı ise düşüş trendinin güç kazandığını göstermektedir. Her indikatör gibi yatay piyasada hatalı sonuçlar üretebilir, bu nedenle rsi, sokastik gibi bir osilatörle desteklenmesi hacimin mevcut trendi desteklemesi gerekmektedir. Kazançlı işlemlerde kullanılmasını temenni ederim.
Safe Scalpy Stop Loss. Percentage from price visualizer.This is my first script I have published so bear with me.
I have thrown this together so you can easily see on the chart where -0.5%, -1% and -2% would be from the last candle close. I also replicated these to show positive values in case you are shorting.
I have also added a custom value setting so you can set the line at whatever percentage value you like and included an adjustable recent higher high and higher low finder to help create a recent range as it seems to work well in tandem for scalping range based price movement.
You can turn all these things on and off in the settings on the style checkboxes.
I felt the need to make this because I like to scalp trade with leverage like a total degen from time to time. Often the setups happen very quickly. It is difficult to calculate where to set a stop loss in a hurry so I keep a fixed account size/lev and just vary the position percentage size based on the percentage of the stop loss from the current price.
Sometimes when switching from a lower volatility chart to high volatility one it is easy to get caught out by quickly entering a scalp trade only to find you made your position way too big or you shouldn't have entered at all. You thought it was only moving 0.2% per candle instead of 3%. Whoops. Rekt.
This indicator is all about trying to help me avoid that with a visual clue to back up the bad maths I do quickly in my head.
I often hide it and only show it when I'm ready to enter a position to double check my SL and entry are set in a sensible area.
I thought I would publish it in case someone else finds such a simple tool handy.
Apologies if there is already something out there that does this job. I couldn't find it.
See you all on the moon.
Position Sizing w/ ADR&ATR TrackingScript to use for position sizing based on portfolio size, max position, and max loss inputs. The option to use custom entry and stop are available, but default to last price for entry, and Low of Day (LoD) for stop. The ATR % is a measure of the low of day to current price as a percentage move.
Credit to LonesomeTheBlue for the base code on position sizing and TheScrutiniser/GlinckEastwoot for ADR formula
-Nelgoth, best of luck
MultiAlert, MultiTargets + TickersThis is my first script, completely made from scratch. Bear with me.
Script that allows one to set an alert for Multiple Price Levels, on Multiple Tickers, complete with Dynamic Messages showing you which ticker, at which price, at which alert (Stop loss, Target 1 etc.), set to Once Per Bar.
Select Ticker, type in price levels that you have for targets & stop loss, move on to the next, or don't and leave 0 and blank.
Disable the targets you do not need in STYLE tab to disable plotting & scaling, leave unused tickers & targets blank & 0.
Create Alert, select this indicator, anyfunction() alert.
MAKE SURE to remake the alert every time you change something, they are not smart enough to change as you change things. Can Confirm by using the numbers in the alert name. You will also have to set the profit level or stop loss to zero every time it triggers to avoid triggered again.
In fact, you do not need the indicator active at all. Add it to a chart and hide it by clicking on the little eyeball icon, to make an alert open the settings for the indicator and type in your targets like normal. Indicator will remain invisable.
I have not found a way to dynamic message the alert name, or else I would.
DISCLAIMER: NONE OF THIS IS FINANCIAL ADVICE. You are completely responsible for whatever happens to you. Do not use the targets in this chart. Do your own research before trading.
ATR RangeUseful in case you use Average True Range to determine Shows Stop Loss and Take Profit price levels.
For example, if you want to put Stop Loss with a distance of 1.5xATR and Take Profit 2xATR for a long trade, put 1.5 as Lower Factor and 2 as Upper Factor. Lower and Upper prices will show price levels for SL and TP respectively.
Pookies SL/TP LinesThis indicator calculates Stop-loss and Take-profit limits and plots them on the chart based on the daily ATR value for a given instrument.
The Stop-loss is calculated at the current close price minus 1x ATR and is plotted as a red line by default.
The Take-profit is calculated at the current close price plus 1.5x ATR and is plotted as a green line by default.
The colors for each line can be changed, as well as the default ATR values (length, smoothing).
To use:
When you see a long or short signal (your own preference), enter your position and set your take-profit and stop-loss limits at the current red/green lines, based on whatever Risk-Reward you've set it to.
This is also helpful in determining whether or not a trade offers enough potential to risk prior to entering the trade.
When the lines are far apart, the ATR is high. When the lines are close together, the ATR is low. This can be used to determine volatility and allow traders to buy during consolidation and sell into strength.
Thank you.
Highlighter Strategy V2// Based on Normalized Smoothed MACD by Dreadblitz
Old one was just an oscillator, I changed a few things
1) It now paints the line green/orange
2) The trigger (green/red) is now based on a signal
3) The signal is basically isUp, but with some additional controls, e.g.
4) (new) There is an embedded stoploss. This is a growth/decay function that decays slower than it grows.
5) Signal is filtered additionally by the stoploss (no green under the decaying line)
ATR For Stop Loss (Overlay)This script is an enhancement of ATR Indicator.
It is used to determine the stop loss position by using the ATR indicator, in conjunction with the low of the candle.
Formula = Stop Loss = Lowest(Lowest Length) - (ATR Multiplier * ATR (Smoothing, Length))
However, the user needs to manually identify the swing low for a better stop loss placement.
Parameter Information :
- Length : Period to calculate the average true range.
- Smoothing : The method used for averaging.
- ATR Multiplier : Multiplier factor to determine the Stop Loss from the lowest reference point. (1 ATR Multiplier means the stop loss would be = Low - ATR)
- Lowest Length : A total number of candle to determine the lowest reference point. (1 means only using the latest candle's low as a lowest reference point)
Have fun and good luck!