PercentComplete

View as Markdown

Definition

Returns a value indicating the percentage complete of the real-time bar processing.

Notes:

  1. Since a historical bar is complete, values during State.Historical should be ignored (also the case with TickReplay bars).
  2. Some BarsTypes may not be compatible with the PercentComplete property. In these cases, a value of 0 always returns (e.g., Range, Renko, Point & Figure, Kagi, LineBreak, and some other 3rd party bars types).

Property Value

A double value representing a percent e.g. a value of .5 indicates the bar was at 50%. This property is read-only.

Syntax

Bars.PercentComplete

Tip: If you are developing a custom BarsType, please use the GetPercentComplete() method used to calculate the value returned by PercentComplete.

Examples

1protected override void OnBarUpdate()
2{
3 if(State == State.Realtime)
4 {
5 Draw.TextFixed(this, "barstatus", Bars.PercentComplete.ToString("P2"), TextPosition.BottomRight);
6 }
7}