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:
Usuń z Ulubionych Skryptów Dodaj do Ulubionych Skryptów
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.
+1 Odpowiedź
Just seeing this...backward it is very interesting. Can you connect this to an alarm in TV?
Odpowiedź
Thanks.. I'm going to test this out. How does if fair as a live strategy? Do we get any repainting?
+1 Odpowiedź
NO LE PUEDO DAR NINGUN COMENTARIO, NO LO HE PODIDO PROBAR
+2 Odpowiedź
Is there a possible way to add a vertical line as well when it signals a change in direction
Odpowiedź
Interesting how completely different code not based on RSI at all generates the same signals

Odpowiedź
miyako.pro amazing_ilya
Many indicators are the same exact data represented in different views.
Odpowiedź
karabogerald miyako.pro
can you help, with creating an Alert for this. thank you.
Odpowiedź
The problem is... this script uses candle high as the sell price and candle low as the buy price, which is not realistic. It should use candle close price for a more realistic algo trader, in which case, the results are much worse.
Odpowiedź
Would you be able to convert this one in a strategy so the performance can be tracked?
Odpowiedź
Strona główna Skaner akcji Skaner Forex Skaner Krypto Kalendarz ekonomiczny Jak to działa Funkcje wykresów Cena Dobre Praktyki Moderatorzy Rozwiązania internetowe i brokerskie Widżety Wykresy Uzyskaj Pomoc Zgłoś dodatkową funkcjonalność Blog i wiadomości Często zadawane pytania Wiki Twitter
Profil Ustawienia profilu Konto i płatności Monety TradingView Wiadomości do działu obsługi Uzyskaj Pomoc Opublikowane Pomysły Obserwujący Lista obserwowanych Wiadomość prywatna Czat Wyloguj