[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 175

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
No, from the one the variable i had before the cycle. Write
is identical to
int cnt,i;
Now I get it. Thank you. I was looking... there was no reference point. Now it's 0.
Hmm. Well, for example, index is passed as 1. Let's look at this piece of code:
immediately on arrival it will be:cnt = 0, i = index + g_center - 1 = 1(index value) +2(g_centervalue) - 1 = 2
But according to the loop's condition, it will continue until i equals 0. How will this happen?
The condition says that if i has a value from 2(if index = 1), to i >= 0 andcnt has a value from 0, tocnt < g_center, then the nested conditions are fulfilled.
It turns out that if the variable here is 1, then we will only have 1 iteration in the loop, right?
Explain the concept of "limited to 0 bar"
In other words I need to draw a line (not a ray) through 2 fractals, but it should end on 0 bar
The algorithm is as follows:
1. Let the fractal coordinates be (i1; p1) and (i2; p2), where i1<i2 (i.e. the 1st fractal is closer to 0 bar than the 2nd)
2. Equation of the line passing through these fractals p = (p1-p2)/(i1-i2) * i + (p2*i1 - p1*i2)/(i1-i2)
3. Hence, we need to draw a segment with the following end coordinates: (0; (p2*i1 - p1*i2)/(i1-i2)) and (i2;p2)
4. ObjectCreate(...)
5. ???
6. Profit!!!
It should work on the first tick of the new day.
Thanks for the response! True, it never worked until I inserted at the beginning of the indicator start
if(Hour() == 0 && Minute() == 0 && Seconds() == 0) { DeleteObject() etc.
}
if(Hour() >= 0 && Minute() >= 0 && Seconds() >= 1) { indicator code ...
Recently it doesn't work with this one either! I don't know what to do. What can you advise? Thank you!
Just managed to write it now, I'm working for a living on Saturday.
Yes Boris, that's very good, by the way! Thank you very much. That's what I wanted. I twisted it... I twisted it... I didn't get it right. I haven't had much experience yet, and my brain isn't thinking like a pro. It's a bit of a dead end, isn't it? :(
I didn't want to ask right away, but I had to. Because I couldn't make the cut myself.
Now I get it. Thank you. I was looking... there was no point of reference. Now it's 0.
Hmm. Well, for example, index is passed as 1. Let's look at this piece of code:
immediately on arrival it will be:cnt = 0, i = index + g_center - 1 = 1(index value) +2(g_centervalue) - 1 = 2
But according to the loop's condition, it will continue until i equals 0. How will this happen?
The condition says that if i has a value from 2(if index = 1), to i >= 0 andcnt has a value from 0, tocnt < g_center, then the nested conditions are fulfilled.
It turns out that if the variable here is 1, we will have only 1 iteration in the loop, right?
The loop terminates when the condition written in the second place of for() operator is no longer satisfied, i.e. in this case, when i becomes less than 0, or when cnt becomes greater than or equal to g_center. Both variables have initial values assigned before the loop and change during its execution: the variable i as a result of i-- (the third part of the for statement, it is executed every time the loop reaches the closing bracket }) and the variable cnt as a result of cnt++.
Hi.
Trying to export to html my trade from my demo account. (Alpari, latest build). I press save as report, a folder selection window opens, I press save, nothing happens. Is it the same for demo accounts? One more thing, my MT4 is installed on my desktop. Does it matter?
Who knows, is it possible by making Hour(), Minute() and Seconds() global variables, to control the change of DailyPivotPoints indicator to the new PP levels and other lines from the EA at midnight (0.00)? I used to do it directly in the indicator with Hour(), Minute(), Seconds(), and it worked without having to compile every night. But recently it stopped changing itself, maybe from changing the bild? Thanks!
I think this is the most correct way, even though it's primitive!:) Why not implement this as a new bar function? You need it to be recalculated once a day, i.e. starting from 0.00 o'clock. So we do it simply. In the start of course:
The loop ends when the condition written in the second place of for() operator is no longer satisfied, i.e. in this case, when i becomes less than 0 or when cnt becomes greater than or equal to g_center.
But it's not either, it's AND. The && sign is there, too.
I understand all that. But the point here is this:
Variableindex in general by code has value Bar - IndicatorCounted()
I.e. it is 1 on the current bar and 2 on the new one.
It enters the IsUpFractal() function with the value either 1 or 1 if the bar is not yet new, right?
So, the i variable will have a fixed value since the input parameter index is also fixed. So the loop will always break after the first iteration. What's the point of the loop then?
Can you please tell me why it's not showing...