LibAndyLibrary "LibAndy"
TODO: add library description here
greencandlme(x)
โโTODO: add function description here
โโParameters:
โโโโ x (float) : TODO: add parameter x description here
โโReturns: TODO: add what function returns
greencandle()
โโWhether this candle is green or not
โโReturns: Whether this candle is green or not
redcandle()
โโWhether this candle is red or not
โโReturns: Whether this candle is red or not
boostrapSeries(bsSeries)
โโParameters:
โโโโ bsSeries (float)
Indicators and strategies
PolynomialLibrary "Polynomial"
TODO: add library description here
PolyNomial(Dop, n, step, nonp)
โโTODO: add function description here
โโParameters:
โโโโ Dop (int)
โโโโ n (int)
โโโโ step (int)
โโโโ nonp (int)
โโReturns: TODO: add what function returns
Branch CurveLibrary "branch"
Generates a branch made of segments with a starting angle
and a turning angle for each segment. The branch is generated from a starting point
and a number of nodes to generate. The length of each segment and angle of each segment
can be adjusted. The branch can be generated in 2D or 3D, render as you wish.
method branch(origin, nodes, segment_length, segment_growth, angle_start, angle_turn)
โโ# Branch Generation.
- `origin`: CommonTypesMath.Vector3 - The starting point of the branch. If the z value is not zero, it will be used as the starting angle.
- `nodes`: int - The number of nodes to generate.
- `segment_length`: float - The length of each segment.
- `segment_growth`: float - The growth of each segment. 0 = no growth, 100 = double the length of the previous segment.
- `angle_start`: float - The starting angle of the branch in degrees.
- `angle_turn`: float - The turning angle of each segment in degrees.
โโNamespace types: CommonTypesMath.Vector3
โโParameters:
โโโโ origin (Vector3 type from RicardoSantos/CommonTypesMath/1) : The starting point of the branch. If the z value is not zero, it will be used as the starting angle.
โโโโ nodes (int) : The number of nodes to generate.
โโโโ segment_length (float) : The length of each segment.
โโโโ segment_growth (float) : The growth of each segment. 0 = no growth, 100 = double the length of the previous segment.
โโโโ angle_start (float) : The starting angle of the branch in degrees.
โโโโ angle_turn (float) : The turning angle of each segment in degrees.
@return segments The list of segments that make up the branch.
VolumeLibLibrary "VolumeLib"
Contains types and methods related to VOLUME
volumePrice()
โโTODO: add function description here
โโReturns: TODO: add what function returns
averageVolumePrice(length)
โโParameters:
โโโโ length (simple int)
volumePower(volume_price, average_volume_price)
โโParameters:
โโโโ volume_price (float)
โโโโ average_volume_price (float)
volumePower(length)
โโParameters:
โโโโ length (simple int)
OrderLibLibrary "OrderLib"
TODO: add library description here
removeOrderView(view)
โโParameters:
โโโโ view (orderView)
createOrderView(model, length, profit_color, loss_color, enter_color)
โโParameters:
โโโโ model (orderModel)
โโโโ length (simple int)
โโโโ profit_color (simple color)
โโโโ loss_color (simple color)
โโโโ enter_color (simple color)
createOrder(enter, tp, sl)
โโParameters:
โโโโ enter (float)
โโโโ tp (float)
โโโโ sl (float)
createOrderByRR(enter, sl, rr)
โโParameters:
โโโโ enter (float)
โโโโ sl (float)
โโโโ rr (float)
createOrderByRR(enter, sl, rr, commision_percent)
โโParameters:
โโโโ enter (float)
โโโโ sl (float)
โโโโ rr (simple float)
โโโโ commision_percent (simple float)
orderModel
โโFields:
โโโโ enter (series__float)
โโโโ sl (series__float)
โโโโ tp (series__float)
orderView
โโFields:
โโโโ enter (series__line)
โโโโ sl (series__line)
โโโโ tp (series__line)
AdxLibLibrary "AdxLib"
TODO: add library description here
create(di_length, adx_length)
โโParameters:
โโโโ di_length (simple int)
โโโโ adx_length (simple int)
create(adx_length)
โโParameters:
โโโโ adx_length (simple int)
TextLibLibrary "TextLib"
TODO: Library with text / string functions
addText(before, value, separator)
โโParameters:
โโโโ before (string)
โโโโ value (string)
โโโโ separator (string)
addText(before, value1, value2, separator)
โโParameters:
โโโโ before (string)
โโโโ value1 (string)
โโโโ value2 (string)
โโโโ separator (string)
LibreLibrary "Libre"
TODO: add library description here
MMMM(toe)
โโParameters:
โโโโ toe (string)
OOOO(toe, toe1, toe2, toe3, toe4, toe5, init)
โโParameters:
โโโโ toe (string)
โโโโ toe1 (string)
โโโโ toe2 (string)
โโโโ toe3 (string)
โโโโ toe4 (string)
โโโโ toe5 (string)
โโโโ init (int)
XXXX(toe)
โโParameters:
โโโโ toe (string)
WWWW(toe)
โโParameters:
โโโโ toe (string)
HarmonicPatternTrackingLibrary "HarmonicPatternTracking"
Library contains few data structures and methods for tracking harmonic pattern trades via pinescript.
method draw(this)
โโCreates and draws HarmonicDrawing object for given HarmonicPattern
โโNamespace types: HarmonicPattern
โโParameters:
โโโโ this (HarmonicPattern) : HarmonicPattern object
โโReturns: current HarmonicPattern object
method addTrade(this)
โโcalculates HarmonicTrade and sets trade object for HarmonicPattern
โโNamespace types: HarmonicPattern
โโParameters:
โโโโ this (HarmonicPattern) : HarmonicPattern object
โโReturns: bool true if pattern trades are valid, false otherwise
method delete(this)
โโDeletes drawing objects of HarmonicDrawing
โโNamespace types: HarmonicDrawing
โโParameters:
โโโโ this (HarmonicDrawing) : HarmonicDrawing object
โโReturns: current HarmonicDrawing object
method delete(this)
โโDeletes drawings of harmonic pattern
โโNamespace types: HarmonicPattern
โโParameters:
โโโโ this (HarmonicPattern) : HarmonicPattern object
โโReturns: current HarmonicPattern object
HarmonicDrawing
โโDrawing objects of Harmonic Pattern
โโFields:
โโโโ xa (series line) : xa line
โโโโ ab (series line) : ab line
โโโโ bc (series line) : bc line
โโโโ cd (series line) : cd line
โโโโ xb (series line) : xb line
โโโโ bd (series line) : bd line
โโโโ ac (series line) : ac line
โโโโ xd (series line) : xd line
โโโโ x (series label) : label for pivot x
โโโโ a (series label) : label for pivot a
โโโโ b (series label) : label for pivot b
โโโโ c (series label) : label for pivot c
โโโโ d (series label) : label for pivot d
โโโโ xabRatio (series label) : label for XAB Ratio
โโโโ abcRatio (series label) : label for ABC Ratio
โโโโ bcdRatio (series label) : label for BCD Ratio
โโโโ xadRatio (series label) : label for XAD Ratio
HarmonicTrade
โโTrade tracking parameters of Harmonic Patterns
โโFields:
โโโโ initialEntry (series float) : initial entry when pattern first formed.
โโโโ entry (series float) : trailed entry price.
โโโโ initialStop (series float) : initial stop when trade first entered.
โโโโ stop (series float) : current stop updated as per trailing rules.
โโโโ target1 (series float) : First target value
โโโโ target2 (series float) : Second target value
โโโโ target3 (series float) : Third target value
โโโโ target4 (series float) : Fourth target value
โโโโ status (series int) : Trade status referenced as integer
โโโโ retouch (series bool) : Flag to show if the price retouched after entry
HarmonicProperties
โโDisplay and trade calculation properties for Harmonic Patterns
โโFields:
โโโโ fillMajorTriangles (series bool) : Display property used for using linefill for harmonic major triangles
โโโโ fillMinorTriangles (series bool) : Display property used for using linefill for harmonic minor triangles
โโโโ majorFillTransparency (series int) : transparency setting for major triangles
โโโโ minorFillTransparency (series int) : transparency setting for minor triangles
โโโโ showXABCD (series bool) : Display XABCD pivot labels
โโโโ lblSizePivots (series string) : Pivot label size
โโโโ showRatios (series bool) : Display Ratio labels
โโโโ useLogScaleForScan (series bool) : Use log scale to determine fib ratios for pattern scanning
โโโโ useLogScaleForTargets (series bool) : Use log scale to determine fib ratios for target calculation
โโโโ base (series string) : base on which calculation of stop/targets are made.
โโโโ entryRatio (series float) : fib ratio to calculate entry
โโโโ stopRatio (series float) : fib ratio to calculate initial stop
โโโโ target1Ratio (series float) : fib ratio to calculate first target
โโโโ target2Ratio (series float) : fib ratio to calculate second target
โโโโ target3Ratio (series float) : fib ratio to calculate third target
โโโโ target4Ratio (series float) : fib ratio to calculate fourth target
HarmonicPattern
โโHarmonic pattern object to track entire pattern trade life cycle
โโFields:
โโโโ id (series int) : Pattern Id
โโโโ dir (series int) : pattern direction
โโโโ x (series float) : X Pivot
โโโโ a (series float) : A Pivot
โโโโ b (series float) : B Pivot
โโโโ c (series float) : C Pivot
โโโโ d (series float) : D Pivot
โโโโ xBar (series int) : Bar index of X Pivot
โโโโ aBar (series int) : Bar index of A Pivot
โโโโ bBar (series int) : Bar index of B Pivot
โโโโ cBar (series int) : Bar index of C Pivot
โโโโ dBar (series int) : Bar index of D Pivot
โโโโ przStart (series float) : Start of PRZ range
โโโโ przEnd (series float) : End of PRZ range
โโโโ patterns (bool ) : array representing the patterns
โโโโ patternLabel (series string) : string representation of list of patterns
โโโโ patternColor (series color) : color assigned to pattern
โโโโ properties (HarmonicProperties) : HarmonicProperties object containing display and calculation properties
โโโโ trade (HarmonicTrade) : HarmonicTrade object to track trades
โโโโ drawing (HarmonicDrawing) : HarmonicDrawing object to manage drawings
AstroLibLibrary "AstroLib", or Astro Library, is a collection of public Pinescript functions & calculations for use in astrology & astronomy indicators. Unless noted otherwise, this library was written jointly by @badsector666 and @BarefootJoey.
Library "AstroLib"
t_(txt)
โโParameters:
โโโโ txt (string)
JDNv2(t, withFraction)
โโParameters:
โโโโ t (float)
โโโโ withFraction (bool)
J2K(t)
โโParameters:
โโโโ t (float)
J2KtoUnix(TimeInJDN)
โโParameters:
โโโโ TimeInJDN (float)
atan2(y, x)
โโParameters:
โโโโ y (float)
โโโโ x (float)
DegSin(x)
โโParameters:
โโโโ x (float)
DegCos(x)
โโParameters:
โโโโ x (float)
DegTan(x)
โโParameters:
โโโโ x (float)
DegArcsin(x)
โโParameters:
โโโโ x (float)
DegArccos(x)
โโParameters:
โโโโ x (float)
DegArctan(x)
โโParameters:
โโโโ x (float)
DegAtan2(y, x)
โโParameters:
โโโโ y (float)
โโโโ x (float)
range2pi(x)
โโParameters:
โโโโ x (float)
range360(x)
โโParameters:
โโโโ x (float)
gst(days)
โโParameters:
โโโโ days (float)
DegDecimal(Degrees, Minutes, Seconds)
โโParameters:
โโโโ Degrees (float)
โโโโ Minutes (float)
โโโโ Seconds (float)
Rectangular(R, theta, phi, Index)
โโParameters:
โโโโ R (float)
โโโโ theta (float)
โโโโ phi (float)
โโโโ Index (float)
rLength(x, y, z)
โโParameters:
โโโโ x (float)
โโโโ y (float)
โโโโ z (float)
spherical(x, y, z, Index)
โโParameters:
โโโโ x (float)
โโโโ y (float)
โโโโ z (float)
โโโโ Index (float)
obliquity(d)
โโParameters:
โโโโ d (float)
requatorial(x, y, z, d, Index)
โโParameters:
โโโโ x (float)
โโโโ y (float)
โโโโ z (float)
โโโโ d (float)
โโโโ Index (float)
recliptic(x, y, z, d, Index)
โโParameters:
โโโโ x (float)
โโโโ y (float)
โโโโ z (float)
โโโโ d (float)
โโโโ Index (float)
sequatorial(R, theta, phi, d, Index)
โโParameters:
โโโโ R (float)
โโโโ theta (float)
โโโโ phi (float)
โโโโ d (float)
โโโโ Index (float)
secliptic(R, theta, phi, d, Index)
โโParameters:
โโโโ R (float)
โโโโ theta (float)
โโโโ phi (float)
โโโโ d (float)
โโโโ Index (float)
precess(d1, d2, DEC, RA, Index, ddec, dra)
โโParameters:
โโโโ d1 (float)
โโโโ d2 (float)
โโโโ DEC (float)
โโโโ RA (float)
โโโโ Index (float)
โโโโ ddec (float)
โโโโ dra (float)
riset(J2000, DEC, RA, GLat, GLong, Index)
โโParameters:
โโโโ J2000 (float)
โโโโ DEC (float)
โโโโ RA (float)
โโโโ GLat (float)
โโโโ GLong (float)
โโโโ Index (float)
ssun(d, Index)
โโParameters:
โโโโ d (float)
โโโโ Index (float)
rsun(d, Index)
โโParameters:
โโโโ d (float)
โโโโ Index (float)
sun(d, Index)
โโParameters:
โโโโ d (float)
โโโโ Index (float)
SunLongitude(d, Index)
โโParameters:
โโโโ d (float)
โโโโ Index (float)
Sunrise(J2000, GLat, GLong, Index, altitudex)
โโParameters:
โโโโ J2000 (float)
โโโโ GLat (float)
โโโโ GLong (float)
โโโโ Index (float)
โโโโ altitudex (float)
smoon(dx, Index)
โโParameters:
โโโโ dx (float)
โโโโ Index (float)
rmoon(d, Index)
โโParameters:
โโโโ d (float)
โโโโ Index (float)
tmoon(d, GLat, GLong, Index)
โโParameters:
โโโโ d (float)
โโโโ GLat (float)
โโโโ GLong (float)
โโโโ Index (float)
moon(d, Index)
โโParameters:
โโโโ d (float)
โโโโ Index (float)
Element(d, pnum)
โโParameters:
โโโโ d (float)
โโโโ pnum (int)
kepler(m, ecc, eps)
โโParameters:
โโโโ m (float)
โโโโ ecc (float)
โโโโ eps (float)
rplanet(d, pnumber, Index)
โโParameters:
โโโโ d (float)
โโโโ pnumber (int)
โโโโ Index (float)
planet(d, pnumber, Index)
โโParameters:
โโโโ d (float)
โโโโ pnumber (int)
โโโโ Index (float)
altaz(d, DEC, RA, GLat, GLong, Index)
โโParameters:
โโโโ d (float)
โโโโ DEC (float)
โโโโ RA (float)
โโโโ GLat (float)
โโโโ GLong (float)
โโโโ Index (float)
prise(d, P, GLat, GLong, Index)
โโParameters:
โโโโ d (float)
โโโโ P (int)
โโโโ GLat (float)
โโโโ GLong (float)
โโโโ Index (float)
MoonSize(d)
โโParameters:
โโโโ d (float)
Refraction(Temperature_C, Atmospheric_Pressure_mBar, Altitude_Deg)
โโParameters:
โโโโ Temperature_C (float)
โโโโ Atmospheric_Pressure_mBar (float)
โโโโ Altitude_Deg (float)
MoonRise(d, Longitude, Latitude, Index)
โโParameters:
โโโโ d (float)
โโโโ Longitude (float)
โโโโ Latitude (float)
โโโโ Index (float)
f_to_sec(dec)
โโParameters:
โโโโ dec (float)
f_to_time(sec)
โโParameters:
โโโโ sec (float)
deg_to_time(deg)
โโParameters:
โโโโ deg (float)
toDMS(coordinate)
โโParameters:
โโโโ coordinate (float)
convertDMS(lat, lng)
โโParameters:
โโโโ lat (float)
โโโโ lng (float)
convlatdec(deg)
โโParameters:
โโโโ deg (float)
PlanetName(pnum)
โโParameters:
โโโโ pnum (int)
PlanetNameV(pnum)
โโParameters:
โโโโ pnum (int)
PlanetSign(pnum)
โโParameters:
โโโโ pnum (int)
PlanetColor(pnum)
โโParameters:
โโโโ pnum (int)
zodiaccolor(deg)
โโParameters:
โโโโ deg (float)
degsign(deg)
โโParameters:
โโโโ deg (float)
degsignf(deg)
โโParameters:
โโโโ deg (float)
degnash(deg)
โโParameters:
โโโโ deg (float)
degname(deg)
โโParameters:
โโโโ deg (float)
retrogradesym(deg)
โโParameters:
โโโโ deg (float)
degaspsign(deg)
โโParameters:
โโโโ deg (float)
degaspname(deg)
โโParameters:
โโโโ deg (float)
degaspfull(deg)
โโParameters:
โโโโ deg (float)
degaspfullV2(deg)
โโParameters:
โโโโ deg (float)
degaspnameV2(deg)
โโParameters:
โโโโ deg (float)
degtolowest180(deg)
โโParameters:
โโโโ deg (float)
degaspfullapproach(deg)
โโParameters:
โโโโ deg (float)
virinchiaspectcol(deg, bull_col, bear_col)
โโParameters:
โโโโ deg (float)
โโโโ bull_col (color)
โโโโ bear_col (color)
virinchiaspectemo(deg, bull_emo, bear_emo)
โโParameters:
โโโโ deg (float)
โโโโ bull_emo (string)
โโโโ bear_emo (string)
aspectfastsigndeg(deg)
โโParameters:
โโโโ deg (float)
aspectfastfull(deg)
โโParameters:
โโโโ deg (float)
aspectslowfull(deg)
โโParameters:
โโโโ deg (float)
aspectslowsigndeg(deg)
โโParameters:
โโโโ deg (float)
aspectslowsign(deg)
โโParameters:
โโโโ deg (float)
aspectsignprecision(deg, precision)
โโParameters:
โโโโ deg (float)
โโโโ precision (int)
aspectsignprecisionV2(deg, precision)
โโParameters:
โโโโ deg (float)
โโโโ precision (float)
aspectsignprecisionV2ext(deg, precision)
โโParameters:
โโโโ deg (float)
โโโโ precision (float)
IPaspectsignprecision(planet1, planet2, precision)
โโParameters:
โโโโ planet1 (float)
โโโโ planet2 (float)
โโโโ precision (float)
IPaspectsignprecisionFull(planet1, planet2, precision)
โโParameters:
โโโโ planet1 (float)
โโโโ planet2 (float)
โโโโ precision (float)
IPaspectlineprecision(planet1, planet2, precision, style, width)
โโParameters:
โโโโ planet1 (float)
โโโโ planet2 (float)
โโโโ precision (float)
โโโโ style (string)
โโโโ width (int)
rDeg(deg)
โโParameters:
โโโโ deg (float)
AngToCirc(angle)
โโParameters:
โโโโ angle (float)
AngToCirc180(angle)
โโParameters:
โโโโ angle (float)
sidereal(deg, sidereal)
โโParameters:
โโโโ deg (float)
โโโโ sidereal (bool)
J2000(JDN)
โโParameters:
โโโโ JDN (float)
JDN(t, d, tz)
โโParameters:
โโโโ t (float)
โโโโ d (float)
โโโโ tz (float)
getsun(index, day, dayr, latitude, longitude, tz)
โโParameters:
โโโโ index (int)
โโโโ day (float)
โโโโ dayr (float)
โโโโ latitude (float)
โโโโ longitude (float)
โโโโ tz (float)
getmoon(index, day, dayr, latitude, longitude)
โโParameters:
โโโโ index (int)
โโโโ day (float)
โโโโ dayr (float)
โโโโ latitude (float)
โโโโ longitude (float)
getplanet(planet, index, day, dayr, latitude, longitude, tz)
โโParameters:
โโโโ planet (int)
โโโโ index (int)
โโโโ day (float)
โโโโ dayr (float)
โโโโ latitude (float)
โโโโ longitude (float)
โโโโ tz (float)
MarkovAlgorithmLibrary "MarkovAlgorithm"
Markov algorithm is a string rewriting system that uses grammar-like rules to operate on strings of
symbols. Markov algorithms have been shown to be Turing-complete, which means that they are suitable as a
general model of computation and can represent any mathematical expression from its simple notation.
~ wikipedia
.
reference:
en.wikipedia.org
rosettacode.org
parse(rules, separator)
โโParameters:
โโโโ rules (string)
โโโโ separator (string)
โโReturns: - `array _rules`: List of rules.
---
Usage:
- `parse("|0 -> 0|| 1 -> 0| 0 -> ")`
apply(expression, rules)
โโAplies rules to a expression.
โโParameters:
โโโโ expression (string) : `string`: Text expression to be formated by the rules.
โโโโ rules (rule ) : `string`: Rules to apply to expression on a string format to be parsed.
โโReturns: - `string _result`: Formated expression.
---
Usage:
- `apply("101", parse("|0 -> 0|| 1 -> 0| 0 -> "))`
apply(expression, rules)
โโParameters:
โโโโ expression (string)
โโโโ rules (string)
โโReturns: - `string _result`: Formated expression.
---
Usage:
- `apply("101", parse("|0 -> 0|| 1 -> 0| 0 -> "))`
rule
โโString pair that represents `pattern -> replace`, each rule may be ordinary or terminating.
โโFields:
โโโโ pattern (series string) : Pattern to replace.
โโโโ replacement (series string) : Replacement patterns.
โโโโ termination (series bool) : Termination rule.
new_line_dot_3Library "new_line"
TODO: plot line based on 3 points.
new_line(x_1, x_2, x_3, y_1, y_2, y_3)
โโTODO: plot line based on 3 points. (each different)
โโParameters:
โโโโ x_1 (int)
โโโโ x_2 (int)
โโโโ x_3 (int)
โโโโ y_1 (float)
โโโโ y_2 (float)
โโโโ y_3 (float)
โโReturns: TODO: new line based on each different 3 values.
OHLC๐ LIBRARY OHLC
๐ท Introduction
This library is a custom library designed to work with real-time bars. It allows to easily calculate OHLC values for any source.
Personally, I use this library to accurately display the highest and lowest values on visual indicators such as my progress bars.
๐ท How to Use
โผ 1. Import the OHLC library into your TradingView script:
import cryptolinx/OHLC/1
- or -
Instead of the library namespace, you can define a custom namespace as alias.
import cryptolinx/OHLC/1 as src
โผ 2. Create a new OHLC source using the `new()` function.
varip mySrc = OHLC.new() // It is required to use the `varip` keyword to init your ``
- or -
If you has set up an alias before.
varip mySrc = src.new()
===
In that case, your `` needs to be `na`, define your object like that
varip mySrc = na
โผ 3. Call the `hydrateOHLC()` method on your OHLC source to update its values:
Basic
float rsi = ta.rsi(close, 14)
mySrc.hydrateOHLC(rsi)
- or -
Inline
rsi = ta.rsi(close, 14).hydrateOHLC(mySrc)
โผ 4. The data is accessible under their corresponding names.
mySrc.open
mySrc.high
mySrc.low
mySrc.close
๐ท Note: This library only works with real-time bars and will not work with historical bars.
Lex_3CR_Functions_Library2Library "Lex_3CR_Functions_Library2"
This is a source code for a technical analysis library in Pine Script language,
designed to identify and mark Bullish and Bearish Three Candle Reversal (3CR) chart patterns.
The library provides three functions to be used in a trading algorithm.
The first function, Bull_3crMarker, adds a dashed line and label to a Bullish 3CR chart pattern, indicating the 3CR point.
The second function, Bear_3crMarker, adds a dashed line and label to a Bearish 3CR chart pattern.
The third function, Bull_3CRlogicals, checks for a Bullish 3CR pattern where the first candle's low is greater than the second candle's low and the second candle's low is less than the third candle's low.
If found, creates a line at the breakout point and a label at the fail point,
if specified. All functions take parameters such as the chart pattern's characteristics and output colors, labels, and markers.
Bull_3crMarker(bulllinearray, barnum, breakpoint, failpointB, failpoint, linecolorbull, bulllabelarray, labelcolor, textcolor, labelon)
โโBull_3crMarker Adds a 3CR marker to a Bullish 3CR chart pattern
@description Adds a dashed line and label to a 3CR up chart pattern, indicating the 3CR (3 Candle Reversal) point.
โโParameters:
โโโโ bulllinearray (line )
โโโโ barnum (int)
โโโโ breakpoint (float)
โโโโ failpointB (float )
โโโโ failpoint (float)
โโโโ linecolorbull (color)
โโโโ bulllabelarray (label )
โโโโ labelcolor (color)
โโโโ textcolor (color)
โโโโ labelon (bool)
Bear_3crMarker(bearlinearray, barnum, breakpoint, failpointB, failpoint, linecolorbear, bearlabelarray, labelcolor, textcolor, labelon)
โโBear_3crMarker Adds a 3CR marker to a Bearish 3CR chart pattern
@description Adds a dashed line and label to a 3CR down chart pattern, indicating the 3CR (3 Candle Reversal) point.
โโParameters:
โโโโ bearlinearray (line )
โโโโ barnum (int)
โโโโ breakpoint (float)
โโโโ failpointB (float )
โโโโ failpoint (float)
โโโโ linecolorbear (color)
โโโโ bearlabelarray (label )
โโโโ labelcolor (color)
โโโโ textcolor (color)
โโโโ labelon (bool)
Bull_3CRlogicals(low1, low2, low3, bulllinearray, bulllabelarray, failpointB, linecolorbull, labelcolor, textcolor, labelon)
โโChecks for a bullish three candle reversal pattern and creates a line and label at the breakout point if found
@description Checks for a bullish three candle reversal pattern where the first candle's low is greater than the second candle's low and the second candle's low is less than the third candle's low. If found, creates a line at the breakout point and a label at the fail point, if specified.
โโParameters:
โโโโ low1 (float)
โโโโ low2 (float)
โโโโ low3 (float)
โโโโ bulllinearray (line )
โโโโ bulllabelarray (label )
โโโโ failpointB (float )
โโโโ linecolorbull (color)
โโโโ labelcolor (color)
โโโโ textcolor (color)
โโโโ labelon (bool)
Bear_3CRlogicals(high1, high2, high3, bearlinearray, bearlabelarray, failpointB, linecolorbear, labelcolor, textcolor, labelon)
โโChecks for a Bearish 3CR pattern and draws a bearish marker on the chart at the appropriate location
@description This function checks for a Bearish 3CR (Three-Candle Reversal) pattern, which is defined as the second candle having a higher high than the first and third candles, and the third candle having a lower high than the first candle. If the pattern is detected, a bearish marker is drawn on the chart at the appropriate location, and an optional label can be added to the marker.
โโParameters:
โโโโ high1 (float)
โโโโ high2 (float)
โโโโ high3 (float)
โโโโ bearlinearray (line )
โโโโ bearlabelarray (label )
โโโโ failpointB (float )
โโโโ linecolorbear (color)
โโโโ labelcolor (color)
โโโโ textcolor (color)
โโโโ labelon (bool)
bullLineDelete(i, bulllinearray, failarray, bulllabelarray, labelon)
โโRemoves a bullish line from a specified position in a line array, and optionally removes a label associated with that line
@description Removes a bullish line from a specified position in a line array, and optionally removes a label associated with that line.
โโParameters:
โโโโ i (int)
โโโโ bulllinearray (line )
โโโโ failarray (float )
โโโโ bulllabelarray (label )
โโโโ labelon (bool)
bearLineDelete(i, bearlinearray, failarray, bearlabelarray, labelon)
โโRemoves a bearish line from a specified position in a line array, and optionally removes a label associated with that line
@description Removes a bearish line from a specified position in a line array, and optionally removes a label associated with that line.
โโParameters:
โโโโ i (int)
โโโโ bearlinearray (line )
โโโโ failarray (float )
โโโโ bearlabelarray (label )
โโโโ labelon (bool)
bulloffsetdelete(i, bulllinearray, failarray, bulllabelarray, labelon)
โโRemoves a bullish line from a specified position in a line array, and optionally removes a label associated with that line
@description Removes a bullish line from a specified position in a line array, and optionally removes a label associated with that line.
โโParameters:
โโโโ i (int)
โโโโ bulllinearray (line )
โโโโ failarray (float )
โโโโ bulllabelarray (label )
โโโโ labelon (bool)
bearoffsetdelete(i, bearlinearray, failarray, bearlabelarray, labelon)
โโRemoves a bearish line from a specified position in a line array, and optionally removes a label associated with that line
@description Removes a bearish line from a specified position in a line array, and optionally removes a label associated with that line.
โโParameters:
โโโโ i (int)
โโโโ bearlinearray (line )
โโโโ failarray (float )
โโโโ bearlabelarray (label )
โโโโ labelon (bool)
BullEntry_setter(i, bulllinearray, failpointB, entrystopB, entryB, entryboolB)
โโChecks if the specified value is greater than the break point of any bullish line in an array, and removes that line if true
@description Checks if the s pecified value is greater than the break point of any bullish line in an array, and removes that line if true.
โโParameters:
โโโโ i (int)
โโโโ bulllinearray (line )
โโโโ failpointB (float )
โโโโ entrystopB (float )
โโโโ entryB (float )
โโโโ entryboolB (bool )
Bull3CRchecker(close1, bulllinearray, FailpointB, rsiB, bulllabelarray, labelt, bullcolored, directionarray, rsi, secondbullline, entrystopB, entryB, entryboolB)
โโParameters:
โโโโ close1 (float)
โโโโ bulllinearray (line )
โโโโ FailpointB (float )
โโโโ rsiB (float )
โโโโ bulllabelarray (label )
โโโโ labelt (bool)
โโโโ bullcolored (color)
โโโโ directionarray (label )
โโโโ rsi (float)
โโโโ secondbullline (line )
โโโโ entrystopB (float )
โโโโ entryB (float )
โโโโ entryboolB (bool )
Bear3CRchecker(close1, bearlinearray, FailpointB, bearlabelarray, labelt, bearcolored, directionarray, rsi, secondbearline, rsiB)
โโChecks if the specified value is less than the break point of any bearish line in an array, and removes that line if true
@description Checks if the specified value is less than the break point of any bearish line in an array, and removes that line if true.
โโParameters:
โโโโ close1 (float)
โโโโ bearlinearray (line )
โโโโ FailpointB (float )
โโโโ bearlabelarray (label )
โโโโ labelt (bool)
โโโโ bearcolored (color)
โโโโ directionarray (label )
โโโโ rsi (float)
โโโโ secondbearline (line )
โโโโ rsiB (float )
Bulloffsetcheck(FailpointB, bulllabelarray, linearray, labelt, offset)
โโChecks the offset of bullish lines and deletes them if they are beyond a certain offset from the current bar index
@description Checks the offset of bullish lines and deletes them if they are beyond a certain offset from the current bar index
โโParameters:
โโโโ FailpointB (float )
โโโโ bulllabelarray (label )
โโโโ linearray (line )
โโโโ labelt (bool)
โโโโ offset (int)
Bearoffsetcheck(FailpointB, bearlabelarray, linearray, labelt, offset)
โโChecks the offset of bearish lines and deletes them if they are beyond a certain offset from the current bar index
@description Checks the offset of bearish lines and deletes them if they are beyond a certain offset from the current bar index
โโParameters:
โโโโ FailpointB (float )
โโโโ bearlabelarray (label )
โโโโ linearray (line )
โโโโ labelt (bool)
โโโโ offset (int)
Bullfailchecker(close1, FailpointB, bulllabelarray, linearray, labelt)
โโChecks if the current price has crossed above a bullish fail point and deletes the corresponding line and label
@description Checks if the current price has crossed above a bullish fail point and deletes the corresponding line and label
โโParameters:
โโโโ close1 (float)
โโโโ FailpointB (float )
โโโโ bulllabelarray (label )
โโโโ linearray (line )
โโโโ labelt (bool)
Bearfailchecker(close1, FailpointB, bearlabelarray, linearray, labelt)
โโChecks for bearish lines that have failed to trigger and removes them from the chart
@description This function checks for bearish lines that have failed to trigger (i.e., where the current price is above the fail point) and removes them from the chart along with any associated label.
โโParameters:
โโโโ close1 (float)
โโโโ FailpointB (float )
โโโโ bearlabelarray (label )
โโโโ linearray (line )
โโโโ labelt (bool)
rsibullchecker(rsiinput, rsiBull, secondbullline)
โโChecks for bullish RSI lines that have failed to trigger and removes them from the chart
@description This function checks for bullish RSI lines that have failed to trigger (i.e., where the current RSI value is below the line's trigger level) and removes them from the chart along with any associated line.
โโParameters:
โโโโ rsiinput (float)
โโโโ rsiBull (float )
โโโโ secondbullline (line )
rsibearchecker(rsiinput, rsiBear, secondbearline)
โโChecks for bearish RSI lines that have failed to trigger and removes them from the chart
@description This function checks for bearish RSI lines that have failed to trigger (i.e., where the current RSI value is above the line's trigger level) and removes them from the chart along with any associated line.
โโParameters:
โโโโ rsiinput (float)
โโโโ rsiBear (float )
โโโโ secondbearline (line )
MarkovChainLibrary "MarkovChain"
Generic Markov Chain type functions.
---
A Markov chain or Markov process is a stochastic model describing a sequence of possible events in which the
probability of each event depends only on the state attained in the previous event.
---
reference:
Understanding Markov Chains, Examples and Applications. Second Edition. Book by Nicolas Privault.
en.wikipedia.org
www.geeksforgeeks.org
towardsdatascience.com
github.com
stats.stackexchange.com
timeseriesreasoning.com
www.ris-ai.com
github.com
gist.github.com
github.com
gist.github.com
writings.stephenwolfram.com
kevingal.com
towardsdatascience.com
spedygiorgio.github.io
github.com
www.projectrhea.org
method to_string(this)
โโTranslate a Markov Chain object to a string format.
โโNamespace types: MC
โโParameters:
โโโโ this (MC) : `MC` . Markov Chain object.
โโReturns: string
method to_table(this, position, text_color, text_size)
โโNamespace types: MC
โโParameters:
โโโโ this (MC)
โโโโ position (string)
โโโโ text_color (color)
โโโโ text_size (string)
method create_transition_matrix(this)
โโNamespace types: MC
โโParameters:
โโโโ this (MC)
method generate_transition_matrix(this)
โโNamespace types: MC
โโParameters:
โโโโ this (MC)
new_chain(states, name)
โโParameters:
โโโโ states (state )
โโโโ name (string)
from_data(data, name)
โโParameters:
โโโโ data (string )
โโโโ name (string)
method probability_at_step(this, target_step)
โโNamespace types: MC
โโParameters:
โโโโ this (MC)
โโโโ target_step (int)
method state_at_step(this, start_state, target_state, target_step)
โโNamespace types: MC
โโParameters:
โโโโ this (MC)
โโโโ start_state (int)
โโโโ target_state (int)
โโโโ target_step (int)
method forward(this, obs)
โโNamespace types: HMC
โโParameters:
โโโโ this (HMC)
โโโโ obs (int )
method backward(this, obs)
โโNamespace types: HMC
โโParameters:
โโโโ this (HMC)
โโโโ obs (int )
method viterbi(this, observations)
โโNamespace types: HMC
โโParameters:
โโโโ this (HMC)
โโโโ observations (int )
method baumwelch(this, observations)
โโNamespace types: HMC
โโParameters:
โโโโ this (HMC)
โโโโ observations (int )
Node
โโTarget node.
โโFields:
โโโโ index (series int) : . Key index of the node.
โโโโ probability (series float) : . Probability rate of activation.
state
โโState reference.
โโFields:
โโโโ name (series string) : . Name of the state.
โโโโ index (series int) : . Key index of the state.
โโโโ target_nodes (Node ) : . List of index references and probabilities to target states.
MC
โโMarkov Chain reference object.
โโFields:
โโโโ name (series string) : . Name of the chain.
โโโโ states (state ) : . List of state nodes and its name, index, targets and transition probabilities.
โโโโ size (series int) : . Number of unique states
โโโโ transitions (matrix) : . Transition matrix
HMC
โโHidden Markov Chain reference object.
โโFields:
โโโโ name (series string) : . Name of thehidden chain.
โโโโ states_hidden (state ) : . List of state nodes and its name, index, targets and transition probabilities.
โโโโ states_obs (state ) : . List of state nodes and its name, index, targets and transition probabilities.
โโโโ transitions (matrix) : . Transition matrix
โโโโ emissions (matrix) : . Emission matrix
โโโโ initial_distribution (float )
FunctionProbabilityViterbiLibrary "FunctionProbabilityViterbi"
The Viterbi Algorithm calculates the most likely sequence of hidden states *(called Viterbi path)*
that results in a sequence of observed events.
viterbi(observations, transitions, emissions, initial_distribution)
โโCalculate most probable path in a Markov model.
โโParameters:
โโโโ observations (int ) : array . Observation states data.
โโโโ transitions (matrix) : matrix . Transition probability table, (HxH, H:Hidden states).
โโโโ emissions (matrix) : matrix . Emission probability table, (OxH, O:Observed states).
โโโโ initial_distribution (float ) : array . Initial probability distribution for the hidden states.
โโReturns: array. Most probable path.
FunctionBaumWelchLibrary "FunctionBaumWelch"
Baum-Welch Algorithm, also known as Forward-Backward Algorithm, uses the well known EM algorithm
to find the maximum likelihood estimate of the parameters of a hidden Markov model given a set of observed
feature vectors.
---
### Function List:
> `forward (array pi, matrix a, matrix b, array obs)`
> `forward (array pi, matrix a, matrix b, array obs, bool scaling)`
> `backward (matrix a, matrix b, array obs)`
> `backward (matrix a, matrix b, array obs, array c)`
> `baumwelch (array observations, int nstates)`
> `baumwelch (array observations, array pi, matrix a, matrix b)`
---
### Reference:
> en.wikipedia.org
> github.com
> en.wikipedia.org
> www.rdocumentation.org
> www.rdocumentation.org
forward(pi, a, b, obs)
โโComputes forward probabilities for state `X` up to observation at time `k`, is defined as the
probability of observing sequence of observations `e_1 ... e_k` and that the state at time `k` is `X`.
โโParameters:
โโโโ pi (float ) : Initial probabilities.
โโโโ a (matrix) : Transmissions, hidden transition matrix a or alpha = transition probability matrix of changing
states given a state matrix is size (M x M) where M is number of states.
โโโโ b (matrix) : Emissions, matrix of observation probabilities b or beta = observation probabilities. Given
state matrix is size (M x O) where M is number of states and O is number of different
possible observations.
โโโโ obs (int ) : List with actual state observation data.
โโReturns: - `matrix _alpha`: Forward probabilities. The probabilities are given on a logarithmic scale (natural logarithm). The first
dimension refers to the state and the second dimension to time.
forward(pi, a, b, obs, scaling)
โโComputes forward probabilities for state `X` up to observation at time `k`, is defined as the
probability of observing sequence of observations `e_1 ... e_k` and that the state at time `k` is `X`.
โโParameters:
โโโโ pi (float ) : Initial probabilities.
โโโโ a (matrix) : Transmissions, hidden transition matrix a or alpha = transition probability matrix of changing
states given a state matrix is size (M x M) where M is number of states.
โโโโ b (matrix) : Emissions, matrix of observation probabilities b or beta = observation probabilities. Given
state matrix is size (M x O) where M is number of states and O is number of different
possible observations.
โโโโ obs (int ) : List with actual state observation data.
โโโโ scaling (bool) : Normalize `alpha` scale.
โโReturns: - #### Tuple with:
> - `matrix _alpha`: Forward probabilities. The probabilities are given on a logarithmic scale (natural logarithm). The first
dimension refers to the state and the second dimension to time.
> - `array _c`: Array with normalization scale.
backward(a, b, obs)
โโComputes backward probabilities for state `X` and observation at time `k`, is defined as the probability of observing the sequence of observations `e_k+1, ... , e_n` under the condition that the state at time `k` is `X`.
โโParameters:
โโโโ a (matrix) : Transmissions, hidden transition matrix a or alpha = transition probability matrix of changing states
given a state matrix is size (M x M) where M is number of states
โโโโ b (matrix) : Emissions, matrix of observation probabilities b or beta = observation probabilities. given state
matrix is size (M x O) where M is number of states and O is number of different possible observations
โโโโ obs (int ) : Array with actual state observation data.
โโReturns: - `matrix _beta`: Backward probabilities. The probabilities are given on a logarithmic scale (natural logarithm). The first dimension refers to the state and the second dimension to time.
backward(a, b, obs, c)
โโComputes backward probabilities for state `X` and observation at time `k`, is defined as the probability of observing the sequence of observations `e_k+1, ... , e_n` under the condition that the state at time `k` is `X`.
โโParameters:
โโโโ a (matrix) : Transmissions, hidden transition matrix a or alpha = transition probability matrix of changing states
given a state matrix is size (M x M) where M is number of states
โโโโ b (matrix) : Emissions, matrix of observation probabilities b or beta = observation probabilities. given state
matrix is size (M x O) where M is number of states and O is number of different possible observations
โโโโ obs (int ) : Array with actual state observation data.
โโโโ c (float ) : Array with Normalization scaling coefficients.
โโReturns: - `matrix _beta`: Backward probabilities. The probabilities are given on a logarithmic scale (natural logarithm). The first dimension refers to the state and the second dimension to time.
baumwelch(observations, nstates)
โโ**(Random Initialization)** BaumโWelch algorithm is a special case of the expectationโmaximization algorithm used to find the
unknown parameters of a hidden Markov model (HMM). It makes use of the forward-backward algorithm
to compute the statistics for the expectation step.
โโParameters:
โโโโ observations (int ) : List of observed states.
โโโโ nstates (int)
โโReturns: - #### Tuple with:
> - `array _pi`: Initial probability distribution.
> - `matrix _a`: Transition probability matrix.
> - `matrix _b`: Emission probability matrix.
---
requires: `import RicardoSantos/WIPTensor/2 as Tensor`
baumwelch(observations, pi, a, b)
โโBaumโWelch algorithm is a special case of the expectationโmaximization algorithm used to find the
unknown parameters of a hidden Markov model (HMM). It makes use of the forward-backward algorithm
to compute the statistics for the expectation step.
โโParameters:
โโโโ observations (int ) : List of observed states.
โโโโ pi (float ) : Initial probaility distribution.
โโโโ a (matrix) : Transmissions, hidden transition matrix a or alpha = transition probability matrix of changing states
given a state matrix is size (M x M) where M is number of states
โโโโ b (matrix) : Emissions, matrix of observation probabilities b or beta = observation probabilities. given state
matrix is size (M x O) where M is number of states and O is number of different possible observations
โโReturns: - #### Tuple with:
> - `array _pi`: Initial probability distribution.
> - `matrix _a`: Transition probability matrix.
> - `matrix _b`: Emission probability matrix.
---
requires: `import RicardoSantos/WIPTensor/2 as Tensor`
MyLibraryLibrary "MyLibrary"
TODO: add library description here
fun(x)
โโTODO: add function description here
โโParameters:
โโโโ x (float) : TODO: add parameter x description here
โโReturns: TODO: add what function returns
TrendIndicatorsLibrary "TrendIndicators"
This is a library of 'Trend Indicators'.
It aims to facilitate the grouping of this category of indicators, and also offer the customized supply of
the source, not being restricted to just the closing price.
Indicators (this is a work in progress):
1. Absolute DI (Directional Moviment Index) (Difference between DI+ and DI-).
Used in 'DMI Stochastic Extreme' by Barbara Star.
2. DMI
DI_Abs(lengthDI, smoothDI, typeMA, lengthMA)
โโ@description Absolute DI (Directional Moviment Index).
Used in 'DMI Stochastic Extreme' by Barbara Star.
Difference between DI+ and DI-
โโParameters:
โโโโ lengthDI : (int) Length of DI+/DI-
โโโโ smoothDI : (bool) Sets whether absolute DI should be smoothed
โโโโ typeMA : (int) Type of moving average of smoothing
โโโโ lengthMA : (int) Length for moving average of smoothing
โโReturns: (float) Absolute value of DI
dmi(diLength, adxSmoothing)
โโ@description DMI (Directional Movement Index)
Same as ta.dmi()
โโParameters:
โโโโ diLength : (int) Length of DI+/DI-
โโโโ adxSmoothing : (int) ADX Smoothing
โโReturns: Tuple of three DMI series: Positive Directional
Movement (+DI), Negative Directional Movement (-DI) and Average Directional Movement Index (ADX).
dmi(source, diLength, adxSmoothing)
โโ@description DMI (Directional Movement Index)
Customized version of ta.dmi(), with custom source
โโParameters:
โโโโ source : (float) Source for DI+/DI-
โโโโ diLength : (int) Length of DI+/DI-
โโโโ adxSmoothing : (int) ADX Smoothing
โโReturns: Tuple of three DMI series: Positive Directional
Movement (+DI), Negative Directional Movement (-DI) and Average Directional Movement Index (ADX).
Scaled Order Sizing and Take Profit Target ArraysWOAH Order Scaling!
This Provides a user with methods to create a list of profit targets and order sizes which grow or shrink. For size, the will add up to specific sum. for Targets they will include the first and last, and can lean towards either, to scale the order grid.
And thanks to @Hoanghetti for the markdown, i've included a basic usage example within the hover , o you don't need to search for the usage example, simply import, and when writing, the code hint contains a full example.
scaled_sizes(total_size, count, weight, min_size, as_percent)
create an array of sizes which grow or shrink from first to last
which add up to 1.0 if set the as_percent flag , or a total value / sum.
โโParameters:
โโโโ total_size : (float) total size to divide ito split
โโโโ count : (int ) desired number of splits to create
โโโโ weight : (float) a weight to apply to grow or shrink the split either towards the last being most, or the first being most, or 1.0 being each is equally sized as 1/n count
โโโโ min_size : (float) a minimum size for the smallest value (in value of ttotal_size units)
โโโโ as_percent : (float) a minimum size for the smallest value (in value of total_size units)
โโReturns: Array of Sizes for each split
scaled_targets(count, weight, minimum, maximum)
create a list of take profitt targets from the smallest to larget distance
โโParameters:
โโโโ count : (int ) number of targets
โโโโ weight : (float) weight to apply to growing or shrinking
โโโโ minimum : (float) first value of the output
โโโโ maximum : (float) last value of the output
โโReturns: Array of percentage targets
DiddlyUtilityLibrary "DiddlyUtility"
TODO: add library description here
getStringTimeMinus1Minute(london_ssth, london_sstm)
โโParameters:
โโโโ london_ssth
โโโโ london_sstm
getLadderStepIncrement(_price)
โโParameters:
โโโโ _price
getLadderIndexForPrice(_price, _ladderRange)
โโParameters:
โโโโ _price
โโโโ _ladderRange
getLadderStartPriceRange(_price, _ladderRange)
โโParameters:
โโโโ _price
โโโโ _ladderRange
get_volume_string(_volume)
โโParameters:
โโโโ _volume
floorDown(number, decimals)
โโParameters:
โโโโ number
โโโโ decimals
countDigitsBeforeDecimal(n)
โโParameters:
โโโโ n
countDigitsAfterDecimal(n)
โโParameters:
โโโโ n
getChartTimePeriodAsSeconds(_chartPeriod)
โโParameters:
โโโโ _chartPeriod
debug(_txt)
โโParameters:
โโโโ _txt
MomentumIndicatorsLibrary "MomentumIndicators"
This is a library of 'Momentum Indicators', also denominated as oscillators.
The purpose of this library is to organize momentum indicators in just one place, making it easy to access.
In addition, it aims to allow customized versions, not being restricted to just the price value.
An example of this use case is the popular Stochastic RSI.
# Indicators:
1. Relative Strength Index (RSI):
Measures the relative strength of recent price gains to recent price losses of an asset.
2. Rate of Change (ROC):
Measures the percentage change in price of an asset over a specified time period.
3. Stochastic Oscillator (Stoch):
Compares the current price of an asset to its price range over a specified time period.
4. True Strength Index (TSI):
Measures the price change, calculating the ratio of the price change (positive or negative) in relation to the
absolute price change.
The values of both are smoothed twice to reduce noise, and the final result is normalized
in a range between 100 and -100.
5. Stochastic Momentum Index (SMI):
Combination of the True Strength Index with a signal line to help identify turning points in the market.
6. Williams Percent Range (Williams %R):
Compares the current price of an asset to its highest high and lowest low over a specified time period.
7. Commodity Channel Index (CCI):
Measures the relationship between an asset's current price and its moving average.
8. Ultimate Oscillator (UO):
Combines three different time periods to help identify possible reversal points.
9. Moving Average Convergence/Divergence (MACD):
Shows the difference between short-term and long-term exponential moving averages.
10. Fisher Transform (FT):
Normalize prices into a Gaussian normal distribution.
11. Inverse Fisher Transform (IFT):
Transform the values of the Fisher Transform into a smaller and more easily interpretable scale is through the
application of an inverse transformation to the hyperbolic tangent function.
This transformation takes the values of the FT, which range from -infinity to +infinity, to a scale limited
between -1 and +1, allowing them to be more easily visualized and compared.
12. Premier Stochastic Oscillator (PSO):
Normalizes the standard stochastic oscillator by applying a five-period double exponential smoothing average of
the %K value, resulting in a symmetric scale of 1 to -1
# Indicators of indicators:
## Stochastic:
1. Stochastic of RSI (Relative Strengh Index)
2. Stochastic of ROC (Rate of Change)
3. Stochastic of UO (Ultimate Oscillator)
4. Stochastic of TSI (True Strengh Index)
5. Stochastic of Williams R%
6. Stochastic of CCI (Commodity Channel Index).
7. Stochastic of MACD (Moving Average Convergence/Divergence)
8. Stochastic of FT (Fisher Transform)
9. Stochastic of Volume
10. Stochastic of MFI (Money Flow Index)
11. Stochastic of On OBV (Balance Volume)
12. Stochastic of PVI (Positive Volume Index)
13. Stochastic of NVI (Negative Volume Index)
14. Stochastic of PVT (Price-Volume Trend)
15. Stochastic of VO (Volume Oscillator)
16. Stochastic of VROC (Volume Rate of Change)
## Inverse Fisher Transform:
1.Inverse Fisher Transform on RSI (Relative Strengh Index)
2.Inverse Fisher Transform on ROC (Rate of Change)
3.Inverse Fisher Transform on UO (Ultimate Oscillator)
4.Inverse Fisher Transform on Stochastic
5.Inverse Fisher Transform on TSI (True Strength Index)
6.Inverse Fisher Transform on CCI (Commodity Channel Index)
7.Inverse Fisher Transform on Fisher Transform (FT)
8.Inverse Fisher Transform on MACD (Moving Average Convergence/Divergence)
9.Inverse Fisher Transfor on Williams R% (Williams Percent Range)
10.Inverse Fisher Transfor on CMF (Chaikin Money Flow)
11.Inverse Fisher Transform on VO (Volume Oscillator)
12.Inverse Fisher Transform on VROC (Volume Rate of Change)
## Stochastic Momentum Index:
1.Stochastic Momentum Index of RSI (Relative Strength Index)
2.Stochastic Momentum Index of ROC (Rate of Change)
3.Stochastic Momentum Index of VROC (Volume Rate of Change)
4.Stochastic Momentum Index of Williams R% (Williams Percent Range)
5.Stochastic Momentum Index of FT (Fisher Transform)
6.Stochastic Momentum Index of CCI (Commodity Channel Index)
7.Stochastic Momentum Index of UO (Ultimate Oscillator)
8.Stochastic Momentum Index of MACD (Moving Average Convergence/Divergence)
9.Stochastic Momentum Index of Volume
10.Stochastic Momentum Index of MFI (Money Flow Index)
11.Stochastic Momentum Index of CMF (Chaikin Money Flow)
12.Stochastic Momentum Index of On Balance Volume (OBV)
13.Stochastic Momentum Index of Price-Volume Trend (PVT)
14.Stochastic Momentum Index of Volume Oscillator (VO)
15.Stochastic Momentum Index of Positive Volume Index (PVI)
16.Stochastic Momentum Index of Negative Volume Index (NVI)
## Relative Strength Index:
1. RSI for Volume
2. RSI for Moving Average
rsi(source, length)
โโRSI (Relative Strengh Index). Measures the relative strength of recent price gains to recent price losses of an asset.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ length : (int) Period of loopback
โโReturns: (float) Series of RSI
roc(source, length)
โโROC (Rate of Change). Measures the percentage change in price of an asset over a specified time period.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ length : (int) Period of loopback
โโReturns: (float) Series of ROC
stoch(kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโStochastic Oscillator. Compares the current price of an asset to its price range over a specified time period.
โโParameters:
โโโโ kLength
โโโโ kSmoothing : (int) Period for smoothig stochastic
โโโโ dSmoothing : (int) Period for signal (moving average of stochastic)
โโโโ maTypeK : (int) Type of Moving Average for Stochastic Oscillator
โโโโ maTypeD : (int) Type of Moving Average for Stochastic Oscillator Signal
โโโโ almaOffsetKD : (float) Offset for Arnaud Legoux Moving Average for Oscillator and Signal
โโโโ almaSigmaKD : (float) Sigma for Arnaud Legoux Moving Average for Oscillator and Signal
โโโโ lsmaOffSetKD : (int) Offset for Least Squares Moving Average for Oscillator and Signal
โโReturns: A tuple of Stochastic Oscillator and Moving Average of Stochastic Oscillator
stoch(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโStochastic Oscillator. Customized source. Compares the current price of an asset to its price range over a specified time period.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ kLength : (int) Period of loopback to calculate the stochastic
โโโโ kSmoothing : (int) Period for smoothig stochastic
โโโโ dSmoothing : (int) Period for signal (moving average of stochastic)
โโโโ maTypeK : (int) Type of Moving Average for Stochastic Oscillator
โโโโ maTypeD : (int) Type of Moving Average for Stochastic Oscillator Signal
โโโโ almaOffsetKD : (float) Offset for Arnaud Legoux Moving Average for Stoch and Signal
โโโโ almaSigmaKD : (float) Sigma for Arnaud Legoux Moving Average for Stoch and Signal
โโโโ lsmaOffSetKD : (int) Offset for Least Squares Moving Average for Stoch and Signal
โโReturns: A tuple of Stochastic Oscillator and Moving Average of Stochastic Oscillator
tsi(source, shortLength, longLength, maType, almaOffset, almaSigma, lsmaOffSet)
โโTSI (True Strengh Index). Measures the price change, calculating the ratio of the price change (positive or negative) in relation to the absolute price change.
The values of both are smoothed twice to reduce noise, and the final result is normalized in a range between 100 and -100.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ shortLength : (int) Short length
โโโโ longLength : (int) Long length
โโโโ maType : (int) Type of Moving Average for TSI
โโโโ almaOffset : (float) Offset for Arnaud Legoux Moving Average
โโโโ almaSigma : (float) Sigma for Arnaud Legoux Moving Average
โโโโ lsmaOffSet : (int) Offset for Least Squares Moving Average
โโReturns: (float) TSI
smi(sourceTSI, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโSMI (Stochastic Momentum Index). A TSI (True Strengh Index) plus a signal line.
โโParameters:
โโโโ sourceTSI : (float) Source of series for TSI (close, high, low, etc.)
โโโโ shortLengthTSI : (int) Short length for TSI
โโโโ longLengthTSI : (int) Long length for TSI
โโโโ maTypeTSI : (int) Type of Moving Average for Signal of TSI
โโโโ almaOffsetTSI : (float) Offset for Arnaud Legoux Moving Average
โโโโ almaSigmaTSI : (float) Sigma for Arnaud Legoux Moving Average
โโโโ lsmaOffSetTSI : (int) Offset for Least Squares Moving Average
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
โโReturns: A tuple with TSI, signal of TSI and histogram of difference
wpr(source, length)
โโWilliams R% (Williams Percent Range). Compares the current price of an asset to its highest high and lowest low over a specified time period.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ length : (int) Period of loopback
โโReturns: (float) Series of Williams R%
cci(source, length, maType, almaOffset, almaSigma, lsmaOffSet)
โโCCI (Commodity Channel Index). Measures the relationship between an asset's current price and its moving average.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ length : (int) Period of loopback
โโโโ maType : (int) Type of Moving Average
โโโโ almaOffset : (float) Offset for Arnaud Legoux Moving Average
โโโโ almaSigma : (float) Sigma for Arnaud Legoux Moving Average
โโโโ lsmaOffSet : (int) Offset for Least Squares Moving Average
โโReturns: (float) Series of CCI
ultimateOscillator(fastLength, middleLength, slowLength)
โโUO (Ultimate Oscilator). Combines three different time periods to help identify possible reversal points.
โโParameters:
โโโโ fastLength : (int) Fast period of loopback
โโโโ middleLength : (int) Middle period of loopback
โโโโ slowLength : (int) Slow period of loopback
โโReturns: (float) Series of Ultimate Oscilator
ultimateOscillator(source, fastLength, middleLength, slowLength)
โโUO (Ultimate Oscilator). Customized source. Combines three different time periods to help identify possible reversal points.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ fastLength : (int) Fast period of loopback
โโโโ middleLength : (int) Middle period of loopback
โโโโ slowLength : (int) Slow period of loopback
โโReturns: (float) Series of Ultimate Oscilator
macd(source, fastLength, slowLength, signalLength, maTypeFast, maTypeSlow, maTypeMACD, almaOffset, almaSigma, lsmaOffSet)
โโMACD (Moving Average Convergence/Divergence). Shows the difference between short-term and long-term exponential moving averages.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ fastLength : (int) Period for fast moving average
โโโโ slowLength : (int) Period for slow moving average
โโโโ signalLength : (int) Signal length
โโโโ maTypeFast : (int) Type of fast moving average
โโโโ maTypeSlow : (int) Type of slow moving average
โโโโ maTypeMACD : (int) Type of MACD moving average
โโโโ almaOffset : (float) Offset for Arnaud Legoux Moving Average
โโโโ almaSigma : (float) Sigma for Arnaud Legoux Moving Average
โโโโ lsmaOffSet : (int) Offset for Least Squares Moving Average
โโReturns: A tuple with MACD, Signal, and Histgram
fisher(length)
โโFisher Transform. Normalize prices into a Gaussian normal distribution.
โโParameters:
โโโโ length
โโReturns: A tuple with Fisher Transform and signal
fisher(source, length)
โโFisher Transform. Customized source. Normalize prices into a Gaussian normal distribution.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ length
โโReturns: A tuple with Fisher Transform and signal
inverseFisher(source, length, subtrahend, denominator)
โโInverse Fisher Transform.
Transform the values of the Fisher Transform into a smaller and more easily interpretable scale is
through the application of an inverse transformation to the hyperbolic tangent function.
This transformation takes the values of the FT, which range from -infinity to +infinity,
to a scale limited between -1 and +1, allowing them to be more easily visualized and compared.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ length : (int) Period for loopback
โโโโ subtrahend : (int) Denominator. Useful in unbounded indicators. For example, in CCI.
โโโโ denominator
โโReturns: (float) Series of Inverse Fisher Transform
premierStoch(length, smoothlen)
โโPremier Stochastic Oscillator (PSO).
Normalizes the standard stochastic oscillator by applying a five-period double exponential smoothing
average of the %K value, resulting in a symmetric scale of 1 to -1.
โโParameters:
โโโโ length : (int) Period for loopback
โโโโ smoothlen : (int) Period for smoothing
โโReturns: (float) Series of PSO
premierStoch(source, smoothlen, subtrahend, denominator)
โโPremier Stochastic Oscillator (PSO) of custom source.
Normalizes the source by applying a five-period double exponential smoothing average.
โโParameters:
โโโโ source : (float) Source of series (close, high, low, etc.)
โโโโ smoothlen : (int) Period for smoothing
โโโโ subtrahend : (int) Denominator. Useful in unbounded indicators. For example, in CCI.
โโโโ denominator
โโReturns: (float) Series of PSO
stochRsi(sourceRSI, lengthRSI, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ sourceRSI
โโโโ lengthRSI
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochRoc(sourceROC, lengthROC, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ sourceROC
โโโโ lengthROC
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochUO(fastLength, middleLength, slowLength, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ fastLength
โโโโ middleLength
โโโโ slowLength
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochTSI(source, shortLength, longLength, maType, almaOffset, almaSigma, lsmaOffSet, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ shortLength
โโโโ longLength
โโโโ maType
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochWPR(source, length, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ length
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochCCI(source, length, maType, almaOffset, almaSigma, lsmaOffSet, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ length
โโโโ maType
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochMACD(source, fastLength, slowLength, signalLength, maTypeFast, maTypeSlow, maTypeMACD, almaOffset, almaSigma, lsmaOffSet, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ fastLength
โโโโ slowLength
โโโโ signalLength
โโโโ maTypeFast
โโโโ maTypeSlow
โโโโ maTypeMACD
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochFT(length, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ length
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochVolume(kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochMFI(source, length, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ length
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochOBV(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochPVI(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochNVI(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochPVT(source, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ source
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochVO(shortLen, longLen, maType, almaOffset, almaSigma, lsmaOffSet, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ shortLen
โโโโ longLen
โโโโ maType
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
stochVROC(length, kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD)
โโParameters:
โโโโ length
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
iftRSI(sourceRSI, lengthRSI, lengthIFT)
โโParameters:
โโโโ sourceRSI
โโโโ lengthRSI
โโโโ lengthIFT
iftROC(sourceROC, lengthROC, lengthIFT)
โโParameters:
โโโโ sourceROC
โโโโ lengthROC
โโโโ lengthIFT
iftUO(fastLength, middleLength, slowLength, lengthIFT)
โโParameters:
โโโโ fastLength
โโโโ middleLength
โโโโ slowLength
โโโโ lengthIFT
iftStoch(kLength, kSmoothing, dSmoothing, maTypeK, maTypeD, almaOffsetKD, almaSigmaKD, lsmaOffSetKD, lengthIFT)
โโParameters:
โโโโ kLength
โโโโ kSmoothing
โโโโ dSmoothing
โโโโ maTypeK
โโโโ maTypeD
โโโโ almaOffsetKD
โโโโ almaSigmaKD
โโโโ lsmaOffSetKD
โโโโ lengthIFT
iftTSI(source, shortLength, longLength, maType, almaOffset, almaSigma, lsmaOffSet, lengthIFT)
โโParameters:
โโโโ source
โโโโ shortLength
โโโโ longLength
โโโโ maType
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ lengthIFT
iftCCI(source, length, maType, almaOffset, almaSigma, lsmaOffSet, lengthIFT)
โโParameters:
โโโโ source
โโโโ length
โโโโ maType
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ lengthIFT
iftFisher(length, lengthIFT)
โโParameters:
โโโโ length
โโโโ lengthIFT
iftMACD(source, fastLength, slowLength, signalLength, maTypeFast, maTypeSlow, maTypeMACD, almaOffset, almaSigma, lsmaOffSet, lengthIFT)
โโParameters:
โโโโ source
โโโโ fastLength
โโโโ slowLength
โโโโ signalLength
โโโโ maTypeFast
โโโโ maTypeSlow
โโโโ maTypeMACD
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ lengthIFT
iftWPR(source, length, lengthIFT)
โโParameters:
โโโโ source
โโโโ length
โโโโ lengthIFT
iftMFI(source, length, lengthIFT)
โโParameters:
โโโโ source
โโโโ length
โโโโ lengthIFT
iftCMF(length, lengthIFT)
โโParameters:
โโโโ length
โโโโ lengthIFT
iftVO(shortLen, longLen, maType, almaOffset, almaSigma, lsmaOffSet, lengthIFT)
โโParameters:
โโโโ shortLen
โโโโ longLen
โโโโ maType
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ lengthIFT
iftVROC(length, lengthIFT)
โโParameters:
โโโโ length
โโโโ lengthIFT
smiRSI(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ length
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiROC(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ length
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiVROC(length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ length
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiWPR(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ length
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiFT(length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ length
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiFT(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ length
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiCCI(source, length, maTypeCCI, almaOffsetCCI, almaSigmaCCI, lsmaOffSetCCI, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ length
โโโโ maTypeCCI
โโโโ almaOffsetCCI
โโโโ almaSigmaCCI
โโโโ lsmaOffSetCCI
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiUO(fastLength, middleLength, slowLength, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ fastLength
โโโโ middleLength
โโโโ slowLength
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiMACD(source, fastLength, slowLength, signalLength, maTypeFast, maTypeSlow, maTypeMACD, almaOffset, almaSigma, lsmaOffSet, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ fastLength
โโโโ slowLength
โโโโ signalLength
โโโโ maTypeFast
โโโโ maTypeSlow
โโโโ maTypeMACD
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiVol(shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiMFI(source, length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ length
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiCMF(length, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ length
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiOBV(source, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiPVT(source, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiVO(shortLen, longLen, maType, almaOffset, almaSigma, lsmaOffSet, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ shortLen
โโโโ longLen
โโโโ maType
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiPVI(source, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
smiNVI(source, shortLengthTSI, longLengthTSI, maTypeTSI, almaOffsetTSI, almaSigmaTSI, lsmaOffSetTSI, maTypeSignal, smoothingLengthSignal, almaOffsetSignal, almaSigmaSignal, lsmaOffSetSignal)
โโParameters:
โโโโ source
โโโโ shortLengthTSI
โโโโ longLengthTSI
โโโโ maTypeTSI
โโโโ almaOffsetTSI
โโโโ almaSigmaTSI
โโโโ lsmaOffSetTSI
โโโโ maTypeSignal
โโโโ smoothingLengthSignal
โโโโ almaOffsetSignal
โโโโ almaSigmaSignal
โโโโ lsmaOffSetSignal
rsiVolume(length)
โโParameters:
โโโโ length
rsiMA(sourceMA, lengthMA, maType, almaOffset, almaSigma, lsmaOffSet, lengthRSI)
โโParameters:
โโโโ sourceMA
โโโโ lengthMA
โโโโ maType
โโโโ almaOffset
โโโโ almaSigma
โโโโ lsmaOffSet
โโโโ lengthRSI
UtilsLibrary "Utils"
Utility functions. Mathematics, colors, and auxiliary algorithms.
setTheme(vc, theme)
โโSet theme for levels (predefined colors).
โโParameters:
โโโโ vc : (valueColorSpectrum) Object to associate a color with a value, taking into account the previous value and its levels.
โโโโ theme : (int) Theme (predefined colors).
0 = 'User defined'
1 = 'Spectrum Blue-Green-Red'
2 = 'Monokai'
3 = 'Green'
4 = 'Purple'
5 = 'Blue'
6 = 'Red'
โโReturns: (void)
setTheme(vc, colorLevel_Lv1, colorLevel_Lv1_Lv2, colorLevel_Lv2_Lv3, colorLevel_Lv3_Lv4, colorLevel_Lv4_Lv5, colorLevel_Lv5)
โโSet theme for levels (customized colors).
โโParameters:
โโโโ vc : (valueColorSpectrum) Object to associate a color with a value, taking into account the previous value and its levels
โโโโ colorLevel_Lv1 : (color) Color associeted with value when below Level 1.
โโโโ colorLevel_Lv1_Lv2 : (color) Color associeted with value when between Level 1 and 2.
โโโโ colorLevel_Lv2_Lv3 : (color) Color associeted with value when between Level 2 and 3.
โโโโ colorLevel_Lv3_Lv4 : (color) Color associeted with value when between Level 3 and 4.
โโโโ colorLevel_Lv4_Lv5 : (color) Color associeted with value when between Level 4 and 5.
โโโโ colorLevel_Lv5 : (color) Color associeted with value when above Level 5.
โโReturns: (void)
setCurrentColorValue(vc)
โโSet color to a current value, taking into account the previous value and its levels
โโParameters:
โโโโ vc : (valueColorSpectrum) Object to associate a color with a value, taking into account the previous value and its levels
โโReturns: (void)
setCurrentColorValue(vc, gradient)
โโSet color to a current value, taking into account the previous value.
โโParameters:
โโโโ vc : (valueColor) Object to associate a color with a value, taking into account the previous value
โโโโ gradient
โโReturns: (void)
setCustomLevels(vc, level1, level2, level3, level4, level5)
โโSet boundaries for custom levels.
โโParameters:
โโโโ vc : (valueColorSpectrum) Object to associate a color with a value, taking into account the previous value and its levels
โโโโ level1 : (float) Boundary for level 1
โโโโ level2 : (float) Boundary for level 2
โโโโ level3 : (float) Boundary for level 3
โโโโ level4 : (float) Boundary for level 4
โโโโ level5 : (float) Boundary for level 5
โโReturns: (void)
getPeriodicColor(originalColor, density)
โโReturns a periodic color. Useful for creating dotted lines for example.
โโParameters:
โโโโ originalColor : (color) Original color.
โโโโ density : (float) Density of color. Expression used in modulo to obtain the integer remainder.
If the remainder equals zero, the color appears, otherwise it remains hidden.
โโReturns: (color) Periodic color.
dinamicZone(source, sampleLength, pcntAbove, pcntBelow)
โโGet Dynamic Zones
โโParameters:
โโโโ source : (float) Source
โโโโ sampleLength : (int) Sample Length
โโโโ pcntAbove : (float) Calculates the top of the dynamic zone, considering that the maximum values are above x% of the sample
โโโโ pcntBelow : (float) Calculates the bottom of the dynamic zone, considering that the minimum values are below x% of the sample
โโReturns: A tuple with 3 series of values: (1) Upper Line of Dynamic Zone;
(2) Lower Line of Dynamic Zone; (3) Center of Dynamic Zone (x = 50%)
valueColorSpectrum
โโ# Object to associate a color with a value, taking into account the previous value and its levels.
โโFields:
โโโโ currentValue
โโโโ previousValue
โโโโ level1
โโโโ level2
โโโโ level3
โโโโ level4
โโโโ level5
โโโโ currentColorValue
โโโโ colorLevel_Lv1
โโโโ colorLevel_Lv1_Lv2
โโโโ colorLevel_Lv2_Lv3
โโโโ colorLevel_Lv3_Lv4
โโโโ colorLevel_Lv4_Lv5
โโโโ colorLevel_Lv5
โโโโ theme
valueColor
โโ# Object to associate a color with a value, taking into account the previous value
โโFields:
โโโโ currentValue
โโโโ previousValue
โโโโ currentColorValue
โโโโ colorUp
โโโโ colorDown