Skip to content

FavoriteTimeFrames.Remove

method · FavoriteTimeFrames · cAlgo.API Since 5.3

DesktopCLICloud

Removes a time frame from favorite TimeFrames.

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

bool Remove(TimeFrame timeFrame)
favoriteTimeFrames.Remove(timeFrame: TimeFrame) -> bool

Parameters

Name C# type Python type Description
timeFrame TimeFrame TimeFrame TimeFrame

Returns bool — True if succeeded otherwise False.

Examples

var isRemoved = TimeFrameManager.Favorite.Remove(TimeFrame.Hour4);
Print("Hour4 removed from favorites: {0}", isRemoved);
isRemoved = api.TimeFrameManager.Favorite.Remove(TimeFrame.Hour4)
api.Print(f"Hour4 removed from favorites: {isRemoved}")