why backtesting daily chart open value is start at 21:00?

Created at 20 Jul 2014, 19:16
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!
TO

TonyPro

Joined 18.07.2014

why backtesting daily chart open value is start at 21:00?
20 Jul 2014, 19:16


I want to backtest daily data during 2013 ~2014, but the problem is after I point the cursor to one daily bar, the daily info at the bottom bar is wrong. Specifically, the open time start from 21:00, and the open price is 21:00 hour open price, instead of daily open price. but the chart I'm using is daily chart, is this a bug of cTrader?


@TonyPro
Replies

Spotware
21 Jul 2014, 14:58

RE:

Daily bars are aggregated by 17:00 EST which is equal to 21:00 UTC. That's why you see such results.

It is a standard for financial markets to calculate new financial day after closing of american market session.

TonyPro said:

I want to backtest daily data during 2013 ~2014, but the problem is after I point the cursor to one daily bar, the daily info at the bottom bar is wrong. Specifically, the open time start from 21:00, and the open price is 21:00 hour open price, instead of daily open price. but the chart I'm using is daily chart, is this a bug of cTrader?

 


@Spotware

TonyPro
21 Jul 2014, 17:50

RE: RE:

Can I set the daily bars start time to 00:00 EST? because my strategy is based on that time.

Spotware said:

Daily bars are aggregated by 17:00 EST which is equal to 21:00 UTC. That's why you see such results.

It is a standard for financial markets to calculate new financial day after closing of american market session.

TonyPro said:

I want to backtest daily data during 2013 ~2014, but the problem is after I point the cursor to one daily bar, the daily info at the bottom bar is wrong. Specifically, the open time start from 21:00, and the open price is 21:00 hour open price, instead of daily open price. but the chart I'm using is daily chart, is this a bug of cTrader?

 

 


@TonyPro

Spotware
21 Jul 2014, 18:11

RE: RE: RE:

Daily bars start at 17:00 EST and it's not up to cAlgo to change that time.

If you need daily bars to open at 00:00 than you need to specify TimeZone of your cBot. 

using cAlgo.API;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.EEuropeStandardTime, AccessRights = AccessRights.None)]
    public class BarOpen : Robot
    {
        protected override void OnStart()
        {
            Print(MarketSeries.OpenTime.LastValue);
        }
    }
}

will give you: 21.07.2014 0:00:00 

 

TonyPro said:

Can I set the daily bars start time to 00:00 EST? because my strategy is based on that time.

Spotware said:

Daily bars are aggregated by 17:00 EST which is equal to 21:00 UTC. That's why you see such results.

It is a standard for financial markets to calculate new financial day after closing of american market session.

TonyPro said:

I want to backtest daily data during 2013 ~2014, but the problem is after I point the cursor to one daily bar, the daily info at the bottom bar is wrong. Specifically, the open time start from 21:00, and the open price is 21:00 hour open price, instead of daily open price. but the chart I'm using is daily chart, is this a bug of cTrader?

 

 

 


@Spotware

TonyPro
29 Jul 2014, 19:41 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE: RE: RE:

The problem is cTrader chart and MT4 chart aren't same for the same trading day. even though I have wrote the same strategy as MT4 using C#, it doesn't work because the difference of two charts. but I know that the datas are same for both of charts. Is there any way to fix it?

Spotware said:

Daily bars start at 17:00 EST and it's not up to cAlgo to change that time.

If you need daily bars to open at 00:00 than you need to specify TimeZone of your cBot. 

using cAlgo.API;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.EEuropeStandardTime, AccessRights = AccessRights.None)]
    public class BarOpen : Robot
    {
        protected override void OnStart()
        {
            Print(MarketSeries.OpenTime.LastValue);
        }
    }
}

will give you: 21.07.2014 0:00:00 

 

TonyPro said:

Can I set the daily bars start time to 00:00 EST? because my strategy is based on that time.

Spotware said:

Daily bars are aggregated by 17:00 EST which is equal to 21:00 UTC. That's why you see such results.

It is a standard for financial markets to calculate new financial day after closing of american market session.

TonyPro said:

I want to backtest daily data during 2013 ~2014, but the problem is after I point the cursor to one daily bar, the daily info at the bottom bar is wrong. Specifically, the open time start from 21:00, and the open price is 21:00 hour open price, instead of daily open price. but the chart I'm using is daily chart, is this a bug of cTrader?

 

 

 

 


@TonyPro

Spotware
30 Jul 2014, 09:30 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE: RE: RE: RE:

Is it one broker for both platforms?

TonyPro said:

The problem is cTrader chart and MT4 chart aren't same for the same trading day. even though I have wrote the same strategy as MT4 using C#, it doesn't work because the difference of two charts. but I know that the datas are same for both of charts. Is there any way to fix it?

Spotware said:

Daily bars start at 17:00 EST and it's not up to cAlgo to change that time.

If you need daily bars to open at 00:00 than you need to specify TimeZone of your cBot. 

using cAlgo.API;

namespace cAlgo
{
    [Robot(TimeZone = TimeZones.EEuropeStandardTime, AccessRights = AccessRights.None)]
    public class BarOpen : Robot
    {
        protected override void OnStart()
        {
            Print(MarketSeries.OpenTime.LastValue);
        }
    }
}

will give you: 21.07.2014 0:00:00 

 

TonyPro said:

Can I set the daily bars start time to 00:00 EST? because my strategy is based on that time.

Spotware said:

Daily bars are aggregated by 17:00 EST which is equal to 21:00 UTC. That's why you see such results.

It is a standard for financial markets to calculate new financial day after closing of american market session.

TonyPro said:

I want to backtest daily data during 2013 ~2014, but the problem is after I point the cursor to one daily bar, the daily info at the bottom bar is wrong. Specifically, the open time start from 21:00, and the open price is 21:00 hour open price, instead of daily open price. but the chart I'm using is daily chart, is this a bug of cTrader?

 

 

 

 

 


@Spotware

TonyPro
30 Jul 2014, 10:23

RE: RE: RE: RE: RE: RE:

yes, it is. and each tick price is same for mt4 and ctrader , but the daily bar isn't same.


@TonyPro

Spotware
30 Jul 2014, 10:53

RE: RE: RE: RE: RE: RE: RE:

As far as we see from your screenshot in MT4 you have extra candle on weekend day. Trading session in cTrader is configured to end on Friday and to start on Monday.

You should clarify about trading session configuration with your broker.

 

TonyPro said:

yes, it is. and each tick price is same for mt4 and ctrader , but the daily bar isn't same.

 


@Spotware

TonyPro
30 Jul 2014, 11:00

RE: RE: RE: RE: RE: RE: RE: RE:

you are right. MT4 start on Sunday in my broker. I think I should ask my broker to adjust the time of cTrader.

Spotware said:

As far as we see from your screenshot in MT4 you have extra candle on weekend day. Trading session in cTrader is configured to end on Friday and to start on Monday.

You should clarify about trading session configuration with your broker.

 

TonyPro said:

yes, it is. and each tick price is same for mt4 and ctrader , but the daily bar isn't same.

 

 


@TonyPro