Improperly formatted code edited by moderator. Please always use the CODE button (Alt-S) when inserting code.
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
Hi,
I am new in mt5. i am confused about the price used in back test. something very simple as below. i hope someone can confirm my understanding
1) when i run the back test, the bar period using is set in the Strategy Tester pop up, say 1H bar. so the back test bar will use 1H for historical data and live data still using per tick data when new tick come in, am i correct?
2)let's say i am using 1H period and there is a new buy trade in 1800pm bar at open. if i use the "ask" in trade.Buy as buy price. is it the best ask price at 1800pm? so it will automatically help me to search the database and find the best ask price at this time point? because i found that many buy prices are slightly higher than the open price on the hour bars. don't know if i am correct.
3) what if i want the buy price set as the open price of this bar? how can i modify the code above? because when we do longer back test, we may need to manually import data, so we can only use the open price (hard to find tick data) data).
appreciate if anyone can help. thanks!