- Square
- Gooners BTC Weekly RSI Hack Strategy
Gooners BTC Weekly RSI Hack Strategy
Author:
Zer3192, Date: 2022-08-27 20:46:08
Tags:
/*backtest
start: 2015-05-08 00:00:00
end: 2022-05-07 23:59:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Gooners BTC Weekly RSI Hack Strategy", overlay = true, default_qty_value = 100, default_qty_type = strategy.percent_of_equity, initial_capital = 1000000)
length = input( 14 )
buylevel = input( 52 )
selllevel = input( 52 )
price = close
rsi = ta.rsi(price, length)
co = ta.crossover(rsi, buylevel)
cu = ta.crossunder(rsi, selllevel)
if (not na(rsi))
if (co)
strategy.entry("RsiLE", strategy.long, comment="RsiLE")
if (cu)
strategy.close("RsiLE", comment="RsiLC")
More