It should be no separate diagram shown for data feed if the plotting turned off. Where in this case your trades are plotted?
ab_trader
@ab_trader
Posts made by ab_trader
-
RE: Stop plotting trades on resampled data
-
RE: How to give to EMA DAILY timeframe?
@YELNAr
Calculate EMA for data feed with hourly bars. -
RE: Live trading multiple strategies, each one on a separate data feed
IB has limitations on amount of data user is able to get, and based on the error it seems that you are trying to get more data than you are allowed.
-
RE: IndexError: array index out of range
If you need some advice, you may want to share full script. Not just arbitrary piece of it.
-
RE: Execute trade immediatly after a stop is hit
@CooleRnax said in Execute trade immediatly after a stop is hit:
Is there any way to place stop order instantly after enter order gets filled without waiting next bar?
Yes, in the
next()
you issue regular order asmarket
order andstop
order. Then before call of the nextnext()
your market order will be executed (if it will be enough money) and you will have activestop
order. -
RE: On-close orders
Since you are trying to come up with some tricks, than you don't use intraday data, am I right?
If this is a case, than check out the data filters, in particular Docs - Daysplitter_Close.
-
RE: Execute trade immediatly after a stop is hit
Lets figure out what do you want first. Do you want to execute stop (1) at stop price as soon as price hit stop or (2) at the open of the bar next to the bar where price hit stop?
(1) is already introduced in the
bt
with the regular stop orders. Notification about the stop order execution comes at the open of the bar next to the bar where price hit stop. This way I would callimmediately
.(2) is easy to incorporate: just check price vs stop relation in the
next()
and if price crosses/touches stop price, than issue simple market order to close position. It will be executed at the open of the bar next to the bar where price hit stop. -
RE: Error at the end of backtesting if I use resampled data
Seems you didn't set time frame and compression for baseline
data
. If I remember correctlybt
s default time frame isDaily
. So you are re-sampling from days to intraday now. -
RE: How to give to EMA DAILY timeframe?
I didn't notice but for EMA I would use the following indicator:
self.ema = bt.indicators.ExponentialMovingAverage(self.data, period=200)