public abstract class AbstractPivotIndicator extends java.lang.Object implements IIndicator, IDrawingIndicator
Modifier and Type | Field and Description |
---|---|
protected IIndicatorContext |
context |
protected boolean |
showHistoricalLevels |
protected boolean |
showLabels |
Constructor and Description |
---|
AbstractPivotIndicator() |
Modifier and Type | Method and Description |
---|---|
protected OutputParameterInfo |
createOutputParameterInfo(java.lang.String name,
OutputParameterInfo.Type type,
OutputParameterInfo.DrawingStyle drawingStyle,
boolean showOutput) |
java.awt.Point |
drawOutput(java.awt.Graphics g,
int outputIdx,
java.lang.Object values,
java.awt.Color color,
java.awt.Stroke stroke,
IIndicatorDrawingSupport indicatorDrawingSupport,
java.util.List<java.awt.Shape> shapes,
java.util.Map<java.awt.Color,java.util.List<java.awt.Point>> handles)
This method will be called once for every output marked as drawnByIndicator every time the chart surface needs to be redrawn
|
void |
onStart(IIndicatorContext context)
Called on indicator initialization
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
calculate, getIndicatorInfo, getInputParameterInfo, getLookback, getLookforward, getOptInputParameterInfo, getOutputParameterInfo, setInputParameter, setOptInputParameter, setOutputParameter
protected IIndicatorContext context
protected boolean showHistoricalLevels
protected boolean showLabels
public void onStart(IIndicatorContext context)
IIndicator
onStart
in interface IIndicator
context
- allows access to system functionalityprotected OutputParameterInfo createOutputParameterInfo(java.lang.String name, OutputParameterInfo.Type type, OutputParameterInfo.DrawingStyle drawingStyle, boolean showOutput)
public java.awt.Point drawOutput(java.awt.Graphics g, int outputIdx, java.lang.Object values, java.awt.Color color, java.awt.Stroke stroke, IIndicatorDrawingSupport indicatorDrawingSupport, java.util.List<java.awt.Shape> shapes, java.util.Map<java.awt.Color,java.util.List<java.awt.Point>> handles)
IDrawingIndicator
drawOutput
in interface IDrawingIndicator
g
- graphical contextoutputIdx
- index of the output parametervalues
- 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 © 2024. All rights reserved.