INVITE-ONLY SCRIPT

Profit Bands [Loxx]

已更新
Profit Bands [Loxx] 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
版本注释
Small error fix when going backward in history.
版本注释
Added 12 different types of volatility
Added select bar by date
版本注释
Updated Moving Averages.
版本注释
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
Adaptive Deviation [Loxx]


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
ER-Adaptive ATR [Loxx]


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()
版本注释
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.
版本注释
Removed unused code to speed up the indicator.
ATRAverage True Range (ATR)gigakaleidoscopeGKDloxxprofitprofitbandsriskVolatility

仅限邀请脚本

仅限作者授权的用户访问此脚本,并且通常需要付费。您可以将其添加到收藏中,但是只有在向作者请求并获得许可之后,才能使用它。 请联系loxx了解更多信息,或按照以下作者的说明操作。

TradingView不建议付费使用脚本,除非您100%信任作者并了解脚本的工作原理。在许多情况下,您可以在我们的社区脚本免费找到不错的开源替代方案。

作者的说明

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.

想在图表上使用此脚本?

警告:请在申请访问权限之前阅读

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: patreon.com/algxtrading/membership
更多:

免责声明