MTF Stochastic with automatic divergence

In addition, the indicator will show when positive and negative divergence occurs on the current timeframe. Divergence can be a little subjective but it seems to find the important ones.
Finally, it highlights when the current stochastic crosses. I was finding once you squash it down it gets difficult to see so I made that easier.
For me I don't tend to use the divergence feature (which is ironic as i found it very hard to code) but being able to see what is happening on the timeframe above is a very effective filter saving me from bad trades.
The script is a little scruffy in places but neat enough to adapt to other indicators. Somewhere I have the same principle for MACD - one of these days I'll find it and make it available.
Hope thats useful to people and good luck.
option to make upper stochastic grey
I fixed it and modified the input but I've dropped the divergence - its too complicated to fix. Its the previous revision if someone wants to rescue it...
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.