josetolima

Alert GetTrendStrategy BTCUSD

//@version=2
study(title="Alert GetTrendStrategy BTCUSD", shorttitle="GTSBTC", overlay=true)
tim=input('370')

out1 = security(tickerid, tim, open)
out2 = security(tickerid, tim, close)


//buy = cross(out1,out2) and out1<out2 and close
//sell = cross(out1,out2) and out1>out2 and close
//long = (buy*close? buy*close : na)
//short = (sell*close? sell*close : na)

plot(out1,color=red, title='Rojo')
plot(out2,color=green, title='Verde')

//Marker
//plotshape(long, "Buy", shape.triangleup, location.belowbar, blue, offset=0, text="buy", size=size.tiny)
//plotshape(short, "Sell", shape.triangledown, location.abovebar, red, offset=0, text="sell", size=size.tiny)


gtsBuy = crossover(security(tickerid, tim, close),security(tickerid, tim, open))
alertcondition(gtsBuy,title='BuyCondition', message='BTCUSD GTS Buy')


gtsSell = crossunder(security(tickerid, tim, close),security(tickerid, tim, open))


alertcondition(gtsSell,title='SellCondition', message='BTCUSD GTS Sell')

plotshape(gtsBuy, "Buy", shape.triangleup, location.belowbar, #400FEA, offset=0, text="Buy", size=size.tiny)
plotshape(gtsSell, "Sell", shape.triangledown, location.abovebar, fuchsia, offset=0, text="Sell", size=size.tiny)
保護スクリプト
このスクリプトは保護スクリプトとして公開されていますが、利用することができます。お気に入りに登録してチャート上でご利用頂けます。但しこのスクリプトのソースコードを閲覧したり変更することはできません。
免責事項

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

チャートでこのスクリプトを利用したいですか?