Delete indicator automatically after run EA on strategy tester

To add comments, please log in or register
Mohammad Aghaali
1462
Mohammad Aghaali  

Hello

1-As a title How can i delete indicator automatically after run EA on strategy tester ?

   I mean use code in on deinit !

2-When i use indicator in my EA and run it on strategy tester , after tester end it draw indicator on chart !, is it possible change it that nor draw on chart ?

Thanks

Stanislav Korotky
26900
Stanislav Korotky  

Forum on trading, automated trading systems and testing trading strategies

HideTestIndicators function in MQL5

Young Ho Seo, 2016.01.29 12:17

I also wrote service desk if they are planning to implement   HideTestIndicators function.

Their short answer was "No".

Just sharing some information I got.

Using IndicatorsRelesae function will not have exact same functionality as HideTestIndicators function.

Disabling visual mode isn't very elegant solution either. T T

So there is nothing we can do.

Regards.




Mohammad Aghaali
1462
Mohammad Aghaali  
Stanislav Korotky:

Thanks for your answer

and do you know answer for other question

   I mean use code in on deinit !

like code that used for delete object after close EA
Alain Verleyen
37483
Alain Verleyen  
I like the software but Their is one major flaw...
If you have the software set to be take multiple trades... Let say with the t/p at 20 - it lookslike the it will set the t/p between 20 and 200 pips or up to 10x the t/p setting (let me know if i'm correct).

The problem comes in when the software takes the second or subsequent trades. My experience is that the second t/p will be the same distance away as the the first trade.

So when the subequent hits the T/P it results in a loss.

When I realized this I've had to turn off "live trading" for that pair and manually adjust the the t/p.

The other thing I've done is change the setting to only 1.

Can you fix this and send an update?
Jose Francisco Casado Fernandez
5319
Jose Francisco Casado Fernandez  
Alain Verleyen:
I love your comment,   lol.
Stanislav Korotky
26900
Stanislav Korotky  
Jose Francisco Casado Fernandez:
I love your comment,   lol.

This was/is a bug of the site. Many comments were emptied automatically.

Marco vd Heijden
Moderator
8831
Marco vd Heijden  

You can just add 10 more moving averages and psar, bands,gator and etc...so that they will have to figure out which one you are using.

Osama Shaban
1554
Osama Shaban  

Here is the solution I use ...

   HideTestIndicators(true); 
   double MA1c = iMA(Symbol(),TimeFrame,ma1Period,0,MODE_EMA,PRICE_CLOSE,0);
   double MA2c = iMA(Symbol(),TimeFrame,ma2Period,0,MODE_EMA,PRICE_CLOSE,0);
   double MA1p = iMA(Symbol(),TimeFrame,ma1Period,0,MODE_EMA,PRICE_CLOSE,1);
   double MA2p = iMA(Symbol(),TimeFrame,ma2Period,0,MODE_EMA,PRICE_CLOSE,1);
   double RSI  = iRSI(Symbol(),TimeFrame,rsiPeriod,PRICE_CLOSE,0);
   HideTestIndicators(false); 

If you do the same as above, indicators will not show after the the back-test finish or stopped.

As a result, no one can know what indicators you are using. I suppose this is what you are looking for.

Stanislav Korotky
26900
Stanislav Korotky  
Osama Shaban:

Here is the solution I use ...

If you do the same as above, indicators will not show after the the back-test finish or stopped.

As a result, no one can know what indicators you are using. I suppose this is what you are looking for.

The question was about MT5. The method you mentioned works in MT4 only.

Alain Verleyen
37483
Alain Verleyen  
Jose Francisco Casado Fernandez:
I love your comment,   lol.

Yeah I am really funny :-)

If I remember well I was saying something like :

You can code your indicator(s) to no draw anything.

nikkirachael
10
nikkirachael  
It Eventually got implemented, check Here 
TesterHideIndicators(true);
To add comments, please log in or register