Geometric analysis is based on the conviction that the market conforms to geometric principles that take both price and time into account. This form of analysis is advanced and uses innovative tools and techniques. The founder of using geometry in trading is W.D. Gann who used angles, squares and other geometric constructions in his forecasting methods and introduced a whole new way of thinking about market analysis to the financial world.

There are several types of market geometry. Pitchforks are a widely used tool which, based on a channel drawn on major pivots, calculates a median line that provides a different market geometry perspective. This median line is key, which is why pitchforks are often called the median line method. For some chartists straight lines are too limited. They bring market geometry to another level by using arcs, circles and spirals. They measure the geometry, in price and time, of the market and allow a trader to fit past price action and then predict future moves based on potential support, resistance or reversal points.

There are several types of market geometry. Pitchforks are a widely used tool which, based on a channel drawn on major pivots, calculates a median line that provides a different market geometry perspective. This median line is key, which is why pitchforks are often called the median line method. For some chartists straight lines are too limited. They bring market geometry to another level by using arcs, circles and spirals. They measure the geometry, in price and time, of the market and allow a trader to fit past price action and then predict future moves based on potential support, resistance or reversal points.

Library "Trig" Trigonometric functions rt_get_angleAlpha(a, b, c, deg) Get angle α of a right triangle, given the lengths of its sides Parameters: a : length of leg a (float) b : length of leg b (float) c : length of hypotenuse (float) deg : flag to return angle in degrees (bool - default = false) Returns: angle α in radians (or...

2

Library "LinearRegressionLibrary" contains functions for fitting a regression line to the time series by means of different models, as well as functions for estimating the accuracy of the fit. Linear regression algorithms: RepeatedMedian(y, n, lastBar) applies repeated median regression (robust linear regression algorithm) to the input time series...

66

This script plots a a square composed of 8 equilateral triangles ("grid"). User can set the frequency of calculation/interval by adjusting the 't' parameter. Steps for calculating grid: 1. Find the highest high and lowest low for last 't' periods. 2. Calculate midpoint for prices during that interval (highest high + lowest low) / 2. 3. Center of the grid =...

342

█ OVERVIEW Library "e2hray" A drawing library that contains the hray() function, which draws a horizontal ray/s with an initial point determined by a specified condition. It plots a ray until it reached the price. The function let you control the visibility of historical levels and setup the alerts. █ HORIZONTAL RAY FUNCTION hray(condition, level, color,...

96

Murrey Math Lines are support and resistance lines based on geometric mathematical formulas developed by T. H. Murrey. MM lines are a derivation of the observations of W.D. Gann. Murrey's geometry facilitate the use of Gann's theories in a somewhat easier application. According to Gann's theory, price tends to trend and retrace in 1/8th intervals. The most...

498

Library "eHarmonicpatternsExtended" Library provides an alternative method to scan harmonic patterns. This is helpful in reducing iterations. Republishing as new library instead of existing eHarmonicpatterns because I need that copy for existing scripts. scan_xab(bcdRatio, err_min, err_max, patternArray) Checks if bcd ratio is in range of any harmonic...

197

Library "rzigzag" Recursive Zigzag Using Matrix allows to create zigzags recursively on multiple levels. After bit of consideration, decided to make this public. zigzag(length, ohlc, numberOfPivots, offset) calculates plain zigzag based on input Parameters: length : Zigzag Length ohlc : Array containing ohlc values. Can also contain custom...

55

Library "CreateAndShowZigzag" Functions in this library creates/updates zigzag array and shows the zigzag getZigzag(zigzag, prd, max_array_size) calculates zigzag using period Parameters: zigzag : is the float array for the zigzag (should be defined like "var zigzag = array.new_float(0)"). each zigzag points contains 2 element: 1. price level of the zz...

158

functions using the new line functions in V4 to draw multiple geometric shapes.

147

This is a script to draw a square wave on the chart, with an indicator for current price. Markets undergoing Dow Jones or Wyckoff Accumulation/Distribution cycles tend to move in such waves, and if the period of the cycles are detected, a signal for accumulation/distribution phases can be created as an early warning. Useful inputs: - Average True Range as the...

188

Library "harmonicpatterns" harmonicpatterns: methods required for calculation of harmonic patterns. These are customised to be used in my scripts. But, also simple enough for others to make use of :) isGartleyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max) isGartleyPattern: Checks for harmonic pattern Gartley Parameters: xabRatio :...

91

Library "LineGetPriceOnLogScale" This library provides a way to calculate the y-coordinate of a line on a specified bar when the chart scale is Log. The built-in `line.get_price()` function only works with linear scale and gives incorrect results when the chart is in Log scale. The library only works with `bar_index` values and `xloc.bar_index`-based lines,...

43

Library "HarmonicPattern" Functions to detect/check harmonic patterns from provided values. line_price_rate(point_c, point_b, point_a) Compute the price rate of the line AB divided by the the line BC Parameters: point_c : float, the price at point C. point_b : float, the price at point B. point_a : float, the price at point A. Returns: float ...

66

Library "CommonMarkup" Provides functions for chart markup, such as indicating recession bands. markRecessionBands(showBands, lineY, labelY) Mark vertical bands and show recession band labels if argument showBands is true. Example "markRecessionBands(bar_index ,3.0" Parameters: showBands : - show vertical recession bands when true. Functionally...

1

Library "HelperFunctions" A collection of my most used functions apply_smoothing() Apply one of Pine Script's built-in smoothing functions to a series

0

Library "eHarmonicpatterns" Library provides an alternative method to scan harmonic patterns. This is helpful in reducing iterations scan_xab(bcdRatio, err_min, err_max, patternArray) Checks if bcd ratio is in range of any harmonic pattern Parameters: bcdRatio : AB/XA ratio err_min : minimum error threshold err_max : maximum error...

86

Library "divergence" divergence: divergence algorithm with top and bottom kline tolerance regular_bull(series, series, simple, simple, simple, simple, simple) regular_bull: regular bull divergence, lower low src but higher low osc Parameters: series : float src: the source series series : float osc: the oscillator index simple : int lbL:...

5

Library "FunctionCosineSimilarity" Cosine Similarity method. function(sample_a, sample_b) Measure the similarity of 2 vectors. Parameters: sample_a : float array, values. sample_b : float array, values. Returns: float. diss(cosim) Dissimilarity helper function. Parameters: cosim : float, cosine similarity value (0 > 1) Returns: float

17