Hi coders, I'm a beginner to learn coding and seeking for your kind help.
There are 2 scripts attached here and you just test them on your chart, the output will pop up. I'm asking for your help on the Array2 script :-
1) "Array1-Use AvLL+HHLL Scpt.mq4"
This Array1 script's SymFr[] output is absolutely 100% correct and is using 2 buffers (AvLL[] and HHLL[]) to get the answers. Therefore it involves 2 loops to achieve my final mission (to get the SymFr[] output).
2) "Array2-No AvLL+HHLL Scpt.mq4"
This Array2 script is not using the the 2 AvLL[] and HHLL[] buffers but were replaced by 2 variables (double AvLL=0, HHLL=0) to get the SymFr[] output, but the SymFr[] output is incorrect (the way I structured the codes was incorrect). It involves combining the 2 loops above (Array1 script) into only 1 single loop to achieve my mission.
Could you please help to correct my Array2 script whether is it possible to use 2 variables to replace the 2 buffers ?
Notes to coders : please do not care about the purposes of the AvLL and HHLL as both scripts' formulas are exactly the same to get the AvLL and HHLL output. My questions and issues are just on the coding aspect whether is there a way to use 2 variables instead of 2 buffers to achieve my final mission i.e. I only need to run 1 single loop to get the correct SymFr[] output in Array2 script, thank you.
There are 2 scripts attached here and you just test them on your chart, the output will pop up. I'm asking for your help on the Array2 script :-
1) "Array1-Use AvLL+HHLL Scpt.mq4"
This Array1 script's SymFr[] output is absolutely 100% correct and is using 2 buffers (AvLL[] and HHLL[]) to get the answers. Therefore it involves 2 loops to achieve my final mission (to get the SymFr[] output).
2) "Array2-No AvLL+HHLL Scpt.mq4"
This Array2 script is not using the the 2 AvLL[] and HHLL[] buffers but were replaced by 2 variables (double AvLL=0, HHLL=0) to get the SymFr[] output, but the SymFr[] output is incorrect (the way I structured the codes was incorrect). It involves combining the 2 loops above (Array1 script) into only 1 single loop to achieve my mission.
Could you please help to correct my Array2 script whether is it possible to use 2 variables to replace the 2 buffers ?
Notes to coders : please do not care about the purposes of the AvLL and HHLL as both scripts' formulas are exactly the same to get the AvLL and HHLL output. My questions and issues are just on the coding aspect whether is there a way to use 2 variables instead of 2 buffers to achieve my final mission i.e. I only need to run 1 single loop to get the correct SymFr[] output in Array2 script, thank you.
Attached File(s)
Array1-Use AvLL+HHLL Scpt.mq4
6 KB
|
41 downloads
Array2-No AvLL+HHLL Scpt.mq4
5 KB
|
41 downloads