PINE LIBRARY
HarmonicMapLib

Library "HarmonicMapLib"
Harmonic Pattern Library implementation utilising maps
method tostring(this)
convert Range value to string
Namespace types: Range
Parameters:
this (Range): Range value
Returns: converted string representation
method tostring(this)
convert array of Range value to string
Namespace types: array<Range>
Parameters:
this (array<Range>): array<Range> object
Returns: converted string representation
method tostring(this)
convert map of string to Range value to string
Namespace types: map<string, Range>
Parameters:
this (map<string, Range>): map<string,Range> object
Returns: converted string representation
method tostring(this)
convert RatioMap to string
Namespace types: RatioMap
Parameters:
this (RatioMap): RatioMap object
Returns: converted string representation
method tostring(this)
convert array of RatioMap to string
Namespace types: array<RatioMap>
Parameters:
this (array<RatioMap>): array<RatioMap> object
Returns: converted string representation
method tostring(this)
convert map of string to RatioMap to string
Namespace types: map<string, RatioMap>
Parameters:
this (map<string, RatioMap>): map<string, RatioMap> object
Returns: converted string representation
method tostring(this)
convert map of string to bool to string
Namespace types: map<string, bool>
Parameters:
this (map<string, bool>): map<string, bool> object
Returns: converted string representation
method tostring(this)
convert PrzRange to string
Namespace types: PrzRange
Parameters:
this (PrzRange): PrzRange object
Returns: converted string representation
method tostring(this)
convert array of PrzRange to string
Namespace types: array<PrzRange>
Parameters:
this (array<PrzRange>): array<PrzRange> object
Returns: converted string representation
getHarmonicMap()
Creates the RatioMap for harmonic patterns
Returns: map<string, RatioMap> haronic ratio rules for all patterns
method evaluate(patternsMap, pattern, ratioRange, properties, ratioValue)
evaluates harmonic ratio range
Namespace types: map<string, bool>
Parameters:
patternsMap (map<string, bool>): parameter containing valid pattern names
pattern (string): Pattern type to be evaluated
ratioRange (Range): ratio range to be checked
properties (ScanProperties): Scan Properties
ratioValue (float)
Returns: void
method evaluate(przRange, pattern, ratioRange, priceRange, properties)
Evaluate PRZ ranges
Namespace types: map<string, Range>
Parameters:
przRange (map<string, Range>)
pattern (string): Pattern name
ratioRange (Range): Range of ratio for the pattern
priceRange (Range): Price range based on ratio
properties (ScanProperties): ScanProperties object
Returns: void
method scanRatio(currentPatterns, rules, properties, ratioName, ratioValue)
Scan for particular named ratio of harmonic pattern to filter valid patterns
Namespace types: map<string, bool>
Parameters:
currentPatterns (map<string, bool>): Current valid patterns map
rules (map<string, RatioMap>): map<string, RatioMap> Harmonic ratio rules
properties (ScanProperties): ScanProperties object
ratioName (string): Specific ratio name
ratioValue (float): ratio value to be checked
Returns: updated currentPatterns object
method scanPatterns(patterns, x, a, b, c, d, properties)
Scan for patterns based on X, A, B, C, D values
Namespace types: map<string, bool>
Parameters:
patterns (map<string, bool>): List of allowed patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
d (float): D coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: updated valid patterns map
method scanProjections(patterns, x, a, b, c, properties)
Scan for projections based on X, A, B, C values
Namespace types: map<string, bool>
Parameters:
patterns (map<string, bool>): List of allowed patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: updated valid projections map
method merge(this, other)
merge two ranges into one
Namespace types: Range
Parameters:
this (Range): first range
other (Range): second range
Returns: combined range
method union(this, other)
union of two ranges into one
Namespace types: Range
Parameters:
this (Range): first range
other (Range): second range
Returns: union range
method overlaps(this, other)
checks if two ranges intersect
Namespace types: Range
Parameters:
this (Range): first range
other (Range): second range
Returns: true if intersects, false otherwise
method consolidate(this)
Consolidate ranges into PRZ
Namespace types: map<string, Range>
Parameters:
this (map<string, Range>): map of Ranges
Returns: consolidated PRZ
method consolidateMany(this)
Consolidate ranges into multiple PRZ ranges
Namespace types: map<string, Range>
Parameters:
this (map<string, Range>): map of Ranges
Returns: consolidated array of PRZ ranges
method getRange(currentPatterns, x, a, b, c, properties)
Get D range based on X, A, B, C coordinates for the current patterns
Namespace types: map<string, bool>
Parameters:
currentPatterns (map<string, bool>): List of valid patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: map of D ranges
method getPrzRange(currentPatterns, x, a, b, c, properties)
Get PRZ range based on X, A, B, C coordinates for the current patterns
Namespace types: map<string, bool>
Parameters:
currentPatterns (map<string, bool>): List of valid patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: PRZRange for the pattern
method getProjectionRanges(currentPatterns, x, a, b, c, properties)
Get projection range based on X, A, B, C coordinates for the current patterns
Namespace types: map<string, bool>
Parameters:
currentPatterns (map<string, bool>): List of valid patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: array of projection ranges
Range
Collection of range values
Fields:
values (array<float>): array of float values
RatioMap
ratio map for pattern
Fields:
ratioMap (map<string, Range>): map of string to Range (array of float)
ScanProperties
Pattern Scanning properties
Fields:
strictMode (series bool): strict scanning mode will check for overflows
logScale (series bool): scan ratios in log scale
errorMin (series float): min error threshold
errorMax (series float)
mintick (series float): minimum tick value of price
PrzRange
Potential reversal zone range
Fields:
patterns (array<string>): array of pattern names for the given XABCD combination
prz (Range): PRZ range
Harmonic Pattern Library implementation utilising maps
method tostring(this)
convert Range value to string
Namespace types: Range
Parameters:
this (Range): Range value
Returns: converted string representation
method tostring(this)
convert array of Range value to string
Namespace types: array<Range>
Parameters:
this (array<Range>): array<Range> object
Returns: converted string representation
method tostring(this)
convert map of string to Range value to string
Namespace types: map<string, Range>
Parameters:
this (map<string, Range>): map<string,Range> object
Returns: converted string representation
method tostring(this)
convert RatioMap to string
Namespace types: RatioMap
Parameters:
this (RatioMap): RatioMap object
Returns: converted string representation
method tostring(this)
convert array of RatioMap to string
Namespace types: array<RatioMap>
Parameters:
this (array<RatioMap>): array<RatioMap> object
Returns: converted string representation
method tostring(this)
convert map of string to RatioMap to string
Namespace types: map<string, RatioMap>
Parameters:
this (map<string, RatioMap>): map<string, RatioMap> object
Returns: converted string representation
method tostring(this)
convert map of string to bool to string
Namespace types: map<string, bool>
Parameters:
this (map<string, bool>): map<string, bool> object
Returns: converted string representation
method tostring(this)
convert PrzRange to string
Namespace types: PrzRange
Parameters:
this (PrzRange): PrzRange object
Returns: converted string representation
method tostring(this)
convert array of PrzRange to string
Namespace types: array<PrzRange>
Parameters:
this (array<PrzRange>): array<PrzRange> object
Returns: converted string representation
getHarmonicMap()
Creates the RatioMap for harmonic patterns
Returns: map<string, RatioMap> haronic ratio rules for all patterns
method evaluate(patternsMap, pattern, ratioRange, properties, ratioValue)
evaluates harmonic ratio range
Namespace types: map<string, bool>
Parameters:
patternsMap (map<string, bool>): parameter containing valid pattern names
pattern (string): Pattern type to be evaluated
ratioRange (Range): ratio range to be checked
properties (ScanProperties): Scan Properties
ratioValue (float)
Returns: void
method evaluate(przRange, pattern, ratioRange, priceRange, properties)
Evaluate PRZ ranges
Namespace types: map<string, Range>
Parameters:
przRange (map<string, Range>)
pattern (string): Pattern name
ratioRange (Range): Range of ratio for the pattern
priceRange (Range): Price range based on ratio
properties (ScanProperties): ScanProperties object
Returns: void
method scanRatio(currentPatterns, rules, properties, ratioName, ratioValue)
Scan for particular named ratio of harmonic pattern to filter valid patterns
Namespace types: map<string, bool>
Parameters:
currentPatterns (map<string, bool>): Current valid patterns map
rules (map<string, RatioMap>): map<string, RatioMap> Harmonic ratio rules
properties (ScanProperties): ScanProperties object
ratioName (string): Specific ratio name
ratioValue (float): ratio value to be checked
Returns: updated currentPatterns object
method scanPatterns(patterns, x, a, b, c, d, properties)
Scan for patterns based on X, A, B, C, D values
Namespace types: map<string, bool>
Parameters:
patterns (map<string, bool>): List of allowed patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
d (float): D coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: updated valid patterns map
method scanProjections(patterns, x, a, b, c, properties)
Scan for projections based on X, A, B, C values
Namespace types: map<string, bool>
Parameters:
patterns (map<string, bool>): List of allowed patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: updated valid projections map
method merge(this, other)
merge two ranges into one
Namespace types: Range
Parameters:
this (Range): first range
other (Range): second range
Returns: combined range
method union(this, other)
union of two ranges into one
Namespace types: Range
Parameters:
this (Range): first range
other (Range): second range
Returns: union range
method overlaps(this, other)
checks if two ranges intersect
Namespace types: Range
Parameters:
this (Range): first range
other (Range): second range
Returns: true if intersects, false otherwise
method consolidate(this)
Consolidate ranges into PRZ
Namespace types: map<string, Range>
Parameters:
this (map<string, Range>): map of Ranges
Returns: consolidated PRZ
method consolidateMany(this)
Consolidate ranges into multiple PRZ ranges
Namespace types: map<string, Range>
Parameters:
this (map<string, Range>): map of Ranges
Returns: consolidated array of PRZ ranges
method getRange(currentPatterns, x, a, b, c, properties)
Get D range based on X, A, B, C coordinates for the current patterns
Namespace types: map<string, bool>
Parameters:
currentPatterns (map<string, bool>): List of valid patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: map of D ranges
method getPrzRange(currentPatterns, x, a, b, c, properties)
Get PRZ range based on X, A, B, C coordinates for the current patterns
Namespace types: map<string, bool>
Parameters:
currentPatterns (map<string, bool>): List of valid patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: PRZRange for the pattern
method getProjectionRanges(currentPatterns, x, a, b, c, properties)
Get projection range based on X, A, B, C coordinates for the current patterns
Namespace types: map<string, bool>
Parameters:
currentPatterns (map<string, bool>): List of valid patterns
x (float): X coordinate
a (float): A coordinate
b (float): B coordinate
c (float): C coordinate
properties (ScanProperties): ScanProperties object. If na, default values are initialised
Returns: array of projection ranges
Range
Collection of range values
Fields:
values (array<float>): array of float values
RatioMap
ratio map for pattern
Fields:
ratioMap (map<string, Range>): map of string to Range (array of float)
ScanProperties
Pattern Scanning properties
Fields:
strictMode (series bool): strict scanning mode will check for overflows
logScale (series bool): scan ratios in log scale
errorMin (series float): min error threshold
errorMax (series float)
mintick (series float): minimum tick value of price
PrzRange
Potential reversal zone range
Fields:
patterns (array<string>): array of pattern names for the given XABCD combination
prz (Range): PRZ range
Thư viện Pine
Theo tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này dưới dạng thư viện nguồn mở để các lập trình viên Pine khác trong cộng đồng của chúng tôi có thể sử dụng lại. Xin tri ân tác giả! Bạn có thể sử dụng thư viện này riêng tư hoặc trong các bài đăng nguồn mở khác. Tuy nhiên, bạn cần sử dụng lại mã này theo Nội quy chung.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Thư viện Pine
Theo tinh thần TradingView thực sự, tác giả đã xuất bản mã Pine này dưới dạng thư viện nguồn mở để các lập trình viên Pine khác trong cộng đồng của chúng tôi có thể sử dụng lại. Xin tri ân tác giả! Bạn có thể sử dụng thư viện này riêng tư hoặc trong các bài đăng nguồn mở khác. Tuy nhiên, bạn cần sử dụng lại mã này theo Nội quy chung.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.