HPotter

Strategy RSI Backtest

The RSI is a very popular indicator that follows price activity.
It calculates an average of the positive net changes, and an average
of the negative net changes in the most recent bars, and it determines
the ratio between these averages. The result is expressed as a number
between 0 and 100. Commonly it is said that if the RSI has a low value,
for example 30 or under, the symbol is oversold. And if the RSI has a
high value, 70 for example, the symbol is overbought.

You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
Remove from Favorite Scripts Add to Favorite Scripts
DONATE/TIP

BTC: 3FKWwtaYrf5NHZzaCi1fyAfQj7XSgtyCqe
I've been loolking at this backtest on ETHUSD pair and the results are impressive. One thing that would make result more accurate is if the entry price was calculated at the closing price of the candle when the signal was generated (rather than the opening price, as now). Is it possible to adjust this? Thanks!
Reply
HPotter oliverpablo123
@oliverpablo123, If do you mean a backtest logic then I think no. If data for calculate, then you can change line 20 where to change CLOSE on the OPEN.
Reply
@HPotter, Awsome, thanks. Can you turn this strategy into a script to create alerts when a entry is signalled?
Reply
HPotter oliverpablo123
@oliverpablo123, Add this lines before barcolor....

alertcondition(possig != possig and possig == 1, title='Signal Buy', message="Buy")
alertcondition(possig != possig and possig == -1, title='Signal Sell', message="Sell")

and it should make alerts
Reply
@HPotter, Thanks! I added those lines but it still doesn't give the option for alerts...
Reply
HPotter oliverpablo123
@oliverpablo123, It will send an alert when it will. When signal will change. Do you save script without errors?
Reply
@HPotter, It saved without errors but even with the added code* it doesn't let me add alerts. When I try to add an alert the 'condition' box is greyed out.


*alertcondition(possig != possig and possig == 1, title='Signal Buy', message="Buy")
alertcondition(possig != possig and possig == -1, title='Signal Sell', message="Sell")
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar Shows How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Help Center Refer a friend Feature Request Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out