You are missing the point. A boolean is true or false. incrementing it makes no sense. If it is cloudy today, what does cloudy today plus one mean?
Infinite loop, "a" never changes inside the loop.
What does a price plus one mean?
Why are you looking at the same two elements inside the loop. That condition is constant.
"h" never changes inside the loop. Why are you assigning the same element multiple times
a = (dCurrent>High[i+1] && dCurrent>High[i-1]);
while(a) //i read this as while a is happening. However its always "happening" and true as a equals what i have said above
{
{
High_Array[h]=dCurrent;
}
if(High_Array[0]<High_Array[1])
{
testBUFFER[i]=dCurrent;
}
dCurrent++; // i was trying to add the high values to the array. Now understand that was rubbish
}
for(int h=0; h<0; h++) //Array start when nothing is in it, stop when less than 0 and add them up++
{
if (dCurrent>High[i+1] && dCurrent>High[i-1] //If new high has formed
High_Array[h]=High[i]; //Store the high in the High_Arrayif(High_Array[0]>High_Array[1]) //If the most recent high price stored is greater than the previous one stored
testBUFFER[h]=High[i]; //Print the test buffer on that high
}
OK, lost count at the attempts but hopefully i am getting there.
I now i have the code above and explained my reasoning. However it still isn't printing the buffer ha i don't know whether to laugh or cry
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
You are missing the point. A boolean is true or false. incrementing it makes no sense. If it is cloudy today, what does cloudy today plus one mean?
OK, lost count at the attempts but hopefully i am getting there.
I now i have the code above and explained my reasoning. However it still isn't printing the buffer ha i don't know whether to laugh or cry
Any more thoughts ?
i bet this concept is stupidly simple as well
Thanks again