Unxi

McClellan Oscillator for DAX (GER30) [aftabmk modified]

Unxi 업데이트됨   
About McClellan Oscillator
Developed by Sherman and Marian McClellan, the McClellan Oscillator is a breadth indicator derived from Net Advances, the number of advancing issues less the number of declining issues. Subtracting the 39-day exponential moving average of Net Advances from the 19-day exponential moving average of Net Advances forms the oscillator.

As the formula reveals, the McClellan Oscillator is a momentum indicator that works similar to MACD .

McClellan Oscillator signals can be generated with breadth thrusts, centerline crossovers, overall levels and divergences.

About my version
This version here is a modification, though:
- It can only be used on the DAX index (DAX 30 or GER 30)
- It only considers the DAX 30 stocks
- The data window will provide a summary about rising and declining stocks
- The data window will output the last change for each of the 30 stocks

BUG
I am only publishing this version because I am not sure if my current version is saved when I leave tradingview.com without publishing the script.
This version still contains a bug - the if/else clauses do not correctly recognize declining stocks. So the oscillator should not be used as it is.
Working on it these days. Feel free to provide feedback!

Stuff I am working on
- Coloring the area green/red according to the value
- Fixing this bug/making this script more efficient


DISCLAIMER
This script was mainly written for educational purposes (training myself how to write custom indicatotors).
As you can see, the code is really messy.



Credits
Based on the simple version of aftabmk
You can find the original version by searching for McClellan Oscillator for nifty 50.
릴리즈 노트:
  • Added green and red coloring
  • Switched to 1000* scale
  • I took some parts out of lazybear's version, also some of "Crypto McClellan Oscillator" from danarn
  • Renamed the script to make the name more precise

Important: In this release, the bug described above is not fixed yet. Still working on this issue.
Hint: The script is pretty slow because it has to calculate the change for each bar individually (instead of receiving a complete calculation from the stock exchange).
릴리즈 노트:
  • BUG FIXED, oscillator should now work as expected for the DAX 30 index
  • Added some credits to the code
  • Code is still a mess, lol
릴리즈 노트:
  • Added more precise information to the data window
  • FOR YOUR INFORMATION: This script will work on any time period. It is recommended to use it with timeperiod = 1d, though. Just use whatever timeperiod you are comfortable with, the indicator will automatically adjust accordingly.
오픈 소스 스크립트

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

면책사항

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

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