Errors, bugs, questions - page 419

 
Im_hungry:

Good night, I was wondering if in this code

after checking B>spred, which is "FALSE", the rest of the values are checked

It increases the test running time, so I have to modify the code in the following way

And the most time consuming in terms of calculations ( proverka() - copying of buffer values of an indicator)

I put it last but it does not check the last one. I wonder.

Why?

Or it does not check the last one:

Try it this way

if((B >= spred) && (IND && proverka()))
{
//Processing...
}
 
Interesting:

Try this

Sory - I've under-checked it, it works in all sorts of ways,
 

Now I'm wondering why in the EA, the indicator is eating up all the RAM and more,

and separately working from the Expert Advisor, it does not.

it may be that the indicator is not deleted or something else but it is called on every new bar,

and we get less and less RAM with every bar (

 bytes not available

). Why? Yes good night !

 
Renat:
Please give me the code.
Renat if the question is for me, I just created a blank EA and ran it. it must be UAC related since I have all files stored here C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\88B20A762CA848D878978288235C7B072A6 and the visualizer tries to get data from the direct directory.
 
Im_hungry:

Now I'm wondering why in the EA, the indicator is eating up all the RAM and more,

and separately working from the Expert Advisor, it does not.

it may be that the indicator is not deleted or something else but it is called on every new bar,

and less and less RAM with every bar (

). Why? Yes goodnight !


The example in the studio please (at least as a sketch of an idea), or to developers but all in one piece. By the way, what does it mean "is called on every tick"?

The idea is that it must be called once, at the initialization block. In case of an attempt to bypass an initialisation error, you can still call it in a timer or on a new tick(but only if the handle is disabled).

In all other places it is only reasonable to get a certain portion of data (while controlling the handicap of course).

 
sergey1294:
Renat if the question is for me, I just created a blank EA and ran it. probably this is related to UAC as I have all files stored here C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\88B20A762CA848D878978288235C7B072A6 and the renderer tries to pull data from the direct directory.
So let's exclude the UAC from the vazooms with portability... :)
 
Interesting:
So let's exclude UAC from the vazooms with portability... :)
If I start the terminal now with this switch will it always start with it or should I start the terminal from the command line every time?
 
Interesting:

Studio example please (at least as an idea outline), or to the developers, but the whole thing. By the way, what does "called on every tick" mean?

The idea is that it must be called once, at the initialization block. In case of an attempt to bypass an initialization error, it can still be in a timer or on a new tick(but only if the handle is disabled).

In all other places it is reasonable only to get a certain portion of data (with handicap control of course).

This is used to check if the buffers were copied (successfully or not)

bool proverka()
{
  ArraySetAsSeries(Buf,true);
  handle=iCustom(NULL,0,"V",Symbol_1,Symbol_2,Depth,ExpKoef,DateStart);
  ResetLastError();
  int copied=CopyBuffer(handle,0,1,1,Buf);
  if(copied<=0)
   {
    Sleep(50);
................

with this one we call the indicator on a new bar

handle=iCustom(NULL,0,"V",Symbol_1,Symbol_2,Depth,ExpKoef,DateStart);
And without it, we only get zero values !!!

And the memory gets smaller and smaller with every bar...

Why?

 
sergey1294:
If I start the terminal now with this key, will it run with it all the time, or should I start the terminal from the command line every time?

If you create a batch file and or correct the corresponding shortcut, then all the time. If I just run it from the command line, it's a one-time thing.

In my opinion, it is easier to create a copy of the shortcut with the appropriate name and command line.

 
Interesting:

If you create a batch file and or correct the corresponding shortcut, it's all the time. If also just run from the command line, then one time.

In my opinion, it is easier to create a copy of the shortcut with the appropriate name and command line.

how to do it properly
Reason: