练习01.RSI
0
Follow
0
Followers
Source
Python
def RSI():
ticker = exchange.GetTicker()
account = exchange.GetAccount()
r = exchange.GetRecords(PERIOD_H1 * 4)
rsi = TA.RSI(r, 14)
is_buy = False
is_sell = False
if rsi[-1] > 70 and account["Stocks"] > 0:
id = exchange.Sell(ticker["Buy"], account["Stocks"] * 0.01)
is_buy = True
elif rsi[-1] < 30 and account["Balance"] > 0:Related strategies
Comment
All comments (0)
No data
- 1