kuhoerk

Range Strat - MACD/RSI

kuhoerk Cập nhật   
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
Phát hành các Ghi chú:
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
Phát hành các Ghi chú:
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.
Phát hành các Ghi chú:
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%.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?