Backtesting Bug? (Spread)

Created at 14 Sep 2023, 02:54
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!
JXTA's avatar

JXTA

Joined 23.08.2023

Backtesting Bug? (Spread)
14 Sep 2023, 02:54


In 1st photo provided below, it has shown the backtesting position entry price will be exact right after my logic is meet which is too good to be true, but in real-time automate trading including spread it should be on the red line level, what is wrong with the backtesting spread? because even if I have set a 2000 spread before I run the backtesting the result is still same, when the run is done it will still stay on the level where yellow arrow pointed, not adding any spread in the first place tho, it will lead to an false gaining/losing result, the spread should be included in the first place not after a trade is done and be deducted out.

 

Follow by this second photo, you can see clearly the backtesting system has shown that the stop loss is only 400+pips in the history included commission, but my realtime stoploss pip was 600+pips, so the backtesting system will not give an accurate result if this happen, please point it out if I miss out something.


@JXTA
Replies

JXTA
14 Sep 2023, 03:12 ( Updated at: 21 Dec 2023, 09:23 )

see this, 1st photo is the backtesting provided deal map

2nd photo is the realtime deal map

Stop loss in the same level but the spread pips are not included in the backtesting system


@JXTA

PanagiotisChar
14 Sep 2023, 06:36

Hi there,

In order to get assistance, you would need to share the following information

  1. cBot code
  2. cBot parameters
  3. Backtesting parameters

 


@PanagiotisChar

JXTA
15 Sep 2023, 05:05 ( Updated at: 21 Dec 2023, 09:23 )

RE: Backtesting Bug? (Spread)

JINGXUAN said: 

see this, 1st photo is the backtesting provided deal map

2nd photo is the realtime deal map

Stop loss in the same level but the spread pips are not included in the backtesting system

I have found the source of causing this problem, when we are backtesting we should use the “Tick data from Server”, this will simulate the real time environment including all the spreads and commission


@JXTA