which is the difference between IsTesting( ) or IsOptimization( ) function?
Sorry Rush but In the article there are no references to those functions.
I want to know Which is the difference between IsTesting() and IsOptimizing() functions ?
For me are the same return or no?
I want write a condition in my code that understand if code is running in real time mode or in optimizzation (or testing) mode
eugenio
Here is template:
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
if (IsTesting()&& !IsOptimization())
{
int i,limit=OrdersHistoryTotal()-1;
for (i=limit;i>-0;i--)
{
if (OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) OrderPrint();
}
}
//----
return(0);
}
Optimizing is a subset of testing; you can be testing without optimizing and you use them to tell the difference. For example, there are display objects I use in my EA when it's running live on a pair, but there's no reason to run them if I'm testing or optimizing, so I shut the routine off using IsTesting() and just run it once at the end. I want it off whether I'm optimizing or not. However, if I wanted to keep stats on what the program was doing for different values in parameters while I was optimizing, I'd only run that when IsOptimizing() was true - it would make no sense to run it with just a single run if IsTesting() was true, or if it was running live.
which is the difference between IsTesting( ) or IsOptimization( ) function?
eugenio