CryptonianFibMath

Library "CryptonianFibMath"
[Cryptonian] Fibonacci pure mathematics library. Part 0 / v0.1.0.
NO INPUTS, NO REQUEST.SECURITY, NO DRAWINGS, NO STATE AND NO FUTURE DATA.
swingSize(a, b)
Absolute price displacement between two pivots.
Parameters:
a (float): First pivot price.
b (float): Second pivot price.
Returns: Absolute displacement, or na when the price pair is unavailable.
validSwing(a, b, minMove)
Verify that an anchor pair has a meaningful (positive) displacement.
Parameters:
a (float): Earlier anchor price.
b (float): Later anchor price.
minMove (float): Minimum permitted absolute price move.
Returns: True if valid and separated by the requested amount.
retracement(a, b, ratio)
Retracement of a movement A -> B. 0 = B, 1 = A, 0.618 = 61.8% back from B.
Parameters:
a (float): First anchor A.
b (float): Last anchor B.
ratio (float): Retracement fraction, e.g. 0.618.
Returns: Absolute retracement price, or na for unavailable inputs.
extension(a, b, ratio)
Extension of A -> B. 1 = B, 1.618 projects 61.8% beyond B.
Parameters:
a (float): First anchor A.
b (float): Last anchor B.
ratio (float): Extension multiple, e.g. 1.618.
Returns: Absolute extension price.
projection(a, b, c, ratio)
Three-point Fibonacci projection: project AB from C by a selected multiple.
Parameters:
a (float): Origin of impulse AB.
b (float): End of impulse AB.
c (float): Start of new projected leg.
ratio (float): Size multiple of AB.
Returns: Projected endpoint from C.
distance(price, level)
Absolute price distance between a level and an observed price.
Parameters:
price (float): Observed price.
level (float): Reference level.
Returns: Positive absolute distance.
normalizedDistance(price, level, structuralRange)
Distance normalized to a nonzero structural range (not a probability).
Parameters:
price (float): Observed price.
level (float): Reference price.
structuralRange (float): Positive reference range.
Returns: Distance / range, or na for a zero/invalid range.
inZone(price, a, b, tolerance)
Whether a price is inside a region, allowing a caller-specified absolute tolerance.
Parameters:
price (float): Observed price.
a (float): One zone boundary.
b (float): Other zone boundary.
tolerance (float): Nonnegative absolute buffer around the region.
Returns: True only for valid inputs and an inclusive match.
roundToTick(price, tickSize)
Round a price to the nearest instrument tick (caller passes syminfo.mintick).
Parameters:
price (float): Price to round.
tickSize (float): Tick size (must be positive).
Returns: Rounded price or na for invalid inputs.
rewardRisk(entry, stop, target)
Geometry-only reward/risk; no fill or profitability claims.
Parameters:
entry (float): Hypothetical trade entry.
stop (float): Structural stop.
target (float): Projected target.
Returns: Reward/risk if target and stop bracket the entry in a valid direction.
projectedBars(baseBars, ratio)
Extrapolate a whole-number bar count using a Fibonacci/time multiple.
Parameters:
baseBars (int): Original positive bar count.
ratio (float): Positive time ratio.
Returns: Number of bars, or na when unavailable/invalid.
ratioAt(index)
Common chart Fibonacci ratios by index (0..15).
Includes conventional midpoint 0.500 and sqrt-like derived ratios.
Parameters:
index (int): Index from 0 to 15.
Returns: Ratio or na for an unrecognized index.
[Cryptonian] Fibonacci pure mathematics library. Part 0 / v0.1.0.
NO INPUTS, NO REQUEST.SECURITY, NO DRAWINGS, NO STATE AND NO FUTURE DATA.
swingSize(a, b)
Absolute price displacement between two pivots.
Parameters:
a (float): First pivot price.
b (float): Second pivot price.
Returns: Absolute displacement, or na when the price pair is unavailable.
validSwing(a, b, minMove)
Verify that an anchor pair has a meaningful (positive) displacement.
Parameters:
a (float): Earlier anchor price.
b (float): Later anchor price.
minMove (float): Minimum permitted absolute price move.
Returns: True if valid and separated by the requested amount.
retracement(a, b, ratio)
Retracement of a movement A -> B. 0 = B, 1 = A, 0.618 = 61.8% back from B.
Parameters:
a (float): First anchor A.
b (float): Last anchor B.
ratio (float): Retracement fraction, e.g. 0.618.
Returns: Absolute retracement price, or na for unavailable inputs.
extension(a, b, ratio)
Extension of A -> B. 1 = B, 1.618 projects 61.8% beyond B.
Parameters:
a (float): First anchor A.
b (float): Last anchor B.
ratio (float): Extension multiple, e.g. 1.618.
Returns: Absolute extension price.
projection(a, b, c, ratio)
Three-point Fibonacci projection: project AB from C by a selected multiple.
Parameters:
a (float): Origin of impulse AB.
b (float): End of impulse AB.
c (float): Start of new projected leg.
ratio (float): Size multiple of AB.
Returns: Projected endpoint from C.
distance(price, level)
Absolute price distance between a level and an observed price.
Parameters:
price (float): Observed price.
level (float): Reference level.
Returns: Positive absolute distance.
normalizedDistance(price, level, structuralRange)
Distance normalized to a nonzero structural range (not a probability).
Parameters:
price (float): Observed price.
level (float): Reference price.
structuralRange (float): Positive reference range.
Returns: Distance / range, or na for a zero/invalid range.
inZone(price, a, b, tolerance)
Whether a price is inside a region, allowing a caller-specified absolute tolerance.
Parameters:
price (float): Observed price.
a (float): One zone boundary.
b (float): Other zone boundary.
tolerance (float): Nonnegative absolute buffer around the region.
Returns: True only for valid inputs and an inclusive match.
roundToTick(price, tickSize)
Round a price to the nearest instrument tick (caller passes syminfo.mintick).
Parameters:
price (float): Price to round.
tickSize (float): Tick size (must be positive).
Returns: Rounded price or na for invalid inputs.
rewardRisk(entry, stop, target)
Geometry-only reward/risk; no fill or profitability claims.
Parameters:
entry (float): Hypothetical trade entry.
stop (float): Structural stop.
target (float): Projected target.
Returns: Reward/risk if target and stop bracket the entry in a valid direction.
projectedBars(baseBars, ratio)
Extrapolate a whole-number bar count using a Fibonacci/time multiple.
Parameters:
baseBars (int): Original positive bar count.
ratio (float): Positive time ratio.
Returns: Number of bars, or na when unavailable/invalid.
ratioAt(index)
Common chart Fibonacci ratios by index (0..15).
Includes conventional midpoint 0.500 and sqrt-like derived ratios.
Parameters:
index (int): Index from 0 to 15.
Returns: Ratio or na for an unrecognized index.
I Am LOVE But You Can Call Me AYEHAN
ayehan.com
discord.gg/nX3DGCyCJV
ayehan.com
discord.gg/nX3DGCyCJV
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
I Am LOVE But You Can Call Me AYEHAN
ayehan.com
discord.gg/nX3DGCyCJV
ayehan.com
discord.gg/nX3DGCyCJV
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.