Struct HeatmapRectangle
Area of a bar-indexed heatmap: a range of bars and a range of prices.
public struct HeatmapRectangle
- Extension Methods
Properties
BarsCount
public int BarsCount { get; }
Property Value
- int
EndBar
Index of the last bar of the area, inclusive.
public int EndBar { readonly get; set; }
Property Value
- int
HighPrice
Highest price of the area.
public decimal HighPrice { readonly get; set; }
Property Value
- decimal
LowPrice
Lowest price of the area.
public decimal LowPrice { readonly get; set; }
Property Value
- decimal
StartBar
Index of the first bar of the area.
public int StartBar { readonly get; set; }
Property Value
- int
Methods
Contains(HeatmapLevel)
Determines whether a level lies within this area; the bounds are inclusive.
public bool Contains(HeatmapLevel level)
Parameters
levelHeatmapLevelThe level to test.
Returns
- bool
True when the bar and price of
levellie within this area.
Contains(HeatmapRectangle)
Determines whether this area fully covers another one; the bounds are inclusive.
public bool Contains(HeatmapRectangle displayRectangle)
Parameters
displayRectangleHeatmapRectangleThe area to test.
Returns
- bool
True when the bars and prices of
displayRectanglelie within this area.
Equals(HeatmapRectangle)
Determines whether this area has the same bars and prices as other.
public bool Equals(HeatmapRectangle other)
Parameters
otherHeatmapRectangleThe area to compare with.
Returns
- bool
True when all four bounds are equal.
Equals(object?)
Determines whether obj is a HeatmapRectangle equal to this one.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with.
Returns
- bool
True when
objis an equal HeatmapRectangle.
GetHashCode()
Returns a hash code combining the four bounds.
public override int GetHashCode()
Returns
- int
The hash code.
ToString()
Returns the bounds of the area as text, for diagnostics.
public override string ToString()
Returns
- string
The bars and prices of the area.
Operators
operator ==(HeatmapRectangle, HeatmapRectangle)
Determines whether two areas are equal.
public static bool operator ==(HeatmapRectangle left, HeatmapRectangle right)
Parameters
leftHeatmapRectangleThe first area.
rightHeatmapRectangleThe second area.
Returns
- bool
True when the areas are equal.
operator !=(HeatmapRectangle, HeatmapRectangle)
Determines whether two areas differ.
public static bool operator !=(HeatmapRectangle left, HeatmapRectangle right)
Parameters
leftHeatmapRectangleThe first area.
rightHeatmapRectangleThe second area.
Returns
- bool
True when the areas are not equal.