bitmexstorm

Cyclic Polygamma Bands

bitmexstorm Updated   
The polygamma function is the (n+1)st derivative of the logarithm of the gamma function where n is the respective order. An approximation of this derivative at order n=1 is taken and applied to my own calculation of upper and lower bands (along with a mean), to create the cyclic polygamma bands. Cyclic, as it is weighted to mimic the local alternations in price (peak to trough corresponding to turning points of a set of moving averages). Lower cyclic weights for trending markets, higher cyclic weights correspond to choppier markets. It has 3 plots. The CP-H, CP-Mean and CP-L, where the CP-H is the red band, CP-L is the green band and CP-Mean the mean of these 2 bands. The method of trading is dependent on the user, but generally in an (here, undefined) uptrend, prices that snap the CP-L are considered bullish. Same logic for shorts and the CP-H.

The raw calculation is the unfiltered calculation. Cyclic is recommended, but the CP-Mean has exhibited interesting behavior (use at your own discretion). Cyclic aims to follow the local cycles of price.

Low cyclic weight will allow the weight of the polygamma to be higher. High cyclic weight will mimic price more, responding quicker to price. Use high if markets are chopping.
Release Notes:
Changed default cyclic weights to high. I've noticed low cyclic weights tends to be withdrawn from signaling considerably more, so the high option is set to default.

Protected script
This script is published closed-source but you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
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.

Want to use this script on a chart?