Library "CandlesGroup_Types" CandlesGroup Type allows you to efficiently store and access properties of all the candles in your chart. You can easily manipulate large datasets, work with multiple timeframes, or analyze multiple symbols simultaneously. By encapsulating the properties of each candle within a CandlesGroup object, you gain a convenient and...
█ OVERVIEW This indicator is an educational indicator to make pine coders easier to input color code. Color code displayed either in hex or rgb code or both. █ INSPIRATIONS RGB Color Codes Chart Table Color For Pairing Black And White █ FEATURES Hover table cell to see all properties of color such as Hex code and RGB code via tooltip. Cell can be...
█ OVERVIEW This indicator is a predecessor to Regression Channel Alternative MTF , which is coded based on latest update of type, object and method. █ IMPORTANT NOTES This indicator is NOT true Multi Timeframe (MTF) but considered as Alternative MTF which calculate 100 bars for Primary MTF, can be refer from provided line helper. The timeframe scenarios...
This is experimental script for zigzag which uses type, method and array. Not recommend for actual usage, for pine script study maybe useful. In this experiment, I use type as coded below. It seems have limitation as specially when push as array. As Trading View recommendation, pushing float and int into array especially for type not guarantee to work. I agree...
█ OVERVIEW This is a divergence indicator based on Relative Strength Index (RSI). My attempt to make this indicator updated based on latest pine script features such as type, object and method. █ FEATURES 1. Color of plot and label is based on contrast color of chart background. Able to customize color from style menu. 2. Big divergence (Regular Divergence)...
Library "Vector2FunctionClip" Sutherland-Hodgman polygon clipping algorithm. reference: . rosettacode.org . clip(source, reference) Perform Clip operation on a vector with another. Parameters: source : array . Source polygon to be clipped. reference : array . Reference polygon to clip source. Returns: array.
Library "Vector2Array" functions to handle vector2 Array operations. . references: docs.unity3d.com gist.github.com github.com gist.github.com gist.github.com gist.github.com . from(source, prop_sep, vect_sep) Generate array of vector2 from string. Parameters: source : string Source string of the vectors. prop_sep : string Separator character...
Library "Segment2" Structure representation of a directed straight line in two dimensions from origin to target vectors. . reference: graphics.stanford.edu . new(origin, target) Generate a new segment. Parameters: origin : Vector2 . Origin of the segment. target : Vector2 . Target of the segment. Returns: Segment2. new(origin_x, origin_y,...
Library "Vector2DrawQuad" functions to handle vector2 Quad drawing operations. new(a, b, c, d, xloc, bg_color, line_color, line_style, line_width) Draws a quadrilateral with background fill. Parameters: a : v2 . Vector2 object, in the form `(x, y)`. b : v2 . Vector2 object, in the form `(x, y)`. c : v2 . Vector2 object, in the...
Library "Vector2DrawTriangle" Functions to draw a triangle and manipulate its properties. new(a, b, c, xloc, bg_color, line_color, line_style, line_width) Draws a triangle with background fill using line prototype. Parameters: a : v2 . Vector2 object, in the form `(x, y)`. b : v2 . Vector2 object, in the form `(x, y)`. c : v2 ....
Library "Vector2" Representation of two dimensional vectors or points. This structure is used to represent positions in two dimensional space or vectors, for example in spacial coordinates in 2D space. ~~~ references: docs.unity3d.com gist.github.com github.com gist.github.com gist.github.com gist.github.com ~~~ new(x, y) Create a new Vector2...
For completeness here is a naive method with seasonality. The idea behind naive method with seasonality is to take last value from same season and treat it as a forecast. Its counterpart, naive method without seasonality, involves taking last mean value, i.e forecast = sma(x, p) .
This is a continuation of my series on forecasting techniques. The idea behind the Simple Mean method is to somehow extend historical mean to the future. In this case a forecast equals to last value plus average change.
Holt's Forecasting method Holt (1957) extended simple exponential smoothing to allow the forecasting of data with a trend. This method involves a forecast equation and two smoothing equations (one for the level and one for the trend): Forecast equation: ŷ = l + h * b Level equation: l = alpha * y + (1 - alpha) * (l + b) Trend equation: b = beta * (l - l)...
This script is similar to the "Hi-Lo" or "Clear" methods of painting bars. Instead of using the tips/edges of the candles like those two, the "(H+L)/2" method uses the change in (high+low)/2 to paint the bars. This gives you some similar results if you were to be binary with the candle coloring. However, my coloring scheme is not entirely binary. There are 5...
example method for hard coded data: