Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 79

 
Gevorg Hakobyan:
Yes, of course.
Is it in the market review?
 
Gevorg Hakobyan:
Yes, of course.
#property strict
Do you use ?
 
Vladimir Zubov:
#property strict
Do you use it?
I do.
 
I even tested the indicator myself in mt4, there is no such error.
 
Gevorg Hakobyan:
I even tested the indicator myself in mt4, I don't see such an error.
Maybe the symbol is not exactly"GBPNZD", but for example with some suffix"GBPNZDm"?
 
Vitaly Muzichenko:
Maybe the symbol is not quite"GBPNZD" but with some suffix"GBPNZDm", for instance?
Then another part of the code would return an error: "error:unknown symbol".
 
Alekseu Fedotov:

Whatever, you can do it on the icon.

throw the fractals on the chart and hover the mouse over the icon

Sorry, I'm very nerdy - I don't understand it very well.
Maybe you have the simplest indicator with a code of some, I have an analogy to understand? Because I couldn't find one.

I have a very simple code that puts the dots in the middle of the bar. How do I make it so that when I hover over them, a text appears, or a box, whatever.



#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Black
//---- input parameters
//---- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,159);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexEmptyValue(0,0.0);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int counted_bars=IndicatorCounted();
   int limit=Bars-counted_bars;
//----  
   for(int i=limit; i>=0; i--)
     {
      double       fabody0 = fabs(Close[i]-Open[i]);
      double       fabody1 = fabs(Close[i+1]-Open[i+1]);
      double       fabody2 = fabs(Close[i+2]-Open[i+2]);
      double       fabody3 = fabs(Close[i+3]-Open[i+3]);
      double       fabody4 = fabs(Close[i+4]-Open[i+4]);
      double       fabody5 = fabs(Close[i+5]-Open[i+5]);
      double       fabody6 = fabs(Close[i+6]-Open[i+6]);
      double       fabody7 = fabs(Close[i+7]-Open[i+7]);
      if((fabody0>fabody1) && (fabody0>fabody2) && (fabody0>fabody3) && (fabody0>fabody4) && (fabody0>fabody5) && (fabody0>fabody6) &&(Volume[i]>Volume[i+1]))
      {  
         if (((Close[i]>Open[i])&&(Low[i]+(High[i]-Low[i])/2>Low[i+1]+(High[i+1]-Low[i+1])*0.9))||((Close[i]<Open[i])&&(Low[i]+(High[i]-Low[i])/2<Low[i+1]+(High[i+1]-Low[i+1])*0.1)))
         ExtMapBuffer1[i]=(iHigh(Symbol(),0,i)+iLow(Symbol(),0,i))/2;
      }
     }
//----
   return(0);
  }
 
Gevorg Hakobyan:
The other part of the code would then show an error: "error:unknown symbol".
Do you check in the tester on a different symbol?
 
Artyom Trishkin:
Check in the tester on a different character?
Tried on three different symbols. (USDCHF, EURNZD, GBPNZD).
 
Gevorg Hakobyan:
Tried it on three different symbols. (USDCHF, EURNZD, GBPNZD).

In the tester on a different symbol? Or in demo/real on another symbol? Or in the tester on this symbol? Or on demo/real on this symbol?

Why do you have to pull everything out of you?

Reason: