Pause live trading in Oanda
monil shah 0 last edited by
Hi! Thanks for this amazing code. I am using Oanda for live trading which is deployed on VPS. How can I pause the program when there is no live bar? Example: At 3:30 pm the program should go in sleep mode and get activated next day at 9:15 am.
Should I use
- Celery or RabbitMQ to pause the whole program
- internal code modification to send backtrader in sleep mode.
tianjixuetu last edited by
@monil-shah-0 It is an interesting question,when we are making live trading ,we also met it ,and leave it unsolved.
I cannot fully comprehend what the intended use of Celery or RabbitMQ would be
- The program sleeps "most" of the time waiting for incoming data. As such if there is no data between 15:30 and 0915, there will no action.
Furthermore, data feeds carry a timestamp payload with which to identify the actual time, should there be any spurious data.
- A live data feed sends notifications about its status, like when it switches from
LIVE(and can switch again backwards), which is the indication for the strategy to wait.
Monil Shah last edited by