confusing in backtest

 

hi everyone

i had wrote a EA in mt5(mql5), that my codes include ZigZag indicator#

so when i perform strategy tester and run backtest when the display mode is active the graph and result are good, but when it is disable the graph goes down and result is bad !!!

where is the problem?

please help me , thanks

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
 

Sorry but that's the reality of your EA in the longterm period. 

The first 20 trades can be wins, and then it starts losing. Welcome to the painful world of making a profitable EA! The graph is providing the truth of the backtest, as well as the backtest information.

 
masoodbabagoli:

i had wrote a EA in mt5(mql5), that my codes include ZigZag indicator#

so when i perform strategy tester and run backtest when the display mode is active the graph and result are good, but when it is disable the graph goes down and result is bad !!!

where is the problem?

Here is one possible reason - https://www.mql5.com/en/book/applications/indicators_make/indicators_test:

In the tester the indicators are calculated on each tick under any of the following conditions:

The indicator developer should pay attention to the fact that without visualization, the tester uses an accelerated calculation method for indicators called from Expert Advisors. The data is not calculated at every tick, but only when the relevant data is requested from indicator buffers (see the CopyBuffer function).
MQL5 Book: Creating application programs / Creating custom indicators / Testing indicators
MQL5 Book: Creating application programs / Creating custom indicators / Testing indicators
  • www.mql5.com
The built-in MetaTrader 5 tester supports two types of MQL programs: Expert Advisors and Indicators. Indicators are always tested in the visual...
 
Stanislav Korotky #:

In the tester the indicators are calculated on each tick under any of the following conditions:

The indicator developer should pay attention to the fact that without visualization, the tester uses an accelerated calculation method for indicators called from Expert Advisors. The data is not calculated at every tick, but only when the relevant data is requested from indicator buffers (see the CopyBuffer function).

I would like to find this text ^ in the book, but I couldn't find it at the link provided

 
Stanislav Korotky #:

Here is one possible reason - https://www.mql5.com/en/book/applications/indicators_make/indicators_test:

the link that you mentioned does not exist


and one other thing when i run back test with visual mode enable it takes a lot of time

please help me

 
Conor Mcnamara #:

Sorry but that's the reality of your EA in the longterm period. 

The first 20 trades can be wins, and then it starts losing. Welcome to the painful world of making a profitable EA! The graph is providing the truth of the backtest, as well as the backtest information.

i know that making profitable EA is hard ,you do not understand what i said
 
masoodbabagoli #:
i know that making profitable EA is hard ,you do not understand what i said

Then rewrite your post, or nobody will understand what you're saying.

This is what I got from your post:

"When visual mode is enabled, the results are good. When visual mode is disabled, the results are bad as seen on the graph"

 
Conor Mcnamara #:

Then rewrite your post, or nobody will understand what you're saying.

This is what I got from your post:

"When visual mode is enabled, the results are good. When visual mode is disabled, the results are bad as seen on the graph"

So what the hell is "display mode" what are you talking about then?

Btw, there is no graph to be seen when running it on visual mode.

i mean visual mode as display mode
 
masoodbabagoli #:

the link that you mentioned does not exist

There is a problem with formatting of inline link in that post (I don't know why) - unfortunately I can't edit posts - ask moderators.

But the same link with proper formatting is provided in a dedicated box at the bottom of that same post, like this - https://www.mql5.com/en/book/applications/indicators_make/indicators_test

|

|

V

MQL5 Book: Creating application programs / Creating custom indicators / Testing indicators
MQL5 Book: Creating application programs / Creating custom indicators / Testing indicators
  • www.mql5.com
The built-in MetaTrader 5 tester supports two types of MQL programs: Expert Advisors and Indicators. Indicators are always tested in the visual...
 
Conor Mcnamara #:

I would like to find this text ^ in the book, but I couldn't find it at the link provided

Please, start to read from the beginning and the quoted fragments will appear among first 10 paragraphs.

 
masoodbabagoli #:

the link that you mentioned does not exist


and one other thing when i run back test with visual mode enable it takes a lot of time

please help me

there's a button you can drag left and right to speedup the backtest process mate, rather thn that generally nothing else can help you speedup the time.