feat: add new indicators (Decay, Edecay, MinusDi, MinusDm, PlusDi, PlusDm, Maxindex, Minindex, Sarext) and update pine scripts, core libs, validation tests, and python bindings
2026-03-09 13:45:46 -07:00
|
|
|
// Licensed under the Apache License, Version 2.0
|
2026-01-18 19:02:03 -08:00
|
|
|
// © mihakralj
|
|
|
|
|
//@version=6
|
|
|
|
|
indicator("Exponential Transformation (EXP)", "Exptrans", overlay=false)
|
|
|
|
|
|
|
|
|
|
//@function Applies an exponential transformation (y = e^x) to the input series.
|
|
|
|
|
//@param source series float The input series to transform.
|
|
|
|
|
//@returns series float The exponentially transformed series.
|
|
|
|
|
//@optimized for performance and dirty data
|
|
|
|
|
expT(series float source) =>
|
|
|
|
|
if na(source)
|
fix(docs): correct .md documentation across errors, dynamics, filters, forecasts, momentum, numerics, oscillators, reversals, statistics, trends, volatility, volume
2026-03-10 18:38:23 -07:00
|
|
|
na
|
|
|
|
|
else
|
|
|
|
|
math.exp(source)
|
2026-01-18 19:02:03 -08:00
|
|
|
|
|
|
|
|
// ---------- Main loop ----------
|
|
|
|
|
|
|
|
|
|
// Inputs
|
fix(docs): correct .md documentation across errors, dynamics, filters, forecasts, momentum, numerics, oscillators, reversals, statistics, trends, volatility, volume
2026-03-10 18:38:23 -07:00
|
|
|
i_source = input.source(close, "Source")
|
2026-01-18 19:02:03 -08:00
|
|
|
|
|
|
|
|
// Calculation
|
|
|
|
|
transformedSource = expT(i_source)
|
|
|
|
|
|
|
|
|
|
// Plot
|
fix(docs): correct .md documentation across errors, dynamics, filters, forecasts, momentum, numerics, oscillators, reversals, statistics, trends, volatility, volume
2026-03-10 18:38:23 -07:00
|
|
|
plot(transformedSource, "Exptrans", color=color.yellow, linewidth=2)
|