USDCHF backtest has invalid backtest data, and gives me a 1200+ pip trade!

Created at 17 Sep 2020, 00:57
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!
WI

wilson347

Joined 31.07.2019

USDCHF backtest has invalid backtest data, and gives me a 1200+ pip trade!
17 Sep 2020, 00:57


Can someone create a basic cBot and put this code in please OnTick. And please explain to me why I can't see this MASSIVE price jump (at 11:40 on 31st Oct 2018) in the 'normal' chart? OR am I just missing something? The broker is ICMarkets.

- Run a backtest from 31.10.2018 to 1.11.2018

- Do the backtest against ANY timeframe (up to daily)

- Use m1 bars from server for backtest

........ Voila! 1200 pip take profit gets hit!

protected override void OnTick()
        {
            DateTime t = new DateTime(2018, 10, 31);
            DateTime currtime = Server.Time;
            if(currtime.Equals(t))
            {
                String buylabel = "usdchf_buy";
                Position buypos = Positions.Find(buylabel, SymbolName, TradeType.Buy);
                if (buypos == null)
                {
                    double LotsQuantity = 1;
                    var volumeInUnits = Symbol.QuantityToVolumeInUnits(LotsQuantity);
                    ExecuteMarketOrder(TradeType.Buy, SymbolName, volumeInUnits, buylabel, 140, 600);

                }
            }
        }


@wilson347
Replies

PanagiotisCharalampous
17 Sep 2020, 08:00

Hi wilson347,

Price feeds are a responsibility of the broker. You need to check this with ICMarkets.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

wilson347
23 Sep 2020, 18:30

RE:

PanagiotisCharalampous said:

Hi wilson347,

Price feeds are a responsibility of the broker. You need to check this with ICMarkets.

Best Regards,

Panagiotis 

Join us on Telegram

 

I have messaged ICMarkets but They are not responding. Can I just ask this - if I use ICMarket one minute data from within cTrader and output the bid price on each bar opening I can see the huge change in price (for the minutes 11:41, 11:42 & 11:43), see below. These are totally wrong I think, but can someone just confirm this please(maybe with another brokers data).

How can I trust data like this? I just happened to notice this discrepancy in price purely by accident, but what other discrepancies are there that are unnoticed that folks are trusting their backtests and optimizations against?

Can anyone recommend ICMArkets and their data? OR a different broker with good data perhaps please?

11:34:00.000 | Bid Price=1.00567
11:35:00.000 | Bid Price=1.00575
11:36:00.000 | Bid Price=1.00573
11:37:00.000 | Bid Price=1.00596
11:39:00.000 | Bid Price=1.00575
11:40:00.000 | Bid Price=1.00575
11:41:00.000 | Bid Price=1.13412
11:42:00.000 | Bid Price=1.1343
11:43:00.000 | Bid Price=1.13427

11:44:00.000 | Bid Price=1.00594
11:45:00.000 | Bid Price=1.00596
11:46:00.000 | Bid Price=1.00592
11:47:00.000 | Bid Price=1.00586
11:48:00.000 | Bid Price=1.0059

Thank you
Dave Wilson


@wilson347