nboone

Stochastic Histogram

Last Edited: 5/19/16

Description:
This is a basic Stochastic histogram that essentially shows when the indicator
is either above or below the 50 level. Colors can be customized to your liking.
Length and smoothing factor can be adjusted as well. Defaults are 14 (Length)
and 3 (Smoothing Factor).


NOTE: The above chart contains the built-in stochastic indicator for comparison.
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
/////////////////////////////////////////////////////////////////////////////////////
// Last Edited: 5/19/16                                                            //    
// Created By: nboone                                                              //
//                                                                                 //
// Description:                                                                    //
// This is a basic Stochastic histogram that essentially shows when the indicator  //
// is either above or below the 50 level. Colors can be customized to your liking. //
// Length and smoothing factor can be adjusted as well. Defaults are 14 (Length)   //
// and 3 (Smoothing Factor).                                                       //                
/////////////////////////////////////////////////////////////////////////////////////
study(title="Stochastic Histogram", shorttitle="NB_StochHist")
length = input(14, minval=1)
smoothK = input(3, minval=1)

k = (sma(stoch(close, high, low, length), smoothK) - 50)
c = (k > 0) ? green : (k < 0) ? red : black

plot(k, style=histogram, color=c)
plot(k, color=black)