Backtest: Pending Orders - Market Orders

 

I got a question about when a order is filled during a backtest:

1)

OP_BUYSTOP at  1.3400

Current Ask at     1.3399

Next tick Ask at    1.3402

The limit order is filled at 1.3400, right?

2)

OP_BUY if Ask    >= 1.3400

Current Ask at         1.3399

Next tick Ask at        1.3402

The market order is filled at 1.3402, right?


Thanks in advance for answer!

 
APeng:

I got a question about when a order is filled during a backtest:

1)

OP_BUYSTOP at  1.3400

Current Ask at     1.3399

Next tick Ask at    1.3402

The limit order is filled at 1.3400, right?

No, this is a stop order, not a limit order. Will be triggered at 1.3402.


2)

OP_BUY if Ask    >= 1.3400

Current Ask at         1.3399

Next tick Ask at        1.3402

The market order is filled at 1.3402, right?

Yes.
Reason: