public interface IIndicatorDrawingSupport
Modifier and Type | Method and Description |
---|---|
Period |
getBasePeriod()
Returns base period of currently drawn indicator.
|
float |
getCandleLineWidth()
Returns line width for drawing candles.
|
IBar[] |
getCandles()
Returns array of candles.
|
float |
getCandleWidthInPixels()
Candle width in pixels.
|
float |
getCandleWidthInPixels(int index)
Candle width in pixels.
|
int |
getChartHeight()
Returns height of the panel in pixels where drawing should happen
|
int |
getChartWidth()
Returns width of the panel in pixels where drawing should happen
|
DisplayMode |
getDisplayMode()
Returns display mode of currently drawn indicator with custom period.
|
java.awt.Color |
getDowntrendColor()
Returns downtrend color for this indicator
|
IFinancialInstrument |
getFinancialInstrument()
Deprecated.
|
Period |
getFormulaPeriod()
Returns period of currently drawn indicator.
|
IFormulaTimeData |
getFormulaTimeData()
Returns time data for currently drawn indicator or
null if it is calculated on chart period. |
int |
getIndexOfFirstCandleOnScreen()
Index in the array of values and candles.
|
Instrument |
getInstrument()
Returns instrument of the chart
|
JFTimeZone |
getJFTimeZone()
Returns time zone of the chart.
|
double |
getMaxPrice()
Returns the maximum value of the price scale.
|
long |
getMaxTime()
Returns the maximum time scale value.
|
float |
getMiddleOfCandle(int index)
X coordinate of the candle with index.
|
double |
getMinPrice()
Returns the minimum value of the price scale.
|
long |
getMinTime()
Returns the minimum time scale value.
|
int |
getNumberOfCandlesOnScreen()
Returns number of candles currently visible on the screen.
|
OfferSide |
getOfferSide()
Return offer side of the chart or null if this is ticks chart
|
Period |
getPeriod()
Returns period of the chart.
|
float |
getPreciseXForTime(long time)
Returns precise X coordinate for the specified time.
|
int |
getShiftedIndex(int index,
int shift)
Index in the array of values and candles, shifted from start index on specified number of candles.
|
int |
getShiftedIndex(int index,
int shift,
DisplayMode displayMode)
Index in the array of values and candles, shifted from start index on specified number of candles.
|
long |
getShiftedTime(long time,
int shift)
Time, shifted from start time on specified number of candles.
|
float |
getSpaceBetweenCandlesInPixels()
Returns number of pixels between two candles.
|
float |
getSpaceBetweenCandlesInPixels(int index)
Returns number of pixels between two candles.
|
int |
getXForTime(long time)
Returns X coordinate for the specified time.
|
int |
getXForTime(long time,
boolean stickToCandleBarTime)
Returns X coordinate for the specified time.
|
float |
getYForValue(double value)
Returns Y coordinate for the specified value.
|
float |
getYForValue(int value)
Returns Y coordinate for the specified value.
|
boolean |
isChartPanel()
Returns true if Graphics passed to drawOutput method belong to main chart (where candles are shown) or false
if it belongs to separate panel created for this indicator (when IndicatorInfo.isOverChart returns false).
|
boolean |
isHandlerNeeded(int index)
Tests whether handler for selected indicator should be drawn in specified position.
|
boolean |
isLastCandleInProgress()
Returns true if the last candle is not fully formed yet
|
boolean |
isTimeAggregatedPeriod()
Returns current period is whether time aggregated or not.
|
boolean isChartPanel()
int getNumberOfCandlesOnScreen()
int getIndexOfFirstCandleOnScreen()
float getCandleWidthInPixels()
float getCandleWidthInPixels(int index)
index
- index of the candlefloat getSpaceBetweenCandlesInPixels()
float getSpaceBetweenCandlesInPixels(int index)
index
- index of the candlefloat getCandleLineWidth()
float getMiddleOfCandle(int index)
index
- index of the candles or/and valueint getShiftedIndex(int index, int shift)
index
- start indexshift
- number of candles for shiftint getShiftedIndex(int index, int shift, DisplayMode displayMode)
index
- start indexshift
- number of candles for shiftdisplayMode
- display mode for indicators with custom periodlong getShiftedTime(long time, int shift)
time
- start timeshift
- number of candles for shiftboolean isHandlerNeeded(int index)
index
- index of candletrue
if handler should be drawn in specified position, false
otherwiseint getXForTime(long time)
time
- time to get x coordinate forint getXForTime(long time, boolean stickToCandleBarTime)
time
- time to get x coordinate forstickToCandleBarTime
- stick to candle/bar timefloat getPreciseXForTime(long time)
time
- time to get x coordinate forfloat getYForValue(double value)
value
- indicator valuefloat getYForValue(int value)
value
- indicator valueIBar[] getCandles()
IFormulaTimeData getFormulaTimeData()
null
if it is calculated on chart period.boolean isLastCandleInProgress()
int getChartWidth()
int getChartHeight()
Instrument getInstrument()
@Deprecated IFinancialInstrument getFinancialInstrument()
Period getPeriod()
JFTimeZone getJFTimeZone()
Period getFormulaPeriod()
Period getBasePeriod()
DisplayMode getDisplayMode()
OfferSide getOfferSide()
java.awt.Color getDowntrendColor()
double getMinPrice()
double getMaxPrice()
long getMinTime()
long getMaxTime()
boolean isTimeAggregatedPeriod()
Copyright © 2024. All rights reserved.