Solved !!!
I got the highest volume last 24 candle by this code
Maxvolume = MathMax(MathMax(MathMax(MathMax(cd1,cd2),cd3),cd4),cd5)
Thanks for all help.
Solved !!!
I got the highest volume last 24 candle by this code
Maxvolume = MathMax(MathMax(MathMax(MathMax(cd1,cd2),cd3),cd4),cd5)
Thanks for all help.
I have got some error or I must do something wrong in this project
: https://fxdreema.com/shared/zXMCiR74b
I explaned my strategy in the project.
More informations is : when I got the highest Volume of last 23 candle (once a day) by Custom Code (this is DONE).
and then Find the candle ID that is equal to highest volume and then draw lines on that ID.
I have tried hard to make them find the highest volume candle ID. and stucked.
As below picture
the problem while testing (many times) is in the first 2-3 days or sometimes 4-5 days it does well !! like the 1st and 2nd picture below . And then after that "N" will be = 23 and never update in next next day also the Hori-line stop update like the last picture.
May be I did something wrong. Please tell me Thank you.



@jstap thank you and I tried to make this code for my condition but I can't ... By the way thank you so much




https://fxdreema.com/shared/tmlxIDGHc
More info : my condition is to draw line at High an Low of the Highest Volume candle yesturday. only one time a day when market Open .
@jstap Thank you
@jstap Thanks for your answer
the way you show me is to find the highest candle of 10 or more candle period back.
... but I want to find the highest "volume" candle of last 24 candle (Last Day...or last 24 hours) and OK I have found it.
My each 24 candles have their own tick volume into variables (such as c1 c2 c3 ....to c24)
I put the highest value of volume that I have got into the variable "MaxVolume" -------- > but I cannot find the candle ID (c1 c2 c3..... to c24) which one that have the MaxValue ?.
please help again.
I Have got the highest Volume Of last 24 candles and I put that volume in "MaxVolume" variable.
I tried to find the solution in this forum but i cannot found the exactly solution.
I want to find the candle ID that has the value of "MaxVolume"
It is very confusing to me. Please help 
οΈ
Solved !!!
I got the highest volume last 24 candle by this code
Maxvolume = MathMax(MathMax(MathMax(MathMax(cd1,cd2),cd3),cd4),cd5)
Thanks for all help.
Actually I just found this code.
https://docs.mql4.com/array/arraymaximum
I think this is what I want but I really don't know what I have to put in.
The code from the above link :
void OnStart()
{
//---
double num_array[15]={4,1,6,3,19,4,2,6,3,9,4,5,6,3,9};
int maxValueIdx=ArrayMaximum(num_array,WHOLE_ARRAY,0);
Print("Max value = ",num_array[maxValueIdx]," at index=",maxValueIdx);
}
I don't know which one is the Variable I have to Add.
For Example : "num_array" is a variable I have to add right??? " ArrayMaximum" in the above code is a variable? or just a code .
@l-andorrΓ thank you to let me know ... I will wait if someone could show me the code...
οΈ
For Example : I have 10 variables (with value in it) I want to find the highest value of these 10 variables.
I have used MathMax but it compares only between 2 variables.
Please help .