Yes. I realizenow thatI suggesteddoes not workifthe highestvalue is touchedline[0]. So you have to found an other way in this case, for example use ArrayMaximum().
angevoyageur: Yes. I realizenow thatI suggesteddoes not workifthe highestvalue is touchedline[0]. So you have to found an other way in this case, for example use ArrayMaximum().
Hi Ange,
I tried do my best, but I think this is a bit more complicated...i wrote this and don't work, any suggestion? thanks
int index_max;
for(int i=0;i<10;i++)
{
if(touchedline[i]>temp)
{
index_max=ArrayMaximum(touchedline[i],0,WHOLE_ARRAY); // maximum in High
temp=touchedline[i];
}
}
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.
Something like that ?
Only a solution among others.There is something wrong...I can use it only on tick data otherwise the previous highest is always =-1
But the main problem is that also on tick data sometime without reason the previous highest change to =-1
Thanks again for support
doc
There is something wrong...I can use it only on tick data otherwise the previous highest is always =-1
But the main problem is that also on tick data sometime without reason the previous highest change to =-1
Thanks again for support
doc
I can only help if you show the code you are using.
Is it enough this or you need the entire code?
Thanks Ange for the support...
doc
int touchedline[10]; int temp = 0; int valuearray = 0; touchedline[0]=emacross1_TouchTime; touchedline[1]=emacross2_TouchTime; touchedline[2]=emacross3_TouchTime; touchedline[3]=emacross4_TouchTime; touchedline[4]=emacross5_TouchTime; touchedline[5]=emacross6_TouchTime; touchedline[6]=emacross7_TouchTime; touchedline[7]=emacross8_TouchTime; touchedline[8]=emacross9_TouchTime; touchedline[9]=emacross10_TouchTime; int highest=-1, previoushighest=-1; for(int i=0;i<10;i++) { if(touchedline[i]>temp) { previoushighest=highest; highest=i; temp=touchedline[i]; } } Print("act_highest :",highest); Print("prv_highest :",previoushighest);Is it enough this or you need the entire code?
Thanks Ange for the support...
doc
Yes. I realize now that I suggested does not work if the highest value is touchedline[0]. So you have to found an other way in this case, for example use ArrayMaximum().
Hi Ange,
I tried do my best, but I think this is a bit more complicated...i wrote this and don't work, any suggestion? thanks
Hi Ange,
I tried do my best, but I think this is a bit more complicated...i wrote this and don't work, any suggestion? thanks
No time to test, and I don't pretend it's the best solution. But I think it should work.
I tried, but now previous and current give me the same result most of the time
Sorry I don't have time and trying to help in these condition is not a good idea. I am wasting your time.
Sorry I don't have time and trying to help in these condition is not a good idea. I am wasting your time.
Sorry but what did you mean with "these condition"?