how to run a test with daily bars only

 

HI all, I loaded a daily historical series for a Custom Symbol.

I haven't lower time frames.

I would like to test a strategy on D1 time frame, because it only needs Open High Low and Close daily prices, but I seem it's not possible with MT5 strategy tester, could you confirm?

Is there a way to run the test without lower frames? 

Thank you!

 
Alberto Tortella:I haven't lower time frames.
MT5 only has one-minute data. It generates all other timeframes from that.
 
Alberto Tortella:

HI all, I loaded a daily historical series for a Custom Symbol.

I haven't lower time frames.

I would like to test a strategy on D1 time frame, because it only needs Open High Low and Close daily prices, but I seem it's not possible with MT5 strategy tester, could you confirm?

Is there a way to run the test without lower frames? 

Thank you!

Maybe in math test mode where you run the entire test on your own.

Its not difficult to create a simulator 

 
Alberto Tortella:
daily historical

not possible to update daily historical since it only support M1 data. How did you update daily data D1 bars?



 

Even if you could, you don't actually want to do that unless your strategy will only ever open and close trades at the creation of a new daily bar. The reason is actually rather simple, if you only look at daily OHLC the Open, High, Low prices are effectively ignored, as no trade would be triggered by those values, and you're left with one single price update per day.

Say you start the day at $1, price goes to $2, then $3, then closes at $0.50. The only thing the tester sees is that you started the day at $1 and ended at $0.50. All the other things that happened intra-day are ignored. You had a TP set at $3 and a SL at $0.50? Guess what, that winning trade is now reporting as a loss. OR say you went short, TP at $0.50 and SL at $3. Your SL gets hit but the trade shows up as a win.

With modern compute you should ALWAYS be using tick data and nothing less. When I started trading and things like multi-core CPU's didn't even exist, yeah people took short cuts (so as to not wait like weeks for the test to finish) and kind of accepted that the back test wouldn't be all that accurate. These days there's absolutely no reason to be taking those short cuts and you should always use "tick data based on real ticks". Not "tick data" as that's just OHLC values with generated (fake) ticks.

The only exception to this rule that I can think of would be if you're using a non-standard chart like line break to execute trades and you're not using a SL or TP value. Then your trades would only open and close when a new bar is created and your testing would be accurate while using only daily OHLC values; but for 99% of cases, it would only harm yourself to use daily OHLC.

 
Rajesh Kumar Nait #:

not possible to update daily historical since it only support M1 data. How did you update daily data D1 bars?



I load D1 bars with the specific function in Symbols.

 
James McKnight #:

Even if you could, you don't actually want to do that unless your strategy will only ever open and close trades at the creation of a new daily bar. The reason is actually rather simple, if you only look at daily OHLC the Open, High, Low prices are effectively ignored, as no trade would be triggered by those values, and you're left with one single price update per day.

Say you start the day at $1, price goes to $2, then $3, then closes at $0.50. The only thing the tester sees is that you started the day at $1 and ended at $0.50. All the other things that happened intra-day are ignored. You had a TP set at $3 and a SL at $0.50? Guess what, that winning trade is now reporting as a loss. OR say you went short, TP at $0.50 and SL at $3. Your SL gets hit but the trade shows up as a win.

With modern compute you should ALWAYS be using tick data and nothing less. When I started trading and things like multi-core CPU's didn't even exist, yeah people took short cuts (so as to not wait like weeks for the test to finish) and kind of accepted that the back test wouldn't be all that accurate. These days there's absolutely no reason to be taking those short cuts and you should always use "tick data based on real ticks". Not "tick data" as that's just OHLC values with generated (fake) ticks.

The only exception to this rule that I can think of would be if you're using a non-standard chart like line break to execute trades and you're not using a SL or TP value. Then your trades would only open and close when a new bar is created and your testing would be accurate while using only daily OHLC values; but for 99% of cases, it would only harm yourself to use daily OHLC.

It depends form the strategy you want to test.

If you place a buy order at previous high break, and place the stop at previous day low, then you are not interested in what happens during the day. You consider slippage and transaction costs instead of spread. 

This is how it work with other software, Python or Multicharts for instance.

 
Alberto Tortella #:

I load D1 bars with the specific function in Symbols.

As in my knowledge there is no specific function which allows loading d1 data directly. Can you explain which specific functions you are discussing?
 

I selected Daily as time frame and used Import Bars button.

image

 
Alberto Tortella #:

I selected Daily as time frame and used Import Bars button.


Oh ok this is about importing bars. If your import is successful then without no problem you can test your strategy on D1 timeframe. Few things to check if that it's crimson color it means data may not have been imported. Must verify. Second thing to note is that you must have enough bars required with your strategy. Then all will be fine. If nothing works, import it as m1 bar and simulate your strategy considering its d1 bar.
 

The crimson problem is due to volume and spread columns. If I fill them, then the row turns to green.

I'm trying with example expert Moving Average.ex5 and I seem it works properly.

green