kuhoerk

Range Strat - MACD/RSI

kuhoerk Uppdaterad   
This strategy uses a trend based indicator (MACD) for entry/exit signals with a momentum oscillator (RSI) to act as confirmation. Although relying on a trend based indicator this has been created for range bound crypto markets, which have been in a period of chop since June 2022.

Long/Short signals are generated from MACD with the RSI oscillator thresholds suppressing entries at price extremes. This is not a mean reversion RSI strategy! As the indicators are contrary to each other you will need to be generous with the RSI settings in order for signals to trigger.

Strategy is designed for use on the 4h timeframe, it may work well on higher timeframes, but lower time frames will lead to false signals. Use fixed percentage of equity for order size to capture the compounding effect. As a reversal strategy bear in mind that should market trend strongly in either direction stops will be required.

The RSI thresholds can be tailored to provide higher frequency or safer signals. Similarly tweaking MACD settings will provide earlier/more frequent or safer signals. As this is intended to enter near range high / low you should check the visual cues to ensure a ping-pong effect is observed, so that peaks and troughs are captured. Once an observable range is established the strategy works well across a range of crypto markets,

The script is open source, so feel free to amend as you wish. Using a different momentum oscillator may provide better results. I have prior coding experience, but first time using PineScript was last night, so it's not very tidy. I will update this with some additional customisation and TP/SL in the near future.

Usage: Range bound markets
Markets: Cryptocurrency Alts/BTC/ETH
Timeframe: 4h
Versionsinformation:
Tidied up a bit and included some additional options:
Stop loss for long/short positions
EMA/SMA options for MACD lines
Select source drop downs for RSI and MACD
Versionsinformation:
No logic changes here. I've got a bit better handle on Pine scripting and have gone through a tidy up process of the variables, so I can use this again later as a template. Quality of life improvements include input settings grouped by category and use of the date picker rather than filling the input screen with date stuff.
Versionsinformation:
Knocked back the percentage of equity in trade to just 10% as running at 100% was unrealistically exaggerating performance due to the compounding effect. Also notched down the stop loss to a more reasonable 15%.
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?