OPEN-SOURCE SCRIPT
Fractal Dimension (Katz, Quant Lab)

This indicator estimates the Katz Fractal Dimension of the price series over a rolling window.
It computes:
• L = sum of absolute price changes within the window
• d = maximum distance between any point and the first point in the window
• n = window length
Then applies Katz’s formula:
FDI = ln(n) / (ln(n) + ln(d / L))
The resulting Fractal Dimension typically lies between 1.0 and 2.0:
• FDI ≈ 1.0–1.3 → Strong, directional trend (low randomness)
• FDI ≈ 1.3–1.5 → Mixed / transitional behavior
• FDI ≈ 1.5–2.0 → Noisy, choppy, mean-reverting / range market
It computes:
• L = sum of absolute price changes within the window
• d = maximum distance between any point and the first point in the window
• n = window length
Then applies Katz’s formula:
FDI = ln(n) / (ln(n) + ln(d / L))
The resulting Fractal Dimension typically lies between 1.0 and 2.0:
• FDI ≈ 1.0–1.3 → Strong, directional trend (low randomness)
• FDI ≈ 1.3–1.5 → Mixed / transitional behavior
• FDI ≈ 1.5–2.0 → Noisy, choppy, mean-reverting / range market
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน