One such system is already in development. Take a look: OmegaUI. It uses dash/plotly framework as well.
Thanks
Vlad
One such system is already in development. Take a look: OmegaUI. It uses dash/plotly framework as well.
Thanks
Vlad
Just curious - why add the dependency on Google API - just because it fits into the always free plan ?
The alternative could be to just get the N1 VM instance and use the 300$ free trial credit. Such node will cost you around 25$ monthly (assuming 10GB of storage and Linux OS - which is probably more than you need, given your trading frequency) so that this credit will cover a full year of trial.
Then you may just run whatever you want on this node, using a standard Backtrader API without any dependency on Google Cloud APIs.
@backtrader said in Does backtrader suppress logging emitted to stdout by the Python logger internally to Cerebro?:
https://community.backtrader.com/topic/376/eodevelopment-1-x
Sorry to hear about EOD. Was the development of 2.x started, or am I missing something big ?
I actually like the platform very much and the fact that it is open source (and not only because of it being free ) is a huge advantage. So I wonder why to stop the development ?
Sorry, some text got inside the code section, quoting it once again:
So it seems not a large effort to refactor it to use the standard logging. Of cause this need to be properly designed and discussed.
Would such pull request be accepted by the maintainer(s) ?
Or there is some principal position to use just a plain prints ?
Or there is another design direction ?
Thanks
Vlad
Hi all,
I do also see the benefits of using standard python logging capabilities throughout the framework and user code:
The question is an effort estimation and someone willing to invest - and I actually do want to try.
Looking at the backtrader's source code, it seems there are just a few places that directly use 'print' to output to stdout/stderr (excluding samples and tests ).
Searching 343 files for "print" (case sensitive, whole word)
\\vladnas\work\backtrader\backtrader\brokers\oandabroker.py:
102: print('position for instrument:', p['instrument'])
\\vladnas\work\backtrader\backtrader\btrun\btrun.py:
148: print('====================')
149: print('== Analyzers')
150: print('====================')
153: analyzer.print()
155: print('##########')
156: print(name)
157: print('##########')
354: print('')
355: print('Failed to load module %s:' % modpath, e)
363: print('No class %s / module %s' % (str(name), modpath))
398: print('')
399: print('Failed to load module %s:' % modpath, e)
407: print('No function %s / module %s' % (str(name), modpath))
631: help=('Automatically print analyzers'))
635: help=('Automatically PRETTY print analyzers'))
\\vladnas\work\backtrader\backtrader\feeds\influxfeed.py:
69: print('Failed to establish connection to InfluxDB: %s' % err)
96: print('InfluxDB query failed: %s' % err)
\\vladnas\work\backtrader\backtrader\feeds\vcdata.py:
581: print('*' * 50, 'DEBUG OnNewTicks')
583: print('-' * 40)
584: print('tick.SymbolCode', tick.SymbolCode.encode('ascii', 'ignore'))
586: print(' tick.Field : {} ({})'.format(fname, tick.Field))
587: print(' tick.FieldEx :', tick.FieldEx)
591: print(' tick.Date :', tdate)
593: print(' tick.Index :', tick.TickIndex)
594: print(' tick.Value :', tick.Value)
595: print(' tick.Text :', tick.Text.encode('ascii', 'ignore'))
\\vladnas\work\backtrader\backtrader\stores\ibstore.py:
329: print(*args)
'''
So it seems not a large effort to refactor it to use the standard logging. Of cause this need to be properly designed and discussed.
Would such pull request be accepted by the maintainer(s) ?
Or there is some principal position to use just a plain prints ?
Or there is another design direction ?
Thanks
Vlad
My understanding is that trades are reported when the position in a particular instrument is eliminated (goes to zero). In case you are trading the same instrument with partial orders ( like sell 5% of your holding and buy it back ) the trade notification will not be generated - that's what I saw. However I'd wait for more experienced forum members to reply of cause, in case I'm wrong.
Probably not directly related to multiple data feeds speedup - but the following post discussed some ways of speeding up the feed's loading times (including some caching):
Thanks
Vlad
Hi Ed,
Did you consider submitting a pull request to backtrader's repository ? Seems like a pretty useful and important store/feed IMHO.
I'm planning to use it in my system - will share any feedback I'll have of cause.
Thanks for your work,
Vlad
I think this question was already answered few times. Please take a look:
Is there way to track open orders with IB broker?
Is it possible to retrieve all the open/active orders from Interactive Broker?
Ways to repopulate IB trades/orders in strategy after shutdown
You may probably find other similar questions & answers by searching for 'open orders'.
Ended up with just a small change that 'fixes' the issue for me (probably not the best fix of cause):
diff --git a/backtrader/feeds/ibdata.py b/backtrader/feeds/ibdata.py
index ab3c184..84cff62 100644
--- a/backtrader/feeds/ibdata.py
+++ b/backtrader/feeds/ibdata.py
@@ -408,7 +408,7 @@ class IBData(with_metaclass(MetaIBData, DataBase)):
def reqdata(self):
'''request real-time data. checks cash vs non-cash) and param useRT'''
- if self.contract is None:
+ if self.contract is None or self._state == self._ST_LIVE:
return
if self._usertvol:
Thanks