Center fo Gravity (COG) is designed to anticipate future price movements. Since it has no lag, it can give clear signals of turning points in the price. A Simple Moving Average can be displayed as a signal line.
Disposes the indicator.
Gets the indicator name.
The indicator name.
Sets the color of the Center of Gravity line.
New line color as string, should be in HEX format e.g. #FFFFFF.
Sets the line width of the indicator.
New line width.
Sets the name of the indicator.
New indicator name.
Moves the indicator from its calculated position forward or backward.
New offset value.
Sets the number of time periods (n) used to calculate the indicator.
New period count.
Sets whether the signal line should be visible or not.
Set true to show the signal line.
Sets the color of the Signal line.
Sets the number of time periods (n) used to calculate the signal line.
Sets which values the indicator calculations are based on.
Values to base the calculations on.
Sets the type of the indicator's value label(s).
Value label type.
Sets the visibility of the indicator. Hiding the indicator via setVisible(false) does not remove it. Use dispose() to delete any indicator.
Visibility of the indicator.
Programmatically opens the indicator settings menu.
Center fo Gravity (COG) is designed to anticipate future price movements. Since it has no lag, it can give clear signals of turning points in the price. A Simple Moving Average can be displayed as a signal line.