RicardoSantos

MathGeometryCurvesChaikin

Library "MathGeometryCurvesChaikin"
Implements the chaikin algorithm to create a curved path, from assigned points.

chaikin(points_x, points_y, closed) Chaikin algorithm method, uses provided points to generate a smoothed path.
Parameters:
  • points_x: float array, the x value of points.
  • points_y: float array, the y value of points.
  • closed: bool, default=false, is the path closed or not.
Returns: tuple with 2 float arrays.

smooth(points_x, points_y, iterations, closed) Iterate the chaikin algorithm, to smooth a sample of points into a curve path.
Parameters:
  • points_x: float array, the x value of points.
  • points_y: float array, the y value of points.
  • iterations: int, number of iterations to apply the smoothing.
  • closed: bool, default=false, is the path closed or not.
Returns: array of lines.

draw(path_x, path_y, closed) Draw the path.
Parameters:
  • path_x: float array, the x value of the path.
  • path_y: float array, the y value of the path.
  • closed: bool, default=false, is the path closed or not.
Returns: array of lines.
ไลบรารีไพน์

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

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

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

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

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