| Concept | Lipi | MQL4 | MQL5 | NinjaScript | Pine Script | thinkScript |
|---|---|---|---|---|---|---|
| Average true range | ta.atr | Caveat | Caveat | Exact | Exact | Caveat |
| Bollinger Bands | ta.bb | Caveat | Caveat | Caveat | Caveat | Caveat |
| Bollinger Bands width | ta.bbw | Absent | Absent | Absent | Differs | Differs |
| Donchian channel | ta.dc | Absent | Absent | Caveat | Absent | Caveat |
| Donchian channel width | ta.dcw | Absent | Absent | Absent | Absent | Absent |
| Mean absolute deviation | ta.dev | Absent | Caveat | Absent | Caveat | Caveat |
| Keltner channels | ta.kc | Absent | Absent | Caveat | Caveat | Caveat |
| Keltner channels width | ta.kcw | Absent | Absent | Absent | Caveat | Absent |
| Parabolic SAR | ta.psar | Caveat | Caveat | Caveat | Caveat | Caveat |
| Standard deviation | ta.stdev | Caveat | Caveat | Caveat | Caveat | Caveat |
| Supertrend | ta.supertrend | Absent | Absent | Absent | Caveat | Absent |
| True range | ta.tr | Absent | Absent | Absent | Caveat | Caveat |
| Variance | ta.variance | Absent | Caveat | Absent | Caveat | Absent |
Average true range
Average true range overlength bars.
In Lipi: ta.atr.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | iATR | Equivalent, with a caveat | Called with symbol, timeframe, period and shift; returns the value at that shift, not the current bar’s. History indexing: shift counts bars back from the current bar; shift 0 is the still-forming bar, and any shift can be read in one call. Other timeframes: symbol and timeframe arguments read another symbol or period directly; Lipi ta calls use the chart’s own bars. |
| MQL5 | iATR | Equivalent, with a caveat | Returns a handle, one buffer. Symbol and timeframe are arguments; the smoothing method is not stated on the page. State and side effects: Returns a handle; values are read later with CopyBuffer and are not ready right after creation. History indexing: CopyBuffer start_pos 0 is the current bar and counts toward the past; copied data lands oldest-first. Other timeframes: Symbol and timeframe are explicit arguments, so another symbol or timeframe is requested directly. |
| NinjaScript | ATR | Exact | |
| Pine Script | ta.atr | Exact | |
| thinkScript | ATR | Equivalent, with a caveat | Defaults to a 14-bar Wilder average of true range; thinkScript also takes an average type (simple, exponential, weighted, Wilder, Hull) that Lipi ta.atr lacks. |
Bollinger Bands
Bollinger bands forsource over length bars, with mult setting how far the outer bands sit from the middle one.
In Lipi: ta.bb.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | iBands | Equivalent, with a caveat | One call returns one line by mode (0 main, 1 upper, 2 lower); Lipi returns a tuple. Source is an applied-price constant, not any series. History indexing: shift counts bars back from the current bar; shift 0 is the still-forming bar, and any shift can be read in one call. Other timeframes: symbol and timeframe arguments read another symbol or period directly; Lipi ta calls use the chart’s own bars. |
| MQL5 | iBands | Equivalent, with a caveat | Buffers are 0 base, 1 upper, 2 lower, the same order as Lipi’s tuple. Adds a shift argument; price is an applied-price constant. State and side effects: Returns a handle; each band is read with its own CopyBuffer call on buffer 0, 1 or 2. History indexing: CopyBuffer start_pos 0 is the current bar and counts toward the past; copied data lands oldest-first. Other timeframes: Symbol and timeframe are explicit arguments, so another symbol or timeframe is requested directly. |
| NinjaScript | Bollinger | Equivalent, with a caveat | Order is multiplier then period (input first if given). Bands come back as .Upper and .Lower series, not a tuple. |
| Pine Script | ta.bb | Equivalent, with a caveat | Pine’s reference says na source values are ignored; Lipi’s ta.bb returns na on a bar whose source is na. |
| thinkScript | BollingerBands | Equivalent, with a caveat | Separate lower and upper deviation counts, a displace shift and a selectable average type; plots are MidLine, LowerBand, UpperBand versus Lipi’s [middle, upper, lower]. |
Bollinger Bands width
Bollinger band width: the same calculation astalib.bb, delivered as one number instead of three bands.
In Lipi: ta.bbw.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No band-width function; compute it from the main, upper and lower iBands lines. | |
| MQL5 | Not in MQL5 | No band-width indicator; derive it from the iBands base, upper and lower buffers. | |
| NinjaScript | Not in NinjaScript | No band-width indicator; derive it from the Bollinger Upper and Lower series. | |
| Pine Script | ta.bbw | Looks alike, behaves differently | Lipi returns upper minus lower in price units; Pine divides that width by the middle band (a fraction, or x100 in its own example). |
| thinkScript | BollingerBandwidth | Looks alike, behaves differently | BollingerBandwidth gives band distance as a percent of the middle band, plus Bulge and Squeeze plots. Lipi’s ta.bbw is top minus bottom, in price units. |
Donchian channel
Donchian channel overlength bars.
In Lipi: ta.dc.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No Donchian channel; combine iHighest and iLowest with iHigh and iLow. | |
| MQL5 | Not in MQL5 | No Donchian channel indicator; build it from iHighest and iLowest over the window. | |
| NinjaScript | DonchianChannel | Equivalent, with a caveat | Read as .Upper and .Lower series plus the default series, not a tuple; the plain call needs only a period. |
| Pine Script | Not in Pine Script | The ta namespace lists no Donchian function. A script must compose it from ta.highest and ta.lowest (our inference, not stated in the reference). | |
| thinkScript | PriceChannel | Equivalent, with a caveat | Plots only LowerBand and UpperBand, no midline; Highest and Lowest give the same bands (the docs shift them by [1] to skip the current bar). |
Donchian channel width
Donchian channel width overlength bars, as a single figure.
In Lipi: ta.dcw.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No Donchian width function; derive it from iHighest/iHigh and iLowest/iLow. | |
| MQL5 | Not in MQL5 | No Donchian width indicator; derive it from the highest and lowest values yourself. | |
| NinjaScript | Not in NinjaScript | No width indicator; subtract DonchianChannel Lower from Upper. | |
| Pine Script | Not in Pine Script | No Donchian width function in the ta namespace. Compose it from ta.highest and ta.lowest (our inference, not stated in the reference). | |
| thinkScript | Not in thinkScript | No channel-width study; subtract the PriceChannel LowerBand from its UpperBand. |
Mean absolute deviation
A deviation measure forsource over length bars.
In Lipi: ta.dev.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No mean-deviation function among the indicator functions. | |
| MQL5 | MathAverageDeviation | Equivalent, with a caveat | Average absolute deviation of an array you fill with the window. Lipi’s reference does not define its dev measure, so confirm they match. |
| NinjaScript | Not in NinjaScript | No mean-absolute-deviation indicator in the system list; compute it by hand. | |
| Pine Script | ta.dev | Equivalent, with a caveat | Pine’s reference says na source values are ignored; Lipi’s ta.dev returns na on a bar whose source is na. |
| thinkScript | LinDev | Equivalent, with a caveat | LinDev’s length defaults to 12, Lipi’s dev requires it, so a converter must insert 12 when omitted; the deviation formula matches. |
Keltner channels
Keltner channels forsource over length bars, with mult setting the distance to the outer bands.
In Lipi: ta.kc.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No Keltner channel; iEnvelopes is a fixed-percent envelope around an average, not ATR-based. | |
| MQL5 | Not in MQL5 | No Keltner channel among the built-in indicators; combine a moving average with iATR. | |
| NinjaScript | KeltnerChannel | Equivalent, with a caveat | Multiplier comes before period, with no true-range switch. Bands are .Upper and .Lower series; the page does not state how the width is built. |
| Pine Script | ta.kc | Equivalent, with a caveat | Bands match the page formula after the first bars; Lipi seeds the range EMA on bar 0 from high-low, the page’s ta.tr is na there. |
| thinkScript | KeltnerChannels | Equivalent, with a caveat | Width is always ATR times factor (default 2), with separate average types for the centre line and ATR; plots Avg, Upper_Band, Lower_Band. |
Keltner channels width
Keltner channel width forsource over length bars: one figure in place of the three the channel call returns.
In Lipi: ta.kcw.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No Keltner width; no Keltner channel is built in. | |
| MQL5 | Not in MQL5 | No Keltner width indicator; derive it from your own channel bands. | |
| NinjaScript | Not in NinjaScript | No width indicator; derive it from KeltnerChannel Upper and Lower. | |
| Pine Script | ta.kcw | Equivalent, with a caveat | Width fraction matches the page formula after the first bars; Lipi seeds the range EMA on bar 0, the page’s ta.tr is na there. |
| thinkScript | Not in thinkScript | No Keltner width study; derive it from the Upper_Band, Lower_Band and Avg plots. |
Parabolic SAR
Parabolic SAR, controlled by three numbers rather than a bar count: where the calculation starts, how much it moves on each step, and how far it is allowed to go. In Lipi:ta.psar.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | iSAR | Equivalent, with a caveat | Two parameters (step, maximum) where Lipi has start, step and max_step; no source argument. History indexing: shift counts bars back from the current bar; shift 0 is the still-forming bar, and any shift can be read in one call. Other timeframes: symbol and timeframe arguments read another symbol or period directly; Lipi ta calls use the chart’s own bars. |
| MQL5 | iSAR | Equivalent, with a caveat | Takes step and maximum only; Lipi also has a start value. Usual values per the page are 0.02 and 0.2. One buffer. State and side effects: Returns a handle; values are read later with CopyBuffer and are not ready right after creation. History indexing: CopyBuffer start_pos 0 is the current bar and counts toward the past; copied data lands oldest-first. Other timeframes: Symbol and timeframe are explicit arguments, so another symbol or timeframe is requested directly. |
| NinjaScript | ParabolicSAR | Equivalent, with a caveat | Order is acceleration, max, step, whereas Lipi is start, step, max_step. The page’s own syntax lines disagree on the last two. |
| Pine Script | ta.sar | Equivalent, with a caveat | Pine’s function is ta.sar; there is no ta.psar. Positional arguments start, inc, max line up with Lipi’s start, step, max_step. |
| thinkScript | ParabolicSAR | Equivalent, with a caveat | Two inputs: initial acceleration factor and its limit. Lipi ta.psar has three (start, step, max_step), so the step is not separately set. |
Standard deviation
Standard deviation ofsource over length bars.
In Lipi: ta.stdev.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | iStdDev | Equivalent, with a caveat | Takes a moving-average method and shift; the docs do not say population or sample division. Source is an applied-price constant, not any series. History indexing: shift counts bars back from the current bar; shift 0 is the still-forming bar, and any shift can be read in one call. Other timeframes: symbol and timeframe arguments read another symbol or period directly; Lipi ta calls use the chart’s own bars. |
| MQL5 | iStdDev | Equivalent, with a caveat | Also takes ma_method and ma_shift, so the mean it measures around is selectable; use MODE_SMA. The divisor is not stated on the page. State and side effects: Returns a handle; values are read later with CopyBuffer and are not ready right after creation. History indexing: CopyBuffer start_pos 0 is the current bar and counts toward the past; copied data lands oldest-first. Other timeframes: Symbol and timeframe are explicit arguments, so another symbol or timeframe is requested directly. |
| NinjaScript | StdDev | Equivalent, with a caveat | Lipi divides by length (population). The page does not state NinjaTrader’s divisor; dividing by length minus one gives larger values. |
| Pine Script | ta.stdev | Equivalent, with a caveat | Pine adds a biased flag (default true, the population form Lipi always uses). biased=false has no Lipi counterpart; use ta.variance with biased and math.sqrt. |
| thinkScript | StDev | Equivalent, with a caveat | StDev’s length defaults to 12, Lipi requires it; both are population deviations (divide by length). |
Supertrend
Supertrend from amultiplier and an atrLength, calculated on the chart’s own bars.
In Lipi: ta.supertrend. Takes the multiplier first, then the ATR length. At this build the direction is -1 on every bar except at most one early bar (none with an ATR length of 1).
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No Supertrend among the indicator functions; build it from iATR and price. | |
| MQL5 | Not in MQL5 | No Supertrend among the built-in indicators; it would come from a custom indicator via iCustom or your own code on iATR. | |
| NinjaScript | Not in NinjaScript | No Supertrend in NinjaTrader’s system indicator list; build it from ATR by hand. | |
| Pine Script | ta.supertrend | Equivalent, with a caveat | Same signs: -1 up-trend, 1 down-trend. Lipi takes multiplier, then ATR length; its direction is -1 on all but at most one early bar. |
| thinkScript | Not in thinkScript | No Supertrend study or function in the functions list or the study library. |
True range
True range for the bar the script is on, taken from the chart’s own bars. In Lipi:ta.tr.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No true-range function; derive it from High, Low and the previous Close, or use iATR. | |
| MQL5 | Not in MQL5 | No true-range indicator; only the averaged iATR exists. Compute true range from high, low and previous close. | |
| NinjaScript | Not in NinjaScript | No standalone true-range indicator; true range appears only inside the ATR page’s description. Compute it from High, Low and the prior Close. | |
| Pine Script | ta.tr | Equivalent, with a caveat | Pine has both a variable ta.tr (same as ta.tr(false)) and the function; Lipi has only the function, so write the bare variable as ta.tr(). |
| thinkScript | TrueRange | Equivalent, with a caveat | Takes high, close and low series as explicit arguments and uses the previous close; Lipi ta.tr reads chart bars and has a handle_na option. |
Variance
Variance ofsource over length bars.
In Lipi: ta.variance.
| Language | Construct | Relation | Note |
|---|---|---|---|
| MQL4 | Not in MQL4 | No variance function; square iStdDev or compute it in a loop. | |
| MQL5 | vector::Var, MathVariance | Equivalent, with a caveat | Divisor is N minus ddof: ddof 0 is the biased form, ddof 1 the unbiased. Fill the vector with the window first. |
| NinjaScript | Not in NinjaScript | No variance indicator; only StdDev and StdError exist, so square StdDev or compute by hand. | |
| Pine Script | ta.variance | Equivalent, with a caveat | Pine skips na values in the window; Lipi’s ta.variance returns na on a bar whose source is na. |
| thinkScript | Not in thinkScript | No variance function; square StDev with Sqr. StDev divides by length, so the result is the biased (population) variance. |