Hi all
Im backtesting GBPUSD but with data from EURUSD
I get the correct value from double high_1 && double low_1
But the double high && double low i will get the open price on current bar not the high and the low? What am i doing wrong?
It tells you here: Testing Features and Limits in MetaTrader 4
"Zero bar of another timeframe for the same symbol under test is modeled approximately
Open = correct Open, Close = correct Close, Low = min (Open,Close), High = max (Open,Close), Volume = final Volume (false)"
Great thanx.
But if i trade with the EA Live, i do not use
*Low = min (Open,Close), High = max (Open,Close)
Correct??
Great thanx.
But if i trade with the EA Live, i do not use
*Low = min (Open,Close), High = max (Open,Close)
Correct??
your chart pair is modeled (bar zero) is the current price. You are assuming that the other chart is also. It's not. (tested on build 445)
You have to find the correct shift [iBarShift(otherPair,otherTF, Time[0])].
The other pair is also constrained by max Bars in chart. Make sure you have enough bars to cover your tester start date.
No longer true. There's a post 6 months back where someone tested it. Current symbol is now fine.
Now you mention it . . . I do recall it, the OP would seem to disagree. Perhaps I should find out for myself . . .
This thread: https://www.mql5.com/en/forum/142100
I was looking for a URL on the problem, (I hadn't saved any.) Found it: I posted a comment at the bottom of the article, with two links: Is no longer correct, per Tester in the Terminal MetaTrader 4: It Should Be Known - MQL4 Articles and in EA testing The "someone tested it" was me! LOL
No longer true. There's a post 6 months back where someone tested it. OHLC, Current symbol, PERIOD_D1, bar 0 was correct.
your chart pair is modeled (bar zero) is the current price. You are assuming that the other chart is also. It's not. (tested on build 445)
You have to find the correct shift [iBarShift(otherPair,otherTF, Time[0])].
The other pair is also constrained by max Bars in chart. Make sure you have enough bars to cover your tester start date.
Dosent work how shall i code to get the last high for different symbol in strategy tester
double high = iHigh("EURUSD", 60, 0); //Not correct i understand double high = iHigh("EURUSD", 60,iBarShift("EURUSD",60, Time[0]); // does not work
"Doesn't work" is a meaning less expression - there are no mind readers here.
Print out your variables, what is iBarShift, value what is iBars("EURUSD",60)
Dosent work how shall i code to get the last high for different symbol in strategy tester
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all
Im backtesting GBPUSD but with data from EURUSD
I get the correct value from double high_1 && double low_1
But the double high && double low i will get the open price on current bar not the high and the low? What am i doing wrong?