Errors, bugs, questions - page 834

 
marketeer:
Very much even appears. If a variable name of some class is entered and a dot is put (dereferencing operator), a list with available properties of that object is shown. If there are errors in the code, it may not show up. Also if the input context involves an expression of a particular type, such as an integer, only integer properties will be shown in the list. When found in a class method, the properties of the class are also shown in the list of names at the beginning of the input.

int Var=5;//I'm talking about the hint, which is in the comments, when selecting an option from the "list of names"!

but only if Var is declared in the class

If globally, it displays....

 

How do I write an EA without handles for indices like

int MACD;

//+-----------------------------------+

void OnInit()

{

MACD=iMACD(NULL,0,Fast,Slow,Sign,PRICE_CLOSE);

}

//+-----------------------------------+

void OnTick()

{

static bool UpSignal,DnSignal;

if(TradeSignalCounter(UpSignal,DnSignal)) TradePerformer(UpSignal,DnSignal);

}

//+-----------------------------------+

bool TradeSignalCounter(bool &UpSignal,bool &DnSignal)

{

if(Bars(_Symbol,0)<100) return(false);

static int Recount;

if(IsNewBar() || Recount)

{

double Ind[2],Sig[3];

DnSignal=false;

UpSignal=false;

Recount=false;

if(CopyBuffer(MACD,0,1,2,Ind)<0) Recount=true;

if(CopyBuffer(MACD,1,1,3,Sig)<0) Recount=true;

if(Recount==true) return(false);

if(Ind[0]>0 && Ind[1]<0) DnSignal=true;

if(Ind[0]<0 && Ind[1]>0) UpSignal=true;

if(Ind[1]<0 && Sig[0]<Sig[1] && Sig[1]>Sig[2]) DnSignal=true;

if(Ind[1]>0 && Sig[0]>Sig[1] && Sig[1]<Sig[2]) UpSignal=true;

return(true);

}

return(false);

}

 

How do I add a branch to ignore?

There's a thread called Pure Maths, Physics etc.: brainteasers that have nothing to do with trading.

It very often appears unread although no one writes messages, apparently one of the smart guys makes a minor change in his message so that the thread was at the top - I am sick of this nonsense. I am sick of this nonsense. They should write on the topic, but they are trashing school kids.

 
Zeleniy:

How do I add a branch to ignore?

There is a thread on pure maths, physics etc.: brainteasers that have nothing to do with trading.

In the morning, as a rule, the sun appears in the top, it often appears unread even though no one writes messages, apparently one of the smart guys makes a minor change in his message so that the thread was at the top - I'm sick of this nonsense. I am sick of this nonsense. They should write on the topic, but they are trashing school kids.

Very simple -- don't read it.

--

If they're trying to tell the administration or moderators how to run their lives, they're pretty much doomed to extinction.

In short, I wouldn't advise you to become such an imbecile. I advise you to be modest until you have gained experience and understanding.

Yeah. Don't try to interpret that note as a threat, even if it's tempting, it's a misinterpretation. It's just simple advice. It's more or less friendly.

 
MetaDriver:

Very simple - don't read it.

--

If they're trying to tell the administration or moderators how to run their lives, they're pretty much doomed to extinction.

In short, I wouldn't advise becoming such an imbecile. I'd advise being humble until you're experienced and sensible.

Yeah. Don't interpret that note as a threat, even if it's tempting - that's a misinterpretation. It's just advice. More or less friendly.

I can not read - I have a psychology of that, all such empty and meaningless posts like this light up my room, so I have to read them involuntarily in order to reduce the glow.
 
pronych:

int Var=5;//I'm talking about the hint, which is in the comments, when selecting an option from the "list of names"!

but only if Var is declared in the class

If globally, it outputs....

If we're talking about input variables, they can't be declared inside the class. The question is not clear. As for inputs, the output of comments as tooltips in UI seems to work, but is made terribly inconveniently, I suggested to do differently, but here all with a mustache.
 

Why is it that the number of records in the optimization results shown in the tester's log and in the OnTesterPass function may be different? The situation is as follows. I run optimization with a forward period and show in the log that 4618 records are made in the back period, while 1154 records are made in the forward period, which makes the total of 5772. The OnTesterPass function is spinning the counter:

while(FrameNext(pass, name, id, value, data))
{
  fpasscount++;
}

Then fpasscount is output to the terminal log. There is a value of 5742. Question is where did 30 records disappear to? There is a clarification - all missing records from forward.

 
Zeleniy:
I can't not read - my psychology is such that all such empty and meaningless posts as these light up my room, so I have to read them involuntarily in order to reduce the glow.

Poor guy. Well, see a psychiatrist, complain about photophobia.

// Sorry, no more free advice from me. Get your own way, it's time to grow up.
 
marketeer:
If we are talking about input variables, they cannot be declared inside the class. The question is not clear. As for inputs, outputting comments as hints in UI seems to work, but is made terribly inconvenient.

Oh, for fuck's sake!...

int varBase=5;//VarBase-переменная объявлена глобально
//| Class                                                            |
//+------------------------------------------------------------------+
class CName
  {
   public:
   int varClass;//VarClass-переменная объявлена в классе
  };
CName Name;

  int OnInit()
  {
//---
   var

   Name.var
//---
   return(0);
  }

Copy the code into a new project

1. in OnInit() put your cursor just after the first var and press Ctrl+Space

2. repeat the same with the second var

Do you feel the difference?

 
mql5:
Yes, mql there is a C++ inconsistency when returning an object from a function. A fix is planned, the behaviour will be like in C++.
The fix will be released in the next update.
Reason: