DisplayUtilitiesLibrary   "DisplayUtilities" 
Display utilities for color management and visual presentation
 get_direction_color(direction, up_excessive, up_normal, neutral, down_normal, down_excessive) 
  Get candle color based on direction and color scheme
  Parameters:
     direction (int) : Direction value (-2, -1, 0, 1, 2)
     up_excessive (color) : Color for +2 direction
     up_normal (color) : Color for +1 direction
     neutral (color) : Color for 0 direction
     down_normal (color) : Color for -1 direction
     down_excessive (color) : Color for -2 direction
  Returns: Appropriate color for the direction
 get_candle_paint_directions(paint_opt, body_dir, bar_dir, breakout_dir, combined_dir) 
  Get candle directions for different painting algorithms
  Parameters:
     paint_opt (string) : Painting option algorithm
     body_dir (int) : Body direction
     bar_dir (int) : Bar direction
     breakout_dir (int) : Breakout direction
     combined_dir (int) : Combined direction
  Returns:  
 get_bias_paint_directions(paint_bias, unified_dir) 
  Get paint directions based on bias filter
  Parameters:
     paint_bias (string) : Paint bias option ("All", "Bull Bias", "Bear Bias")
     unified_dir (int) : Unified direction
  Returns:   Directions for two plotcandle series
 get_transparency_levels(sf_filtered, fade_option, fade_opacity) 
  Calculate transparency levels for strength factor filtering
  Parameters:
     sf_filtered (bool) : Is strength factor filtered
     fade_option (string) : Fade option ("Disabled", "Fade Candle", "Do Not Fade Wick", "Do Not Fade Wick and Border")
     fade_opacity (int) : Fade opacity percentage
  Returns:  
 get_strength_factor_filter(filter_option, individual_filters) 
  Generate strength factor filter conditions
  Parameters:
     filter_option (string) : Filter option string
     individual_filters (map) : Map of individual filter conditions
  Returns: Boolean filter result
 get_signal_bar_condition(signal_option, individual_filters) 
  Generate signal bar conditions (inverted filters)
  Parameters:
     signal_option (string) : Signal bar option string
     individual_filters (map) : Map of individual filter conditions
  Returns: Boolean signal bar result
 get_zscore_signal_condition(z_signal_option, z_filters) 
  Get Z-score signal bar conditions
  Parameters:
     z_signal_option (string) : Z-score signal option
     z_filters (map) : Map of Z-score filters
  Returns: Boolean Z-score signal condition
 get_standard_colors() 
  Create a standard color scheme for directions
  Returns:   Standard color set
 apply_zscore_modification(original_dir, z_filtered) 
  Modify directions for Z-score excess display
  Parameters:
     original_dir (int) : Original direction
     z_filtered (bool) : Is Z-score filtered (shows excess)
  Returns: Modified direction (doubled if excess detected)
 get_default_fade_colors() 
  Get default fade colors for strength factor overlay
  Returns:   Default colors for TV overlay
 should_paint_candles(paint_algo) 
  Check if paint algorithm should show candles
  Parameters:
     paint_algo (string) : Paint algorithm option
  Returns: True if algorithm should display candles
 get_signal_bar_char(signal_type, is_bullish) 
  Get signal bar character based on signal type
  Parameters:
     signal_type (string) : Signal type ("strength_factor" or "zscore")
     is_bullish (bool) : Direction is bullish
  Returns:   Character and location for plotchar
 get_signal_bar_color(signal_type, is_bullish) 
  Get signal bar colors
  Parameters:
     signal_type (string) : Signal type ("strength_factor" or "zscore")
     is_bullish (bool) : Direction is bullish
  Returns: Signal bar color
Penunjuk dan strategi
ZScoreAnalysisLibrary   "ZScoreAnalysis" 
Z-score analysis for detecting statistical deviations and excess market behavior
 calculate_zscore(source, lookback, threshold, switch_enabled) 
  Calculate Z-score and related metrics with history tracking
  Parameters:
     source (float) : Data source for Z-score calculation
     lookback (int) : Lookback period for mean and standard deviation
     threshold (float) : Z-score threshold for significance
     switch_enabled (string) : Enable/disable switch ("Enabled"/"Disabled")
  Returns:   Z-score, historical significant values, and running average
 get_zscore_threshold(opt, input_thr, avg) 
  Get threshold based on threshold option
  Parameters:
     opt (string) : Threshold option ("User Input Threshold", "Average as Threshold", or other)
     input_thr (float) : User input threshold
     avg (float) : Average threshold
  Returns: Calculated threshold value
 is_zscore_filtered(switch_enabled, zscore, threshold) 
  Check if a metric passes the Z-score filter
  Parameters:
     switch_enabled (string) : Enable/disable switch
     zscore (float) : Current Z-score value
     threshold (float) : Z-score threshold
  Returns: True if filtered (exceeds threshold)
 get_consecutive_distances(body_dir, breakout_dir, is_inside_bar) 
  Calculate consecutive distances for Z-score analysis
  Parameters:
     body_dir (int) : Body direction
     breakout_dir (int) : Breakout direction
     is_inside_bar (bool) : Inside bar flag
  Returns:  
 get_trend_to_mean_distance() 
  Calculate distance from trend to mean for momentum analysis
  Returns: Distance between trend and mean
 get_all_zscores(lookback, threshold, bar_dist_switch, body_dist_switch, chl_dist_switch, cc_dist_switch, m_dist_switch, body_dir, breakout_dir, is_inside_bar) 
  Get all Z-score calculations for the indicator
  Parameters:
     lookback (int) : Z-score lookback period
     threshold (float) : Z-score threshold
     bar_dist_switch (string) : Enable bar distance Z-score
     body_dist_switch (string) : Enable body distance Z-score
     chl_dist_switch (string) : Enable consecutive highs/lows Z-score
     cc_dist_switch (string) : Enable consecutive closes Z-score
     m_dist_switch (string) : Enable momentum distance Z-score
     body_dir (int) : Body direction
     breakout_dir (int) : Breakout direction
     is_inside_bar (bool) : Inside bar flag
  Returns:   Array of Z-score results and filters
 get_combined_zscore_filters(z_filters) 
  Get combined Z-score filters
  Parameters:
     z_filters (map) : Map of individual Z-score filters
  Returns:   Various combinations of Z-score filters
 get_basic_distances() 
  Calculate basic distances used in Z-score analysis
  Returns:   Bar range and body range
 get_individual_zscore_filter(z_filters, filter_name) 
  Get individual Z-score filter by name
  Parameters:
     z_filters (map) : Map of Z-score filters
     filter_name (string) : Name of the filter ("bar_dist", "body_dist", etc.)
  Returns: Boolean filter result
 has_any_zscore_signal(z_filters) 
  Check if any Z-score filter is active
  Parameters:
     z_filters (map) : Map of individual Z-score filters
  Returns: True if any Z-score exceeds threshold
StrengthFactorsLibrary   "StrengthFactors" 
Strength factor calculations for various market analysis metrics
 get_threshold(opt, input_val, avg_val, lineancy) 
  Calculate threshold based on options
  Parameters:
     opt (string) : Threshold option ("Disabled", "User Input Threshold", "Average as Threshold")
     input_val (float) : User input threshold value
     avg_val (float) : Average value for threshold
     lineancy (float) : Lineancy adjustment percentage
  Returns: Calculated threshold
 get_percentage_of_threshold(value, threshold) 
  Calculate percentage of threshold
  Parameters:
     value (float) : Current value
     threshold (float) : Threshold value
  Returns: Percentage of threshold
 get_distance_sf(lookback, thr_opt, thr_inp, lineancy) 
  Calculate Distance Strength Factor
  Parameters:
     lookback (int) : Lookback period for average
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     lineancy (float) : Lineancy adjustment
  Returns:  
 get_uniformity_sf(lookback, thr_opt, thr_inp, stddev_mult, lineancy) 
  Calculate Uniformity Strength Factor
  Parameters:
     lookback (int) : Lookback period for average
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     stddev_mult (float) : Standard deviation multiplier
     lineancy (float) : Lineancy adjustment
  Returns:  
 get_overlap_sf(lookback, thr_opt, thr_inp, lineancy) 
  Calculate Overlap Strength Factor
  Parameters:
     lookback (int) : Lookback period for average
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     lineancy (float) : Lineancy adjustment
  Returns:  
 get_body_sf(lookback, thr_opt, thr_inp, lineancy) 
  Calculate Body Strength Factor
  Parameters:
     lookback (int) : Lookback period for average
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     lineancy (float) : Lineancy adjustment
  Returns:  
 get_close_sf(lookback, thr_opt, thr_inp, lineancy) 
  Calculate Close Strength Factor
  Parameters:
     lookback (int) : Lookback period for average
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     lineancy (float) : Lineancy adjustment
  Returns:  
 get_breakout_sf(lookback, thr_opt, thr_inp, lineancy, bro_dir, is_inside_bar) 
  Calculate Breakout Strength Factor
  Parameters:
     lookback (int) : Lookback period for average
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     lineancy (float) : Lineancy adjustment
     bro_dir (int) : Breakout direction
     is_inside_bar (bool) : Is inside bar flag
  Returns:  
 get_always_in_sf(thr_opt, thr_inp, lineancy) 
  Calculate Always-In Strength Factor
  Parameters:
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     lineancy (float) : Lineancy adjustment
  Returns:  
 get_directional_sf(overlap_prc, distance_prc, body_prc, close_prc, breakout_prc, lookback, thr_opt, thr_inp, lineancy) 
  Calculate Directional Strength Factor (composite)
  Parameters:
     overlap_prc (float) : Overlap SF as percentage of threshold
     distance_prc (float) : Distance SF as percentage of threshold
     body_prc (float) : Body SF as percentage of threshold
     close_prc (float) : Close SF as percentage of threshold
     breakout_prc (float) : Breakout SF as percentage of threshold
     lookback (int) : Lookback period for average
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     lineancy (float) : Lineancy adjustment
  Returns:  
 get_combined_direction_sf(body_prc, close_prc, breakout_prc, lookback, thr_opt, thr_inp, lineancy) 
  Calculate Combined Direction Strength Factor
  Parameters:
     body_prc (float) : Body SF as percentage of threshold
     close_prc (float) : Close SF as percentage of threshold
     breakout_prc (float) : Breakout SF as percentage of threshold
     lookback (int) : Lookback period for average
     thr_opt (string) : Threshold option
     thr_inp (float) : User threshold input
     lineancy (float) : Lineancy adjustment
  Returns:  
 get_all_strength_factors(lookback, lineancy, dist_thr_opt, dist_thr_inp, body_thr_opt, body_thr_inp, close_thr_opt, close_thr_inp, breakout_thr_opt, breakout_thr_inp, bro_dir, is_inside_bar) 
  Get all strength factors at once (convenience function)
  Parameters:
     lookback (int) : Lookback period for averages
     lineancy (float) : Lineancy adjustment percentage
     dist_thr_opt (string) : Distance threshold option
     dist_thr_inp (float) : Distance threshold input
     body_thr_opt (string) : Body threshold option
     body_thr_inp (float) : Body threshold input
     close_thr_opt (string) : Close threshold option
     close_thr_inp (float) : Close threshold input
     breakout_thr_opt (string) : Breakout threshold option
     breakout_thr_inp (float) : Breakout threshold input
     bro_dir (int) : Breakout direction
     is_inside_bar (bool) : Is inside bar flag
  Returns: Map containing all strength factor results
DirectionCalculationsLibrary   "DirectionCalculations" 
Direction calculation algorithms for body, bar, and breakout directions
 get_body_direction() 
  Calculate body direction based on open vs close
  Returns: Body direction: 1 (bullish), -1 (bearish), 0 (doji)
 get_bar_direction() 
  Calculate bar direction based on close position relative to hl2
  Returns: Bar direction: 1 (upper half), -1 (lower half), 0 (middle)
 get_breakout_direction() 
  Calculate breakout direction with outside/inside bar logic
  Returns:  
 get_combined_direction(bod_dir, bar_dir, bro_dir, bro_ob_dir) 
  Calculate combined direction from body and bar directions
  Parameters:
     bod_dir (int) : Body direction
     bar_dir (int) : Bar direction
     bro_dir (int) : Breakout direction
     bro_ob_dir (int) : Outside bar direction
  Returns: Combined direction
 is_consecutive_direction(current_dir, previous_dir) 
  Check if directions are consecutive (no reversal)
  Parameters:
     current_dir (int) : Current direction
     previous_dir (int) : Previous direction
  Returns: True if consecutive (no reversal from +1 to -1 or -1 to +1)
 get_all_directions() 
  Get all direction calculations at once
  Returns:  
 get_breakout_distances() 
  Get distance calculations for breakout analysis
  Returns:   High-to-high and low-to-low distances
 get_bar_patterns() 
  Check for specific bar patterns
  Returns: 
WeightedVolumeUtilsLibrary   "WeightedVolumeUtils" 
 fun(x) 
  Returns the input value (placeholder function).
  Parameters:
     x (float) : A float value.
  Returns: The same float value passed as input.
 weightedBSEVolume() 
  Calculates the weighted volume for BSE index based on top constituent stocks.
  Returns: Weighted volume value based on fixed weights for BSE SENSEX stocks.
 getAdjustedVolume() 
  Returns the adjusted volume for SENSEX or regular volume otherwise.
  Returns: Weighted BSE volume if current symbol is SENSEX, else raw volume.
MathSpecialFunctionsConvolve1DLibrary   "MathSpecialFunctionsConvolve1D" 
Convolution is one of the most important mathematical operations used in signal processing. This simple mathematical operation pops up in many scientific and industrial applications, from its use in a billion-layer large CNN to simple image denoising.
___
Reference:
www.algorithm-archive.org
numpy.org
lloydrochester.com
www.geeksforgeeks.org
 f(signal, filter) 
  Convolve
  Parameters:
     signal (array) : List with signal data.
     filter (array) : List with weights to apply to the signal data.
  Returns: Discrete, linear convolution of `signal` and `filter`.
BTC_News_2025Library   "BTC_News_2025" 
This library contains the tooltips used in the script "Bitcoin History Events (BTC Story)"
V1 News from January to May
 tt_020125() 
 tt_070125() 
 tt_200125() 
 tt_270125() 
 tt_300125() 
 tt_030225() 
 tt_260225() 
 tt_240225() 
 tt_020325() 
 tt_030325() 
 tt_090325() 
 tt_110325() 
 tt_190325() 
 tt_280325() 
 tt_310325() 
 tt_020425() 
 tt_060425() 
 tt_090425() 
 tt_150425() 
 tt_190425() 
 tt_220425() 
 tt_050525() 
 tt_080525() 
 tt_130525() 
 tt_200525() 
 tt_220525()
ErrorFunctionsLibrary   "ErrorFunctions" 
A collection of functions used to approximate the area beneath a Gaussian curve.
Because an ERF (Error Function) is an integral, there is no closed-form solution to calculating the area beneath the curve. Meaning all ERFs are approximations; precisely wrong, but mostly accurate. How close you need to get to the actual area depends entirely on your use case, with more precision being less efficient.
The internal precision of floats in Pine Script is 1e-16 (16 decimals, aka. double precision). This library adapts well known algorithms designed to efficiently reach double precision. Single precision alternates are also included. All of them were made free to use, modify, and distribute by their original authors.
 HASTINGS 
Adaptation of a  single  precision ERF by Cecil Hastings Jr, published through Princeton University in 1955. It was later documented by Abramowitz and Stegun as equation 7.1.26 in their 1972 Handbook of Mathematical Functions. Fast, efficient, and ideal when precision beyond a few decimals is unnecessary.
 GILES 
Adaptation of a  single  precision Inverse ERF by Michael Giles, published through the University of Oxford in 2012. It reverses the ERF, estimating an X coordinate from an area. It too is fast, efficient, and ideal when precision beyond a few decimals is unnecessary.
 LIBC 
Adaptation of the  double  precision ERF & ERFC in the standard C library (aka. libc). It is also the same ERF & ERFC that SciPy uses. While not quite as efficient as the Hastings approximation, it's still very fast and fully maximizes Pines precision.
 BOOST 
Adaptation of the  double  precision Inverse ERF & Inverse ERFC in the Boost Math C++ library. SciPy uses these as well. These reverse the ERF & ERFC, estimating an X coordinate from an area. It too isn't quite as efficient as the Giles approximation, but still fast and fully maximizes Pines precision.
While these algorithms are not exported directly, they are available through their exported counterparts.
- - -
 ERROR FUNCTIONS 
 erf(x, precise) 
  An  Error Function  estimates the theoretical error of a measurement.
  Parameters:
     x (float) : (float) Upper limit of the integration.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between -1 and 1.
 erfc(x, precise) 
  A  Complementary Error Function  estimates the difference between a theoretical error and infinity.
  Parameters:
     x (float) : (float) Lower limit of the integration.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and 2.
 erfinv(x, precise) 
  An  Inverse Error Function  reverses the  erf()  by estimating the original measurement from the theoretical error.
  Parameters:
     x (float) : (float) Theoretical error.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and ± infinity.
 erfcinv(x, precise) 
  An  Inverse Complementary Error Function  reverses the  erfc()  by estimating the original measurement from the difference between the theoretical error and infinity.
  Parameters:
     x (float) : (float) Difference between the theoretical error and infinity.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and ± infinity.
- - -
 DISTRIBUTION FUNCTIONS 
 pdf(x, m, s) 
  A  Probability Density Function  estimates the probability  density . For clarity,  density is not a probability .
  Parameters:
     x (float) : (float) X coordinate for which a density will be estimated.
     m (float) : (float) Mean
     s (float) : (float) Sigma
  Returns: (float) Between 0 and ∞.
 cdf(z, precise) 
  A  Cumulative Distribution Function  estimates the area under a Gaussian curve between negative infinity and the Z Score.
  Parameters:
     z (float) : (float) Z Score.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and 1.
 cdfinv(a, precise) 
  An  Inverse Cumulative Distribution Function  reverses the  cdf()  by estimating the Z Score from an area.
  Parameters:
     a (float) : (float) Area between 0 and 1.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between -∞ and +∞
 cdfab(z1, z2, precise) 
  A  Cumulative Distribution Function  from  A  to  B  estimates the area under a Gaussian curve between two Z Scores (A and B).
  Parameters:
     z1 (float) : (float) First Z Score.
     z2 (float) : (float) Second Z Score.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and 1.
 ttt(z, precise) 
  A  Two-Tailed Test  estimates the area under a Gaussian curve between symmetrical ± Z scores and ± infinity.
  Parameters:
     z (float) : (float) One of the symmetrical Z Scores.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and 1.
 tttinv(a, precise) 
  An  Inverse Two-Tailed Test  reverses the  ttt()  by estimating the absolute Z Score from an area.
  Parameters:
     a (float) : (float) Area between 0 and 1.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and ∞.
 ott(z, precise) 
  A  One-Tailed Test  estimates the area under a Gaussian curve between an absolute Z Score and infinity.
  Parameters:
     z (float) : (float) Z Score.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and 1.
 ottinv(a, precise) 
  An  Inverse One-Tailed Test  Reverses the  ott()  by estimating the Z Score from a an area.
  Parameters:
     a (float) : (float) Area between 0 and 1.
     precise (bool) : Double precision (true) or single precision (false).
  Returns: (float) Between 0 and ∞.
OHLCVRangeXThe OHLCVRange library provides modular range-building utilities for Pine Script v6 based on custom conditions like time, price, volatility, volume, and pattern detection. Each function updates a persistent range (OHLCVRange) passed in from the calling script, based on live streaming candles.
This library is designed to support dynamic windowing over incoming OHLCV bars, with all persistent state handled externally (in the indicator or strategy). The library merely acts as a filter and updater, appending or clearing candles according to custom logic.
📦 
export type OHLCVRange
    OHLCV.OHLCV  candles  // Sliding window of candles
The OHLCVRange is a simple container holding an array of OHLCV.OHLCV structures.
This structure should be declared in the indicator using var to ensure persistence across candles.
🧩 Range Updater Functions
Each function follows this pattern:
export updateXxxRange(OHLCVRange r, OHLCV.OHLCV current, ...)
r is the range to update.
current is the latest OHLCV candle (typically from your indicator).
Additional parameters control the behavior of the range filter.
🔁 Function List
1. Fixed Lookback Range
export updateFixedRange(OHLCVRange r, OHLCV.OHLCV current, int barsBack)
Keeps only the last barsBack candles.
Sliding window based purely on number of bars.
2. Session Time Range
export updateSessionRange(OHLCVRange r, OHLCV.OHLCV current, int minuteStart, int minuteEnd)
Keeps candles within the  [minuteStart, minuteEnd) intraday session.
Clears the range once out of session bounds.
3. Price Zone Range
export updatePriceZoneRange(OHLCVRange r, OHLCV.OHLCV current, float minP, float maxP)
Retains candles within the vertical price zone  .
Clears when a candle exits the zone.
4. Consolidation Range
export updateConsolidationRange(OHLCVRange r, OHLCV.OHLCV current, float thresh)
Stores candles as long as the candle range (high - low) is less than or equal to thresh.
Clears on volatility breakout.
5. Volume Spike Range
export updateVolumeSpikeRange(OHLCVRange r, OHLCV.OHLCV current, float avgVol, float mult, int surround)
Triggers a new range when a volume spike ≥ avgVol * mult occurs.
Adds candles around the spike (total surround * 2 + 1).
Can be used to zoom in around anomalies.
6. Engulfing Pattern Range
export updateEngulfingRange(OHLCVRange r, OHLCV.OHLCV current, int windowAround)
Detects bullish or bearish engulfing candles.
Stores 2 * windowAround + 1 candles centered around the pattern.
Clears if no valid engulfing pattern is found.
7. HTF-Aligned Range
export updateHTFAlignedRange(OHLCVRange r, OHLCV.OHLCV current, OHLCV.OHLCV prevHtf)
Used when aligning lower timeframe candles to higher timeframe bars.
Clears and restarts the range on HTF bar transition (compare prevHtf.bar_index with current).
Requires external management of HTF candle state.
💡 Usage Notes
All OHLCVRange instances should be declared as var in the indicator to preserve state:
var OHLCVRange sessionRange = OHLCVRange.new()
sessionRange := OHLCVRange.updateSessionRange(sessionRange, current, 540, 900)
All OHLCV data should come from the OHLCVData library (v15 or later):
import userId/OHLCVData/15 as OHLCV
OHLCV.OHLCV current = OHLCV.getCurrentChartOHLCV()
This library does not use var internally to enforce clean separation of logic and persistence.
📅 Planned Enhancements
Fib zone ranges: capture candles within custom Fibonacci levels.
Custom event ranges: combine multiple filters (e.g., pattern + volume spike).
Trend-based ranges: windowing based on moving average or trend breaks.
Crypto_in_details_MAlibCrypto_in_details_MaLib — Advanced Moving Average Library for Pine Script
Overview:
Crypto_in_details_MaLib is a comprehensive, performance-optimized Moving Average (MA) library designed specifically for Pine Script v6 users seeking advanced technical analysis tools. Developed by Crypto_in_details, this library consolidates the most popular and sophisticated MA calculation methods — including classical, weighted, exponential, and Hull variants — into one seamless package.
Key Features:
Implements a wide range of Moving Averages: SMA, EMA, WMA, RMA, VWMA, HMA, TEMA, EHMA, THMA.
Designed for precision and flexibility — suitable for diverse trading strategies and indicator development.
Fully typed functions compatible with Pine Script v6 standards.
Simplifies your scripting workflow by providing ready-to-use MA functions via clean and easy-to-import methods.
Well-documented and maintained by an experienced Pine Script developer.
Why Use Crypto_in_details_MaLib?
Gain access to advanced MA calculations that enhance trend analysis, smoothing, and signal accuracy.
Save time on coding complex moving averages from scratch.
Easily extend or combine with your own strategies or indicators for improved performance.
Rely on a tested and community-driven solution backed by a prolific Pine Script author.
Ideal for:
Traders and developers building custom indicators or strategies requiring versatile MA techniques.
Anyone looking to improve their Pine Script efficiency and code maintainability.
Pine Script enthusiasts wanting a professional-grade MA toolkit.
VolumeFlowOscillatorLibVolume Flow Oscillator Library 
 Overview 
The Volume Flow Oscillator library provides a comprehensive framework for analyzing directional volume flow in financial markets. It creates a multi-band oscillator system that transforms price and volume data into a spectrum of sensitivity bands, revealing the underlying buying and selling pressure.
 Technical Approach 
The library combines price direction with trading volume to generate an oscillator that fluctuates around a zero line, with positive values indicating buying pressure and negative values showing selling pressure. Using sophisticated ALMA (Arnaud Legoux Moving Average) smoothing techniques with asymmetric sensitivity, the library creates seven distinct bands that help identify various intensity levels of volume flow.
 Key Features 
 
  Multi-band oscillator system with seven sensitivity levels
  Directional volume flow analysis combining price movement and volume
  Zero-line oscillation showing the balance between buying and selling pressure
  Asymmetric ALMA smoothing for different sensitivity on positive/negative bands
  Customizable lookback periods and multipliers for fine-tuning
  Color-coded visualization for intuitive chart reading
 
 Applications 
This library offers developers a versatile foundation for creating volume-based indicators that go beyond simple volume measurement to reveal the directional force behind market movements. Ideal for confirming price trends, detecting divergences, identifying volume climaxes, and assessing overall market strength.
StrategyUtilsLibrary   "StrategyUtils" 
 getHeikinAshi(open, high, low, close) 
  getHeikinAshi
  Parameters:
     open (float) : float: Raw open price
     high (float) : float: Raw high price
     low (float) : float: Raw low price
     close (float) : float: Raw close price
  Returns: tuple of haOpen, haClose, haHigh, haLow
 getFibExtensions(high, low) 
  getFibExtensions
  Parameters:
     high (float) : float: Highest point before trade
     low (float) : float: Lowest point before trade
  Returns: tuple of extension levels
 inBacktestWindow(time, start, end) 
  inBacktestWindow
  Parameters:
     time (int) : int: Current bar time
     start (int) : int: Start timestamp
     end (int) : int: End timestamp
  Returns: bool: true if within Fbrange
 getCurrentState(buy, sell) 
  getCurrentState
  Parameters:
     buy (bool) : bool: Buy signal condition
     sell (bool) : bool: Sell signal condition
  Returns: string: "Buy", "Sell", or "None"
 formatPrice(price) 
  formatPrice
  Parameters:
     price (float) : float: Input price value
  Returns: string: Formatted price string
 getColorByProfit(netprofit, initial, green, red) 
  getColorByProfit
  Parameters:
     netprofit (float) : float: Strategy net profit
     initial (float) : float: Initial capital
     green (color) : color: Positive color
     red (color) : color: Negative color
  Returns: color: Display color based on PnL
KTUtilsLibrary   "KTUtils" 
Utility functions for technical analysis indicators, trend detection, and volatility confirmation.
 MGz(close, length) 
  MGz
@description Moving average smoother used for signal processing
  Parameters:
     close (float) : float Price input (typically close)
     length (int) : int Length of smoothing period
  Returns: float Smoothed value
 atrConf(length) 
  atrConf
@description Calculates Average True Range (ATR) for volatility confirmation
  Parameters:
     length (simple int) : int Length for ATR calculation
  Returns: float ATR value
 f(input) 
  f
@description Simple Moving Average with fixed length
  Parameters:
     input (float) : float Input value
  Returns: float Smoothed average
 bcwSMA(s, l, m) 
  bcwSMA
@description Custom smoothing function with weight multiplier
  Parameters:
     s (float) : float Signal value
     l (int) : int Length of smoothing
     m (int) : int Weighting multiplier
  Returns: float Smoothed output
 MGxx(close, length) 
  MGxx
@description Custom Weighted Moving Average (WMA) variant
  Parameters:
     close (float) : float Price input
     length (int) : int Period length
  Returns: float MGxx smoothed output
 _PerChange(lengthTime) 
  _PerChange
@description Measures percentage price change over a period and range deviation
  Parameters:
     lengthTime (int) : int Period for change measurement
  Returns: tuple Measured change, high deviation, low deviation
 dirmov(len) 
  dirmov
@description Calculates directional movement components
  Parameters:
     len (simple int) : int Lookback period
  Returns: tuple Plus and Minus DI values
 adx(dilen, adxlen) 
  adx
@description Calculates Average Directional Index (ADX)
  Parameters:
     dilen (simple int) : int Length for DI calculation
     adxlen (simple int) : int Length for ADX smoothing
  Returns: float ADX value
 trChopAnalysis() 
  trChopAnalysis
@description Identifies chop and trend phases based on True Range Bollinger Bands
  Returns: tuple TR SMA, chop state, trending state
 wtiAnalysis(haclose, close, filterValue) 
  wtiAnalysis
@description Wave Trend Indicator (WTI) with signal crossover logic
  Parameters:
     haclose (float) : float Heikin-Ashi close
     close (float) : float Standard close
     filterValue (simple int) : int Smoothing length
  Returns: tuple WTI lines and direction states
 basicTrend(hahigh, halow, close, open, filterValue) 
  basicTrend
@description Determines trend direction based on HA high/low and close
  Parameters:
     hahigh (float) : float Heikin-Ashi high
     halow (float) : float Heikin-Ashi low
     close (float) : float Standard close
     open (float) : float Standard open
     filterValue (simple int) : int Smoothing period
  Returns: tuple Uptrend, downtrend flags
 metrics(close, filterValue) 
  metrics
@description Common market metrics
  Parameters:
     close (float) : float Price input
     filterValue (int) : int RSI smoothing length
  Returns: tuple VWMA, SMA10, RSI, smoothed RSI
 piff(close, trend_change) 
  piff
@description Price-Informed Forward Forecasting (PIFF) model for trend strength
  Parameters:
     close (float) : float Price input
     trend_change (float) : float Change in trend
  Returns: tuple Percent change, flags for trend direction
 getMACD() 
  getMACD
@description Returns MACD, signal line, and histogram
  Returns: tuple MACD line, Signal line, Histogram
 getStoch() 
  getStoch
@description Returns K and D lines of Stochastic Oscillator
  Returns: tuple K and D lines
 getKDJ() 
  getKDJ
@description KDJ momentum oscillator
  Returns: tuple K, D, J, Average
 getBBRatio() 
  getBBRatio
@description Bollinger Band Ratio (BBR) and signal flags
  Returns: tuple Basis, Upper, Lower, BBR, BBR Up, BBR Down
 getSupertrend() 
  getSupertrend
@description Supertrend values and direction flags
  Returns: tuple Supertrend, Direction, Up, Down
remaLibrary   " REMA " 
Custom Regional Exponential Moving Average with enhanced sensitivity to recent price action
 Description: What Makes REMA Unique? 
 REMA introduces a dual-region weighting system that intelligently balances short-term responsiveness with long-term trend context, solving the fundamental limitation of standard EMAs where longer periods necessarily sacrifice recent price sensitivity. 
 Key Differences from Standard EMA: 
 
 Adaptive Regional Weighting: Applies stronger exponential decay to recent price data while maintaining appropriate weighting for historical context.
 Maintains Responsiveness at Any Length: Unlike standard EMAs where longer periods become progressively less responsive, REMA preserves significant sensitivity to recent price action even at 100+ period lengths.
 Mathematically Sound Enhancement: Preserves the core mathematical integrity of exponential averaging while introducing region-specific weighting that better reflects how traders actually interpret price action.
 
 Value to TradingView Community: 
 
 Improved Signal Timing: Detects reversals 1-3 bars earlier than traditional EMAs without increasing false signals.
 Better Multi-Timeframe Analysis: Provides more consistent behavior across different period settings, reducing conflicting signals between timeframes.
 Ideal for Modern Markets: Better handles today's high-volatility, algorithm-driven markets where traditional indicators often lag too much to be effective.
 Optimized for Both Trend and Reversal Trading: Simultaneously provides strong trend-following capabilities while remaining sensitive to legitimate reversal signals.
 Computation Efficiency: The fast implementation offers enhanced capabilities with minimal computational overhead, making it practical for real-time analysis.
 
 REMA fills a critical gap between lagging long-period EMAs and noisy short-period EMAs, giving traders a single, versatile tool that adapts to market conditions more effectively than standard technical indicators. 
 Implementation: 
 rema(src, length, recency_bias, transition_point) 
  Regional Exponential Moving Average that maintains recent price sensitivity even with long lookback periods
  Parameters:
     src (float) : Input source series 
     length (int) : Overall EMA period length 
     recency_bias (float) : Weighting factor to increase sensitivity to recent prices (1.0-3.0 recommended) 
     transition_point (float) : Percentage point (0.0-1.0) in the lookback period where weighting shifts from recent to historical 
  Returns: Custom exponentially weighted moving average with regional bias
 rema_fast(src, length, recency_bias) 
  Simplified Regional EMA that uses a recursive calculation method
  Parameters:
     src (float) : Input source series 
     length (int) : Overall EMA period 
     recency_bias (float) : Factor to increase sensitivity to recent price (1.0-3.0 recommended) 
  Returns: Computationally efficient regional EMA
UTSStrategyHelperLibrary   "UTSStrategyHelper" 
TODO: add library description here
 stopLossPrice(sig, atr, factor, isLong) 
  Calculates the stop loss price using a distance determined by ATR multiplied by a factor. Example for Long trade SL: PRICE - (ATR * factor).
  Parameters:
     sig (float) 
     atr (float) : (float): The value of the atr.
     factor (float) 
     isLong (bool) : (bool): The current trade direction.
  Returns: (bool): A boolean value.
 takeProfitPrice(sig, atr, factor, isLong) 
  Calculates the take profit price using a distance determined by ATR multiplied by a factor. Example for Long trade TP: PRICE + (ATR * factor). When take profit price is reached usually 50 % of the position is closed and the other 50 % get a trailing stop assigned.
  Parameters:
     sig (float) 
     atr (float) : (float): The value of the atr.
     factor (float) 
     isLong (bool) : (bool): The current trade direction.
  Returns: (bool): A boolean value.
 trailingStopPrice(initialStopPrice, atr, factor, priceSource, isLong) 
  Calculates a trailing stop price using a distance determined by ATR multiplied by a factor. It takes an initial price and follows the price closely if it changes in a favourable way.
  Parameters:
     initialStopPrice (float) : (float): The initial stop price which, for consistency also should be ATR * factor behind price: e.g. Long trade: PRICE - (ATR * factor)
     atr (float) : (float): The value of the atr. Ideally the ATR value at trade open is taken and used for subsequent calculations.
     factor (float) 
     priceSource (float) : (float): The current price.
     isLong (bool) : (bool): The current trade direction.
  Returns: (bool): A boolean value.
 hasGreaterPositionSize(positionSize) 
  Determines if the strategy's position size has grown since the last bar.
  Parameters:
     positionSize (float) : (float): The size of the position.
  Returns: (bool): A boolean value.
 hasSmallerPositionSize(positionSize) 
  Determines if the strategy's position size has decreased since the last bar.
  Parameters:
     positionSize (float) : (float): The size of the position.
  Returns: (bool): A boolean value.
 hasUnchangedPositionSize(positionSize) 
  Determines if the strategy's position size has changed since the last bar.
  Parameters:
     positionSize (float) : (float): The size of the position.
  Returns: (bool): A boolean value.
 exporthasLongPosition(positionSize) 
  Determines if the strategy has an open long position.
  Parameters:
     positionSize (float) : (float): The size of the position.
  Returns: (bool): A boolean value.
 hasShortPosition(positionSize) 
  Determines if the strategy has an open short position.
  Parameters:
     positionSize (float) : (float): The size of the position.
  Returns: (bool): A boolean value.
 hasAnyPosition(positionSize) 
  Determines if the strategy has any open position, regardless of short or long.
  Parameters:
     positionSize (float) : (float): The size of the position.
  Returns: (bool): A boolean value.
 hasSignal(value) 
  Determines if the given argument contains a valid value (means not 'na').
  Parameters:
     value (float) : (float): The actual value.
  Returns: (bool): A boolean value.
UTSConvenienceToolsLibrary   "UTSConvenienceTools" 
Convenience tool library containing helper functions for drawing and charting.
 isDarkColor(color) 
  Determines on base of the luminance of the given color if the color can be considered a 'dark' color. Usefull for determining the readable font color for arbitrary colored backgrounds. Credits out to: 
  Parameters:
     color (color) : (color): The actual color value.
  Returns: (bool): A boolean value.
 smallLabelLowerRight(txt, yPos, bgColor) 
  Displays the specified `txt` in a small label at the `yPos` of the current bar. The label points to the lower right.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 smallLabelUpperRight(txt, yPos, bgColor) 
  Displays the specified `txt` in a small label at the `yPos` of the current bar. The label points to the upper right.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 smallLabelCenter(txt, yPos, bgColor) 
  Displays the specified `txt` in a small label at the `yPos` of the current bar. The label points to the center.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 smallLabelDown(txt, yPos, bgColor) 
  Displays the specified `txt` in a small label at the `yPos` of the current bar. The label points down.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 smallLabelUp(txt, yPos, bgColor) 
  Displays the specified `txt` in a small label at the `yPos` of the current bar. The label points down.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 normalLabelLowerRight(txt, yPos, bgColor) 
  Displays the specified `txt` in a normal label at the `yPos` of the current bar. The label points to the lower right.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 normalLabelUpperRight(txt, yPos, bgColor) 
  Displays the specified `txt` in a normal label at the `yPos` of the current bar. The label points to the upper right.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 normalLabelCenter(txt, yPos, bgColor) 
  Displays the specified `txt` in a normal label at the `yPos` of the current bar. The label points to the center.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 normalLabelDown(txt, yPos, bgColor) 
  Displays the specified `txt` in a normal label at the `yPos` of the current bar. The label points down.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 normalLabelUp(txt, yPos, bgColor) 
  Displays the specified `txt` in a normal label at the `yPos` of the current bar. The label points down.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 largeLabelLowerRight(txt, yPos, bgColor) 
  Displays the specified `txt` in a large label at the `yPos` of the current bar. The label points to the lower right.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 largeLabelUpperRight(txt, yPos, bgColor) 
  Displays the specified `txt` in a large label at the `yPos` of the current bar. The label points to the upper right.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 largeLabelCenter(txt, yPos, bgColor) 
  Displays the specified `txt` in a large label at the `yPos` of the current bar. The label points to the center.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 largeLabelDown(txt, yPos, bgColor) 
  Displays the specified `txt` in a large label at the `yPos` of the current bar. The label points down.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 largeLabelUp(txt, yPos, bgColor) 
  Displays the specified `txt` in a large label at the `yPos` of the current bar. The label points down.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 autoLabelLowerRight(txt, yPos, bgColor) 
  Displays the specified `txt` in a auto label at the `yPos` of the current bar. The label points to the lower right.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 autoLabelUpperRight(txt, yPos, bgColor) 
  Displays the specified `txt` in a auto label at the `yPos` of the current bar. The label points to the upper right.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 autoLabelCenter(txt, yPos, bgColor) 
  Displays the specified `txt` in a auto label at the `yPos` of the current bar. The label points to the center.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 autoLabelDown(txt, yPos, bgColor) 
  Displays the specified `txt` in a auto label at the `yPos` of the current bar. The label points down.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned above the candle pass 'high'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
 autoLabelUp(txt, yPos, bgColor) 
  Displays the specified `txt` in a auto label at the `yPos` of the current bar. The label points down.
  Parameters:
     txt (string) 
     yPos (float) : (float): The y-position value. To have it positioned below the candle pass 'low'.
     bgColor (color) : (color): The background color value.
  Returns: (bool): A boolean value.
visualizationLibrary   "visualization" 
 method tagLine(message, priceLevel, showCondition, labelPosition, labelSize, offsetX, textColor, bgColor, lineWidth, lineStyle) 
  Creates a textLabel with line at specified price level
  Namespace types: series string, simple string, input string, const string
  Parameters:
     message (string) : Text to display in the textLabel. If starts with '$', price included. Empty = no textLabel
     priceLevel (float) : Price level for textLabel and line positioning
     showCondition (bool) : Condition to display the textLabel and line
     labelPosition (string) : Label position ("above", "below")
     labelSize (string) : Label size
     offsetX (int) : X-axis offset for textLabel and line
     textColor (color) : Text color
     bgColor (color) : Background color
     lineWidth (int) : Line width
     lineStyle (string) : Line style
  Returns: void
 textLabel(message, showCondition, position, textColor) 
  Creates dynamic labels with optional arrows
  Parameters:
     message (string) : Message to show (prefix with "!" to hide arrow)
     showCondition (bool) : Display condition
     position (string) : Label position ("above", "below")
     textColor (color) : Text color
  Returns: void
 box(showCondition, topValue, bottomValue, barsBack, borderColor, bgColor) 
  Creates a box around price range
  Parameters:
     showCondition (bool) : Condition to draw the box
     topValue (float) : Optional custom top value
     bottomValue (float) : Optional custom bottom value
     barsBack (int) : Number of bars to look back
     borderColor (color) : Box border color
     bgColor (color) : Box background color
  Returns: box Box object
pymath█  OVERVIEW 
This library ➕ enhances Pine Script's built-in types (`float`, `int`, `array`, `array`) with mathematical methods, mirroring 🪞 many functions from Python's `math` module.  Import this library to overload or add to built-in capabilities, enabling calls like `myFloat.sin()` or `myIntArray.gcd()`.
█  CONCEPTS 
This library wraps Pine's built-in `math.*` functions and implements others where necessary, expanding the mathematical toolkit available within Pine Script.  It provides a more object-oriented approach to mathematical operations on core data types.
█  HOW TO USE 
 • Import the library: i mport kaigouthro/pymath/1 
 • Call methods directly on variables:   myFloat.sin() , myIntArray.gcd() 
 •  For raw integer literals, you MUST use parentheses: `(1234).factorial()`. 
█  FEATURES 
 • **Infinity Handling:** Includes `isinf()` and `isfinite()` for robust checks.  Uses `POS_INF_PROXY` to represent infinity.
 • **Comprehensive Math Functions:** Implements a wide range of methods, including trigonometric, logarithmic, hyperbolic, and array operations.
 • **Object-Oriented Approach:**   Allows direct method calls  on `int`, `float`, and arrays for cleaner code.
 • **Improved Accuracy:** Some functions (e.g., `remainder()`) offer improved accuracy compared to default Pine behavior.
 • **Helper Functions:** Internal helper functions optimize calculations and handle edge cases.
█  NOTES 
This library improves upon Pine Script's built-in `math` functions by adding new ones and refining existing implementations.  It handles edge cases such as infinity, NaN, and zero values, enhancing the reliability of your Pine scripts. For Speed, it wraps and uses built-ins, as thy are fastest.
█  EXAMPLES 
 
//@version=6
indicator("My Indicator") 
// Import the library
import kaigouthro/pymath/1
// Create some Vars
float myFloat = 3.14159
int myInt = 10
array myIntArray = array.from(1, 2, 3, 4, 5)
// Now you can...
plot( myFloat.sin()   )          // Use sin() method on a float, using built in wrapper
plot( (myInt).factorial() )    // Factorial of an integer (note parentheses)
plot( myIntArray.gcd()   )     // GCD of an integer array
 
 method isinf(self) 
  isinf: Checks if this float is positive or negative infinity using a proxy value.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float)   value to check.
  Returns: (bool)  `true` if the absolute value of `self` is greater than or equal to the infinity proxy, `false` otherwise.
 method isfinite(self) 
  isfinite: Checks if this float is finite (not NaN and not infinity).
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The value to check.
  Returns: (bool) `true` if `self` is not `na` and not infinity (as defined by `isinf()`), `false` otherwise.
 method fmod(self, divisor) 
  fmod: Returns the C-library style floating-point remainder of `self / divisor` (result has the sign of `self`).
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) Dividend `x`.
     divisor (float) : (float) Divisor `y`. Cannot be zero or `na`.
  Returns: (float) The remainder `x - n*y` where n is `trunc(x/y)`, or `na` if divisor is 0, `na`, or inputs are infinite in a way that prevents calculation.
 method factorial(self) 
  factorial: Calculates the factorial of this non-negative integer.
  Namespace types: series int, simple int, input int, const int
  Parameters:
     self (int) : (int) The integer `n`. Must be non-negative.
  Returns: (float) `n!` as a float, or `na` if `n` is negative or overflow occurs (based on `isinf`).
 method isqrt(self) 
  isqrt: Calculates the integer square root of this non-negative integer (floor of the exact square root).
  Namespace types: series int, simple int, input int, const int
  Parameters:
     self (int) : (int) The non-negative integer `n`.
  Returns: (int) The greatest integer `a` such that a² <= n, or `na` if `n` is negative.
 method comb(self, k) 
  comb: Calculates the number of ways to choose `k` items from `self` items without repetition and without order (Binomial Coefficient).
  Namespace types: series int, simple int, input int, const int
  Parameters:
     self (int) : (int) Total number of items `n`. Must be non-negative.
     k (int) : (int) Number of items to choose. Must be non-negative.
  Returns: (float) The binomial coefficient nCk, or `na` if inputs are invalid (n<0 or k<0), `k > n`, or overflow occurs.
 method perm(self, k) 
  perm: Calculates the number of ways to choose `k` items from `self` items without repetition and with order (Permutations).
  Namespace types: series int, simple int, input int, const int
  Parameters:
     self (int) : (int) Total number of items `n`. Must be non-negative.
     k (simple int) : (simple int = na) Number of items to choose. Must be non-negative. Defaults to `n` if `na`.
  Returns: (float) The number of permutations nPk, or `na` if inputs are invalid (n<0 or k<0), `k > n`, or overflow occurs.
 method log2(self) 
  log2: Returns the base-2 logarithm of this float. Input must be positive. Wraps `math.log(self) / math.log(2.0)`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number. Must be positive.
  Returns: (float) The base-2 logarithm, or `na` if input <= 0.
 method trunc(self) 
  trunc: Returns this float with the fractional part removed (truncates towards zero).
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (int) The integer part, or `na` if input is `na` or infinite.
 method abs(self) 
  abs: Returns the absolute value of this float. Wraps `math.abs()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (float) The absolute value, or `na` if input is `na`.
 method acos(self) 
  acos: Returns the arccosine of this float, in radians. Wraps `math.acos()`. Input must be between -1 and 1.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number. Must be between -1 and 1.
  Returns: (float) Angle in radians  , or `na` if input is outside   or `na`.
 method asin(self) 
  asin: Returns the arcsine of this float, in radians. Wraps `math.asin()`. Input must be between -1 and 1.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number. Must be between -1 and 1.
  Returns: (float) Angle in radians  , or `na` if input is outside   or `na`.
 method atan(self) 
  atan: Returns the arctangent of this float, in radians. Wraps `math.atan()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (float) Angle in radians  , or `na` if input is `na`.
 method ceil(self) 
  ceil: Returns the ceiling of this float (smallest integer >= self). Wraps `math.ceil()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (int) The ceiling value, or `na` if input is `na` or infinite.
 method cos(self) 
  cos: Returns the cosine of this float (angle in radians). Wraps `math.cos()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The angle in radians.
  Returns: (float) The cosine, or `na` if input is `na`.
 method degrees(self) 
  degrees: Converts this float from radians to degrees. Wraps `math.todegrees()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The angle in radians.
  Returns: (float) The angle in degrees, or `na` if input is `na`.
 method exp(self) 
  exp: Returns e raised to the power of this float. Wraps `math.exp()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The exponent.
  Returns: (float) `e**self`, or `na` if input is `na`.
 method floor(self) 
  floor: Returns the floor of this float (largest integer <= self). Wraps `math.floor()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (int) The floor value, or `na` if input is `na` or infinite.
 method log(self) 
  log: Returns the natural logarithm (base e) of this float. Wraps `math.log()`. Input must be positive.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number. Must be positive.
  Returns: (float) The natural logarithm, or `na` if input <= 0 or `na`.
 method log10(self) 
  log10: Returns the base-10 logarithm of this float. Wraps `math.log10()`. Input must be positive.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number. Must be positive.
  Returns: (float) The base-10 logarithm, or `na` if input <= 0 or `na`.
 method pow(self, exponent) 
  pow: Returns this float raised to the power of `exponent`. Wraps `math.pow()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The base.
     exponent (float) : (float) The exponent.
  Returns: (float) `self**exponent`, or `na` if inputs are `na` or lead to undefined results.
 method radians(self) 
  radians: Converts this float from degrees to radians. Wraps `math.toradians()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The angle in degrees.
  Returns: (float) The angle in radians, or `na` if input is `na`.
 method round(self) 
  round: Returns the nearest integer to this float. Wraps `math.round()`. Ties are rounded away from zero.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (int) The rounded integer, or `na` if input is `na` or infinite.
 method sign(self) 
  sign: Returns the sign of this float (-1, 0, or 1). Wraps `math.sign()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (int) -1 if negative, 0 if zero, 1 if positive, `na` if input is `na`.
 method sin(self) 
  sin: Returns the sine of this float (angle in radians). Wraps `math.sin()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The angle in radians.
  Returns: (float) The sine, or `na` if input is `na`.
 method sqrt(self) 
  sqrt: Returns the square root of this float. Wraps `math.sqrt()`. Input must be non-negative.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number. Must be non-negative.
  Returns: (float) The square root, or `na` if input < 0 or `na`.
 method tan(self) 
  tan: Returns the tangent of this float (angle in radians). Wraps `math.tan()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The angle in radians.
  Returns: (float) The tangent, or `na` if input is `na`.
 method acosh(self) 
  acosh: Returns the inverse hyperbolic cosine of this float. Input must be >= 1.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number. Must be >= 1.
  Returns: (float) The inverse hyperbolic cosine, or `na` if input < 1 or `na`.
 method asinh(self) 
  asinh: Returns the inverse hyperbolic sine of this float.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (float) The inverse hyperbolic sine, or `na` if input is `na`.
 method atanh(self) 
  atanh: Returns the inverse hyperbolic tangent of this float. Input must be between -1 and 1 (exclusive).
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number. Must be between -1 and 1 (exclusive).
  Returns: (float) The inverse hyperbolic tangent, or `na` if input is outside (-1, 1) or `na`.
 method cosh(self) 
  cosh: Returns the hyperbolic cosine of this float.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (float) The hyperbolic cosine, or `na` if input is `na`.
 method sinh(self) 
  sinh: Returns the hyperbolic sine of this float.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (float) The hyperbolic sine, or `na` if input is `na`.
 method tanh(self) 
  tanh: Returns the hyperbolic tangent of this float.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The input number.
  Returns: (float) The hyperbolic tangent, or `na` if input is `na`.
 method atan2(self, dx) 
  atan2: Returns the angle in radians between the positive x-axis and the point (dx, self). Wraps `math.atan2()`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The y-coordinate `y`.
     dx (float) : (float) The x-coordinate `x`.
  Returns: (float) The angle in radians  , result of `math.atan2(self, dx)`. Returns `na` if inputs are `na`. Note: `math.atan2(0, 0)` returns 0 in Pine.
Optimization: Use built-in math.atan2()
 method cbrt(self) 
  cbrt: Returns the cube root of this float.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The value to find the cube root of.
  Returns: (float) The real cube root. Handles negative inputs correctly, or `na` if input is `na`.
 method exp2(self) 
  exp2: Returns 2 raised to the power of this float. Calculated as `2.0.pow(self)`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The exponent.
  Returns: (float) `2**self`, or `na` if input is `na` or results in non-finite value.
 method expm1(self) 
  expm1: Returns `e**self - 1`. Calculated as `self.exp() - 1.0`. May offer better precision for small `self` in some environments, but Pine provides no guarantee over `self.exp() - 1.0`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The exponent.
  Returns: (float) `e**self - 1`, or `na` if input is `na` or `self.exp()` is `na`.
 method log1p(self) 
  log1p: Returns the natural logarithm of (1 + self). Calculated as `(1.0 + self).log()`. Pine provides no specific precision guarantee for self near zero.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) Value to add to 1. `1 + self` must be positive.
  Returns: (float) Natural log of `1 + self`, or `na` if input is `na` or `1 + self <= 0`.
 method modf(self) 
  modf: Returns the fractional and integer parts of this float as a tuple ` `. Both parts have the sign of `self`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The number `x` to split.
  Returns: ( ) A tuple containing ` `, or ` ` if `x` is `na` or non-finite.
 method remainder(self, divisor) 
  remainder: Returns the IEEE 754 style remainder of `self` with respect to `divisor`. Result `r` satisfies `abs(r) <= 0.5 * abs(divisor)`. Uses round-half-to-even.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) Dividend `x`.
     divisor (float) : (float) Divisor `y`. Cannot be zero or `na`.
  Returns: (float) The IEEE 754 remainder, or `na` if divisor is 0, `na`, or inputs are non-finite in a way that prevents calculation.
 method copysign(self, signSource) 
  copysign: Returns a float with the magnitude (absolute value) of `self` but the sign of `signSource`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) Value providing the magnitude `x`.
     signSource (float) : (float) Value providing the sign `y`.
  Returns: (float) `abs(x)` with the sign of `y`, or `na` if either input is `na`.
 method frexp(self) 
  frexp: Returns the mantissa (m) and exponent (e) of this float `x` as ` `, such that `x = m * 2^e` and `0.5 <= abs(m) < 1` (unless `x` is 0).
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) The number `x` to decompose.
  Returns: ( ) A tuple ` `, or ` ` if `x` is 0, or ` ` if `x` is non-finite or `na`.
 method isclose(self, other, rel_tol, abs_tol) 
  isclose: Checks if this float `a` and `other` float `b` are close within relative and absolute tolerances.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) First value `a`.
     other (float) : (float) Second value `b`.
     rel_tol (simple float) : (simple float = 1e-9) Relative tolerance. Must be non-negative and less than 1.0.
     abs_tol (simple float) : (simple float = 0.0) Absolute tolerance. Must be non-negative.
  Returns: (bool) `true` if `abs(a - b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)`. Handles `na`/`inf` appropriately. Returns `na` if tolerances are invalid.
 method ldexp(self, exponent) 
  ldexp: Returns `self * (2**exponent)`. Inverse of `frexp`.
  Namespace types: series float, simple float, input float, const float
  Parameters:
     self (float) : (float) Mantissa part `x`.
     exponent (int) : (int) Exponent part `i`.
  Returns: (float) The result of `x * pow(2, i)`, or `na` if inputs are `na` or result is non-finite.
 method gcd(self) 
  gcd: Calculates the Greatest Common Divisor (GCD) of all integers in this array.
  Namespace types: array
  Parameters:
     self (array) : (array) An array of integers.
  Returns: (int) The largest positive integer that divides all non-zero elements, 0 if all elements are 0 or array is empty. Returns `na` if any element is `na`.
 method lcm(self) 
  lcm: Calculates the Least Common Multiple (LCM) of all integers in this array.
  Namespace types: array
  Parameters:
     self (array) : (array) An array of integers.
  Returns: (int) The smallest positive integer that is a multiple of all non-zero elements, 0 if any element is 0, 1 if array is empty. Returns `na` on potential overflow or if any element is `na`.
 method dist(self, other) 
  dist: Returns the Euclidean distance between this point `p` and another point `q` (given as arrays of coordinates).
  Namespace types: array
  Parameters:
     self (array) : (array) Coordinates of the first point `p`.
     other (array) : (array) Coordinates of the second point `q`. Must have the same size as `p`.
  Returns: (float) The Euclidean distance, or `na` if arrays have different sizes, are empty, or contain `na`/non-finite values.
 method fsum(self) 
  fsum: Returns an accurate floating-point sum of values in this array. Uses built-in `array.sum()`. Note: Pine Script does not guarantee the same level of precision tracking as Python's `math.fsum`.
  Namespace types: array
  Parameters:
     self (array) : (array) The array of floats to sum.
  Returns: (float) The sum of the array elements. Returns 0.0 for an empty array. Returns `na` if any element is `na`.
 method hypot(self) 
  hypot: Returns the Euclidean norm (distance from origin) for this point given by coordinates in the array. `sqrt(sum(x*x for x in coordinates))`.
  Namespace types: array
  Parameters:
     self (array) : (array) Array of coordinates defining the point.
  Returns: (float) The Euclidean norm, or 0.0 if the array is empty. Returns `na` if any element is `na` or non-finite.
 method prod(self, start) 
  prod: Calculates the product of all elements in this array.
  Namespace types: array
  Parameters:
     self (array) : (array) The array of values to multiply.
     start (simple float) : (simple float = 1.0) The starting value for the product (returned if the array is empty).
  Returns: (float) The product of array elements * start. Returns `na` if any element is `na`.
 method sumprod(self, other) 
  sumprod: Returns the sum of products of values from this array `p` and another array `q` (dot product).
  Namespace types: array
  Parameters:
     self (array) : (array) First array of values `p`.
     other (array) : (array) Second array of values `q`. Must have the same size as `p`.
  Returns: (float) The sum of `p  * q ` for all i, or `na` if arrays have different sizes or contain `na`/non-finite values. Returns 0.0 for empty arrays.
SMCDrawingLibrary   "SMCDrawing" 
 drawSwingPointLabel(bar_index, price, swing_type, text_color, size) 
  Parameters:
     bar_index (int) 
     price (float) 
     swing_type (string) 
     text_color (color) 
     size (string) 
 drawBOSLabel(start_bar, price, end_bar, bos_text, line_color, line_style, line_width, text_color, size) 
  Parameters:
     start_bar (int) 
     price (float) 
     end_bar (int) 
     bos_text (string) 
     line_color (color) 
     line_style (string) 
     line_width (int) 
     text_color (color) 
     size (string) 
 drawRetracementLine(start_bar, price, end_bar, line_color, line_style, line_width) 
  Parameters:
     start_bar (int) 
     price (float) 
     end_bar (int) 
     line_color (color) 
     line_style (string) 
     line_width (int) 
 drawFVG(high_time, low_time, high_price, low_price, is_bullish, line_color, line_width, bar_time) 
  Parameters:
     high_time (int) 
     low_time (int) 
     high_price (float) 
     low_price (float) 
     is_bullish (bool) 
     line_color (color) 
     line_width (int) 
     bar_time (int) 
 drawBPRLabel(bar_time, price, is_bullish, text_color) 
  Parameters:
     bar_time (int) 
     price (float) 
     is_bullish (bool) 
     text_color (color) 
 drawVolumeSpike(bar_time, price, percent_oi, normalized_volume, spike_color) 
  Parameters:
     bar_time (int) 
     price (float) 
     percent_oi (float) 
     normalized_volume (float) 
     spike_color (color) 
 drawCandle(bar_index, open, high, low, close, up_color, down_color, wick_color, up_border_color, down_border_color) 
  Parameters:
     bar_index (int) 
     open (float) 
     high (float) 
     low (float) 
     close (float) 
     up_color (color) 
     down_color (color) 
     wick_color (color) 
     up_border_color (color) 
     down_border_color (color)
SMCFunctionsLibrary   "SMCFunctions" 
 findSwingPoints(high, low, swing_size) 
  Parameters:
     high (float) 
     low (float) 
     swing_size (int) 
 detectBOS(close, high, low, prevHigh, prevLow, highActive, lowActive, bos_conf_type) 
  Parameters:
     close (float) 
     high (float) 
     low (float) 
     prevHigh (float) 
     prevLow (float) 
     highActive (bool) 
     lowActive (bool) 
     bos_conf_type (string) 
 getBOSDetails(highBroken, lowBroken, prevHigh, prevLow, prevSwing, prevHighIndex, prevLowIndex, input_show_choch) 
  Parameters:
     highBroken (bool) 
     lowBroken (bool) 
     prevHigh (float) 
     prevLow (float) 
     prevSwing (int) 
     prevHighIndex (int) 
     prevLowIndex (int) 
     input_show_choch (bool) 
 calculateRetracementLevels(start_price, end_price) 
  Parameters:
     start_price (float) 
     end_price (float)
MLExtensions_CoreLibrary   "MLExtensions_Core" 
A set of extension methods for a novel implementation of a Approximate Nearest Neighbors (ANN) algorithm in Lorentzian space, focused on computation.
 normalizeDeriv(src, quadraticMeanLength) 
  Returns the smoothed hyperbolic tangent of the input series.
  Parameters:
     src (float) :  The input series (i.e., the first-order derivative for price).
     quadraticMeanLength (int) :   The length of the quadratic mean (RMS).
  Returns: nDeriv  The normalized derivative of the input series.
 normalize(src, min, max) 
  Rescales a source value with an unbounded range to a target range.
  Parameters:
     src (float) :  The input series
     min (float) :  The minimum value of the unbounded range
     max (float) :  The maximum value of the unbounded range
  Returns:  The normalized series
 rescale(src, oldMin, oldMax, newMin, newMax) 
  Rescales a source value with a bounded range to anther bounded range
  Parameters:
     src (float) :  The input series
     oldMin (float) :  The minimum value of the range to rescale from
     oldMax (float) :  The maximum value of the range to rescale from
     newMin (float) :  The minimum value of the range to rescale to
     newMax (float) :  The maximum value of the range to rescale to
  Returns:  The rescaled series
 getColorShades(color) 
  Creates an array of colors with varying shades of the input color
  Parameters:
     color (color) :  The color to create shades of
  Returns:  An array of colors with varying shades of the input color
 getPredictionColor(prediction, neighborsCount, shadesArr) 
  Determines the color shade based on prediction percentile
  Parameters:
     prediction (float) :  Value of the prediction
     neighborsCount (int) :  The number of neighbors used in a nearest neighbors classification
     shadesArr (array) :  An array of colors with varying shades of the input color
  Returns: shade  Color shade based on prediction percentile
 color_green(prediction) 
  Assigns varying shades of the color green based on the KNN classification
  Parameters:
     prediction (float) : Value (int|float) of the prediction
  Returns: color 
 color_red(prediction) 
  Assigns varying shades of the color red based on the KNN classification
  Parameters:
     prediction (float) : Value of the prediction
  Returns: color
 tanh(src) 
  Returns the the hyperbolic tangent of the input series. The sigmoid-like hyperbolic tangent function is used to compress the input to a value between -1 and 1.
  Parameters:
     src (float) :  The input series (i.e., the normalized derivative).
  Returns: tanh  The hyperbolic tangent of the input series.
 dualPoleFilter(src, lookback) 
  Returns the smoothed hyperbolic tangent of the input series.
  Parameters:
     src (float) :  The input series (i.e., the hyperbolic tangent).
     lookback (int) :  The lookback window for the smoothing.
  Returns: filter  The smoothed hyperbolic tangent of the input series.
 tanhTransform(src, smoothingFrequency, quadraticMeanLength) 
  Returns the tanh transform of the input series.
  Parameters:
     src (float) :  The input series (i.e., the result of the tanh calculation).
     smoothingFrequency (int) 
     quadraticMeanLength (int) 
  Returns: signal  The smoothed hyperbolic tangent transform of the input series.
 n_rsi(src, n1, n2) 
  Returns the normalized RSI ideal for use in ML algorithms.
  Parameters:
     src (float) :  The input series (i.e., the result of the RSI calculation).
     n1 (simple int) :  The length of the RSI.
     n2 (simple int) :  The smoothing length of the RSI.
  Returns: signal  The normalized RSI.
 n_cci(src, n1, n2) 
  Returns the normalized CCI ideal for use in ML algorithms.
  Parameters:
     src (float) :  The input series (i.e., the result of the CCI calculation).
     n1 (simple int) :  The length of the CCI.
     n2 (simple int) :  The smoothing length of the CCI.
  Returns: signal  The normalized CCI.
 n_wt(src, n1, n2) 
  Returns the normalized WaveTrend Classic series ideal for use in ML algorithms.
  Parameters:
     src (float) :  The input series (i.e., the result of the WaveTrend Classic calculation).
     n1 (simple int) 
     n2 (simple int) 
  Returns: signal  The normalized WaveTrend Classic series.
 n_adx(highSrc, lowSrc, closeSrc, n1) 
  Returns the normalized ADX ideal for use in ML algorithms.
  Parameters:
     highSrc (float) :  The input series for the high price.
     lowSrc (float) :  The input series for the low price.
     closeSrc (float) :  The input series for the close price.
     n1 (simple int) :  The length of the ADX.
 regime_filter(src, threshold, useRegimeFilter) 
  Parameters:
     src (float) 
     threshold (float) 
     useRegimeFilter (bool) 
 filter_adx(src, length, adxThreshold, useAdxFilter) 
  filter_adx
  Parameters:
     src (float) :  The source series.
     length (simple int) :  The length of the ADX.
     adxThreshold (int) :  The ADX threshold.
     useAdxFilter (bool) :  Whether to use the ADX filter.
  Returns:  The ADX.
 filter_volatility(minLength, maxLength, sensitivityMultiplier, useVolatilityFilter) 
  filter_volatility
  Parameters:
     minLength (simple int) :  The minimum length of the ATR.
     maxLength (simple int) :  The maximum length of the ATR.
     sensitivityMultiplier (float) :  Multiplier for the historical ATR to control sensitivity.
     useVolatilityFilter (bool) :  Whether to use the volatility filter.
  Returns:  Boolean indicating whether or not to let the signal pass through the filter.
WebhookGeneratorLibrary   "WebhookGenerator" 
Generates Json objects for webhook messages.
 GenerateOT(license_id, symbol, action, order_type, trade_type, size, price, tp, sl, risk, trailPrice, trailOffset) 
  CreateOrderTicket: Establishes a order ticket.
  Parameters:
     license_id (string) : Provide your license index
     symbol (string) : Symbol on which to execute the trade
     action (string) : Execution method of the trade : "MRKT" or "PENDING"
     order_type (string) : Direction type of the order: "BUY" or "SELL"
     trade_type (string) : Is it a "SPREAD" trade or a "SINGLE" symbol execution?
     size (float) : Size of the trade, in units
     price (float) : If the order is pending you must specify the execution price
     tp (float) : (Optional) Take profit of the order  
     sl (float) : (Optional) Stop loss of the order  
     risk (float) : Percent to risk for the trade, if size not specified
     trailPrice (float) : (Optional) Price at which trailing stop is starting
     trailOffset (float) : (Optional) Amount to trail by  
  Returns: Return Order string
VolumaticDataLibraryLibrary   "VolumaticDataLibrary" 
 norm(src) 
  Normalizes a value if mean is 0
This function does not access global variables.
  Parameters:
     src (float) 
 addVolumeNodeIfSignificant(level, line_amount, node_prices, node_volumes, node_colors, color_up, color_dn, src_open, src_high, src_low, src_close, src_volume) 
  Processes the current bar's data to see if it represents a significant volume node,
and if so, updates the provided arrays with the node data.
This function should be called on every bar from the consuming indicator/strategy.
  Parameters:
     level (float) : The sensitivity level for detecting nodes.
     line_amount (int) : The maximum number of nodes to store.
     node_prices (array) : Array to store node prices (passed by reference).
     node_volumes (array) : Array to store node absolute volumes (passed by reference).
     node_colors (array) : Array to store node colors (passed by reference).
     color_up (color) : The color to use for upward significant volume.
     color_dn (color) : The color to use for downward significant volume.
     src_open (float) : The open price series from the calling script.
     src_high (float) : The high price series from the calling script.
     src_low (float) : The low price series from the calling script.
     src_close (float) : The close price series from the calling script.
     src_volume (float) : The volume series from the calling script.
 createVolumeNodeArray(node_prices, node_volumes, node_colors) 
  Creates an array of VolumeNode objects from the provided separate arrays.
This function can be called on the last bar from the consuming indicator/strategy
to get the current list of significant volume nodes.
  Parameters:
     node_prices (array) : Array containing the prices of the nodes.
     node_volumes (array) : Array containing the absolute volumes of the nodes.
     node_colors (array) : Array containing the colors of the nodes.
  Returns: An array of VolumeNode objects representing the stored volume nodes.
 VolumeNode 
  Fields:
     price (series float) 
     volume (series float) 
     node_color (series color)






















