TradingTools

abstract class TradingTools

The TradingTools class is a useful tool class that allows you to manage trading data

Author

N7ghtm4r3 - Tecknobit

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun computeAssetPercent(startValue: Double, lastValue: Double): Double
Method to get percent between two values
open fun computeAssetPercent(startValue: Double, lastValue: Double, decimalDigits: Int): Double
Method to get percent between two values and round it
Link copied to clipboard
open fun computeProportion(startValue: Double, lastValue: Double): Double
Method to get proportion between two values
open fun computeProportion(startValue: Double, lastValue: Double, decimalDigits: Int): Double
Method to get proportion between two values and round it
Link copied to clipboard
open fun computeTPTOPIndex(historicalValues: Array<Double>, lastValue: Double, intervalDays: Int, offsetRange: Double): Double
open fun computeTPTOPIndex(historicalValues: ArrayList<Double>, lastValue: Double, intervalDays: Int, offsetRange: Double): Double
Method to get forecast of an asset in base of days gap inserted
open fun computeTPTOPIndex(historicalValues: Array<Double>, lastValue: Double, intervalDays: Int, offsetRange: Double, decimalDigits: Int): Double
open fun computeTPTOPIndex(historicalValues: ArrayList<Double>, lastValue: Double, intervalDays: Int, offsetRange: Double, decimalDigits: Int): Double
Method to get forecast of an asset in base of days gap inserted and round it
Link copied to clipboard
open fun getPercentualizedValue(startValue: Double, percentualizer: Double): Double
open fun getPercentualizedValue(startValue: Double, percentualizer: Double, decimalDigits: Int): Double
Method to percentualize a value
Link copied to clipboard
open fun roundValue(value: Double, decimalDigits: Int): Double
Method to round a value
Link copied to clipboard
open fun textualizeAssetPercent(percent: Double, decimalDigits: Int): String
Method get percent between two values and textualize it
open fun textualizeAssetPercent(startValue: Double, lastValue: Double): String
open fun textualizeAssetPercent(startValue: Double, lastValue: Double, decimalDigits: Int): String
Method to get percent between two values and textualize it