Backtest Entry Price: Market Orders vs. Pending Orders

Created at 01 Apr 2024, 15:31
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
NC

ncel01

Joined 19.03.2020

Backtest Entry Price: Market Orders vs. Pending Orders
01 Apr 2024, 15:31


Hello,

I've noticed that, when backtesting, a buy market orders are triggered at the new bar open price (or last bar close price).
However, limit pending orders (buy) are triggered at the last bar lowest price instead.

In fact, since slippage is not considered during backtest, I was expecting the entry prices to be identical for all the order types.
What's the criteria here?

For your reference, I am backtesting using m1 bars from Server (open prices).

Thanks for clarifying.


@ncel01
Replies

VANICKICE
01 Apr 2024, 23:16 ( Updated at: 02 Apr 2024, 06:19 )

vanikice

i m not expert in fact i always wrong with hedging stop limit in fix the stop loss in way that i can buy at lowest price because close always first that i ve buy . i also use pip time set to be more precisely .but also have not understand if is convenient enter at market range high or zero . i m asking if is possible to switch for a netting mode i prefer it. i m new i looking for partners nice to meet you if you want follow me .for collaborations


@VANICKICE

firemyst
02 Apr 2024, 00:24

Can you post any code that replicates the issue?

Along with a screen capture of your back testing parameters.


@firemyst

ncel01
02 Apr 2024, 08:15

RE: Backtest Entry Price: Market Orders vs. Pending Orders

firemyst said: 

Can you post any code that replicates the issue?

Along with a screen capture of your back testing parameters.

I can if this is confirmed to be an issue. Otherwise it will be pointless.


@ncel01

firemyst
02 Apr 2024, 09:34

RE: RE: Backtest Entry Price: Market Orders vs. Pending Orders

ncel01 said: 

firemyst said: 

Can you post any code that replicates the issue?

Along with a screen capture of your back testing parameters.

I can if this is confirmed to be an issue. Otherwise it will be pointless.

Well, if you can't present the details on how to accurately reproduce, I wouldn't be surprised if they say they can't reproduce and/or confirm it. 

And round and round it goes 


@firemyst

ncel01
02 Apr 2024, 10:39 ( Updated at: 02 Apr 2024, 11:05 )

RE: RE: RE: Backtest Entry Price: Market Orders vs. Pending Orders

firemyst said: 

ncel01 said: 

firemyst said: 

Can you post any code that replicates the issue?

Along with a screen capture of your back testing parameters.

I can if this is confirmed to be an issue. Otherwise it will be pointless.

Well, if you can't present the details on how to accurately reproduce, I wouldn't be surprised if they say they can't reproduce and/or confirm it. 

And round and round it goes 

Yes, it goes around. Unless you can be a bit more pragmatic. Would that be too hard?

Since when making  proof of something is a requirement to be informed upfront on how things are supposed to work by default?

In my thread, I explicitly ask for details about this. It's not my fault that you've ignored it at your own convenience.


@ncel01

PanagiotisCharalampous
03 Apr 2024, 09:13

Hi ncel01,

This behavior is by design. Limit orders are executed using low/high prices.

Best regards,

Panagiotis


@PanagiotisCharalampous

ncel01
04 Apr 2024, 18:21

RE: Backtest Entry Price: Market Orders vs. Pending Orders

PanagiotisCharalampous said: 

Hi ncel01,

This behavior is by design. Limit orders are executed using low/high prices.

Best regards,

Panagiotis

Hi Panagiotis,

Is this applicable to the stop orders as well?

What about the market orders?
These seem to be filled at the open prices, however (in some cases) it looks to me that low/high prices are also used.

Thank you once again.


@ncel01

PanagiotisCharalampous
05 Apr 2024, 06:26

RE: RE: Backtest Entry Price: Market Orders vs. Pending Orders

ncel01 said: 

PanagiotisCharalampous said: 

Hi ncel01,

This behavior is by design. Limit orders are executed using low/high prices.

Best regards,

Panagiotis

Hi Panagiotis,

Is this applicable to the stop orders as well?

What about the market orders?
These seem to be filled at the open prices, however (in some cases) it looks to me that low/high prices are also used.

Thank you once again.

As far as I know open prices are used for stop and market orders


@PanagiotisCharalampous