Table of Contents

Class LogReturn

Namespace
FinanceSharp.Indicators
Assembly
FinanceSharp.dll
 Represents the LogReturn indicator (LOGR)
  • log returns are useful for identifying price convergence/divergence in a given period
  • logr = log (current price / last price in period)
public class LogReturn : WindowIndicator, IIndicator, IUpdatable
Inheritance
LogReturn
Implements
Inherited Members
Extension Methods

Constructors

LogReturn(int)

Initializes a new instance of the LogReturn class with the default name and period

public LogReturn(int period)

Parameters

period int

The period of the SMA

LogReturn(string, int)

Initializes a new instance of the LogReturn class with the specified name and period

public LogReturn(string name, int period)

Parameters

name string

The name of this indicator

period int

The period of the LOGR

Properties

WarmUpPeriod

Required period, in data points, for the indicator to be ready and fully initialized.

public override int WarmUpPeriod { get; }

Property Value

int

Methods

Forward(IReadOnlyWindow<long>, IReadOnlyWindow<DoubleArray>, long, DoubleArray)

 Computes the next value for this indicator from the given state.
  • logr = log (current price / last price in period)
protected override DoubleArray Forward(IReadOnlyWindow<long> timeWindow, IReadOnlyWindow<DoubleArray> window, long time, DoubleArray input)

Parameters

timeWindow IReadOnlyWindow<long>
window IReadOnlyWindow<DoubleArray>

The window of data held in this indicator

time long
input DoubleArray

The input value to this indicator on this time step

Returns

DoubleArray

A new value for this indicator