Unxi

[Unxi]McClellan Oscillator for TECDAX [modified]

This version is for use with the German TecDax index only!

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 German TECDAX index
- It only considers the TECDAX 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

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).
This script will work on any time period. Just use whatever timeperiod you are comfortable with, the indicator will automatically adjust accordingly. It is recommended to use it with timeperiod = 1d, though.

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. Feel free to provide your feedback in the comments!

Credits
Based on the simple version of aftabmk
You can find the original version by searching for McClellan Oscillator for nifty 50.
Also got some inspiration from lazybear's version and from danarn's "Crypto McClellan Oscillator".
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?