STOCH CROSS INDI HELP
Can somebody please assist me as I'm trying to understand how to correct the following.
I'm learning MQL4 and have the following 2 issues I don't understand.
#1:
In the attached example I want to put the indicator on an M5 chart, and it draws arrows when the M5 Stochs cross, BUT...the H1 Stochs must also be moving upwards. What I'm getting is the arrows but only ON the hour, while there has been many times within the hour that it didn't create an arrow. I want it to draw an arrow if M5 Stochs cross and even tho the H1 Stochs might not have closed yet take that into consideration for that moment and use the data on the H1 "0 bar".
#2:
Then another thing I picked up was that when changed the previous H1 Stochs from "i-1" to "i-2", it gives an arrow and then directly afterwards another arrow. It's not an Array-out-of-range issue but why is it doing this?
Appreciate the help.
Can somebody please assist me as I'm trying to understand how to correct the following.
I'm learning MQL4 and have the following 2 issues I don't understand.
#1:
In the attached example I want to put the indicator on an M5 chart, and it draws arrows when the M5 Stochs cross, BUT...the H1 Stochs must also be moving upwards. What I'm getting is the arrows but only ON the hour, while there has been many times within the hour that it didn't create an arrow. I want it to draw an arrow if M5 Stochs cross and even tho the H1 Stochs might not have closed yet take that into consideration for that moment and use the data on the H1 "0 bar".
#2:
Then another thing I picked up was that when changed the previous H1 Stochs from "i-1" to "i-2", it gives an arrow and then directly afterwards another arrow. It's not an Array-out-of-range issue but why is it doing this?
Appreciate the help.
Attached File(s)
MTFStochTest.mq4
3 KB
|
167 downloads
|
Uploaded Aug 9, 2018 4:22pm