ArrayCopyRates(mqlrates_usdcad_m1,SymbolPrefix+"AUDUSD"+SymbolSuffix,PERIOD_M1);
MT5 has no ArrayCopyRates. Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)- You don't have to use ACR at "every tick." Once it returns non-zero that pair/TF will always be up to date (assuming the array is global.) Check your return codes, sleep and loop in OnInit.
What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forumYou could also handle 4066/4073 errors yourself if you don't need the ACR.
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles if(iClose(Pair,PERIOD_M1,0)-iLow(Pair,PERIOD_M1,0)>=InvalidateLevel*MarketInfo(Pair,MODE_POINT))
We have no idea what Pair or InvalidateLevel is or what your chart is. Use the debugger or print out your variables, including _Symbol and find out why.- Using _Point means your code breaks if you ever put it on 4 digit brokers, exotics (e.g. USDZAR where spread is over 500 points,) and metals. Compute what a PIP is and use it, not points.
Correct it's mql4 code....
Oke sorry for that.......then I ask the question in the MQL4 section (I thought this was just general...)
anyway thanks for the answers so far.....
Correct it's mql4 code....
Oke sorry for that.......then I ask the question in the MQL4 section (I thought this was just general...)
anyway thanks for the answers so far.....
Don't create a new thread/topic now. That would be double posting. Continue here and let the Moderators move the thread if they decide to do that!
PS! Actually they did move the thread for you and I did not even notice!
Don't create a new thread/topic now. That would be double posting. Continue here and let the Moderators move the thread if they decide to do that!
PS! Actually they did move the thread for you and I did not even notice!
I do it very often, but it's unnoticeable, and I can't write a message each time.
I would just suggest "power" users to don't care and let the moderators some time to act. Most people are anyway posting anywhere, as it doesn't matter for the search engine.
I would just suggest "power" users to don't care and let the moderators some time to act.
*cough*whroeder1*cough*
What can I try to make this issue solved?
MqlRates usdcad[]; ArraySetAsSeries(usdcad,true); CopyRates("USDCAD",PERIOD_M1,0,Bars,usdcad);
if(usdcad[0].close - usdcad[0].low >=InvalidateLevel*MarketInfo(Pair,MODE_POINT))
- www.mql5.com
What's your problem? The topic hadn't yet been moved when I commented, and if nobody mentions it, how can the OP learn?
And has nothing to do with the OPs question.
What's your problem? The topic hadn't yet been moved when I commented, and if nobody mentions it, how can the OP learn?
And has nothing to do with the OPs question.
The problem is that your decorum is very rude on this forum. Often your responses aren't helpful and the essence of your posts scream, "YOU"RE WRONG!!!". You flat-out rub people the wrong way with your comments. I've said it to you before and I'm saying it again, it's better to not receive a response than have someone rudely play mql-cop... and the time I checked you aren't a mod.
Regarding OPs issues, "Now I have an issue which I only can explain if the iClose an or iLow is not uptodate"
Use rate structs instead.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
My EA is handling different instruments (eg. EURUSD and USDCAD and AUDUSD...) and within my EA I also use H1 and M1 periode.
To be sure to have the latest possible values into the history I already use arraycopy rates at every tick for every instrument and used periods (M1and H1)
For usdcad M1 I use the code below:
Well then I thought my history info is most uptodate with that.
Somewhere in my code I use:
Now I have an issue which I only can explain if the iClose an or iLow is not uptodate
I also can't reproduce the issue in the tester (it works perfect)
Am I correct that with the ArrayCopyRates I also update the iLow and iClose
Am I correct that if iClose is uptodate that also iLow must be uptodate or isn't that in sync downloaded.
What can I try to make this issue solved?