Class CalculatePricesResult

java.lang.Object
velox.api.layer1.utils.CalculatePricesResult

public class CalculatePricesResult extends Object
  • Field Details

    • labels

      public String[] labels
    • firstValue

      public double firstValue
      Price value corresponding to bottom pixel of chart
    • lastValue

      public double lastValue
      Price value corresponding to top pixel of chart
    • multiplier

      public double multiplier
    • emptyTop

      public double emptyTop
      Represents the height of the empty space between the chart top and max value of the indicator
    • emptyBottom

      public double emptyBottom
      Represents the height of the empty space between the chart bottom and min value of the indicator
    • priceStep

      public double priceStep
  • Constructor Details

    • CalculatePricesResult

      public CalculatePricesResult()
  • Method Details

    • getScore

      public double getScore()
      Calculates the score based on empty space size. More empty space the bigger the score (worse)
      Returns:
      score
    • isBetterThan

      public boolean isBetterThan(CalculatePricesResult other)
      Compares which indicator range is better based on score (unused empty space size). Less empty space is better.
      Parameters:
      other - CalculatePricesResult to compare with
      Returns:
      true if this result is better than other
    • toString

      public String toString()
      Overrides:
      toString in class Object