conflixx95493

Reversal with Bollinger Bands + RSI + ADX + ATR (Upgraded)

conflixx95493 업데이트됨   
Hi,

Welcome to my 4th script.
Someone asked me some questions about the Bollinger Band strategy I previously published. When I went back to my published script I couldn't help myself but simply try and make it better. Which I did.
Since I've published that script, I've gained much more knowledge about how Pinescript functions. As well as gaining more and more knowledge about how the markets are structered etc.

In this reversal script we use 4 indicators to determine good entry signals, we determine whether the market is ranging or trending and we still only want to take trades in the direction of the "trend".
Bollinger Bands are used for our entry signal. When price hits either side of the band, we wait for a reverse candlestick before we enter a position.
RSI is used to determine if we're in a trending market or in a ranging market. You can adjust the values in the inputs. You can determine the minimum RSI value and the maximum RSI value.
ADX is used the same way as RSI, you can adjust the value in the inputs. You can determine the minimum ADX value.
Last but not least we use two EMA's, a 200 EMA and 100 EMA. Both are adjustable through the inputs. I used two EMA's because I noticed when using this strategy that we'd enter a new position often after having a bad trade. Using two EMA's might clean up some signals, in my case with EUR/USD on a 15m timeframe, it didn't clean up enough signals.

All the default values are pretty decent but might require some finetuning on a certain instrument. Don't overfit the strategy though, that'll only give you bad signals in the future.

Then we are off to our exit signals.
Initially I wanted to incorporate my previous Bollinger Band exit signals as well, but it was too much of a hassle to make the script work as intended so I left it out. If you want to use those exit signals, just find my other script.
When we're in a position and price crosses the opposite band, we wait for a reverse candlestick before we exit the position.
Additionally we want our losses to be as small as possible, so we use RSI to signal us when the market is, or starts to, trend against us. This is where you use the minimum and maximum exit values. So when RSI crosses over or under that value, it'll exit the position.
Furthermore, we use the ATR indicator to set our stop loss, which is pretty basic stuff. You can adjust the ATR multiplier in the inputs. Disabling "Use Trailing Stop?" is really inadvisable unless you know this script inside out as your only exit signals will be opposite Bollinger Band Cross and RSI overbought / oversold areas.
릴리즈 노트:
I've added a ton of input options to change around parameters. As well as differentiate between ranging and trending input options. I've swapped the RSI indicator for Stochastic in the ranging department because I believe Stochastics functions better in a ranging market than RSI does.
Made a mistake in my earlier script, the stop loss was being calculated AFTER my exit signals, this would cause our entry signals to get instantly stopped out. So I fixed that as well.

Cleaned up a lot of my code, especially the entry and exit signals. Made variables for all our seperate entry and exit conditions. This makes the code incredibly more easier to read.

I also added a trailing ATR stop loss.
오픈 소스 스크립트

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

면책사항

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

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