HPotter

High - EMA Strategy

This indicator plots the difference between the High (of the previous period)
and an exponential moving average (13 period) of the Close (of the previous period).
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
It buy if indicator above 0 and sell if below.

オープンソーススクリプト

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

免責事項

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

チャートでこのスクリプトを利用したいですか?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 02/07/2014
// This indicator plots the difference between the High (of the previous period)
// and an exponential moving average (13 period) of the Close (of the previous period).
// You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
// It buy if indicator above 0 and sell if below.
////////////////////////////////////////////////////////////
study(title="High - EMA Strategy", shorttitle="High - EMA Strategy")
Length = input(13, minval=1)
xPrice = close  // You can use any series
hline(0, color=red, linestyle=line)
xEMA = ema(xPrice, Length)
nRes = high[1] - nz(xEMA[1])
pos =	iff(nRes > 0, 1,
	    iff(nRes < 0, -1, nz(pos[1], 0))) 
barcolor(pos == -1 ? red: pos == 1 ? green : blue )
plot(nRes, color=blue, title="High - EMA")