16 using System.Runtime.CompilerServices;
24 [ProtoContract(SkipConstructor =
true)]
27 private bool _openSet;
33 public virtual decimal
Open {
get;
set; }
39 public virtual decimal
High {
get;
set; }
45 public virtual decimal
Low {
get;
set; }
51 public virtual decimal
Close {
get;
set; }
67 public Bar(decimal open, decimal high, decimal low, decimal close)
80 [MethodImpl(MethodImplOptions.AggressiveInlining)]
90 [MethodImpl(MethodImplOptions.AggressiveInlining)]
91 public void Update(ref decimal value)
94 if (value == 0)
return;
101 else if (value >
High)
High = value;
102 else if (value <
Low)
Low = value;
119 return $
"O: {Open.SmartRounding()} " +
120 $
"H: {High.SmartRounding()} " +
121 $
"L: {Low.SmartRounding()} " +
122 $
"C: {Close.SmartRounding()}";