TradingView
josetolima
11 Th12 2017 05:57

Alert GetTrendStrategy BTCUSD 

Stellar Lumens / BitcoinBittrex

Mô tả

//@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)
Bình luận
Ulemamahdumu
Simple, easy and wonderful!
The only small problem is that buy and sell can't be read in dark graphics mode.
Thanks
bkunjir01
Repainting
evrengencsoy
Are the alarms accurate as on the display?
ProfitsNinja
Based on the provided script and the typical behavior of the functions used (security(), crossover(), crossunder()), the script should not repaint. This means the buy and sell signals it generates should remain static once they have been plotted, making it reliable for backtesting and potentially for live trading, assuming the logic aligns well with the market conditions and trading strategy.

It would have been helpful if you had clear instructions on how to use it and what to expect - like repaint, etc

Also, it should be a best practice to add 5-6 popular ticker backtested results.

Cheers!
ashish2
This is repaint indicator
classicfcs
what is this repaint?
cculha
It has a problem. Signal is changing after bar closed.
ajaykumarsharma17968
@cculha, you can increase the input value to get best results.
Thêm nữa