OPEN-SOURCE SCRIPT

[blackcat] L3 CCI-RSI Combo

CCI-RSI Combo indicator is a combination indicator that includes CCI and RSI. It uses some parameters to calculate the values of CCI and RSI, and generates corresponding charts based on these values. On the chart, when CCI exceeds 100 or falls below -100, yellow or magenta filling areas are displayed. Additionally, gradient colors are used on the RSI chart to represent different value ranges. Based on the values of CCI and RSI, buying or selling signals can be identified and "B" or "S" labels are displayed at the corresponding positions. It utilizes some technical indicators and logic to generate buying and selling signals, and displays the corresponding labels on the chart.

Here are the main parts of the code:

1. Definition of some variables:
- `N`, `M`, `N1`: Parameters used to calculate CCI and RSI.
- `xcn(cond, len)` and `xex(cond, len)`: Two functions used to calculate the number of times a condition is met.
2. Calculation of CCI (Commodity Channel Index):
- Calculate the CCI value based on the formula `(TYP - ta.sma(TYP, M)) / (0.015 * ta.stdev(TYP, M))`.
- Use the `plot()` function to plot CCI on the chart and set the color based on its value.
3. Calculation of RSI (Relative Strength Index):
- First calculate RSI1 by taking the average of positive differences between closing prices and the average of all absolute differences, and then multiplying by 100.
- Then use the ALMA function to transform RSI1 into a smoother curve.
- Use the `plot()` function to plot RSI on the chart and select gradient colors for shading based on its value.
4. Setting up the gradient color array:
- Create a color array using `array.new_color()` and add a series of color values to it.
5. Generating buying and selling signals based on conditions:
- Use logical operators and technical indicator functions to determine the conditions for buying and selling.
- Use the `label.new()` function to draw the corresponding labels on the chart to represent buying or selling signals.
blackcat1402Centered Oscillators

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

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


Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
또한 다음에서도:

면책사항