cycle#

tradeexecutor.strategy.cycle Python module in Trading Strategy framework.

Module description#

Strategy cycle definitions.

See Strategy cycle for more information.

Classes#

CycleDuration

Strategy cycle duration options.

Functions#

round_datetime_down(ts, delta[, offset])

Snap to previous available timedelta.

round_datetime_up(ts, delta[, offset])

Snap to next available timedelta.

snap_to_next_tick(ts, tick_size[, offset])

Calculate when the trading logic should wake up from the sleep next time.

snap_to_previous_tick(ts, tick_size[, offset])

Calculate what should the tick time for given real time.