public class IchimokuIndicatorCustomPeriod extends Object implements IIndicator, IDrawingIndicator
| Modifier and Type | Field and Description |
|---|---|
static int |
SENKOU_A |
static int |
SENKOU_B |
| Constructor and Description |
|---|
IchimokuIndicatorCustomPeriod() |
| Modifier and Type | Method and Description |
|---|---|
IndicatorResult |
calculate(int startIndex,
int endIndex)
Calculates values of the indicator from startIndex to endIndex of input parameter and places them in output parameters
|
Point |
drawOutput(Graphics g,
int outputIdx,
Object values2,
Color color,
Stroke stroke,
IIndicatorDrawingSupport indicatorDrawingSupport,
List<Shape> shapes,
Map<Color,List<Point>> handles)
This method will be called once for every output marked as drawnByIndicator every time the chart surface needs to be redrawn
|
IndicatorInfo |
getIndicatorInfo()
Returns object that describes indicator, how many inputs, outputs it has, where it should be shown etc
|
InputParameterInfo |
getInputParameterInfo(int index)
Returns object that describes one of the inputs
|
int |
getLookback()
Returns number of elements needed to calculate value of the first element.
|
int |
getLookforward()
Returns number of elements after last element needed to calculate value of the last element.
|
OptInputParameterInfo |
getOptInputParameterInfo(int index)
Returns object that describes optional input
|
OutputParameterInfo |
getOutputParameterInfo(int index)
Returns object that describes output
|
void |
onStart(IIndicatorContext context)
Called on indicator initialization
|
void |
setInputParameter(int index,
Object array)
Sets input parameter.
|
void |
setOptInputParameter(int index,
Object value)
Sets optional input parameter.
|
void |
setOutputParameter(int index,
Object array)
Sets output parameter.
|
public static final int SENKOU_A
public static final int SENKOU_B
public void onStart(IIndicatorContext context)
IIndicatoronStart in interface IIndicatorcontext - allows access to system functionalitypublic IndicatorResult calculate(int startIndex, int endIndex)
IIndicatorcalculate in interface IIndicatorstartIndex - index of the first element in input parameters that needs corresponding indicator value. That doesn't mean that values
before startIndex will not be read, they will be if lookback is more than 0. That also doesn't mean that value for startIndex will be
calculated, it will be not if startIndex < lookback. IndicatorResult.getFirstValueIndex() returns index of the first element that
has corresponding calculated value in output array(s)endIndex - index of the last element in input parameters that needs corresponding indicator valuepublic IndicatorInfo getIndicatorInfo()
IIndicatorgetIndicatorInfo in interface IIndicatorpublic InputParameterInfo getInputParameterInfo(int index)
IIndicatorgetInputParameterInfo in interface IIndicatorindex - index of the inputpublic int getLookback()
IIndicatorgetLookback in interface IIndicatorpublic OutputParameterInfo getOutputParameterInfo(int index)
IIndicatorgetOutputParameterInfo in interface IIndicatorindex - index of the outputpublic void setInputParameter(int index,
Object array)
IIndicatorsetInputParameter in interface IIndicatorindex - index of the parameterarray - array of the doubles, ints or prices represented as double[][]public OptInputParameterInfo getOptInputParameterInfo(int index)
IIndicatorgetOptInputParameterInfo in interface IIndicatorindex - index of the optional inputpublic void setOptInputParameter(int index,
Object value)
IIndicatorsetOptInputParameter in interface IIndicatorindex - index of the parametervalue - int or double valuepublic void setOutputParameter(int index,
Object array)
IIndicatorIIndicator.calculate(int, int) callsetOutputParameter in interface IIndicatorindex - index of the parameterarray - array of doubles or ints enough to hold values from startIndex to endIndexpublic int getLookforward()
IIndicatorgetLookforward in interface IIndicatorpublic Point drawOutput(Graphics g, int outputIdx, Object values2, Color color, Stroke stroke, IIndicatorDrawingSupport indicatorDrawingSupport, List<Shape> shapes, Map<Color,List<Point>> handles)
IDrawingIndicatordrawOutput in interface IDrawingIndicatorg - graphical contextoutputIdx - index of the output parametervalues2 - array of values (int[], double[] or Object[] depending of the type of the output). Array may be empty or null if data is not yet available.color - color selected when the indicator was addedstroke - stroke selected when the indicator was addedindicatorDrawingSupport - provides information about candle positions, indexes, etcshapes - graphical shapes can be added to this list. This makes it possible to show correct popup when user right-clicks one of the shapes in this list on charthandles - coordinate points with their corresponding colors can be added to this listnull is returned.Copyright © 2016. All rights reserved.