try without
if (SymbolInfoInteger(crtsymbol,SYMBOL_TRADE_CALC_MODE)==SYMBOL_CALC_MODE_FOREX&&StringLen(crtsymbol)>=6)
try without
If I try without that, It will serve the stocks to the procedure that has to make a list of currencies (in the original EA), and the point is to have only forex. Another condition might check if the first character is "#" , but that's unprofessional too, because at some point in future there might be futures or something else lacking the "#" in the front. SYMBOL_TRADE_CALC_MODE is a real smart thing, and I really think that opening a defective pair (like EURRUR or USDRUR) is making the error to appear. You can't put the condition to not work with the RUR, because at the time it gets in the condition it already opens it for working and blows up.
We are working on it.
Just wait for a while.
We are working on it.
Just wait for a while.
Four years later...
I got the same error:
Symbols no prices for symbol USDBRL
And I found out why!
Seems like historic data before 2010.09.07 was broken for USDBRL.
Who would've thought eh!
And Five years on …
after spending way too much time trying to find the problem with the code, trying to find why 'no prices for symbol'
changed base currency from AUD to USD and no problem
Hope this helps save someone some hours :p
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey dudes,
This is a limited edition guide on How to get "No prices" on MetaTrader5.
The support didn't answer again to my ticket, so I decided to post my guide.
1. Make sure you have all symbols activated: right click in Market Watch, then point to "Show all".
2. Make an EA with the following code:
3. Then put the EA to work on a currency of choice: I made it on EURUSD, M1, last month testing.
At the first run, with GenerateError set to false, you'll get stuff like:
2010.08.26 16:38:39 Core 1 2010.08.02 07:22:03 Tickvalue of AUDCHF is 0.9617141593175679
2010.08.26 16:38:39 Core 1 2010.08.02 07:22:03 Tickvalue of AUDCAD is 0.9740322989110321
2010.08.26 16:38:39 Core 1 2010.08.02 07:22:03 Tickvalue of AUDNZD is 0.7283900000000001
2010.08.26 16:38:39 Core 1 2010.08.02 07:22:03 Tickvalue of AUDUSD is 1
2010.08.26 16:38:39 Core 1 2010.08.02 07:22:03 Tickvalue of USDCAD is 0.9740322989110321
2010.08.26 16:38:39 Core 1 2010.08.02 07:22:03 Tickvalue of USDJPY is 1.155641843479869
We have no goddamn error!
4. Switch the GenerateError value to true and test again:
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of EURUSD is 1
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of EURRUR is 0
2010.08.26 16:40:52 Core 1 no prices for symbol USDRUR
2010.08.26 16:40:52 Core 1 no prices for symbol USDRUR
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of EURNZD is 0
2010.08.26 16:40:52 Core 1 no prices for symbol NZDUSD
2010.08.26 16:40:52 Core 1 no prices for symbol NZDUSD
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of EURJPY is 0
2010.08.26 16:40:52 Core 1 no prices for symbol USDJPY
2010.08.26 16:40:52 Core 1 no prices for symbol USDJPY
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of EURGBP is 0
2010.08.26 16:40:52 Core 1 no prices for symbol GBPUSD
2010.08.26 16:40:52 Core 1 no prices for symbol GBPUSD
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of EURCHF is 0
2010.08.26 16:40:52 Core 1 no prices for symbol USDCHF
2010.08.26 16:40:52 Core 1 no prices for symbol USDCHF
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of EURCAD is 0
2010.08.26 16:40:52 Core 1 no prices for symbol USDCAD
2010.08.26 16:40:52 Core 1 no prices for symbol USDCAD
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of EURAUD is 0
2010.08.26 16:40:52 Core 1 no prices for symbol AUDUSD
2010.08.26 16:40:52 Core 1 no prices for symbol AUDUSD
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of CHFJPY is 0
2010.08.26 16:40:52 Core 1 no prices for symbol USDJPY
2010.08.26 16:40:52 Core 1 no prices for symbol USDJPY
2010.08.26 16:40:52 Core 1 2010.08.02 01:12:30 Tickvalue of CADCHF is 0
Here it goes! Your handmade "No prices" error! Cheers!