FavoriteTimeFramesAddedEventArgs.TimeFrames
property · FavoriteTimeFramesAddedEventArgs · cAlgo.API Since 5.3
DesktopCLICloud
Gets the added time frames.
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 TimeFrame[] TimeFrames {get;}
favoriteTimeFramesAddedEventArgs.TimeFrames: list[TimeFrame]
Returns TimeFrame[]
Examples
protected override void OnStart()
{
TimeFrameManager.Favorite.Added += OnFavoriteTimeFramesAdded;
}
private void OnFavoriteTimeFramesAdded(FavoriteTimeFramesAddedEventArgs args)
{
foreach (var timeFrame in args.TimeFrames)
Print("{0} is now a favorite time frame", timeFrame);
}
def on_start(self):
api.TimeFrameManager.Favorite.Added += self.on_favorite_time_frames_added
def on_favorite_time_frames_added(self, args):
for timeFrame in args.TimeFrames:
api.Print(f"{timeFrame} is now a favorite time frame")