xsixs

Megabar Breakout (Range & Volume & RSI)

Hey there,

This strategy is based on the idea that certain events lead to what are called Megabars. Megabars are bars that have a very large range and volume. I wanted to verify whether these bars indicate the start of a trend and whether one should follow the trend.

Summary of the Code:
The code is based on three indicators: the range of the bar, the volume of the bar, and the RSI. When certain values of these indicators are met, a Megabar is identified. The direction of the Megabar indicates the direction in which we should trade.

Why do I combine these indicators?
I want to identify special bars that have the potential to mark the beginning of a breakout. Therefore, a bar needs to exhibit high volume, have a large range (huge price movement), and we also use the Relative Strength Index (RSI) to assess potential momentum. Only if all three criteria are met within one candle, do we use this as an identifier for a megabar.

Explanation of Drawings on the Chart:
As you can see, there is a green background on my chart. The green background symbolizes the time when I'm entering a trade. Only if a Megabar happens during that time, I'm ready to enter a trade. The time is between 6 AM and 4 PM CET. It's just because I prefer that time. Also, the strategy draws an error every time a Megabar happens based on VOL and Range only (not on the RSI). That makes it pretty easy to go through your chart and check the biggest bars manually. You can activate or deactivate these settings via the input data of the strategy.

When Do We Enter a Trade?
We wait for a Megabar to happen during our trading session. If the Megabar is bullish, we open a LONG trade at the opening price of the next candle. If the Megabar is bearish, we open a SHORT trade at the opening price of the next candle.

Where Do We Put Our Take Profit & Stop Loss?
The default setting is TP = 40 Pips and SL = 30 Pips. In that case, we are always trading with a risk-reward ratio of 1.33 by default. You can easily change these settings via the input data of the strategy.

Strategy Results
The criteria for Megabars were chosen by me in a way that makes Megabars something special. They are not intended to occur too frequently, as the fundamental idea of this strategy would otherwise not hold. This results in only 37 closed trades within the last 12 months. If you change the criterias for a megabar to a milder one, you will create more Megabars and therefore more trades. It's up to you. I have adapted this strategy to the 30-minute chart of the EURUSD. In the evaluation, we consider a period of 12 months, which I believe is sufficient.
My default settings for the indicators look like this:
Avg Length Vol 20
Avg Multiplier Vol 3
Avg Length Range 20
Avg Multiplier Range 4
Value SMA RSI for Long Trades 50
Value SMA RSI for Short Trades 70

IMPORTANT: The current performance overview does not display the results of these settings. Please change the settings to my default ones so that you can see how I use this strategy.

I do not recommend trading this strategy without further testing. The script is meant to reflect a basic idea and be used as a tool to identify Megabars. I have made this strategy completely public so that it can be further developed. One can take this framework and test it on different timeframes and different markets.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?