robbatt

lib_retracement_patterns

robbatt 업데이트됨   
Library "lib_retracement_patterns"
types and functions for XABCD pattern detection and plotting

method set_tolerances(this, tolerance_Bmin, tolerance_Bmax, tolerance_Cmin, tolerance_Cmax, tolerance_Dmin, tolerance_Dmax)
  sets tolerances for B, C and D retracements. This creates another Pattern instance that is set as tolerances field on the original and will be used for detection instead of the original ratios.
  Namespace types: Pattern

create_config(pattern_line_args, pattern_point_args, name_label_args, retracement_line_args, retracement_label_args, line_args_Dtarget, line_args_completion, line_args_tp1, line_args_tp2, line_args_sl, label_args_completion, label_args_tp1, label_args_tp2, label_args_sl, label_terminal, label_terminal_up_char, label_terminal_down_char, color_bull, color_bear, color_muted, fill_opacity, draw_point_labels, draw_retracements, draw_target_range, draw_levels, hide_shorter_if_shared_legs_greater_than_max, hide_engulfed_pattern, hide_engulfed_pattern_of_same_type, hide_longer_pattern_with_same_X, mute_previous_pattern_when_next_overlaps, keep_failed_patterns)
method direction(this)
  Namespace types: Match

method length(this)
return the length of this pattern, determined by the distance between X and D point
  Namespace types: Match

method height(this)
return the height of this pattern, determined by the distance between the biggest distance between A/C and X/D
  Namespace types: Match

method is_forming(this)
returns true if not complete, not expired and not invalidated
  Namespace types: Match

method tostring(this)
  return a string representation of all Matches in this map
  Namespace types: Match

method tostring(this)
  Namespace types: map<string, Match>

remove_complete_and_expired(this)

method add(this, item)
  Namespace types: map<string, Match>

method is_engulfed_by(this, other)
checks if this Match is engulfed by the other
  Namespace types: Match

method update(tracking_matches, zigzag, patterns, max_age_idx, detect_dir, pattern_minlen, pattern_maxlen, max_sub_waves, max_shared_legs, max_XB_BD_ratio, debug_log)
checks this map of tracking Matches if any of them was completed or invalidated in
  Namespace types: map<string, Match>

method mute(this, mute_color, mute_fill_color)
mute this pattern by making it all one color (lines and labels, for pattern fill there's another)
  Namespace types: Match

method mute(this, mute_color, mute_fill_color)
mute all patterns in this map by making it all one color (lines and labels, for pattern fill there's another)
  Namespace types: map<string, Match>

method hide(this)
hide this pattern by muting it with a transparent color
  Namespace types: Match

method reset_styles(this)
reset the style of a muted or hidden match back to the preset configuration
  Namespace types: Match

method delete(this)
remove the plot of this Match from the chart
  Namespace types: Match

method delete(this)
remove all the plots of the Matches in this map from the chart
  Namespace types: map<string, Match>

method draw(this)
draw this Match on the chart
  Namespace types: Match

method draw(this, config, all_patterns, debug_log)
draw all Matches in this map, considering all other patterns for engulfing and overlapping
  Namespace types: map<string, Match>

method check_hide_or_mute(this, all, config, debug_log)
checks if this pattern needs to be hidden or muted based on other plotted patterns and given configuration
  Namespace types: Match

method add_if(id, item, condition)
convenience function to add a search pattern to a list, only if given condition (input.bool) is true
  Namespace types: Pattern

Pattern
  type to hold retracement ratios and tolerances for this pattern, as well as targets for trades

Config
  allows control of pattern plotting shape and colors, as well as settings for hiding overlapped patterns etc.

Match
  holds all information on a Pattern and a successful match in the chart. Includes XABCD pivot points as well as all Line and Label objects to draw it

릴리즈 노트:
v2 added custom parameter for terminal bar label offset
릴리즈 노트:
v3 export missing draw and delete methods
릴리즈 노트:
v4 fixed memory error, improved loading time
릴리즈 노트:
v5

Added:
method XB_BD_ratio(this)

Setup

Updated:
method set_tolerances(this, tolerance_Bmin, tolerance_Bmax, tolerance_Cmin, tolerance_Cmax, tolerance_Dmin, tolerance_Dmax)

create_config(pattern_line_args, pattern_point_args, name_label_args, retracement_line_args, retracement_label_args, line_Dtarget_args, line_completion, line_tp1, line_tp2, line_sl, label_completion, label_tp1, label_tp2, label_sl, label_terminal, color_bull, color_bear, color_muted, fill_opacity, draw_point_labels, draw_retracements, draw_target_range, draw_levels, hide_shorter_if_shared_legs_greater_than_max, hide_engulfed_pattern, hide_engulfed_pattern_of_same_type, hide_longer_pattern_with_same_X, mute_previous_pattern_when_next_overlaps, keep_failed_patterns)

remove_complete_and_expired(id)

method update(tracking_matches, zigzag, patterns, max_age_idx, detect_dir, pattern_minlen, pattern_maxlen, max_sub_waves, max_shared_legs, max_XB_BD_ratio, debug_log)

Pattern

Config

Match

Removed:
method is_engulfed_by(this, other)

method mute(this, mute_color, mute_fill_color)

method hide(this)

method reset_styles(this)

method delete(this)

method draw(this, config, all_patterns, terminal_label_yoffset, debug_log)

method check_hide_or_mute(this, all, config, debug_log)

method add_if(id, item, condition)
릴리즈 노트:
v6

Added:
method is_engulfed_by(this, other)

method mute(this, mute_color, mute_fill_color)

method hide(this)

method reset_styles(this)

method delete(this)

method draw(this, config, all_patterns, terminal_label_yoffset, debug_log)

method check_hide_or_mute(this, all, config, debug_log)

method add_if(id, item, condition)

Updated:
method set_tolerances(this, tolerance_Bmin, tolerance_Bmax, tolerance_Cmin, tolerance_Cmax, tolerance_Dmin, tolerance_Dmax)

create_config(pattern_line_args, pattern_point_args, name_label_args, retracement_line_args, retracement_label_args, line_args_Dtarget, line_args_completion, line_args_tp1, line_args_tp2, line_args_sl, label_args_completion, label_args_tp1, label_args_tp2, label_args_sl, label_terminal, label_terminal_up_char, label_terminal_down_char, color_bull, color_bear, color_muted, fill_opacity, draw_point_labels, draw_retracements, draw_target_range, draw_levels, hide_shorter_if_shared_legs_greater_than_max, hide_engulfed_pattern, hide_engulfed_pattern_of_same_type, hide_longer_pattern_with_same_X, mute_previous_pattern_when_next_overlaps, keep_failed_patterns)

remove_complete_and_expired(this)

Pattern

Config

Match

Removed:
method XB_BD_ratio(this)

Setup
릴리즈 노트:
v7 version bump lib_pivot v48, lib_plot_objects v35, lib_zig v18, lib_retracement_label v4
릴리즈 노트:
v8 revert different fills
릴리즈 노트:
v9 version bump lib_plot_objects v36, lib_pivot v49, lib_zig v19, lib_retracement_label v5
릴리즈 노트:
v10 fixed pattern fills via flipped lines when drawing
릴리즈 노트:
v11 fix mute and reset_styles for LineFills with flip_support
릴리즈 노트:
v12 version bump lib_pivot v52 and lib_zig v19
릴리즈 노트:
v13 added high potential flag
파인 라이브러리

트레이딩뷰 정신에 따라 오써는 이 파인 코드를 오픈 소스 라이브러리로 퍼블리쉬하여 당사 커뮤니티의 다른 파인 프로그래머들이 쓸 수 있도록 하였습니다. 오써에게 찬사를! 여러분은 이 라이브러리를 프라이빗 또는 오픈 소스 퍼블리케이션에 쓸 수 있지만 퍼블리케이션에 재사용은 하우스룰을 따릅니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

이 라이브러리를 쓰시겠습니까?

텍스트를 클립보드에 카피한 뒤 님의 스크립트에 붙여 넣기.