Skip to content

CustomBarsNeedsMoreEventArgs

class cAlgo.API Since 5.3

DesktopCLICloud

Provides data for CustomBars NeedsMore event.

Environment behaviour

CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.

Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.

Definition

public class CustomBarsNeedsMoreEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

protected override void OnStart()
{
    var customTimeFrame = TimeFrameManager.Custom.Add("My Time Frame");
    var customBars = customTimeFrame.AddBars(Symbols.GetSymbol("EURUSD"));
    customBars.NeedsMore += OnCustomBarsNeedsMore;
}

private void OnCustomBarsNeedsMore(CustomBarsNeedsMoreEventArgs args)
{
    Print("{0} {1} custom bars need more history", args.CustomBars.Symbol.Name, args.CustomBars.TimeFrame);
}
def on_start(self):
    customTimeFrame = api.TimeFrameManager.Custom.Add("My Time Frame")
    customBars = customTimeFrame.AddBars(api.Symbols.GetSymbol("EURUSD"))
    customBars.NeedsMore += self.on_custom_bars_needs_more

def on_custom_bars_needs_more(self, args):
    api.Print(f"{args.CustomBars.Symbol.Name} {args.CustomBars.TimeFrame} custom bars need more history")

Properties

Name Description
CustomBarsDesktopCLICloudCustomBars Gets custom bars that needs more bars.

See also