How to get the price of a symbol?
Check the the documentation! Look at MarketInfo() function.
Print("the current bid price is ",MarketInfo("Symbol",MODE_ASK));
I keep getting a return of 0 on strategy tester?
See Testing Features and Limits in MetaTrader 4
Using of MarketInfo function generates error ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE(4059), however, correct information about current prices for the symbol under test, about stop level dimensions, about point size, about spread size of any symbol being present in the quotes window is provided.
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