Download MetaTrader 5

Tester > Execution types

To add comments, please log in or register
Launch your trading signal. Make profit from paid subscription!
Troub
10
Troub 2011.02.01 23:10 

Hello,

I've a problem to understand the deep process of the execution types...

Today I've a system based on bid and ask movements - with no indicators - updated at each tick. When I use tester optimisation, I've very stable trading system with 1mnOHLC solution. But if I use every tick or open execution type, on a 1mn timeframe, I've bad results. I don't understand the meaning of this situation and, of course, the system has bad result in realtime paper trading. To highlight the situation, I precise that it is not a scalping system but a TP/SL 200/200 system.

My questions :

1 -  Does 1mnOHLC significant ? How does it use ? Why do I have very stable results in this situation ?? How can I modify trading system to approach in realtime the same result ??

2 -  What can I have (very) different results in M1 timeframe with these different execution types ?!?

3 - In particular, how can I have very different result when I compare 1mnOHLC/Open execution with M1 timeframe ?!? In both reports, I've the same number of tick bar...  

If you can highlight me... 

Troub
10
Troub 2011.02.02 22:50  

So, any answers ? My questions are too naives ? Too complex !?!

Stephen Njuki
5179
Stephen Njuki 2011.02.03 21:50  
Troub:

So, any answers ? My questions are too naives ? Too complex !?!

Hi

try placing your orders only on the formation of a new bar... and not on tick.

Troub
10
Troub 2011.02.04 14:35  

Thank you.

I don't know how to do this, but I try... 

NFTrader
600
NFTrader 2011.02.04 15:34  
Troub:

Thank you.

I don't know how to do this, but I try... 

//+------------------------------------------------------------------+
//| Return true if a new bar appears for the symbol/period pair      |
//+------------------------------------------------------------------+
bool isNewBar()
  {
//--- remember the time of opening of the last bar in the static variable
   static datetime last_time=0;
//--- current time
   datetime lastbar_time=SeriesInfoInteger(Symbol(),Period(),SERIES_LASTBAR_DATE);

//--- if it is the first call of the function
   if(last_time==0)
     {
      //--- set time and exit
      last_time=lastbar_time;
      return(false);
     }

//--- if the time is different
   if(last_time!=lastbar_time)
     {
      //--- memorize time and return true
      last_time=lastbar_time;
      return(true);
     }
//--- if we pass to this line then the bar is not new, return false
   return(false);
  }

This is how you do it. 

The above code was copied from https://www.mql5.com/en/articles/22#check_new_bar 

Limitations and Verifications in Expert Advisors
  • 2010.08.03
  • MetaQuotes Software Corp.
  • www.mql5.com
Is it allowed to trade this symbol on Monday? Is there enough money to open position? How big is the loss if Stop Loss triggers? How to limit the number of pending orders? Was the trade operation executed at the current bar or at the previous one? If a trade robot cannot perform this kind of verifications, then any trade strategy can turn into a losing one. This article shows the examples of verifications that are useful in any Expert Advisor.
To add comments, please log in or register