#####Technical indicator and overlay scripts for use in www.cloud9trader.com charts and trading algorithms.
Their job is to derive a value, or set of values, from price data at any given moment in time to be drawn onto charts as one or several overlays or studies. They can also be used inside your Cloud9Trader trading scripts.
We've included them in this repository so that you can use them as a reference to help build your own indicators - just create a new indicator on the 'Algorithms' screen and copy the code in.
They're also here for those who are just interested in the maths behind technical analysis.
If you spot any issues with them or would like to add your own indicator to Cloud9Trader's built in collection, we'd be very grateful for your pull requests.
The indicators will contain at minimum an 'onIntervalClose' function and some or all of the following:
onIntervalClose()Required. Called every bar close. Its job is to return the current indicator value(s) (and any chart config), so is generally where you'll find most of the logic.
onStart()Optional. Called once run up price data has loaded with any user input parameters. Used to validate these and initialize any variables that are globally scoped (i.e. persist between updates)
getRunUpCount()Optional. Tells the system how many intervals of previous price data to load in that are needed to produce the first value. This is often the n
periodsof the indicator. This is also called with any user input parameters.
getStudyAxisConfig()Optional. Configures the study chart axis for indicators that produce one.
You can find plenty of info for writing your own indicators in the Cloud9Trader documentation pages. See Writing Your Technical Indicators.
For the technical indicator API see Technical Indicators API Reference.
For the API for using these in your trading algorithms see Algorithms API Reference.
- Accumulation Distribution Line
- Aroon Oscillator
- Average True Range
- Bollinger Bands
- Bollinger Bandwidth
- Bollinger %B
- Commodity Channel Index
- Chandelier Exit
- Chaikin Money Flow
- Chande Momentum Oscillator
- Center of Gravity Oscillator
- Coppock Curve
coppock(firstRoCPeriods, wmaPeriods, secondRoCPeriods)
- Daily Pivot
- Detrended Price Oscillator
- Elder Bull/Bear Power
- Exponential Moving Average
- Exponential Moving Average Envelope
- Ease of Movement
- Fisher Transform
- Force Index
- Gopalakrishnan Range Index
- Ichimoku Cloud
ichimokuCloud(conversionLinePeriods, baseLinePeriods, leadingSpanPeriods, laggingSpanPeriods)
- Keltner Channels
keltnerChannels(emaPeriods, atrPeriods, atrMultiplier)
- Know Sure Thing
kst(firstROCPeriods, secondROCPeriods, thirdROCPeriods, fourthROCPeriods, firstSMAPeriods, secondthirdSMAPeriods, fourthSMAPeriods[, signalSMA])
macd(fastEMAPeriods, slowEMAPeriods[, signalEMAPeriods])
- MACD Histogram
macdHistogram(fastEMAPeriods, slowEMAPeriods, signalEMAPeriods)
- Mass Index
- Money Flow Index
- On Balance Volume
- Percentage Price Oscillator
ppo(fastEMAPeriods, slowEMAPeriods[, signalEMAPeriods])
- Pretty Good Oscillator
- Price Channels
- Price Momentum Oscillator
pmo(firstEMAPeriods, secondEMAPeriods[, signalEMAPeriods])
- Price Volume Oscillator
pvo(fastEMAPeriods, slowEMAPeriods, signalEMAPeriods)
- Rate of Change
- Relative Strength Index
- Simple Moving Average
- Simple Moving Average Envelope
- Standard Deviation
- Stochastic Oscillator
- True Strength Index
tsi(firstPeriods, secondPeriods[, signalPeriods])
- Ultimate Oscillator
uo(shortPeriods, mediumPeriods, longPeriods)
- Vortex Indicator
- Williams %R
- Weighted Moving Average