Several overlay functions are detailed below. Overlays are usually plotted over price data. These overlay functions allow you the freedom to examine the data as you wish.
| Function | Description |
|---|---|
| bollingerbands | Bollinger Bands |
| fiblines | Fibonacci Retracement Lines |
| keltnerchannels | Keltner Channels |
| mavg | Moving Averages |
| pricechannel | Price Channels |
| typrice | Typical Price |
All indicator and overlay functions have the same core syntax. This syntax is described in detail in the indicators help section here.
See: Global Syntax
Syntax |
|
|---|---|
MyStocks.bollingerbands(smaperiod,nstd); |
|
| Optional Arguments | Default |
smaperiod |
20 |
| nstd | 2.0 |
| Output Notes | |
The output of the bollingerbands function contains a 3 column array is as follows: stockasset input: bbands1 = MyStocks.bollingerbands(...);
|
|

Syntax |
|
|---|---|
fline1 = MyStocks.fiblines(period); |
|
| Optional Arguments | Default |
period |
20 |
| Output Notes | |
The fiblines function returns a 5
column array corresponding stockasset input: bbands1 = MyStocks.bollingerbands(...);
|
|
Syntax |
|
|---|---|
MyStocks.keltnerchannels(emaperiod,natr,atrperiod); |
|
| Optional Arguments | Default |
emaperiod |
20 |
| natr | 2.0 |
| atrperiod | 10 |
| Output Notes | |
The output of the keltnerchannels function contains a 3 column array as follows: stockasset input: kchan1 = MyStocks.keltnerchannels(...);
|
|

Syntax |
|
|---|---|
MyStocks.mavg(period, matype); |
|
| Optional Arguments | Default |
period |
20 |
| matype | 'ema' |
| Syntax Notes | |
The following moving average types
are supported: |
|

Syntax |
|
|---|---|
MyStocks.pricechannel(period); |
|
| Optional Arguments | Default |
period |
20 |
| Output Notes | |
The output of the pricechannel function contains a 2 column array as follows: stockasset input: prchannel1 = MyStocks.pricechannel(...);
|
|

Syntax |
|
|---|---|
MyStocks.typrice; |
|
| Optional Arguments | Default |
none |
NA |
