For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Pause live trading in Oanda

  • 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

    1. Celery or RabbitMQ to pause the whole program
    2. internal code modification to send backtrader in sleep mode.

  • @monil-shah-0 It is an interesting question,when we are making live trading ,we also met it ,and leave it unsolved.

  • administrators

    I cannot fully comprehend what the intended use of Celery or RabbitMQ would be

    1. 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.

    1. A live data feed sends notifications about its status, like when it switches from DELAYED to LIVE (and can switch again backwards), which is the indication for the strategy to wait.

  • Noted.Thanks.

Log in to reply