Description : This Stochastic variant will auto-adjust stochastic period based on volatility measured by standard deviation. The idea behind it are in highly volatile market, %K period will be reduced to account for recent price range, while in low volatility market, %K period will be increased to account less of the recent price range.
This idea is based on one of medium article written by Sofien Kaabar with slight modification on the adjusting logic implementation. Any ideas to further improve this indicator are welcome :)
Disclaimer: I always felt Pinescript is a very fast to type language with excellent visualization capabilities, so I've been using it as code-testing platform prior to actual coding in other platform. Having said that, these study scripts was built only to test/visualize an idea to see its viability and if it can be used to optimize existing strategy. While some of it are useful and most are useless, none of it should be use as main decision maker.