easyT.manager.Manager.supervise

Manager.supervise()[source]

These functions should be calling inside the while True looping, it is responsible to updates information like if the AlgoTrading is allowed to trade, if it needs to close the position, and to update the tick and the rates’ information.

Returns:

It updates attribute values.

Examples

>>> from easyT.manager import Manager
>>> symbol = 'BTCUSDT'
>>> manager = Manager()
>>> manager.set_platform('binance-spot')
'binance-spot'
>>> manager.get_initialize()
<binanceSpotEasyT.initialization.Initialize object>
>>> # It is important to know that the supervise needs the time set.
>>> manager.supervise()
TypeError: '<=' not supported between instances of 'datetime.datetime' and 'NoneType'
>>> manager.set_trading_time(time_trade_start='09:00', time_trade_stop='17:30', time_position_close='17:45')
>>> # It is important to know that it do not only need the trading time, but also, it needs the Tick() class
>>> # to retrieve the time!
>>> manager.get_tick(symbol=symbol)
<binanceSpotEasyT.tick.Tick object>
>>> manager.supervise()