A bear market begins when an asset trades 20% below its recent high for more than two months, a bear market ends when an asset trades 20% above its recent low for one month or more.
"A bear market begins when an asset trades 20% below its recent high for more than two months."
If we take the standard trading month to be around 20-22 days (excluding weekends), then two months would be approximately 40-44 days. This is why we set the `bearDuration` to 60 days in the script to capture the "more than two months" criteria. Using a daily timeframe, 60 bars represent roughly 3 months (since markets are not open every day due to weekends and holidays).
"...a bear market ends when an asset trades 20% above its recent low for one month or more."
This is why the `bullDuration` is set to 20 days in the script, which represents roughly one trading month on a daily timeframe.
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
เพื่อการเข้าถึงอย่างรวดเร็วบนชาร์ต ให้เพิ่มสคริปต์นี้ในรายการโปรดของคุณ — เรียนรู้เพิ่มเติม ที่นี่
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
เพื่อการเข้าถึงอย่างรวดเร็วบนชาร์ต ให้เพิ่มสคริปต์นี้ในรายการโปรดของคุณ — เรียนรู้เพิ่มเติม ที่นี่