if an expert use several indicator, can do something to don't draw/show them in strategy tester ?

 
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
Documentation on MQL5: MQL5 programs / Testing Trading Strategies
  • www.mql5.com
MQL5 programs / Testing Trading Strategies - Documentation on MQL5
 

thank you to reply; ( and thank you for lik )

i had before only used ; 

//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping for ATR   
   SetIndexBuffer(0,ATR_Buffer,INDICATOR_DATA);
   ATR_Handle = iATR(_Symbol, _Period, ATR_Period );
   if(ATR_Handle<0)
     {
      Alert("Error Creating Handles for indicators - error: ",GetLastError(),"!!");
      return(-1);
     }
//--- 
   return(0);
  }
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   Comment("");
     IndicatorRelease(ATR_Handle);
  }
//+------------------------------------------------------------------+
void OnTick()
  {
.
 .    
   ArraySetAsSeries(ATR_Buffer,true);    //  Array for ATR
   int copy_ATR=CopyBuffer(ATR_Handle, 0, 0, 200, ATR_Buffer);
   .
.

and i correct it to this :

//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping for ATR   
   SetIndexBuffer(0,ATR_Buffer,INDICATOR_DATA);
   ATR_Handle = iATR(_Symbol, _Period, ATR_Period );
   if(ATR_Handle<0)
     {
      Alert("Error Creating Handles for indicators - error: ",GetLastError(),"!!");
      return(-1);
     }
//--- 
   return(0);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   NUMBER_OF_PENDING_ORDER=0;
   Comment("");
   bool hidden=IndicatorRelease(ATR_Handle);
   if(hidden) Print("IndicatorRelease() successfully completed");
   else Print("IndicatorRelease() returned false. Error code ",GetLastError());
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
.
. 
   ArraySetAsSeries(ATR_Buffer,true);    //  Array for ATR
   int copy_ATR=CopyBuffer(ATR_Handle, 0, 0, 200, ATR_Buffer);
//--- free the handle of the indicator
   if(!IndicatorRelease(ATR_Handle)) Print("IndicatorRelease() failed. Error ",GetLastError());   
   .
.

and i get this error :   

ERR_FUNCTION_NOT_ALLOWED

4014

System function is not allowed to call

can you please check what is wrong ?

thank you.

 
TIMisthebest:

thank you to reply; ( and thank you for lik )

i had before only used ; 

and i correct it to this :

and i get this error :   

ERR_FUNCTION_NOT_ALLOWED

4014

System function is not allowed to call

can you please check what is wrong ?

thank you.

IndicatorRelease() doesn't work in Visual Mode of Strategy Tester.
 
angevoyageur:
IndicatorRelease() doesn't work in Visual Mode of Strategy Tester.


oh yes you get it,

so, there is no solution.

thank you.

 
TIMisthebest:


oh yes you get it,

so, there is no solution.

thank you.

Indeed, I already asked explanation to Service Desk, and got following answer :

You cannot release indicators in the visual mode...

This behavior was implemented from begin of visual testing and will not changed

 
angevoyageur:
thank you for all.
 
TIMisthebest:

hello

if an expert use several indicator, can do something to don't draw/show them in strategy tester ?

thank's in advance.

What about setting their colour to CLR_NONE ?  assuming you have access to the Indicators code.
Documentation on MQL5: Standard Constants, Enumerations and Structures / Named Constants / Other Constants
Documentation on MQL5: Standard Constants, Enumerations and Structures / Named Constants / Other Constants
  • www.mql5.com
Standard Constants, Enumerations and Structures / Named Constants / Other Constants - Documentation on MQL5
 
RaptorUK:
What about setting their colour to CLR_NONE ?  assuming you have access to the Indicators code.

interesting; i will chek

and is there possible to change the height of those seperate window ( may be we have several indicator),in order  to release screen ?

& thank to reply.

 
TIMisthebest:

interesting; i will chek

and is there possible to change the height of those seperate window ( may be we have several indicator),in order  to release screen ?

& thank to reply.

In your indicator you can use something like :

   IndicatorSetInteger(INDICATOR_HEIGHT,0);
 
thank you both.