miyako.pro

RSI Algo Trader

This is a simple RSI based signal indicator. It is intended for algorithmic trading by bots, currently working one up for http://bitforex.uk.to and http://okcoin.uk.to to use this.

For the best results leave it on 1-Hour time-frame. It also works best on bitcoin and stocks, not so much oil . GBP/USD and AUD/USD it fairs well too.

When RSI touches 70 it gives a Buy signal and when RSI touches 30 it gives a sell signal. The position is then held out until an opposite signal has been given. If the back-testing shows poor results but looks as though the inverse would be good, there is an easy toggle in the settings to flip it. Also in the code is a nifty method to pragmatically keep a variable's value from resetting each candle until later changed.

MSFT Stock:
从常用脚本中删除 添加到常用脚本
study("RSI Algo", overlay=true)
myPeriod = input(defval=14, type=integer, title="Period")
myThresholdUp = input(defval=70, type=float, title="Upper Threshold")
myThresholdDn = input(defval=30, type=float, title="Lower Threshold")
myAlgoFlipToggle = input(defval=false, type=bool, title="Imverse Algorthim")
myLineToggle = input(defval=true, type=bool, title="Show Lines")
myLabelToggle = input(defval=true, type=bool, title="Show Labels")
myRSI=rsi(close, myPeriod)
buy = myAlgoFlipToggle ? falling(myRSI,1) and cross(myRSI, myThresholdDn) : rising(myRSI, 1) and cross(myRSI,myThresholdUp)
sell = myAlgoFlipToggle ? rising(myRSI, 1) and cross(myRSI,myThresholdUp) : falling(myRSI,1) and cross(myRSI, myThresholdDn)
myPosition = buy==1 ? 0 : sell==1 or myPosition[1]==1 ? 1 : 0
trendColor = buy ? red : sell ? green : na
plot(myLineToggle ? buy and myPosition[1]==1 ? low - 0.004: sell and myPosition[1]==0 ? high + 0.004 : na : na, color=trendColor, style=line, linewidth=4, editable=false)
plotshape(myLabelToggle ? buy and myPosition[1]==1 ? low - 0.005 : na : na, style=shape.labelup, location=location.absolute, text="Buy", transp=0, textcolor = white, color=black, editable=false)
plotshape(myLabelToggle ? sell and myPosition[1]==0 ? high + 0.005 : na : na, style=shape.labeldown, location=location.absolute, text="Sell", transp=0, textcolor = white, color=black, editable=false)

评论

can you create Alert for BUY and SELL signal. thank you.
+17 回复
change setting to 90 2 10 and see the result one more thing make the buy and sell singnel always live on every candle look like trand line if its done its best

over bought level 90
oversold level 10
period 2 once use it
+11 回复
Bogayi patelkarm951
@patelkarm951, Hello, very interested to hear more about how you trade this method. I keep coming back to the RSI2 method but haven't been able to work a great strategy out of it. What timeframe do you use? Thanks!
+1 回复
LeLyonnais patelkarm951
回复
aqprider patelkarm951
@patelkarm951, it works amazingly good with your settings, thanks.
+1 回复
Hey :)
thank you a lot for sharing your indicator. How are you using the Stop-Loss with this indicator?

Cheers
+4 回复
Thanks.. I'm going to test this out. How does if fair as a live strategy? Do we get any repainting?
+3 回复
NO LE PUEDO DAR NINGUN COMENTARIO, NO LO HE PODIDO PROBAR
+3 回复
In this script it's assumed that we buy at the lowest point of the hourly candle and sell at the highest. Although RSI will only break 30/70 after some price movement, so we may found ourselfves on the half-way down of the candle at the moment of RSI break before selling. For example, look at 12 July - trading bot according to this script will close not at the highest point, but lower on the candle
+3 回复
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 如何运作 图表功能 价格 推荐朋友 网站规则 帮助中心 网站 & 经纪商解决方案 插件 图表解决方案 轻量图表库 博客 & 新闻 Twitter
概览 个人资料设置 账户和账单 推荐朋友 代币 我的客服工单 帮助中心 已发表观点 粉丝 正在关注 私人消息 在线聊天 退出