TradingView
Bitduke
Apr 11, 2021 9:22 AM

Improved simple RSI Buy/Sell at a level (SL/TP) 

Ethereum Perpetual FuturesFTX

Description

Improved Simple Strategy based on RSI, using overbought or oversold levels.
Backtest: ETHPERP (FTX) - 30m

Set STOP LOSS and GET PROFIT as a percentage (2% and 10% by default).

If strategy.position_size != 0 algorithm convert percentages into points and set stop loss and take profit limit orders.
Comments
saurabh3679
Hi, How can I modify the strategy like this : buy when RSI rises up and crosses 60 and sell if either 10% profit is made or RSI falls below 60. Please help. Thanks in advance
Bitduke
@saurabh3679, "buy when RSI rises up and crosses 60" - just set overbought const to 60 and use some new variable to save that u'r long, like alreadyLong = true; Check after that, if (alreadyLong) and (rsi < overbought): strategy.entry("Short", strategy.short).

As for 10% profit, it's a little more complicated
saurabh3679
@Bitduke, Thanks for your kind reply. I have another question if you don't mind. I want to detect RSI based on past 14 weekly candles, not daily candles. How can I do that? thanks in advance
psbanerjee
This is great strategy!

One small query - if I were to add conditions to the pyramiding, how can I go about that?

Example:
Crosses RSI below 40 - Buy 1 order
Crosses RSI below 30 - Buy 2 orders
and so on....

Thanks in advance!
yasarazatkavukcu
You are awasome dudeeeee.....there is backtesting datas UwU
More