[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 615

 
ToLik_SRGV:


Well, I wrote the same thing, only instead of a variable, I suggested using an array.

IS THERE ANY OTHER WAY TO DETERMINE WHETHER EQUITY IS INCREASING OR DECREASING?
 
sllawa3:
IS THERE ANY OTHER WAY TO DETERMINE WHETHER EQUITY IS INCREASING OR DECREASING ?

I would add to the above by adding smoothing in the form of a percentage change measurement.

Just on the last few bars.

I dabbled with it once - it works very well.

P.S. Capslock would be good to squeeze.

 
Swetten:

I would add to the above by adding smoothing in the form of a percentage change measurement.

Just on the last few bars.

I dabbled with it once - it works very well.

P.S. Capslock would be good to squeeze.

percentage change in what and in relation to what ?
 
sllawa3:
Percentage change in what and in relation to what ?

Percentage change in equity.

In relation to itself.

 
I mean the equity and balance ratio (because it is possible to decrease the distance between them in spite of the mutual increase or increase of one while the other decreases) ? And still, to compare the change it is necessary to create an array
 
sllawa3:
I mean the ratio of equity to balance (because it is possible to decrease the distance between them in spite of the mutual growth or growth of one while the other is falling) ? And still to compare the change we have to create an array

An array has to be created.

We only measure (measured) equity.

 
double equity;
int limit = 10; //depth in bars
for(int i=0;i<limit;i++)
{
equity=(AccountEquity(),i);

}

something like this (like with the turkeys) but how to write it down correctly... (because we had no school in our village...)

 

It's better this way

double эквити[];
int limit = 10; //глубинa в барах 
ArrayResize(эквити,limit);
for(int i=limit-1;i>=0;i--)
{
if(i!=0)эквити[i]=эквити[i-1];
else эквити=AccountEquity();

}
 
Roger:

That's better.

double эквити[];
int limit = 10; //глубинa в барах 
ArrayResize(эквити,limit);
for(int i=limit-1;i>=0;i--)
{
if(i!=0)эквити[i]=эквити[i-1];
else эквити=AccountEquity();

}

Something tells me there's a hitch... Of course, I am young in MQL (I started working in April this year) and I am not very good with arrays, but the current structure will fill the array at every tick, so the equity will be the same in every array element (the one that is available at the moment). I.e., the loop should check if a new bar opens and if it does, we should enter the equity value into a cell of the array addressed i. If a new bar has not opened, we would not need to enter anything into the next cell of the array addressed i -1, otherwise we would enter the current equity value there...
Correct me if I'm wrong...

 
artmedia70:

Something tells me there's a hitch... Of course, I am young in MQL (I started working in April this year) and I don't really deal with arrays, but the structure will fill the array at every tick, so, equity will be the same in every array element (the one that is available at the moment). I.e., the loop should check if a new bar opens and if it does, we should enter the equity value into a cell of the array addressed i. If a new bar has not opened, we would not need to enter anything into the next cell of the array addressed i -1, otherwise we would enter the current equity value there...
Correct me if I'm wrong...


I think I'm right... I have my doubts too...