com.dukascopy.api.indicators
Class OutputParameterInfo

java.lang.Object
  extended by com.dukascopy.api.indicators.OutputParameterInfo

public class OutputParameterInfo
extends Object

Describes output


Nested Class Summary
static class OutputParameterInfo.DrawingStyle
          Specifies how to draw output
static class OutputParameterInfo.Type
          Type of the output
 
Field Summary
static int DASH_LINE
          Deprecated. use OutputParameterInfo.DrawingStyle.DASH_LINE instead
static int DOT
          Deprecated. use OutputParameterInfo.DrawingStyle.DOTS instead
static int DOT_LINE
          Deprecated. use OutputParameterInfo.DrawingStyle.DOT_LINE instead
static int HISTO
          Deprecated. use OutputParameterInfo.DrawingStyle.HISTOGRAM instead
static int LINE
          Deprecated. use OutputParameterInfo.DrawingStyle.LINE instead
static int PATTERN_BOOL
          Deprecated. use OutputParameterInfo.DrawingStyle.PATTERN_BOOL instead
static int PATTERN_BULL_BEAR
          Deprecated. use OutputParameterInfo.DrawingStyle.PATTERN_BULL_BEAR instead
static int PATTERN_STRENGTH
          Deprecated. use OutputParameterInfo.DrawingStyle.PATTERN_STRENGTH instead
 
Constructor Summary
OutputParameterInfo()
          Creates empty parameter description without setting any field
OutputParameterInfo(String name, OutputParameterInfo.Type type, int flags)
          Deprecated. use OutputParameterInfo(String, Type, DrawingStyle) instead
OutputParameterInfo(String name, OutputParameterInfo.Type type, OutputParameterInfo.DrawingStyle drawingStyle)
          Creates output parameter descriptor and sets all fields.
OutputParameterInfo(String name, OutputParameterInfo.Type type, OutputParameterInfo.DrawingStyle drawingStyle, boolean lastValueOnChart)
          Creates output parameter descriptor and sets all fields.
 
Method Summary
 char getArrowSymbol()
          Returns arrow character for outputs with OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_UP or OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_DOWN style
 Color getColor()
          Returns default color for output or null if no color was set
 OutputParameterInfo.DrawingStyle getDrawingStyle()
          Returns style that specifies how to draw this output
 int getFlags()
          Deprecated. use getDrawingStyle() instead
 String getName()
          Returns name of the output
 float getOpacityAlpha()
          Returns transparency alpha value
 int getShift()
          Shifts output by number of candles returned
 OutputParameterInfo.Type getType()
          Returns type of the output
 boolean isDrawnByIndicator()
          Returns true if indicator draws this output itself
 boolean isGapAtNaN()
          Returns true if drawing logic should make a gap in lines when there is a NaN or Integer.MIN_VALUE in output
 boolean isHistogramTwoColor()
          Returns true if histogram should be shown in two colors
 boolean isShowOutput()
           
 boolean isShowValueOnChart()
          Checks should last value be specially drawn on chart or not.
 void setArrowSymbol(char arrowSymbol)
          Sets arrow character for outputs with OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_UP or OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_DOWN style
 void setColor(Color color)
          Sets default color to use when drawing this output
 void setDrawingStyle(OutputParameterInfo.DrawingStyle drawingStyle)
          Sets style that specifies how to draw this output
 void setDrawnByIndicator(boolean drawnByIndicator)
          If set to true, than indicator should have public method public void drawOutput(Graphics g, int outputIdx, Object values, Color color, IIndicatorDrawingSupport indicatorDrawingSupport, List shapes, Map>Map> handles) Also it's possible to define public double[] getMinMax(int outputIdx, Object values) methods, that will be called to define minimum and maximum values for scale Please look at the description of IIndicator interface for more info
 void setFlags(int flags)
          Deprecated. use setDrawingStyle(DrawingStyle) instead
 void setGapAtNaN(boolean gapAtNaN)
          Set to true to make gaps at candles with Double.NaN or Integer.MIN_VALUE in output
 void setHistogramTwoColor(boolean histogramTwoColor)
          If set to true and drawing style is histogram, then it will be shown in two colors, positive values with green and negative with red
 void setName(String name)
          Sets name of the output
 void setOpacityAlpha(float alpha)
           
 void setShift(int shift)
          Sets number of candles to shift this output
 void setShowOutput(boolean showOutput)
           
 void setShowValueOnChart(boolean showValueOnChart)
          Defines should last value be specially drawn on chart or not.
 void setType(OutputParameterInfo.Type type)
          Sets type of the output
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINE

public static final int LINE
Deprecated. use OutputParameterInfo.DrawingStyle.LINE instead
Show output as line

See Also:
Constant Field Values

DOT_LINE

public static final int DOT_LINE
Deprecated. use OutputParameterInfo.DrawingStyle.DOT_LINE instead
Show output as dotted line

See Also:
Constant Field Values

DASH_LINE

public static final int DASH_LINE
Deprecated. use OutputParameterInfo.DrawingStyle.DASH_LINE instead
Show output as dashed line

See Also:
Constant Field Values

DOT

public static final int DOT
Deprecated. use OutputParameterInfo.DrawingStyle.DOTS instead
Show output as dots

See Also:
Constant Field Values

HISTO

public static final int HISTO
Deprecated. use OutputParameterInfo.DrawingStyle.HISTOGRAM instead
Show output as histogram

See Also:
Constant Field Values

PATTERN_BOOL

public static final int PATTERN_BOOL
Deprecated. use OutputParameterInfo.DrawingStyle.PATTERN_BOOL instead
If value is not zero, then draw pattern

See Also:
Constant Field Values

PATTERN_BULL_BEAR

public static final int PATTERN_BULL_BEAR
Deprecated. use OutputParameterInfo.DrawingStyle.PATTERN_BULL_BEAR instead
If value: == 0 - no pattern > 0 - bullish < 0 - bearish

See Also:
Constant Field Values

PATTERN_STRENGTH

public static final int PATTERN_STRENGTH
Deprecated. use OutputParameterInfo.DrawingStyle.PATTERN_STRENGTH instead
If value: == 0 - neutral ]0..100] getting bullish ]100..200] bullish [-100..0[ getting bearish [-200..100[ bearish

See Also:
Constant Field Values
Constructor Detail

OutputParameterInfo

public OutputParameterInfo()
Creates empty parameter description without setting any field


OutputParameterInfo

public OutputParameterInfo(String name,
                           OutputParameterInfo.Type type,
                           int flags)
Deprecated. use OutputParameterInfo(String, Type, DrawingStyle) instead

Creates output parameter descriptor and sets all fields

Parameters:
name - name of the output
type - type of the output
flags - flags of the output

OutputParameterInfo

public OutputParameterInfo(String name,
                           OutputParameterInfo.Type type,
                           OutputParameterInfo.DrawingStyle drawingStyle)
Creates output parameter descriptor and sets all fields.

Parameters:
name - name of the output
type - type of the output
drawingStyle - specifies how to draw this output

OutputParameterInfo

public OutputParameterInfo(String name,
                           OutputParameterInfo.Type type,
                           OutputParameterInfo.DrawingStyle drawingStyle,
                           boolean lastValueOnChart)
Creates output parameter descriptor and sets all fields.

Parameters:
name - name of the output
type - type of the output
drawingStyle - specifies how to draw this output
lastValueOnChart - true to show indicator's last value for this output on chart.
Method Detail

getName

public String getName()
Returns name of the output

Returns:
name of the output

setName

public void setName(String name)
Sets name of the output

Parameters:
name - name of the output

getType

public OutputParameterInfo.Type getType()
Returns type of the output

Returns:
type of the output

setType

public void setType(OutputParameterInfo.Type type)
Sets type of the output

Parameters:
type - type of the output

getFlags

public int getFlags()
Deprecated. use getDrawingStyle() instead

Returns flags of the output

Returns:
flags of the output

setFlags

public void setFlags(int flags)
Deprecated. use setDrawingStyle(DrawingStyle) instead

Sets flags of the output. Use | operator to specify more than one flag

Parameters:
flags - flags of the output

getDrawingStyle

public OutputParameterInfo.DrawingStyle getDrawingStyle()
Returns style that specifies how to draw this output

Returns:
style that specifies how to draw this output

setDrawingStyle

public void setDrawingStyle(OutputParameterInfo.DrawingStyle drawingStyle)
Sets style that specifies how to draw this output

Parameters:
drawingStyle - specifies how to draw this output

getColor

public Color getColor()
Returns default color for output or null if no color was set

Returns:
default color for output or null

setColor

public void setColor(Color color)
Sets default color to use when drawing this output

Parameters:
color - color to draw with

getArrowSymbol

public char getArrowSymbol()
Returns arrow character for outputs with OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_UP or OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_DOWN style

Returns:
arrow character

setArrowSymbol

public void setArrowSymbol(char arrowSymbol)
Sets arrow character for outputs with OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_UP or OutputParameterInfo.DrawingStyle.ARROW_SYMBOL_DOWN style

Parameters:
arrowSymbol - arrow character

setHistogramTwoColor

public void setHistogramTwoColor(boolean histogramTwoColor)
If set to true and drawing style is histogram, then it will be shown in two colors, positive values with green and negative with red

Parameters:
histogramTwoColor - if true, then show histogram in two colors

isHistogramTwoColor

public boolean isHistogramTwoColor()
Returns true if histogram should be shown in two colors

Returns:
true if histogram should be shown in two colors

getShift

public int getShift()
Shifts output by number of candles returned

Returns:
number of candles to shift this output

setShift

public void setShift(int shift)
Sets number of candles to shift this output

Parameters:
shift - number of candles to shift this output

isDrawnByIndicator

public boolean isDrawnByIndicator()
Returns true if indicator draws this output itself

Returns:
true if indicator draws this output itself

setDrawnByIndicator

public void setDrawnByIndicator(boolean drawnByIndicator)
If set to true, than indicator should have public method public void drawOutput(Graphics g, int outputIdx, Object values, Color color, IIndicatorDrawingSupport indicatorDrawingSupport, List shapes, Map>Map> handles) Also it's possible to define public double[] getMinMax(int outputIdx, Object values) methods, that will be called to define minimum and maximum values for scale Please look at the description of IIndicator interface for more info

Parameters:
drawnByIndicator - true if indicator draws this output itself

isGapAtNaN

public boolean isGapAtNaN()
Returns true if drawing logic should make a gap in lines when there is a NaN or Integer.MIN_VALUE in output

Returns:
true for gaps

setGapAtNaN

public void setGapAtNaN(boolean gapAtNaN)
Set to true to make gaps at candles with Double.NaN or Integer.MIN_VALUE in output

Parameters:
gapAtNaN - true for gaps

isShowValueOnChart

public boolean isShowValueOnChart()
Checks should last value be specially drawn on chart or not.

Returns:
true to draw the last value, false to not.

setShowValueOnChart

public void setShowValueOnChart(boolean showValueOnChart)
Defines should last value be specially drawn on chart or not.

Parameters:
showValueOnChart - true to draw the last value, false to not.

isShowOutput

public boolean isShowOutput()

setShowOutput

public void setShowOutput(boolean showOutput)

getOpacityAlpha

public float getOpacityAlpha()
Returns transparency alpha value

Returns:

setOpacityAlpha

public void setOpacityAlpha(float alpha)


Copyright © 2011. All Rights Reserved.