net.sourceforge.eclipsetrader.charts
Class Scaler
java.lang.Object
net.sourceforge.eclipsetrader.charts.Scaler
- public class Scaler
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Scaler
public Scaler()
set
public void set(int height,
double scaleHigh,
double scaleLow,
double logScaleHigh,
double logRange,
boolean logScale)
set
public void set(int height)
set
public void set(double scaleHigh,
double scaleLow)
convertToY
public int convertToY(double val)
convertToValue
public double convertToValue(int y)
convertToRoundedValue
public double convertToRoundedValue(int y)
getLogScaleHigh
public double getLogScaleHigh()
getLogRange
public double getLogRange()
getHeight
public int getHeight()
getLogFlag
public boolean getLogFlag()
getHigh
public double getHigh()
getLow
public double getLow()
getScaleArray
public java.util.List getScaleArray()
setExtendRange
public void setExtendRange(int extendRange)
getExtendRange
public int getExtendRange()
roundToTick
public static double roundToTick(java.lang.Double price)
- Rounds the given price to the nearest tick.
- Parameters:
price
- The price value
- Returns:
- The rounded price
roundToTick
public static double roundToTick(double value)
- Rounds the given price to the nearest tick.
- Parameters:
value
- The price value
- Returns:
- The rounded price
getPriceTick
public static double getPriceTick(double value)
- Get the price tick related to the passed as argument.
- Parameters:
value
- The price value
- Returns:
- The price tick