[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 448

 
fore-x:

Can you tell me please, #property stacksize 3 - what does it mean, I declare 0 or 1000, or -1000, but the result does not change?


Example code, if you can, for understanding.

What is the result?
 
Vinin:

What's the result?

 Alert("Итог = ",x);
 
fore-x:


This is not the result
 
Vinin:

It's not a result.
That's what I'm asking, what's in it for -
#property stacksize X

- expect it to, I don't understand how it works, why is it needed at all?

I've poked and prodded, it's no use.

 
It's very simple :))) F1 in ME:

stacksize int stack size


or - https://docs.mql4.com/ru/basis/preprosessor/compilation

stacksize int stack size for recursive calls

By the way, there's also a list of about twenty Special Parameters, no questions about them long ago?

P.S. My point is that if you use help and rightly formulate a question (like, why do we need this stack at all?), then you won't even need an answer. Especially if you google the technical literature on the way...

 
n-i-k:
It's very simple :))) F1 in ME:

stacksize int stack size


or - https://docs.mql4.com/ru/basis/preprosessor/compilation

stacksize int stack size for recursive calls

By the way, there's also a list of about twenty Special Parameters, no questions about them long ago?

P.S. My point is that if you use help and rightly formulate a question (like, why do we need this stack at all?), then you won't even need an answer. Especially if you google the technical literature on the way...

I'll let it go, since you (the pros) don't even use it yourself. But it's a good example, I wouldn't mind using this exotic gizmo.
 

Now this question - using fractals, how to compare the previous fractal with a newly formed one (e.g. lower ones)? (I just described the condition of occurrence through iHigh, iLow through counters, without using the function itself).

Here's a piece of code:

if (iLow(NULL,0,5) >= iLow(NULL,0,4) && iLow(NULL,0,4) >= iLow(NULL,0,3) && //фрактал вниз (обнаружение)
iLow(NULL,0,3) < iLow(NULL,0,2) && iLow(NULL,0,2) <= iLow(NULL,0,1) ) {
if (z == 0){
f1= iLow(NULL,0,3); // присваиваем переменной значение фрактала
z=1;}
else
if (z == 1) {
if (f1 > iLow(NULL,0,3)) { // сравниваем новый фрактал с предыдущим, если предыдущий больше, тогда переменной присваевается значение нового фрактала

f1=iLow(NULL,0,3);

z=0;}

else if (f1 < iLow(NULL,0,3)) {OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet);} // если новый фрактал больше предыдущего закрываем сделку

}

}

It closes if the newly formed fractal is higher than the previous one...

But it closes just after the fractal appears.

PS... Well, I must have made a mistake somewhere with describing a fractal... (I just put a standard fractal from the terminal on top...)

 
DOCTORS:

Now this question - using fractals, how to compare the previous fractal with the newly formed one (e.g. lower ones)? (I just described the condition of occurrence through iHigh, iLow through counters, without using the function itself).

Here's a piece of code:

.........................................................

It closes if the newly formed fractal is higher than the previous one...

But it closes just after the fractal appears.

PS... Well, I must have made a mistake somewhere with describing a fractal... (I just put a standard fractal from the terminal on top...)


So look for fractals by iFractals (); Otherwise, you're looking for extremes...
 
artmedia70:
Well, then look for fractals by iFractals (); Otherwise you're looking for extremes...


And a line for an example?

The forum is slowing down, I get it all, let's just say I'm not looking for easy ways :(

 
DOCTORS:

And a line for example?

1. Find the fractal closest to the zero bar, store its time and price level in int and double variables

2. With each tick, look for the fractal closest to the zero bar. If its time is not equal to the time of the fractal found in point 1, then ...

2.1 Check its price level.

2.1.1 If it is lower than the fractal level... one action

2.1.2 If it is above the stored fractal level, .... another action

2.2 Write the time of this fractal and its level into variables from step 1(int and double)

3. Go back to step 2.