Skip to content

Commit

Permalink
Correct is usage from PR395
Browse files Browse the repository at this point in the history
  • Loading branch information
backtrader committed May 28, 2020
1 parent 28be6ea commit f1bc0cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backtrader/stores/ibstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ def reqHistoricalData(self, contract, enddate, duration, barsize,
self.iscash[tickerId] = True
if not what:
what = 'BID' # TRADES doesn't work
elif what is 'ASK':
elif what == 'ASK':
self.iscash[tickerId] = 2
else:
what = what or 'TRADES'
Expand Down Expand Up @@ -845,9 +845,9 @@ def reqMktData(self, contract, what=None):
if contract.m_secType in ['CASH', 'CFD']:
self.iscash[tickerId] = True
ticks = '' # cash markets do not get RTVOLUME
if what is 'ASK':
if what == 'ASK':
self.iscash[tickerId] = 2

# q.put(None) # to kickstart backfilling
# Can request 233 also for cash ... nothing will arrive
self.conn.reqMktData(tickerId, contract, bytes(ticks), False)
Expand Down

0 comments on commit f1bc0cf

Please sign in to comment.