Indicators API functions

From NakedMarkets
Jump to navigation Jump to search

Summary

Constant parameters

Timeframes constants are used to set the values of timeframes
Series constants are used in function to set the mode of data access (open, low, close, high, volume or time)
Drawing styles constants are used in chart drawing functions to set the graph type (line, histogram, candles, ...)
Line styles constants are used in graphical objects functions to set the style of the line
Objects type constants are used in graphical objects functions to set the type of the object (rectangle, ellipse, horizontal line, ...)
Objects properties constants are used in graphical objects functions to set the property of the object (date value, price value, color, ...)
Applied Prices constants are mainly used in Moving Average functions to set the type of the Moving Average Price (Close, Median, Typical, Weighted, ...)
MA Method constants are mainly used in Moving Average functions to set the type of the Moving Average (SMA, EMA, SMMA or LWMA)

Data access functions

Here are the meta-data functions :

Function name Description Returned value
Symbol() Get the current Symbol of the attached chart string
Period() Get the current Timeframe of the attached chart int
Ask() Get the current Ask value double
Bid() Get the current Bid value double
Spread() Get the current Spread value double
Digits() Get the number of digits after the comma double
Point() Get the minimum value of the Symbol double
Bars() Get the number of bars on the attached chart int


Here are the data access functions related to the index :

Function name Description Parameter Returned value
Open(int index) Get the Open value of the bar index of the bar double
High(int index) Get the High value of the bar index of the bar double
Low(int index) Get the Low value of the bar index of the bar double
Close(int index) Get the Close value of the bar index of the bar double
Time(int index) Get the Time (Date) value of the bar index of the bar DateTime
Volume(int index) Get the Volume value of the bar index of the bar int

These functions are used to have the value of a specific bar related to its index. When the index is 0, this is the last bar. When the index i 1, this is the previous last bar. When the index i 2, this is the previous previous last bar. And so on.

Indicator configuration functions

Graphical objects functions

Misc. functions