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.
从常用脚本中删除 添加到常用脚本

评论

If I want to create only Long strategy where if it crosses above 70 then I will buy and exit when it comes below 70. Please help. Thanks
回复
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!
回复
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.
回复
@HPotter, Awsome, thanks. Can you turn this strategy into a script to create alerts when a entry is signalled?
回复
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
回复
@HPotter, Thanks! I added those lines but it still doesn't give the option for alerts...
回复
HPotter oliverpablo123
@oliverpablo123, It will send an alert when it will. When signal will change. Do you save script without errors?
回复
@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")
回复
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 如何运作 图表功能 价格 推荐朋友 网站规则 帮助中心 网站 & 经纪商解决方案 插件 图表解决方案 轻量图表库 博客 & 新闻 Twitter
概览 个人资料设置 账户和账单 推荐朋友 代币 我的客服工单 帮助中心 已发表观点 粉丝 正在关注 私人消息 在线聊天 退出