Market Quality Tester

 

I think about a market  quality tester in mql5, but have no exact idea to do it. It should show when the market is very nervous and tell you when it is better to stay out of this market.

I lost yesterday in the nervous market (Friday 12.10.2018). My shorts got stopped out by the big rebounds, ADX or ATR were usless to me in such nervous markets. There must have been extremely many ticks per minute.

I tested Dow Jones from Yesterday with the Tester. The wildest minutes showed more that 600 ticks per minute in the tester with the following code snippet.


void OnTick()
  {
//---
 //+------------------------------------------------------------------+
//| New Bar Check                                  |
//+------------------------------------------------------------------+
  
  //Simple varant of New Bar Check from https://www.mql5.com/en/forum/81184
   static int ticks_per_bar=0;  //Counter ticks per bar

   static int prev_bars=-1;
   int bars;

   bars=Bars(Symbol(),Period());
   if(bars==prev_bars) // no need to update
     {
     ticks_per_bar++;     
     return;  //Exit OnTick after counting
     }
      
   prev_bars=bars;   //
   Print("Ticks Per Bar: "+IntegerToString(ticks_per_bar));
   
   ticks_per_bar=0;  //Reset counter   
  }



Time ist MESZ-1, at 15:46, 16 Minutes after opening of Dow Jones we had 675 ticks per minute. It seems to be very much. 

May be to write a tick per minute indicator combined with the calculation of some standard deviation would be helpful.

Somebody here with expericene of measuring market qualtiy?