Class CandleSample
Represents data for a candle sample
Inheritance
System.Object
CandleSample
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.dll
Syntax
public class CandleSample : TimeSeriesSampleBase, ITimeSeriesSample, ITimedSample
Constructors
CandleSample()
Declaration
CandleSample(DateTime)
Declaration
public CandleSample(DateTime timeStamp)
Parameters
Type |
Name |
Description |
System.DateTime |
timeStamp |
|
Properties
BuyVolume
Declaration
public long BuyVolume { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
ClosePrice
Declaration
public float ClosePrice { get; set; }
Property Value
Type |
Description |
System.Single |
|
Count
Declaration
public int Count { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Empty
Declaration
public bool Empty { get; }
Property Value
Type |
Description |
System.Boolean |
|
HighPrice
Declaration
public float HighPrice { get; set; }
Property Value
Type |
Description |
System.Single |
|
LowPrice
Declaration
public float LowPrice { get; set; }
Property Value
Type |
Description |
System.Single |
|
OpenPrice
Declaration
public float OpenPrice { get; set; }
Property Value
Type |
Description |
System.Single |
|
SellVolume
Declaration
public long SellVolume { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
TimeSpanMs
Timespan in MS that this candle covers, may not be always needed
Declaration
public long TimeSpanMs { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
Methods
Add(Single, Int64)
Add a price to current candle sample
Declaration
public void Add(float price, long qty = 0L)
Parameters
Type |
Name |
Description |
System.Single |
price |
Price to be added
|
System.Int64 |
qty |
Quantity to be added.
Use positive values for Buy-side quantity and negative for Sell-side quantity
|
AggregateSample(CandleSample)
Declaration
public void AggregateSample(CandleSample sample)
Parameters
AggregateSample(ITimeSeriesSample)
Declaration
public override void AggregateSample(ITimeSeriesSample sample)
Parameters
Overrides
GenerateRandom(Int32, DateTime, Int32, Int32, Int32, Int32, Single)
Generates random market candle stream
Declaration
public static CandleSample[] GenerateRandom(int count, DateTime startDate, int msInterval, int msIntervalDeviation, int priceDirChangeEvery, int priceChangeAccel, float currentMidPrice)
Parameters
Type |
Name |
Description |
System.Int32 |
count |
|
System.DateTime |
startDate |
|
System.Int32 |
msInterval |
|
System.Int32 |
msIntervalDeviation |
|
System.Int32 |
priceDirChangeEvery |
|
System.Int32 |
priceChangeAccel |
|
System.Single |
currentMidPrice |
|
Returns
MakeAggregateInstance()
Declaration
public override ITimeSeriesSample MakeAggregateInstance()
Returns
Overrides
Replace(CandleSample)
Declaration
public void Replace(CandleSample sample)
Parameters
Implements
Extension Methods