DevLucem

Divergence

Library "Divergence"
Calculates a divergence between 2 series

bullish(_src, _low, depth) Calculates bullish divergence
  Parameters:
    _src: Main series
    _low: Comparison series (`low` is used if no argument is supplied)
    depth: Fractal Depth (`2` is used if no argument is supplied)
  Returns: 2 boolean values for regular and hidden divergence

bearish(_src, _high, depth) Calculates bearish divergence
  Parameters:
    _src: Main series
    _high: Comparison series (`high` is used if no argument is supplied)
    depth: Fractal Depth (`2` is used if no argument is supplied)
  Returns: 2 boolean values for regular and hidden divergence

I created this library to plug and play divergences in any code.
You can create a divergence indicator from any series you like.
Fractals are used to pinpoint the edge of the series. The higher the depth, the slower the divergence updates get.

My Plain Stochastic Divergence uses the same calculation. Watch it in action.

🤖🤖🤖🤖🤖🤖🤖🤖🤖🤖
Automate TradingView Alerts
tradingview.to/anywhere
🥰😍😍🥰😍😍🥰😍😍🥰
ไลบรารีไพน์

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

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

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

ต้องการใช้ไลบรารีนี้หรือไม่?

คัดลอกข้อความไปยังคลิปบอร์ดแล้ววางลงในสคริปต์ของคุณ