TradingCharts

What it does

Extra building blocks for your own scripts: Double EMA, Triple EMA, Stochastic RSI, Donchian Channel and Z-score. Each function works on every bar and returns plain values (or a small list of values), so you can plot them or use them in a strategy.

How to use:

import g_T9PHE3Z1/TAPlus/1 as tp

fast = tp.dema(close, 20)

slow = tp.tema(close, 50)

[k, d] = tp.stochRsi(close, 14, 14, 3, 3)

[upper, lower, mid] = tp.donchian(20)

z = tp.zscore(close, 20)

Call each function once per bar at the top level of your script (not inside if or for). Values were checked against hand-written versions of the same formulas.

How to use it

  • Open the charts and go to Indicators › My scripts › Shared with me (or search the Community library) and press Add to chart.
  • Open it in the ChartScript Editor to read the code; Create a copy makes your own editable version.

Version history

  • v1 — 21 Nov, 10:37 am · compiler 0.3.69

#library#moving-average#dema#tema#stochrsi#donchian#zscore#helpers