Perhaps the first time you ran the Indicator your EURJPY and USDJPY data were out of date . . . then when you changed timeframe and back again the Indicator used the correct updated data. It's hard to know just from looking at the charts . . . you need to add some heavy debugging and be prepared to spend time investigating.
i try MarketInfo for true prices, but i can't carry it on buffer.,
is there any way like this ?
Buf_0[i]= MarketInfo("EURJPY",MODE_OPEN,i)
is it possible ?
yilmazkahya:
i try MarketInfo for true prices, but i can't carry it on buffer.,
is there any way like this ?
is it possible ?
No, it isn't. You have to make sure your data is up to date . . . and make sure it is out of date data causing your issue.
It's a common problem, do some reading: https://www.mql5.com/en/forum/148535
Search for 4066 sorted by date
Buf_0[i]= MarketInfo("EURJPY",MODE_OPEN,i)
RTFM market info only has TWO parameters.Buf_0[i]= (iOpen("EURJPY",PERIOD_M5,i) / iOpen("USDJPY",PERIOD_M5,i)) - iOpen ("EURUSD",PERIOD_M5,i); // Value of 0 buffer on i bar
You are assuming that your chart's bar "i" has the same timestamp as some other pair's M5 chart's "i". This is absolutely false in the tester and extremely likely with live history. Don't hard code periods, don't assume.
datetime now = Time[i]; int iEURJPY = iBarShift("EURJPY", 0, now), iUSDJPY = iBarShift("USDJPY", 0, now), iEURUSD = iBarShift("EURUSD", 0, now); Buf_0[i]= (iOpen("EURJPY",0,iEURJPY) / iOpen("USDJPY",0,iUSDJPY)) - iOpen ("EURUSD",0,iEURUSD); // Value of 0 buffer on i bar
thank u i will study these :)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
m5 chart is diffent at the same time ! when i changed it m15 and return m5 again, indicator results are diffent ? how can it be possible ??
RaptorUK please help :(
and codes..