[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 234

 
costy_:

Can't beat that.

Look for an error in .............

The problem is the same - after the calculation the number is much lower than the decimal point, so the indicator goes blank after such a section.
 
Can you advise which function or line in the code is responsible for call of expert's properties (with a window for entering parameters)? I noticed in some experts it is impossible to call this window when it works on a chart, i.e., you can see what parameters are set in the expert only at initial startup, then you can not see what is prescribed there from the chart.
 

Hi!

Can you tell me if there is an operator that can replace the calculation: = iHigh - iLow

to determine the height (length) of a particular bar in pips?

I really need it! )

 
Tancor:

Hi!

Can you tell me if there is an operator that can replace the calculation: = iHigh - iLow

to determine the height (length) of a particular bar in pips?

I really need it! )

Hi!

No! :-)

 
Lonely_man:
Please advise, which function or line in the code is responsible for calling properties of the Expert Advisor (with a window for entering parameters)? I have noticed in some EAs that this window cannot be called when it works on a chart, i.e., to see what parameters are set in the EA, you can only at initial start, then you cannot see what is written there from the chart.
When the Expert Advisor is running in the currency pair window, you'll see a smiley in the upper right corner. Just click on it and a window with input parameters will pop up.
 
paladin80:
When an Expert Advisor works in the currency pair window, you'll see a smiley in the top right corner. Just click on it and a window with parameters will pop up.

The trick is that it doesn't work with all EAs. I want to know why. Below is a screenshot of how the properties window should be open (click on a chart with EAs-advisors>properties>Properties window pops up). The thing is that all normal EAs open (when market is moving too much, not at first, but after 3-4 times), but some EAs open properties window on 20th time (no reaction even after pressing the smiley face).I think it is very difficult to change parameters (or just look at them) to view chart of Expert Advisor every time, so I have to registered something in code.

 

There's a hell of a lot going on. The indicator draws, then it doesn't. I put the code you suggested below mine, although I wondered what the values were. I pulled the indicator onto the chart. It's got a red line on it!!!! It sure does!!! Yay !!!!! And there is a green line, even two, one is just vertical, amazingly, and most importantly there!!!! I have redlined your code, compiled it again, nothing changes.

I added a blue line!!! I compiled - there's a blue line too !!!!!! I changed the timeframe from H1 to M30 All the lines disappeared!!!!!! Yeah, yeah, just disappeared!!! I'm on M15, on H4, again on H1, there are no lines anywhere!!! Wow!!!

I removed the indicator from the chart and put it back on the chart - the devils still did not appear!!! What is it? Here's the chart, here's the indicator on it. Here's the indicator now.

I was getting out of the beginner's question due to the nioble movement that had begun. Of course, I understood what you meant to say - that the points should be filled with values in a row. Thank you very much for the suggestion!

//+------------------------------------------------------------------+
//|                                          поиск вульфа Димона.mq4 |
//|                        Copyright 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window

#property indicator_buffers 3
#property indicator_color1 Green
#property indicator_color2 Red
#property indicator_color3 DarkBlue

double ВерхняячертаBuffer1[];
double НижняячертаBuffer2[];
double СинняячертаBuffer3[];
 double вершина; 
 double основание_первого_снижения;
 double начало;
 double вершина_волны_3;
 
 int timeframe, start ;
 int бар_вершина ;
 int бар_основание_первого_снижения;
 int бар_начало;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()

  {SetIndexStyle(0,DRAW_SECTION,STYLE_SOLID,2,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(0,ВерхняячертаBuffer1);//Alert ("SetIndexBuffer ",GetLastError( ) );
   SetIndexEmptyValue(0,0.0);
   
   SetIndexStyle(1,DRAW_SECTION,STYLE_SOLID,2,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(1,НижняячертаBuffer2);//Alert ("SetIndexBuffer ",GetLastError( ) ); 
   SetIndexEmptyValue(1,0.0);
   
   SetIndexStyle(2,DRAW_SECTION,STYLE_SOLID,2,CLR_NONE);//Alert ("SetIndexStyle ",GetLastError( ) );
  SetIndexBuffer(2,СинняячертаBuffer3);//Alert ("SetIndexBuffer ",GetLastError( ) ); 
   SetIndexEmptyValue(2,0.0);
//---- indicators




//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
//----

  // for(int i=Bars; i>=0;i--)
  int i=Bars;
       бар_вершина=iHighest( NULL,  timeframe, MODE_HIGH, i, start ) ;
       вершина =High[ бар_вершина ];
       бар_основание_первого_снижения=iLowest( NULL,  timeframe, MODE_LOW, бар_вершина, start ) ;
       основание_первого_снижения=Low[ бар_основание_первого_снижения ];
       бар_начало=iLowest( NULL,  timeframe, MODE_LOW, бар_вершина*2, бар_вершина ) ;
       начало=Low[ бар_начало ];
       
      //   Alert ( " бар_вершина   ",бар_вершина  , " вершина  " , вершина ,
      //    " бар_основание_первого_снижения  " ,бар_основание_первого_снижения  , " основание_первого_снижения  " , основание_первого_снижения , 
      //    " бар_начало  " , бар_начало   , " начало  " , начало    );
  
    НижняячертаBuffer2[бар_начало]=начало;
    НижняячертаBuffer2[бар_основание_первого_снижения]=основание_первого_снижения;
    
     int бар_проверка=iLowest( NULL,  timeframe, MODE_LOW, 5, 150 ) ;
     double проверка=Low[ бар_проверка ];
    ВерхняячертаBuffer1[бар_проверка]=проверка;
    ВерхняячертаBuffer1[бар_основание_первого_снижения]=основание_первого_снижения;
   // Alert ( " бар_проверка   ",бар_проверка  , " проверка  " , проверка );
    
 //   ВерхняячертаBuffer1[0]=25;
//ВерхняячертаBuffer1[1]=25;
//ВерхняячертаBuffer1[2]=25;
//ВерхняячертаBuffer1[3]=25;
//ВерхняячертаBuffer1[4]=25;
//ВерхняячертаBuffer1[5]=25;
//ВерхняячертаBuffer1[6]=25;
//ВерхняячертаBuffer1[7]=25;
//ВерхняячертаBuffer1[8]=25;
//ВерхняячертаBuffer1[9]=25;
//ВерхняячертаBuffer1[10]=25;
//ВерхняячертаBuffer1[11]=25;
         for (i=0;i<100;i++){  СинняячертаBuffer3[i]= Open[i];}
          for (i=330;i<500;i++){  СинняячертаBuffer3[i]= Open[i];}

    
//----
   return(0);
  }
//+------------------------------------------------------------------+
 
MikeM:
I useDRAW_LINE. I have a misunderstandingwith DRAW_SECTION.

Thank you!!! I'll give it a try. Wait, what's there to try? Line is a solid line and it needs to be filled exactly element by element, but it's a totally different song - I already figured it out after 15 seconds.
 
Lonely_man:
Please tell me, which function or line in the code is responsible for calling properties of expert (the input parameters box)? I noticed in some EAs it is impossible to call this window when it works on a chart, i.e., you can see what parameters are set in the EA only at initial startup, then you can't see what is written there from the chart.

If the properties window is not called during operation - then the Expert Advisor works in a looped mode
 
High1 = iHigh (Symbol(), PERIOD_W1, 0); // максимум этой недели
Low1 = iLow (Symbol(), PERIOD_W1, 0); // минимум этой недели

There is such a thing in the Expert Advisor, on the demo and on the real all is well, but I would like to run the code in the tester, but in the maximum time frame D1, how to write a function, if possible, that would make the maximum and minimum data of the current week were still in the tester?

Reason: