Rate Functions

Deterministic rate and motion functions

NameParametersReturnsDescription
Rate.Acceleration(decimal currentRate, decimal previousRate)decimalReturns acceleration between two rates.
Rate.Deceleration(decimal currentRate, decimal previousRate)decimalReturns deceleration between two rates.
Rate.Normalized(decimal rate, decimal maxRate)decimalNormalizes a rate by a maximum expected rate.
Rate.OfChange(decimal current, decimal previous, decimal timeDelta)decimalReturns rate of change given current, previous, and time delta.
Rate.PerMinute(decimal delta, decimal minutes)decimalReturns rate per minute.
Rate.PerSecond(decimal delta, decimal seconds)decimalReturns rate per second.
Rate.PerUnit(decimal delta, decimal units)decimalReturns rate per arbitrary unit.
Rate.Slope(decimal a, decimal b, decimal timeDelta)decimalReturns slope between two values over time.
Rate.Trend(decimal current, decimal previous)decimalReturns -1, 0, or 1 indicating downward, flat, or upward trend.

Examples

	

Rate.OfChange(Price, PrevPrice, Seconds)
Rate.PerSecond(DeltaPnL, 5)

Rate.Acceleration(CurrentRate, PrevRate)
Rate.Trend(Current, Previous)

Rate.Normalized(Speed, MaxSpeed)