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

Live trading manual execution



  • Is there a way to use backtrader for live trading but the execution to be done manually?
    Backtrader would for example output the trades to an csv. The trader would manually execute those trades and record back on the csv the executed prices? Obviously this would be done using bigger time frames, for example a daily timeframe.
    PS: none of those brokers supported by backtrader are available in Brasil.



  • @André-Tavares Interactive Brokers is available in Brazil.



  • I can open an account from Brazil with them, but cannot trade brazilian assets on the Bovespa Exchange.



  • The article you are explaining is really good to see. I want to say that nowadays many people are looking for online trading courses so for them I suggest contacting the online trading academy for a better understanding of the trading market.



  • @André-Tavares said in Live trading manual execution:

    Is there a way to use backtrader for live trading but the execution to be done manually?

    It is possible since this is typical backtesting mode. Your path would be approximately the following:

    • update data feed(s) - live or from csv/pandas so you get last day bar
    • run backtest and get signals to buy/sell printed by bt
    • trade manually next day


  • @ab_trader perfect. That is what I was thinking.
    But how will I feedback the system with the open orders, so the strategy can keep evaluating them and tell me when it is time to close?



  • bt will open/close positions and track everything, to just need to update data feeds, run backtest, and synchronize your real account with bt account.



  • @ab_trader
    Tell me if you agree on this updated version of your list of tasks:

    • update data feed(s) - live or from csv/pandas so you get last day bar
    • update order history using add_order_history with the executed orders, so BT can consider them and eventually close any of them
    • run backtest and get signals to buy/sell printed by bt, this is done every morning before market open with last day data.
    • trade manually this day


  • in general i agree, but i believe your 2nd item is more complex than it should be. if you trade on the open or using limit/stop prices calculated on th eprevious prices than bt can do everything by it self. For example:

    Monday morning - you get all prices for last week, bt gives you signal, you bought on the open - position open on real account.
    Tuesday morning - you get prices for Monday, bt open position internally, so you have position on both bt account and real account.



  • But I have to run from start every morning correct?
    How will BT know the orders that are open?



  • @André-Tavares said in Live trading manual execution:

    But I have to run from start every morning correct?

    I think it is easier compare to manually updating orders and importing them into bt.

    @André-Tavares said in Live trading manual execution:

    How will BT know the orders that are open?

    bt generates the signal and opens the position next day. This is the way how bt works by default. You manually sync position on the real account to position on the bt account.



  • The article you are explaining is really helpful for everyone. I am doing online trading for past few years and it's really helping me a lot for growing my wealth.


Log in to reply
 

});