loxx

Profit Bands [Loxx]

loxx Updated   
Profit Bands is a supplementary indicator to be used with Loxx's backtests and combination indicators that use volatility-based take profits and stop loss. This indicator includes two types of volatility: Average True Range and True Range Double. Additional volatility sources will be added in the future. The lines painted on the screen are multiples of ATR for Take Profits and Stoploss for Long/Short positions that you can change in the settings. 3 Take Profits and 1 Stoploss is supported. You can turn on/off each UI element. Position size is determined by calculating the size of an investment where you'd lose only X% of your balance if the Stoploss is hit. You can enter your total balance available to trade and the desired % risk you'd be willing to lose at SL. Typically this number is 1-2% of total balance per trade.

Always remember to wait for bar close on a signal to and then peg this indicator to 1 bar backward to fix the price levels the then seed the exact levels you'll use for Take Profits and Stoploss. This indicator will match exactly the levels in other indicators in Loxx's scripts such as Kaleidoscope. You would overlay this script over any other script that uses volatility stops to see where to place your TPs and SL
Release Notes:
Small error fix when going backward in history.
Release Notes:
Added 12 different types of volatility
Added select bar by date
Release Notes:
Updated Moving Averages.
Release Notes:
Added additional types of volatility added.

Standard Deviation
Standard deviation is a statistic that measures the dispersion of a dataset relative to its mean and is calculated as the square root of the variance. The standard deviation is calculated as the square root of variance by determining each data point's deviation relative to the mean. If the data points are further from the mean, there is a higher deviation within the data set; thus, the more spread out the data, the higher the standard deviation.

Adaptive Deviation
By definition, the Standard Deviation (STD, also represented by the Greek letter sigma σ or the Latin letter s) is a measure that is used to quantify the amount of variation or dispersion of a set of data values. In technical analysis we usually use it to measure the level of current volatility .

Standard Deviation is based on Simple Moving Average calculation for mean value. This version of standard deviation uses the properties of EMA to calculate what can be called a new type of deviation, and since it is based on EMA , we can call it EMA deviation. And added to that, Perry Kaufman's efficiency ratio is used to make it adaptive (since all EMA type calculations are nearly perfect for adapting).

The difference when compared to standard is significant--not just because of EMA usage, but the efficiency ratio makes it a "bit more logical" in very volatile market conditions.

See how this compares to Standard Devaition here:
Adaptive Deviation

Median Absolute Deviation
The median absolute deviation is a measure of statistical dispersion. Moreover, the MAD is a robust statistic, being more resilient to outliers in a data set than the standard deviation. In the standard deviation, the distances from the mean are squared, so large deviations are weighted more heavily, and thus outliers can heavily influence it. In the MAD, the deviations of a small number of outliers are irrelevant.

Because the MAD is a more robust estimator of scale than the sample variance or standard deviation, it works better with distributions without a mean or variance, such as the Cauchy distribution.

For this indicator, I used a manual recreation of the quantile function in Pine Script. This is so users have a full inside view into how this is calculated.

Efficiency-Ratio Adaptive ATR
Average True Range (ATR) is widely used indicator in many occasions for technical analysis . It is calculated as the RMA of true range. This version adds a "twist": it uses Perry Kaufman's Efficiency Ratio to calculate adaptive true range

See how this compares to ATR here:
ER-Adaptive ATR

Mean Absolute Deviation
The mean absolute deviation (MAD) is a measure of variability that indicates the average distance between observations and their mean. MAD uses the original units of the data, which simplifies interpretation. Larger values signify that the data points spread out further from the average. Conversely, lower values correspond to data points bunching closer to it. The mean absolute deviation is also known as the mean deviation and average absolute deviation.

This definition of the mean absolute deviation sounds similar to the standard deviation ( SD ). While both measure variability, they have different calculations. In recent years, some proponents of MAD have suggested that it replace the SD as the primary measure because it is a simpler concept that better fits real life.

For Pine Coders, this is equivalent of using ta.dev()
Release Notes:
Added new volatility type: Static Percent. You can now manually enter the % Static value and then this value will be multiplied by the TP and SL multiples to set targets.
Release Notes:
Removed unused code to speed up the indicator.

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: www.patreon.com/algxtrading/membership
Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact loxx for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases you can find a good open-source alternative for free in our Community Scripts.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Author's instructions

This indicator is only available to ALGX Trading VIP group members. For instructions on how to access, send me a private message here on TradingView or message me using the contact information listed in my TradingView profile.

Want to use this script on a chart?

Warning: please read before requesting access.