A question for MQL connoisseurs - page 7

 

If you have encountered similar problem: When testing EAs in the log first few lines like "2010.08.18 22:23:37 TestGenerator: unmatched data error (volume limit 32 at 2010.08.18 21:15 exceeded)" and "Do not enter" icon (from traffic rules) appear. And then there are strings of information as the test progresses. Is this a problem with the DC server or is this something wrong with the Expert Advisor?

 

This usually happens if the start and end dates of the test are incorrectly set.

Or, at the start of the test, incorrect quotes (or lack thereof), - holes, missing bars at different timeframes, etc...

 
pathfinder1:

If you have encountered similar problem: When testing EAs in the log first few lines like "2010.08.18 22:23:37 TestGenerator: unmatched data error (volume limit 32 at 2010.08.18 21:15 exceeded)" and "Do not enter" icon (from traffic rules) appear. And then there are strings of information as the test progresses. Is this a problem with the DC server or is this something wrong with the Expert Advisor?

And for fun: do a site search with the query "TestGenerator: unmatched data error", and then tell us.
 

Debri... The volume limit varies from 32 to 4826 . But it looks like the history is not formed. I set a different time period and it's OK.

 

1) reload the history, first using the "Page Ap" button, then through the Quote History, recalculate all TFs, go into the tester/history and erase all files - should be ok, or you have a hole in the history, then delete all the history, and perform all operations.

 

Good afternoon everyone!

Another question about the triangle in the indicator window.

I have achieved a normal triangle drawing - with the tip towards the convergence.

But I do not understand,

1. How do I set the colour of the triangle in the function

ObjectCreate("TRIANGLE", OBJ_TRIANGLE,WindowFind(WindowExpertName()), 
         level_1, delta_1,  level_2,delta_2,    level_3,delta_3); 

if there is no colour option?

2. I don't change the direction of the triangle when I change the convergence/divergence of the lines.

I set the code like this:

 datetime  level_1, level_2, level_3;

if ( MathAbs(Symbol1[1]-SymbolS[1]) > MathAbs(Symbol1[0]-SymbolS[0]) ) {
//если имеет место  схождение линий SUM-RDX, задаем переменные для 
// вершины треугольника вправо-  
        level_1=Time[0]+3500;  delta_1= 0.1;
        level_2=Time[0]+3500;  delta_2=-0.1;
        level_3=Time[0]+10500;  delta_3   =0;  
 }       
if ( MathAbs(Symbol1[1]-SymbolS[1]) <= MathAbs(Symbol1[0]-SymbolS[0]) )
{//если имеет место  расхождение линий SUM-RDX, задаем переменные для
// вершины треугольника влево -      
       level_1=Time[0]+3500;  delta_1=0;
       level_2=Time[0]+10500;  delta_2=0.1;
       level_3=Time[0]+10500;  delta_3=-0.1;
  } 
  //==задаем отрисовку треугольника ===================                  
ObjectCreate("TRIANGLE", OBJ_TRIANGLE,WindowFind(WindowExpertName()), 
              level_1, delta_1 ,level_2,delta_2,level_3,delta_3); 

But here I am in the tester now, running the inductor and I can see that the triangle itself has not changed the configuration when I change the convergence to divergence. Moreover, the triangle itself "went" to the left together with "its" place of initial setting (binding) ! Please advise what the error could be ?

Deinit is set.

int deinit()  {
ObjectDelete("TRIANGLE");
   return(0);  }
 

1. objectSet( name, OBJPROP_COLOR, col); // name - object name, col - object colour

2. to change coordinate values, use

ObjectSet(name, OBJPROP_PRICE1, price1);
ObjectSet(name, OBJPROP_PRICE2, price2);
ObjectSet(name, OBJPROP_PRICE3, price3);
ObjectSet(name, OBJPROP_TIME1, time1);
ObjectSet(name, OBJPROP_TIME2, time2);
ObjectSet(name, OBJPROP_TIME3, time3);

 

Thank you, keekkenen!

Did as you wrote. Everything works as it should !!!

 

Good afternoon everyone.

Could you please tell me how to make the price line in the indicator window (see fig. above) change colour on a change in direction ?

I don't even know how to solve this problem.

I did it like this:

 color Color_C ;
 double BufW[];

int init() {
    
  SetIndexStyle(4,DRAW_LINE,STYLE_DOT,2,Color_C);
  SetIndexBuffer(4,BufW);
  SetIndexLabel(4,"Channel width");
  return(0);
               }
int start() {
  
  //------------------------------------------------------------------ 
  // Отрисовка ценовых линий: рисуем и синхронизируем по наличию баров
  for(int i=0; i<limit; i++) { 
.... .... ... 
    BufW[i]=(iMA(Symbol3.Name,Period(),MA........ .... );
                             }  // Конец отрисовки ценовых линий

if( BufW[i-1] => BufW[i] )   Color_C = Green;
  else  Color_C = Red;


But it doesn't work.

 

SetIndexStyle(4,DRAW_LINE,STYLE_DOT,2,Color_C);
SetIndexBuffer(4,BufW);
SetIndexLabel(4,"Channel width");

SetIndexStyle( 5,DRAW_LINE,STYLE_DOT,2,Color_X);
SetIndexBuffer( 5,BufX);
SetIndexLabel( 5,"Channel width");

..............

......................

double ma=iMA(...................,................,i);

double ma1=iMA(......,...............,...........I+1);

if(ma>ma1)

BufW=ma;

else

BufX=ma;