BITFINEX:BTCUSD   ビットコイン/米ドル
Merhabalar, 50 günlük hareketli ortalamanın 200 günlük hareketli ortalamayı yukarı kesmesi durumuna golden cross denmektedir.
Aşağıda geliştirmiş olduğum pine script kodlarında ,golden cross durumunda indikatör hem al durumunda hem sat durumunda hemde alarm sayısından kazanmak için her iki durumda da alarm vermektedir.


// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/
// © ozgurhan

//@version=4
study("Hareketlii ortalama", overlay=true)

hizliPeriyot=input(50)
yavasPeriyot=input(200)

hizliMa=sma(close, hizliPeriyot)
yavasMa=sma(close, yavasPeriyot)

yukariKeser=crossover(hizliMa, yavasMa)
asagiKeser=crossunder(hizliMa, yavasMa)

kesisimRengi=(hizliMa>yavasMa ? color.green : color.red)

plotshape(yukariKeser, size=size.small, style=shape.labelup, location=location.belowbar, color=color.green, text="AL", textcolor=color.black)
plotshape(asagiKeser, size=size.small, style=shape.labeldown , location=location.abovebar, color=color.red, text="SAT", textcolor=color.black)

plot1=plot(hizliMa, color=color.blue, linewidth=3, title="HIZLI MA")
plot2=plot(yavasMa, color=color.orange, linewidth=3, title="YAVAŞ MA")

fill(plot1, plot2, color=kesisimRengi, transp=10)


yukselenTrendrengi=hizliMa>yavasMa

bgcolor(yukselenTrendrengi ? color.green : color.red)

barcolor(yukselenTrendrengi ? color.green : color.red)

alertcondition(yukariKeser, title="yukari kesti", message="yukarı keser")
alertcondition(asagiKeser, title="asagi kesti", message="asagi kesti")
alertcondition(asagiKeser or yukariKeser, title="asağı veya yukarı golden cross", message="asağı veya yukarı golden cross")


免責事項

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