[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 311

 
Alik577:
Please explain the function of the checkbox "allow function import from DLL" in EA settings. What is aDLL and what does it do.


A .dll is an extension of a file with a piece of program code.

If you ask questions like this, don't worry about it just yet.

 
GarKain:
Hd... we don't read textbooks, we all learn by doing)))


I can say that I haven't read the textbook, but I haven't asked any questions either.

If there are questions and there is a source to solve the problem, you are probably in the wrong place. You need to go back to kindergarten. You didn't get the hang of it.

 
Vinin:


I can tell you that I haven't read the textbook, but I haven't asked any questions either.

If there are questions and there is a source to solve the problem, you are probably in the wrong place. You need to go back to kindergarten. You didn't get the hang of it.

I did not say that I do not read anything as a matter of principle. If the link helps me, the question is no longer an issue. A question and a source are not enough to solve a problem, you need to know what to look for in the source.
 
Vinin:

It is always left to right and does not depend on results of input expressions. It is always checked to the end.

In this context I would like to add that if there is a need to use conditions of the if (a>b && c>d) kind...

To speed up execution, use the following way: if (a>b) if (c>d), then...

Because if it turns out that a<b, execution will immediately jump to the next if (a>b) if (c>d) operator, but it will not fully compare expressions in brackets, i.e. it will not check c>d as in the first case.

 
GarKain:
I didn't say that I don't read anything. If the link helps me, the question is no longer an issue. A question and a source are not enough to solve a problem, you also need to know what to look for in the source.

Read the MQL5 forum - people there correctly recommend reading ALL the articles to understand the basics of the language.

In any case, you need to know (read) the base in the form of the tutorial and the docs BEFORE you ask questions.


 
Roman.:


It's OK. Gerchik on YouTube, look and listen: "30% of the market - already higher than the roof ..." - like this, but the conversation is mainly with GEPs from a million rubles and above ... I.e. from such sums, when you can already withdraw money and live on it. Like, what Soros has in different years on average 37% a year earlier and that's more than normal...

He and his team, by the way, are accepting management funds... from RUB 1 million, then he'll be interested in you. See. "The Hunt for Gerchik" on finam.fm. All the pieces.

In fact, in one of his latest "hunts" he said that even if a "newbie" takes more than the bank's interest per year from the market, he can be proud of himself that he "beat" the market and everything else... BUT, it's all about more/less serious derosits, from which 10,20,30% is also a serious amount ...

If the DEP is much smaller, he uses the term - "DEPOSIT DEVELOPMENT"!

i.e. from 1000% p.a. and above...

I agree with him.

 
MQL414:

If the MT4 tester is to be believed, two conditions are money and time. 20,000 roubles. 200,000 rubles and 2 million rubles.


It hurts... :-) familiar images. Post the expa code in this branch of the forum. They will look at it, test it and propose options after you optimize it...

 

Help me find a logical error in the code. When attached to a chart, the indicator does not draw a line, it writes an error "4002 - Array index - out of range".

//+------------------------------------------------------------------+
//|                                                  +OtherChart.mq4 |
//|                                                       silhouette |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "silhouette"
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Black
//+------------------------------------------------------------------+
extern string Smb="GBPUSD";
extern bool Candles=false;
extern bool Line=true;
//+------------------------------------------------------------------+
double Buffer_ind[];
double Buffer_OHLC[4][];
string Symb;
int init()
  {
   Symb=Symbol();
   
   SetIndexBuffer(0,Buffer_ind);
   SetIndexStyle(0,DRAW_LINE,EMPTY,1);
   
   return(0);
  }

int deinit()
  {

   return(0);
  }

int start()
  {
   int counted_bars=IndicatorCounted();
   int limit=Bars-counted_bars-1;
   if (limit>1) 
      limit=Bars-1;
   for(int i=limit; i>=0; i--)
    {
      Buffer_OHLC[1][i]=iOpen (Smb,Period(),i);
      Buffer_OHLC[2][i]=iHigh (Smb,Period(),i);
      Buffer_OHLC[3][i]=iLow  (Smb,Period(),i);
      Buffer_OHLC[4][i]=iClose(Smb,Period(),i);
      
      if(Line==true)
       {
        double Cls=Buffer_OHLC[4][i];
        Buffer_ind[i]=Cls; 
       }
    }
   Alert("Error: ", GetLastError());
   return(0);
  }
 
silhouette:

Help me find a logical error in the code. When attached to a chart, the indicator does not draw a line, it writes an error "4002 - Array index - out of range".


1. The Candles variable is not used anywhere.

2. The line

double Cls=Buffer_OHLC[4][i];

is not written correctly. It lies in the loop - at each iteration of the loop, you create a new variable Cls. And it is not needed there. It is enough to write

Buffer_ind[i]=Buffer_OHLC[4][i];
 

And try the line

double Buffer_OHLC[4][];

replace it with

double Buffer_OHLC[][];
Reason: