BarsHistoryLoadedEventArgs.Count
property · BarsHistoryLoadedEventArgs · cAlgo.API
DesktopCLICloud
Gets the number of bars.
Definition
public int Count {get;}
barsHistoryLoadedEventArgs.Count: int
Returns int
Examples
protected override void OnStart()
{
Bars.HistoryLoaded += OnBarsHistoryLoaded;
Bars.LoadMoreHistoryAsync();
}
private void OnBarsHistoryLoaded(BarsHistoryLoadedEventArgs args)
{
Print("Loaded {0} more bars", args.Count);
}
def on_start(self):
api.Bars.HistoryLoaded += self.on_bars_history_loaded
api.Bars.LoadMoreHistoryAsync()
def on_bars_history_loaded(self, args):
api.Print(f"Loaded {args.Count} more bars")