Hello,
in my backtest , i have intrabar order generation enabled
for 1 min 6EH0 bars.
Each script call is written to a logfile [LOGFILE] (see below).
Also each action.
As you can see, my mc script initiates a short trade at 1.510000
the script command is:
SellShort ("Short") NbrContracts contracts next bar at 1.510000 limit;
But this order gets not filled (marketposition remains 0), but it should because a subsequent tick
is above my limit [The Tick] (see below).
[LOGFILE]
01.12.2009 11:36:00 Short open=1.509800 close=1.509800 high=1.509800 low=1.509800 #=82 price=1.510000
01.12.2009 11:36:00 TICK open=1.509800 close=1.509800 high=1.509800 low=1.509800 #=82
01.12.2009 11:36:00 TICK open=1.509800 close=1.509800 high=1.509800 low=1.509800 #=82
01.12.2009 11:36:00 TICK open=1.509800 close=1.509800 high=1.509800 low=1.509800 #=82
[The Tick which should cause simulation to fill order]
01.12.2009 11:37:00 TICK open=1.510200 close=1.510200 high=1.510200 low=1.510200 #=83
01.12.2009 11:37:00 TICK open=1.510200 close=1.510200 high=1.510200 low=1.510200 #=83
...no fill
Anyone know, why my limit order was not filled, even market goes over
its limit price ?
(# for barnumber)
thank you
backtesting: order not filled
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
i have no ticks for this symbol as IB gives only historical
timebased data (1 min).
i thought that exactly this, testing min bars like tick data,
is the purpose of intradbar order generation.
it is really not much want i want: to be able triggered an order or
get a filled within High and Low of current (historical) Bar.
Do you have an idea how to do this ?
timebased data (1 min).
i thought that exactly this, testing min bars like tick data,
is the purpose of intradbar order generation.
it is really not much want i want: to be able triggered an order or
get a filled within High and Low of current (historical) Bar.
Do you have an idea how to do this ?
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
you can only use PRECISION backtesting IF you have a finer resolution data.i have no ticks for this symbol as IB gives only historical
timebased data (1 min).
i thought that exactly this, testing min bars like tick data,
is the purpose of intradbar order generation.
it is really not much want i want: to be able triggered an order or
get a filled within High and Low of current (historical) Bar.
Do you have an idea how to do this ?
e.g testing 5min with 1min.
otherwise you have to use regular backtesting,
which is executed at EOB (end of bar).
note:
Backtesting is not perfect, even if you have tick data.
Backtesting is not a 100% simulation of the real world.
understanding and accepting the fact that backtesting is not perfect,
you just have to find a median where a testing method/procedure can be used to validate your trading concept.